2009-02-03 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
2
3         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
4
5         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
6         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
7         them.
8
9         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
10         the live ranges of variables.
11
12         * mini.h (struct MonoMethodVar): Add two fields containing the live range
13         of the variable in terms of native offsets.
14
15 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
16
17         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
18         
19 2009-02-02  Mark Probst  <mark.probst@gmail.com>
20
21         Contributed under the terms of the MIT/X11 license by Steven
22         Munroe <munroesj@us.ibm.com>.
23
24         * exceptions-ppc.c (restore_regs_from_context): Correct operand
25         order (offset then base reg) for ppc_load_multiple_regs.
26         (emit_save_saved_regs) Correct operand order for
27         ppc_store_multiple_regs.
28         (mono_arch_get_call_filter): Correct operand order for
29         ppc_load_multiple_regs.
30
31         * mini-ppc.c (emit_memcpy): Fix operand order for
32         ppc_load_reg_update and ppc_store_reg_update.
33         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
34         (mono_arch_emit_epilog): Correct operand order for
35         ppc_load_multiple_regs.
36
37         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
38         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
39
40 2009-02-02  Mark Probst  <mark.probst@gmail.com>
41
42         * cpu-ppc64.md: Fixed storer4_memindex length.
43
44 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
45
46         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
47         line number info.
48         
49         * aot-compiler.c (emit_line_number_info): Optimize this.
50
51 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
52
53         * aot-compiler.c: Disassemble tokens in the IL disassembly.
54         
55         * aot-compiler.c: Add debug info for methods without debug info by
56         emitting an IL file and having the line number info referencing that file.
57
58         * aot-compiler.c: Optimize the size of the generated line number info.
59
60         * aot-compiler.c: Emit line number info in xdebug mode.
61
62         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
63         million arguments.
64
65 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
66
67         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
68
69         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
70         is used.
71
72 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
73
74         * basic-calls.cs: Test for the weird crash found on arm.
75         
76 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
77
78         * cpu-arm.md: Increase the size of storer8_membase_reg and
79         loadr8_membase_reg to 24 bytes to accomodate the extra add.
80
81         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
82         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
83         reg to LR otherwise we'll be loading/storing from just the offset.
84
85 2009-01-30  Miguel de Icaza  <miguel@novell.com>
86
87         Question: if we are storing gint32's inside the "*native_offset",
88         should we change the signature to "gint32 *native_offset" to
89         ensure that we do not have type definition problems?
90         
91         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
92         an int * as this is what the other function expects, causes
93         problems with Freescale's compiler that defined int32_t to be a
94         long and makes int incompatible 
95
96 2009-01-30  Miguel de Icaza  <miguel@novell.com>
97
98         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
99         filename conflict with bjam.
100
101 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
102
103         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
104         as it might use decomposed ops.
105
106 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
107
108         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
109
110         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
111         is defined.
112
113         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
114
115         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
116         offsets.
117
118         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
119         way registers are stored in MonoContext on arm.
120
121         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
122         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
123
124         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
125
126         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
127
128         * mini.c (mini_init): Register mono_isfinite.
129
130         * jit-icalls.c (mono_isfinite): New jit icall.
131
132         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
133         
134         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
135         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
136         the parent frame.
137
138 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
139
140         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
141         separate frame and stack pointers, so we must use FP to find the register
142         spill area.
143         The FP reg is retrieved from the MonoContext::regs array.
144
145 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
146
147         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
148         as FPA requires it.
149
150 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
151
152         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
153         return R4 and R8 when not running under softfloat.
154
155         Fixes basic-calls.exe
156
157 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
158
159         * mini-arm.c: Implement some overflow opcodes.
160
161 2009-01-29  Miguel de Icaza  <miguel@novell.com>
162
163         * ssa.c: handle another alloca.h
164
165         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
166         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
167         MONO_ARCH_USE_SIGACTION. 
168
169         * aot-runtime.c, mini-exceptions.c: Replace platform define with
170         capability defines.
171
172         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
173
174         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
175         PPC targets as sigaction does not exist on all platforms, define
176         this on a per-platform basis.
177
178         Instead of erroring out if the platform is not defined, include
179         mini-ppc-os.h, and expect that the OS specific setting provides
180         the required information.   
181
182 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
183
184         * aot-compiler.c: Fix --enable-minimal=aot.
185
186 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
187
188         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
189         previous change.
190
191 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
192
193         * exceptions-arm.c: Fix warnings.
194
195         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
196         ARM.
197
198         * mini-x86.c: Fix --enable-minimal=jit build.
199
200         * mini.c: Really fix --enable-minimal=jit build.
201         
202         * mini.c (construct_object_context_for_method): Move this outside
203         the DISABLE_JIT block to fix the --enable-minimal=jit build.
204
205         "Backported" of r124984 from 2.0 branch.
206         
207         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
208
209         "Backport" of r124977 + r124978 from 2.0 branch.
210         
211         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
212         to avoid calling mono_exception_from_token () from the throw trampoline.
213         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
214         for throwing corlib exceptions, this fixes full-aot support for corlib
215         exceptions.
216
217         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
218
219 2009-01-29  Miguel de Icaza  <miguel@novell.com>
220
221         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
222         part of the changes to split the code in mini into operating
223         system specific files.
224
225         This patch was done by copying mini.c to the respective files to
226         preserve SVN history.
227
228 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
229
230         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
231
232 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
233
234         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
235         remoting-invoke-with-check wrappers of shared methods.
236
237         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
238
239 2009-01-27  Mark Probst  <mark.probst@gmail.com>
240
241         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
242         optimization if the top of stack is the last instruction in the
243         bblock.  Otherwise it might have been used after its definition.
244         Fixes #469742.
245
246 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
247
248         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
249         method as well when get_vcall_slot () fails to match a code sequence.
250
251         * mini-arm.c: Fix the android build, which doesn't have
252         __aeabi_read_tp.
253
254 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
255
256         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
257         the s390x build.
258
259 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
260
261         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
262
263 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
264
265         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
266         and put its id into jinfo->used_regs. This is only used on amd64,
267         which is currently the only platform generating unwind info.
268
269         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
270         the dwarf unwinder. This is required to correctly handle async exceptions
271         like thread abort and stack overflows, which can happen while a method
272         is in the middle of its prolog or epilog.
273         
274         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
275         the unwind info belonging to an AOTed method.
276
277         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
278         into cfg->unwind_ops.
279         
280         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
281
282         * mini.c (mini_init): Call mono_unwind_init ().
283         (mini_cleanup): Call mono_unwind_cleanup ().
284
285         * unwind.c: Add functions for managing a set of unwind info entries, allowing
286         unwind info to be shared between methods.
287
288         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
289         saved in the LMF.
290
291         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
292         get_throw_pending_exception () to avoid initialization races.
293
294         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
295         mono_arch_exceptions_init () function.
296
297         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
298
299 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
300
301         * mini.c (mono_get_domain_intrinsic): New helper function.
302         (mono_get_thread_intrinsic): Ditto.
303
304         * mini-arm.c mini-ia64.c: Use the new helper functions.
305         
306         * method-to-ir.c (mono_method_to_ir): Fix the comment for
307         the last constrained_call change, since it is needed in the non-AOT
308         case as well.
309
310         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
311         
312         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
313         mono_get_lmf_addr () on arm eabi linux.
314
315 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
316
317         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
318         code sequence which matches a non-virtual call.
319
320 2009-01-23  Mark Probst  <mark.probst@gmail.com>
321
322         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
323         stack pointer (r1).
324
325 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
326
327         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
328         runtime-invoke wrappers, since they are also shared based on signature.
329
330 2009-01-22  Mark Probst  <mark.probst@gmail.com>
331
332         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
333         info from the (correct) context.
334
335 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
336
337         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
338         
339         * unwind.c (mono_unwind_frame): New function to unwind through a frame
340         using dwarf unwinding info. Not yet used.
341
342         * mini.c (mini_init): When using xdebug, disable freeing of domains.
343
344 2009-01-21  Mark Probst  <mark.probst@gmail.com>
345
346         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
347         descriptors.
348
349         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
350         special case and handle mono_arch_delegate_invoke_impl() returning
351         function descriptors.
352
353         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
354         trampolines return function descriptors, too.
355
356 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
357
358         * method-to-ir.c (handle_alloc): Avoid generic instances in the
359         out_of_line optimization.
360
361 2009-01-21  Martin Baulig  <martin@ximian.com>
362
363         * mini.h
364         (MonoCompile): Added `disable_deadce_vars' to disable removing
365         unused variables.
366
367         * mini.c
368         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
369         inside the debugger.
370
371         * liveness.c (mono_analyze_liveness): Don't remove any unused
372         variables if `cfg->disable_deadce_vars' is set.
373
374 2009-01-21  Mark Probst  <mark.probst@gmail.com>
375
376         * method-to-ir.c: Only apply exception constructor optimization if
377         the the method actually belongs to an exception class.  Fixes
378         #467456.
379
380 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
381
382         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
383         change inside a #ifdef __mono_ppc64__.
384
385         * aot-compiler.c (compile_method): Remove the previous limitation.
386
387         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
388         on type variables in AOTed code.
389         
390         * aot-compiler.c (compile_method): Skip generic methods having type 
391         constraints on their generic parameters.
392
393         * aot-compiler.c (compile_method): Check for methods which cannot be
394         encoded inside RGCTX_FETCH patches as well.
395
396         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
397         build.
398
399 2009-01-20  Mark Probst  <mark.probst@gmail.com>
400
401         * method-to-ir.c: Force the vtable variable in shared generic code
402         for the case that they might show up on a stack trace where they
403         are needed.
404
405         * mini-exceptions.c: Save and use generic sharing info as well as
406         IP in stack traces to resolve shared generic instantiations.
407
408 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
409
410         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
411         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
412
413 2009-01-20  Mark Probst  <mark.probst@gmail.com>
414
415         * method-to-ir.c: Do generic sharing for array constructors.
416
417 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
418
419         * mini-exceptions.c (mono_print_thread_dump): Add information
420         about the thread state using wapi_current_thread_desc.
421
422 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
423
424         * basic-simd.cs: Tests for the new constructors. 
425
426 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
427
428         * mini-ops.h: Added OP_EXPAND_*
429
430         * cpu-x86.md: Same.
431
432         * mini-x86.c (mono_arch_output_basic_block): Same.
433         
434         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
435
436 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
437
438         * iltests.il.in: Add a test for #467385.
439
440 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
441
442         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
443         thread been cleaned up is not the same currently in execution.
444
445         Fixes appdomain-unload crashes on windows, osx and linux variants
446         without the __thread keyword.
447
448 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
449
450         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
451         (koush@koushikdutta.com). Implement this for android.
452
453         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
454         begins with a digit.
455
456         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
457         mono_marshal_get_write_barrier ().
458
459 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
460
461         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
462         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
463         that pass them on a register pair.
464
465         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
466         test was crashing due to that.
467
468 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
469
470         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
471         trampoline code. Include ucontext.h only if available.
472
473 2009-01-15  Mark Probst  <mark.probst@gmail.com>
474
475         * mini.c: mono_domain_lookup_shared_generic() takes an open method
476         and doesn't check whether it's sharable, like it was before
477         removing the shared generics hash.  This brings IronPython
478         performance back to what it was before that change.
479
480 2009-01-14  Mark Probst  <mark.probst@gmail.com>
481
482         * method-to-ir.c: Handle delegate invocation optimization earlier,
483         otherwise it would be handled (much more slowly) by the
484         final/sealed optimization.
485
486 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
487
488         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
489         domain is not set. Fixes #465864.
490
491 2009-01-12  Mark Probst  <mark.probst@gmail.com>
492
493         * method-to-ir.c: Don't stop sharing of generic methods with catch
494         clauses - we already handle those.
495
496 2009-01-12  Mark Probst  <mark.probst@gmail.com>
497
498         * mini.c, mini.h: lookup_generic_method() is now
499         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
500         making the shared_generics_hash obsolete.
501
502 2009-01-12  Mark Probst  <mark.probst@gmail.com>
503
504         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
505         use the red zone.  Make room on the stack first and then use it,
506         not the other way around.
507
508 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
509
510         * mini.c (mini_init): Call mono_xdebug_init ().
511
512         * aot-compiler.c (mono_xdebug_init): Make this non-static.
513
514 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
515
516         * TestDriver.cs: Add an --iter argument to run tests multiple times.
517
518         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
519         trampolines.
520
521         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
522         debug+unwind info for trampolines.
523
524         * mini.c (mono_create_unwind_op): New helper function.
525
526         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
527
528 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
529
530         * aot-compiler.c: Fix the build.
531
532 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
533
534         * Makefile.am: Update dtrace-prelink.sh location.
535
536 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
537
538         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
539         optimization. Fixes #464520.
540
541 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
542
543         * mini-amd64.c : Adding code to save/restore non-volatile registers
544            on Winx64.
545
546         * exceptions-amd64.c : Adding code to save/restore non-volatile 
547           registers on Winx64.
548
549         Contributed under MIT/X11 license.
550
551 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
552
553         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
554         __GNUC_MINOR__ which can break when the major version changes.
555
556 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
557
558         * basic-simd.cs: Add tests for usage of the sizeof opcode.
559
560 2009-01-07  Geoff Norton  <gnorton@novell.com>
561
562         * helpers.c:  Allow mono -v -v -v to work on darwin.
563
564 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
565
566         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
567           pattern. 
568
569         Contributed under MIT/X11 license.
570
571 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
572
573         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
574         instead of directly accessing type->data.klass. Fixes #462016.
575         (mono_allocate_stack_slots_full): Ditto.
576
577         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
578         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
579
580         * aot-compiler.c (emit_plt): Fix ARM build.
581
582 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
583
584         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
585         
586         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
587         change.
588
589         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
590         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
591         #463357.
592
593         * iltests.il.in: Add a regression test.
594
595 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
596
597         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
598
599 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
600
601         * basic-simd.cs: Add a regression test for #462457.
602
603 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
604
605         * mini-ops.h: Add a definition of XPHI.
606
607         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
608
609         * ssa.c (op_phi_to_move): Handle XPHI.
610
611         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
612
613         Fixes #462457
614
615 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
616
617         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
618
619 2008-12-31  Geoff Norton  <gnorton@novell.com>
620
621         * mini-ppc.c: The prolog size allocated can be too small for darwin
622         ppc32 under certain circumstances.  Also fix a small logic bug.
623
624 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
625
626         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
627         while loading AOT methods.
628
629         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
630         since only the former is nulled out after a successful cast. This prevents
631         crashes with rethrown exceptions when using --debug=casts.
632
633 2008-12-24  Mark Probst  <mark.probst@gmail.com>
634
635         * mini.h: New macro for checking whether a method is final,
636         i.e. whether the method or its class is marked final.
637
638         * method-to-ir.c: Use the new macro for all final-checks
639         consistently.  Fixes the crash in the System.ServiceModel tests.
640
641 2008-12-23  Mark Probst  <mark.probst@gmail.com>
642
643         * mini-exceptions.c (get_exception_catch_class): Corrected another
644         overly strict assertion.
645
646 2008-12-23  Mark Probst  <mark.probst@gmail.com>
647
648         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
649         Clobbering it is not allowed because the caller might use it as
650         the vtable register in the interface call.
651
652 2008-12-19  Mark Probst  <mark.probst@gmail.com>
653
654         * mini-exceptions.c (get_exception_catch_class): Corrected an
655         overly strict assertion.
656
657 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
658         
659         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
660
661         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
662
663         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
664
665         * cpu-mips.md: correct lengths for certain long_ opcodes.
666
667         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
668
669         * mini-mips.c: Add support for more long operations. Fix issues with stack frame layout for n32 (still not perfect yet). Add mips_emit_load_const().
670         
671 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
672
673         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
674         
675 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
676         
677         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
678         
679 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
680
681         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
682         next basic block.
683         
684 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
685
686         * mini.h: Allow MonoInst 'p' field to alias with the low-order bits of the 'const_val' fields correctly on big-endian systems when SIZEOF_VOID_P < SIZEOF_REGISTER
687
688         * ir-emit.h: Change SIZEOF_VOID_P to SIZEOF_REGISTER, init instruction through inst_c* fields instead of inst_p* fields in case sizeof(inst_p) < sizeof(inst_c)
689         
690 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
691         
692         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
693         
694 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
695
696         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
697         gshared code. Fixes #458947.
698
699         * generics.cs: Add a test.
700
701 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
702         
703         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
704         
705         * mini-mips.c: first pass n32 code generation.
706
707         * mini-mips.h: datatypes and defines for n32 support.
708
709         * exceptions-mips.c: first pass n32 code generation.
710         
711         * tramp-mips.c: first pass n32 code generation.
712         
713         * cpu-mips.md: add long_ opcodes.
714         
715 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
716
717         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
718
719         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
720         
721         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
722         
723         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
724
725         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
726
727         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
728
729         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
730
731         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
732
733         * helpers.c: for mips/n32, don't pass -mips32 to objdump
734
735 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
736
737         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
738
739 2008-12-12  Andrés G. Aragoneses  <aaragoneses@novell.com>
740
741         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
742
743 2008-12-12  Mark Probst  <mark.probst@gmail.com>
744
745         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
746         descriptors for helper functions directly in front of the code.
747
748 2008-12-11  Mark Probst  <mark.probst@gmail.com>
749
750         * method-to-ir.c: Removed an unnecessary assertion.
751
752 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
753
754         * method-to-ir.c: Merge SGEN changes from the old JIT.
755
756 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
757
758         * driver.c (compile_all_methods_thread_main): Handle failure of
759         mono_get_method ().
760
761 2008-12-10  Mark Probst  <mark.probst@gmail.com>
762
763         * mini-ppc.c: Merged with mini-ppc64.c.
764
765         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
766
767         * Makefile.am: Use the same sources for PPC and PPC64.
768
769         * mini-ppc64.c: Removed.
770
771 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
772
773         * branch-opts.c (remove_block_if_useless): Extract fall through detection
774         code to mono_bb_is_fall_through.
775         
776         * branch-opts.c (mono_remove_critical_edges): Same.
777
778 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
779
780         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
781         expect that an OP_BR_REG will be there.
782
783 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
784
785         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
786         for the many branch ops. The original check miss OP_BR_REG.
787
788         Fixes #457574.
789         
790 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
791
792         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
793
794 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
795
796         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
797         while holding the aot lock.
798
799 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
800
801         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
802         
803 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
804
805         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
806           to release all runtime callable wrappers held by the runtime.
807
808         Contributed under MIT/X11 license.
809
810 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
811
812         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
813           for Winx64.
814
815         Contributed under MIT/X11 license.
816
817 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
818
819         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
820         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
821
822 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
823
824         * cpu-mips.md: fix ckfinite length
825
826         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
827         (mono_arch_lowering_pass): cleanup, rearrange for clarity
828         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
829         
830 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
831
832         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
833         
834 2008-12-08  Geoff Norton  <gnorton@novell.com>
835
836         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
837         size by 8 bytes as well.
838
839 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
840
841         * basic-simd.cs: Fix method names for Vector16b.
842         
843 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
844
845         * basic-simd.cs: Fix method names for Vector16sb.
846
847 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
848
849         * basic-simd.cs: Fix method names for Vector8us.
850         
851 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
852
853         * basic-simd.cs: Fix method names for Vector8s.
854         
855 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
856
857         * basic-simd.cs: Fix method names for Vector4ui.
858
859 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
860
861         * basic-simd.cs: Fix method names for Vector2l.
862
863 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
864
865         * basic-simd.cs: Fix method names for Vector2d.
866
867 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
868
869         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
870         that are extension methods.
871
872 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
873
874         * basic-simd.cs: Fix method names for Vector4f.
875
876 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
877
878         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
879         as such. Fixes #456669.
880
881 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
882
883         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
884         
885 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
886
887         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
888         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
889         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
890         (mips_adjust_stackframe): handle FP spills
891                 
892         * mini-ops.h: add mips_mtc1_s2
893         
894         * cpu-mips.md: add mips_mtc1_s2
895         
896 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
897
898         * unwind.c: New file, move the unwind info encoding functions here from
899         aot-compiler.c, so they could be used at runtime too.
900
901 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
902
903         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
904         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
905         
906 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
907
908         * mini-mips.c: cleanup warnings
909         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
910         (mips_adjust_stackframe): handle case of taking the address of stack locals
911         
912 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
913
914         * aot-compiler.c: Implement a few functions missing from the asm writer.
915         (emit_method_code): Only write symbols for methods when using the bin
916         writer, since the assembler can't deal with the characters in our method
917         names.
918
919         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
920
921         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
922         call.
923
924         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
925         a bit to also restore %rax.
926
927 2008-12-05  Mark Probst  <mark.probst@gmail.com>
928
929         * mini-ppc.c: Some simple merges from mini-ppc64.c.
930
931 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
932
933         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
934         arguments.
935
936 2008-12-05  Mark Probst  <mark.probst@gmail.com>
937
938         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
939
940         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
941         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
942
943         * exceptions-ppc64.c: Removed.
944
945         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
946
947 2008-12-05  Mark Probst  <mark.probst@gmail.com>
948
949         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
950         tramp-ppc64.c.
951
952         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
953
954         * tramp-ppc64.c: Removed.
955
956 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
957
958         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
959         the TYPESPEC table.
960
961 2008-12-05  Mark Probst  <mark.probst@gmail.com>
962
963         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
964
965         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
966         mini-ppc.h instead of mini-ppc64.h.
967
968         * mini-ppc64.h: Removed.
969
970 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
971
972         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
973         
974         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
975         
976 2008-12-05  Mark Probst  <mark.probst@gmail.com>
977
978         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
979         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
980         code easier.
981
982 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
983
984         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
985
986 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
987
988         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
989
990 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
991
992         * basic-simd.cs: Tests for operator == and != on Vector4f.
993
994 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
995
996         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
997
998         * simd-intrinsics.c: Kill useless enum.
999
1000 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1001
1002         * cpu-mips.md: add long_conv_to_ovf_i4_2
1003         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
1004
1005 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1006
1007         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
1008         
1009         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
1010
1011 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1012
1013         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
1014         
1015 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1016
1017         * basic-simd.cs: Add tests for new methods.
1018
1019 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1020
1021         * simd-intrinsics.c: Add support for operator == and !=
1022         on Vector4(u)i.
1023
1024         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
1025
1026 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1027
1028         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
1029
1030 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
1031
1032         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
1033
1034         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
1035         MONO_PATCH_INFO_ICALL_ADDR.
1036
1037         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
1038
1039         * aot-compiler.c: Resurrect full-aot support.
1040
1041 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1042
1043         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
1044         
1045 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1046
1047         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
1048         
1049 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
1050
1051         * basic-simd.cs: Fix tests to work under ppc.
1052         Remove tests for methods that will be removed.
1053
1054 2008-12-03  Mark Probst  <mark.probst@gmail.com>
1055
1056         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
1057         generic type (via a typedef or typeref) correctly.
1058
1059 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
1060
1061         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
1062         diagnose an assertion failure.
1063
1064 2008-12-02  Mark Probst  <mark.probst@gmail.com>
1065
1066         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
1067         Fix trampoline size.
1068
1069         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
1070         conversion opcodes are implemented natively instead via emulation.
1071
1072 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1073
1074         * cpu-mips.md: remove mips_xori
1075
1076         * mini-ops.h:  remove mips_xori
1077
1078         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
1079
1080         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
1081         
1082         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
1083         
1084 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1085
1086         * cpu-mips.md: fix instruction lengths.
1087
1088         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
1089
1090         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
1091
1092         * mini-ops.h: fix slti / sltiu op profiles.
1093         
1094 2008-12-02  Martin Baulig  <martin@ximian.com>
1095
1096         * method-to-ir.c (mono_method_to_ir): Disable debugging
1097         information for the init locals block to make the debugger stop
1098         after all locals have been initalized.
1099
1100 2008-12-02  Martin Baulig  <martin@ximian.com>
1101
1102         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
1103         running inside the debugger.
1104
1105 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
1106
1107         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
1108         is enabled.
1109
1110         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
1111         alu->alu imm optimization which only shows if deadce is disabled.
1112
1113         * aot-compiler.c: Rename the function names for the binary and asm writers
1114         so they can coexist in the same process. Rework the xdebug code to use the
1115         asm writer. This avoids the need to call into the runtime to dump the
1116         debugging info. Add more debugging info for types.
1117
1118         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
1119
1120         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
1121         cpu description tables, they can't occur in cpu-<ARCH>.md.
1122
1123         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
1124         the stack in CEE_LDFLDA. Fixes #450542.
1125
1126         * generics.cs: Add a new test.
1127
1128 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1129
1130         * mini-ops.h: updated MIPS opcodes
1131         * mini-mips.c: decompose long opts
1132         * mini-mips.h: decompose long opts
1133         
1134 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
1135
1136         * cpu-mips.md: fix length on int_rem_un
1137         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
1138         
1139 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
1140
1141         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
1142
1143         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
1144
1145 2008-11-29  Martin Baulig  <martin@ximian.com>
1146
1147         * mini-exceptions.c (mono_handle_native_sigsegv): Check
1148         mono_debug_using_mono_debugger() in addition to the
1149         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
1150
1151 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1152
1153         * mini-ops.h: updated more MIPS opcodes
1154         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
1155         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
1156         
1157 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1158
1159         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
1160
1161 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1162
1163         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
1164         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
1165         * mini-ops.h: correct selected mips opcode entries
1166         
1167 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1168
1169         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
1170         make them work.
1171
1172 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1173
1174         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
1175
1176 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1177
1178         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
1179         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
1180         * mini-mips.h: disable IMT
1181         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
1182         
1183 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1184
1185         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
1186
1187 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1188
1189         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
1190
1191 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
1192
1193         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
1194         consistency.
1195
1196 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1197
1198         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1199         for Set/GetVector aligned versions.
1200
1201 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1202
1203         * basic-simd.cs: Add tests for Get/SetVector.
1204
1205 2008-11-27  Mark Probst  <mark.probst@gmail.com>
1206
1207         * mini.c: Removed g_slist_append_mempool().  Now in
1208         metadata/mempool.c.
1209
1210 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1211
1212         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
1213         size properly and make the bounds check optional.
1214
1215         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1216         for SetVector and IsAligned.
1217
1218 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
1219
1220         * mini.c: Remove unused mono_normalize_opcodes () function.
1221
1222 2008-11-26  Mark Probst  <mark.probst@gmail.com>
1223
1224         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
1225         using the new atomic add ops now.
1226
1227         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
1228         add.
1229
1230 2008-11-26  Mark Probst  <mark.probst@gmail.com>
1231
1232         * mini-ppc64.c: Several fixes.
1233
1234 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1235
1236         * cpu-mips.md: added jump_table
1237         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
1238
1239 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1240
1241         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
1242
1243 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1244
1245         * mini-ops.h: corrected a handful of MIPS opcodes.
1246
1247 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1248
1249         * aot-compiler.c: MIPS to use ELF writer
1250
1251 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1252
1253         * mini-codegen.c: remove MIPS specific assert.
1254
1255 2008-11-25  Mark Probst  <mark.probst@gmail.com>
1256
1257         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
1258         fixes.  PPC64 now passes most of the runtime regressions.
1259
1260 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
1261
1262         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
1263         volatile intervals a bit.
1264
1265 2008-11-24  Mark Probst  <mark.probst@gmail.com>
1266
1267         * basic-long.cs: New test case.
1268
1269 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
1270
1271         * mini.c (mini_method_compile): Disable globalra for large methods for 
1272         now.
1273
1274         * regalloc2.c (order_moves): Add fp support.
1275
1276         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
1277         source bblock ends with an OP_BR_REG.
1278
1279         * ratests.cs: Add a new test.
1280
1281 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1282
1283         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
1284         sharing.  PPC64 now passes generics.exe.
1285
1286 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1287
1288         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
1289
1290 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
1291
1292         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
1293         memory when mono_jit_info_table_find () can't find the method in the
1294         LMF case.
1295
1296         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
1297         AOTed code too.
1298         
1299         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
1300         writer too.
1301
1302 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1303
1304         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
1305         Several fixes.  PPC64 now runs exceptions.exe and
1306         devirtualization.exe.
1307
1308 2008-11-22  Mark Probst  <mark.probst@gmail.com>
1309
1310         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
1311         arrays.exe and basic-math.exe.
1312
1313 2008-11-22  Mark Probst  <mark.probst@gmail.com>
1314
1315         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
1316         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
1317
1318 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1319
1320         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
1321
1322 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1323
1324         * method-to-ir.c: Move bounds checking macros to ir-emit.h
1325
1326         * ir-emit.h: Move macros from method-to-ir.c to here.
1327
1328 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1329
1330         * mini-ops.h: Correct the long simd ops to use LREG.
1331
1332 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
1333
1334         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
1335         
1336         * mini-ops.h: Correct the dreg type of a few long opcodes.
1337
1338         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
1339         Add netbsd support.
1340
1341 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
1342
1343         * mini-ppc.c: remove negative stack references in epilog
1344         for platforms that don't support the red zone.
1345
1346 2008-11-21  Mark Probst  <mark.probst@gmail.com>
1347
1348         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
1349         point regs.  Now PPC64 passes basic-calls.exe.
1350
1351 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1352
1353         * basic-simd.cs: Add tests for accessors of Vector2l.
1354
1355 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1356
1357         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
1358
1359         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
1360         
1361         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
1362
1363 2008-11-21  Mark Probst  <mark.probst@gmail.com>
1364
1365         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
1366         PPC64 passes basic-long.exe.
1367
1368 2008-11-20  Mark Probst  <mark.probst@gmail.com>
1369
1370         * decompose.c: Decompose carry and overflow add on PPC64 like on
1371         other 64 bit archs.  Don't decompose sub at all on PPC64.
1372
1373         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
1374         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
1375         basic-long.exe.
1376
1377 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1378
1379         * basic-simd.cs: Add tests for accessors of Vector2d.
1380
1381 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1382
1383         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
1384
1385         * cpu-x86.md: Same.
1386
1387         * mini-x86.c (mono_arch_output_basic_block): Same.
1388         
1389         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
1390
1391 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1392
1393         * basic-simd.cs: Add tests for accessors of Vector4f.
1394
1395 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1396
1397         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
1398
1399         * cpu-x86.md: Same.
1400
1401         * mini-x86.c (mono_arch_output_basic_block): Same.
1402         
1403         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
1404
1405 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1406
1407         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
1408
1409 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1410
1411         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
1412
1413         * cpu-x86.md: Same.
1414
1415         * mini-x86.c (mono_arch_output_basic_block): Same.
1416         
1417         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
1418
1419 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1420
1421         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
1422
1423 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1424
1425         * simd-intrinsics.c: Enable setters for Vector16sb.
1426
1427 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1428
1429         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
1430
1431         * cpu-x86.md: Same.
1432
1433         * mini-x86.c (mono_arch_output_basic_block): Same.
1434         
1435         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
1436
1437 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
1438
1439         * simd-intrinsics.c: Implement setter for Vector8us.
1440
1441 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
1442
1443         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
1444         for dead variables.
1445
1446 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
1447
1448         * mini-ppc.c: remove references to the red zone in the prolog
1449         (for systems that don't support it).
1450
1451 2008-11-19  Mark Probst  <mark.probst@gmail.com>
1452
1453         * cpu-ppc64.md: Fixed a few instruction lengths.
1454
1455         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
1456         now.
1457
1458 2008-11-19  Mark Probst  <mark.probst@gmail.com>
1459
1460         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
1461         basic.exe now.
1462
1463 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
1464
1465         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
1466
1467 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
1468
1469         * mini-ops.h: Added OP_INSERT_I2.
1470
1471         * cpu-x86.md: Same.
1472
1473         * mini-x86.c (mono_arch_output_basic_block): Same.
1474         
1475         * simd-intrinsics.c: Implement setter for Vector8s.
1476
1477         * simd-methods.h: Add the names of get setters of Vector8s.
1478
1479 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
1480
1481         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
1482         
1483         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
1484         parameters.
1485
1486         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1487
1488 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1489
1490         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
1491         for PPC64.  An empty program runs now.
1492
1493 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
1494
1495         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1496
1497         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
1498         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
1499         info for JITted code is emitted into a shared library, loadable into gdb.
1500
1501 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1502
1503         * Makefile.am: Changes to build PPC64.
1504
1505         * mini-arch.h: Include mini-ppc64.h on PPC64.
1506
1507 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1508
1509         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
1510         in PPC code up to r119147.
1511
1512 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1513
1514         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1515         cpu-ppc64.md: Changes for PPC64.
1516
1517         Based on code submitted by andreas.faerber@web.de at
1518         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
1519         X11/MIT license.
1520
1521 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1522
1523         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1524         cpu-ppc64.md: Copied from the corresponding PPC files from
1525         r118846.
1526
1527 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
1528
1529         * mini-ops.h: Added OP_ROUND.
1530
1531         * cpu-x86.md: Added round.
1532
1533         * mini-x86.c: Added support for intrinsicing Math.Round (double).
1534
1535         * basic-math.cs: Added test_0_round to test rounding.
1536
1537         Contributed under MIT/X11 license.
1538
1539 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
1540
1541         * aot-compiler.c : Fix the Winx64 build.
1542
1543         Contributed under MIT/X11 license.
1544
1545 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
1546
1547         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
1548         in OP_EXTRACT_R8 to avoid possible stack corruption.
1549
1550 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
1551
1552         * mini-ops.h: Added OP_EXTRACT_R8/I8.
1553
1554         * cpu-x86.md: Added extract_r8.
1555
1556         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
1557         
1558         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
1559         a couple of OP_EXTRACT_I4.
1560
1561         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
1562
1563         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
1564
1565 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
1566
1567         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
1568         and not 4.1. 
1569
1570 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
1571
1572         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
1573         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
1574
1575         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
1576         are not needed any more.
1577
1578         * mini.h: Remove the unused INS_LIST macros.
1579
1580         * mini.c (mini_method_compile): Remove a disable globalra case which is no
1581         longer needed.
1582
1583         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
1584         ir-emit.h.
1585
1586         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
1587         mono_alloc_ireg () instead.
1588
1589         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
1590         macros.
1591
1592         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
1593         on amd64.
1594
1595         * aot-runtime.c (load_aot_module): Disable AOT when running under
1596         CAS.
1597
1598         * mini-amd64.h: Change the monitor fastpath defines to check for
1599         !PLATFORM_WIN32 so they work on *bsd too.
1600
1601         * mini.h mini.c mini-hhpa.c: Remove more unused code.
1602
1603         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
1604
1605         * mini.h (MonoCompile): Remove new_ir flag.
1606
1607         * regalloc.h regalloc.c: Remove unused code.
1608
1609         * cpu-*.md: Remove more unused opcodes.
1610
1611         * simple-cee-ops.h simple-mini-ops.h: Removed.
1612
1613         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
1614         
1615 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
1616
1617         * aliasing.h: Removed.
1618
1619         * *.c: Remove references to aliasing.h and inssel.h.
1620
1621         * mini.c: Remove additional unused functions.
1622
1623         * mini-ops.h cpu-*.md: Remove unused opcodes.
1624
1625 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
1626
1627         Remove the old JIT code.
1628
1629         * inssel*.brg: Removed.
1630
1631         * ssa.c abcremoval.c aliasing.c: Removed.
1632
1633         * ssa2.c: Renamed to ssa.c.
1634
1635         * abcremoval2.c: Renamed to abcremoval.c.
1636
1637         * *.c: Removed all !cfg->new_ir code.
1638
1639         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
1640         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
1641
1642         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
1643         
1644 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
1645
1646         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
1647         to simplify the code and cut back on the number of global symbols in the AOT
1648         file.
1649         
1650         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
1651
1652 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
1653
1654         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
1655         with the got/got_info tables.
1656
1657         * mini.h: Bump AOT file format version.
1658         
1659         * unwind.h: New file, contains definitions for stack unwinding.
1660
1661         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
1662         to cfg->unwind_ops.
1663         
1664         * aot-compiler.c: Generalize the emitting of unwind information to use the
1665         information in cfg->unwind_ops.
1666
1667         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
1668
1669         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
1670         AOT method frames. Enable writing symbols for methods by default.
1671
1672 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
1673
1674         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
1675         and make it work with vectors of element sizes 1, 2 and 4.
1676
1677         * simd-intrinsics.c: Enable getter for all vectors with element size
1678         1, 2 or 4.
1679
1680         * simd-methods.h: Add the names of other getters.
1681
1682         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
1683
1684         * cpu-x86.md: Same.
1685
1686         * mini-x86.c: Same.
1687
1688 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
1689
1690         * mini-ppc.h: portability fix.
1691
1692 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
1693
1694         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
1695         buggy and will overwrite it.
1696
1697 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
1698
1699         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
1700         Use it to emit local symbols for all methods so AOTed methods show up with
1701         their full name in gdb/valgrind output.
1702
1703 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
1704
1705         * mini-ppc.c: portability fixes.
1706
1707 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
1708
1709         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
1710         entries out of the if (!generic_shared...) code so it is always done.
1711         (mono_class_init_trampoline): Do the patching when running under valgrind
1712         too, newer versions of valgrind have no problems with it.
1713
1714 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
1715
1716         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
1717         further sections.
1718
1719 2008-11-13  Mark Probst  <mark.probst@gmail.com>
1720
1721         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
1722         filters.
1723
1724 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1725
1726         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
1727
1728 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1729
1730         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
1731
1732         * cpu-x86.md: Same.
1733
1734         * mini-x86.c: Same.
1735
1736         * simd-intrinsics.c: Same.
1737
1738 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1739
1740         * simd-intrinsics.c: Enable constructor intrinsics for all types.
1741
1742 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1743
1744         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
1745         to work with more Vector types.
1746
1747 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1748
1749         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
1750         store the elemens directly instead of using and intermediate.
1751
1752 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
1753
1754         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
1755
1756         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
1757         to preserve %eax for aot plt trampolines.
1758
1759         * aot-compiler.c (compile_method): Don't skip synchronized methods.
1760         (encode_method_ref): Flag synchronized methods so they won't go through
1761         the AOT trampoline.
1762
1763         * aot-compiler.c: Additional work to support AOTing synchronized methods/
1764         wrappers.
1765
1766         * cpu-ia64.md (jmp): Increase max length.
1767
1768 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
1769
1770         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
1771         open generic classes.
1772
1773         * aot-compiler.c: Enable the ELF writer on ELF platforms.
1774
1775         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
1776         box+brtrue optimization since it causes test failures on x86.
1777
1778 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
1779
1780         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
1781
1782         * cpu-x86.md: Same.
1783
1784         * mini-x86.c: Same.
1785
1786         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
1787         for simd ctor values. 
1788
1789         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
1790         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
1791
1792 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
1793
1794         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
1795         LogicalRightShift.
1796
1797         * simd-instrincs.c: Same.
1798
1799         * basic-simd.cs: Same.
1800
1801 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
1802
1803         * ratests.cs: Add more tests.
1804
1805         * regalloc2.c (add_spill_code): Handle more corner cases.
1806
1807 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
1808
1809         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
1810         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
1811         both the source an destination of an instruction.
1812
1813 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
1814
1815         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
1816         wapihandles.c: more portability changes.
1817
1818 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
1819
1820         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
1821         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
1822         safe to execute in a signal handler and the kernel provides better
1823         the info in /proc/self/smaps. Avoid the assert on sigaction during
1824         cleanup.
1825
1826 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
1827
1828         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
1829         do the bblock linking hack if it is actually needed.
1830
1831         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
1832         up linking.
1833
1834         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
1835         crash problem is fixed.
1836
1837         * branch-opts.c (mono_remove_critical_edges): Link up newly added
1838         bblocks.
1839
1840         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
1841         for catch clauses.
1842         (mini_method_compile): Set the starting value of next_vreg to 
1843         MAX_IREGS + MAX_FREGS when using globalra.
1844
1845         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
1846         filter clauses with BB_EXCEPTION_HANDLER.
1847
1848         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
1849
1850 2008-11-10  Mark Probst  <mark.probst@gmail.com>
1851
1852         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
1853         space for stdcall.  Fixes regressions on Win32.
1854
1855 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
1856
1857         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
1858         bblocks.
1859         (linear_scan): Remove an assert which doesn't seem to be needed.
1860
1861         * local-propagation.c (mono_local_deadce): Avoid a call to
1862         MONO_DELETE_INS which would screw up the instruction linking.
1863
1864         * mini.c (mono_decompose_op_imm): Make this work with globalra.
1865
1866         * regalloc2.c: Upgrade to work the current JIT code.
1867
1868 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
1869
1870         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
1871         case.
1872
1873         * aot-runtime.c: Remove some dead code.
1874
1875         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
1876         consistency.
1877         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
1878
1879         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
1880         trampolines using sscanf since atoi doesn't work on large unsigned values.
1881
1882         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
1883         Initialize code_size.
1884
1885 2008-11-08  Mark Probst  <mark.probst@gmail.com>
1886
1887         * method-to-ir.c (mini_emit_inst_for_method): Make
1888         Interlocked.CompareExchange work for Int arguments on 32 bit
1889         archs, as well.
1890
1891 2008-11-07  Mark Probst  <mark.probst@gmail.com>
1892
1893         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
1894
1895 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
1896
1897         * main.c Fix MSVC build.
1898
1899         Contributed under MIT/X11 license.
1900
1901 2008-11-06  Mark Probst  <mark.probst@gmail.com>
1902
1903         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
1904         alignment larger than 8 bytes are aligned correctly, too.
1905
1906         * mini.c: Honor the min_align field of MonoClass when laying out
1907         the stack.
1908
1909 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
1910
1911         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
1912
1913         * aot-compiler.c (emit_plt): Fix a warning.
1914         
1915         * aot-compiler.c: Implement ARM support in the binary writer.
1916
1917 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
1918
1919         * basic-simd.cs: Add test for getter with byref arg.
1920         Fix the naming of a few tests.
1921         Add missing checks to a test.
1922
1923 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
1924
1925         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
1926
1927         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
1928         most of the full-aot support for monitor enter/exit trampolines.
1929
1930         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
1931         enter/exit trampoline creation functions.
1932
1933         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
1934         make dist.
1935
1936 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
1937
1938         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
1939         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
1940         implement the needed functionality without adding crap to the runtime.
1941
1942 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
1943
1944         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
1945         non-x86 builds.
1946
1947         * mini.c (mono_build_date): New global version holding the build date in
1948         string format.
1949         
1950         * Makefile.am (buildver.c): Generate a file containing the build date.
1951
1952         * main.c: Set the build date from the generated file.
1953
1954         * mini.c (mono_get_runtime_build_info): New helper function returning build
1955         information in a string format.
1956         
1957         * driver.c (mono_main): Print the build date in --version.
1958
1959         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
1960         file when the bind-to-runtime-version option is used.
1961
1962 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
1963
1964         * simd-intrinsics.c: Fix bug when using getters and byref args. 
1965
1966 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
1967
1968         * simd-methods.h: Rename prefetch methods.
1969
1970         * simd-intrinsics.c: Same.      
1971
1972 2008-11-05  Mark Probst  <mark.probst@gmail.com>
1973
1974         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
1975         sizes.
1976
1977 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
1978
1979         * aot-compiler.c: Use the bundled elf header files instead of depending on
1980         the system one.
1981         
1982         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
1983         mempool.
1984
1985         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
1986         on every call.
1987
1988 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
1989
1990         * cpu-x86.md: Add store nta ops.
1991
1992         * mini-ops.h: Same.
1993
1994         * mini-x86.c: Same.
1995
1996         * mini.h: Add an enum for simd prefetch modes.
1997
1998         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
1999         of store. Use the changed code to support store nta.
2000
2001         * simd-intrinsics.c: Add prefetch ops for all vector types.
2002
2003 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2004
2005         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
2006         threads.
2007         
2008         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
2009         names.
2010
2011         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
2012         trampolines.
2013
2014 2008-11-04  Mark Probst  <mark.probst@gmail.com>
2015
2016         * mini-x86.c: Fixed commit.
2017
2018 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2019
2020         * aot-compiler.c (emit_plt): Align the plt section only on x86.
2021
2022 2008-11-04  Mark Probst  <mark.probst@gmail.com>
2023
2024         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
2025         and MONITOR_EXIT, for the ASM fastpaths.
2026
2027         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
2028         available.
2029
2030         * mini.c, patch-info.h: Signature and patch infos for
2031         Monitor.Enter/Exit trampolines.
2032
2033         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
2034
2035         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
2036         Monitor.Enter/Exit ASM fastpath for Linux.
2037
2038 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2039
2040         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
2041
2042         * objects.cs: Add a new test.
2043         
2044         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
2045
2046         * aot-runtime.c (load_method): Run class initialization in the PLT case even
2047         if MONO_LOG_LEVEL is set.
2048
2049         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
2050
2051         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
2052
2053         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
2054         
2055         * aot-compiler.c: Change the relocation code to use virtual addresses instead
2056         of file offsets. Align the sections belonging to the data segment to 
2057         PAGESIZE.
2058
2059 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
2060
2061         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
2062         elf.h. Port it to amd64.
2063
2064 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2065
2066         * driver.c: Enable SIMD by default.
2067
2068 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2069
2070         * cpu-x86.md: Add prefetch op.
2071
2072         * mini-ops.h: Same.
2073
2074         * mini-x86.c: Same.
2075
2076         * mini.h: Add an enum for simd prefetch modes.
2077
2078         * simd-methods.h: Add prefetch function names.
2079
2080         * simd-intrinsics.c: Add prefetch ops for all vector types.
2081
2082 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
2083
2084         * aot-compiler.c (emit_bytes): Speed this up a little.
2085
2086 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
2087
2088         * aot-compiler.c: Add JIT time etc. statistics.
2089         
2090         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
2091
2092         * mini.h (MonoCompile): Add 'got_offset' field.
2093
2094         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
2095         method_got_offsets array.
2096
2097         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
2098         wrappers.
2099
2100         * aot-compiler.c (compile_method): Add generic method instances referenced
2101         by the method to the list of methods to be compiled, this is required so if
2102         A<T> references B<T>, and another assembly references A<int>, then it will
2103         also get a copy of B<int>.
2104
2105         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
2106         when checking for monitor enter/exit.
2107
2108 2008-10-30  Mark Probst  <mark.probst@gmail.com>
2109
2110         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
2111         for Monitor.Enter and Monitor.Exit if enabled.
2112
2113         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
2114         Solaris.
2115
2116 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
2117
2118         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
2119         of an OP_MOVE. Fixes #440046.
2120
2121         * basic-long.cs: Add a new test.
2122
2123 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
2124
2125         * mini.h: Add synchronization note for the managed counter-part.
2126
2127         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
2128         returns the simd caps of the current cpu.
2129
2130 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
2131
2132         * basic-simd.cs: Remove Console.WriteLine.
2133
2134 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2135
2136         * basic-simd.cs: New tests for Vector2ul.
2137
2138 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2139
2140         * simd-intrinsics.c: Add new vector type Vector2ul.
2141
2142 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2143
2144         * basic-simd.cs: New tests for Vector2l.
2145
2146 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2147
2148         * cpu-x86.md: Add long version of most packed int ops.
2149
2150         * mini-ops.h: Same.
2151
2152         * mini-x86.h: Same.
2153
2154         * simd-intrinsics.c: Add new vector type Vector2l.
2155
2156 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2157
2158         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
2159
2160         * simd-methods.h: Remove SN_op_BitwiseXor.
2161
2162 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
2163
2164         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
2165         alignment.
2166
2167 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2168
2169         * basic-simd.cs: Test for Vector2d.
2170
2171         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
2172         value.
2173
2174 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2175
2176         * cpu-x86.md: Add double version of all packed float ops.
2177
2178         * mini-ops.h: Same.
2179
2180         * mini-x86.h: Same.
2181
2182         * simd-intrinsics.c: Add new vector type Vector2d.
2183
2184         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
2185
2186         * simd-methods.h: Add Duplicate.
2187
2188 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2189
2190         * basic-simd.cs: Test for packing with signed saturation.
2191
2192 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
2193
2194         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
2195         found in the TYPESPEC table.
2196
2197 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
2198
2199         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
2200         too.
2201
2202         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2203
2204         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
2205         instead of the RVA, since the RVA can be changed by tools like the cil 
2206         stripper.
2207
2208         * method-to-ir.c (mono_method_to_ir2): Ditto.
2209
2210         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
2211         (deserialize_variable): Ditto.
2212
2213 2008-10-25  Martin Baulig  <martin@ximian.com>
2214
2215         * debug-mini.c (write_variable): Use
2216         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
2217
2218 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2219
2220         * cpu-x86.md: Add unsigned variants of packd and packw.
2221
2222         * mini-ops.h: Same.
2223
2224         * mini-x86.h: Emit the right instruction for packd and packw.
2225         Add unsigned variants of packd and packw.
2226
2227         * simd-intrinsics.c: Packd and packw were used in place of their
2228         unsigned variants. Change that.
2229         Add intrinsics for (Signed)PackWithSignedSaturation.
2230
2231         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
2232
2233 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2234
2235         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
2236
2237 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2238
2239         * mini-ops.h: Remove dword packed add/sub with saturation ops.
2240
2241         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
2242
2243         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
2244         sse instructions.
2245
2246         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
2247
2248 2008-10-24  Mark Probst  <mark.probst@gmail.com>
2249
2250         * method-to-ir.c, mini.c: Special casing for the synchronized
2251         wrapper for the ldtoken+GetTypeFromHandle case.
2252
2253 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
2254
2255         * mini.c (mono_replace_ins): Move this to branch-opts.c.
2256
2257         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
2258         created/split bblocks.
2259
2260 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2261
2262         * mini-ops.h: Add packed signed mul high.
2263         
2264         * cpu-x86.md: Same.
2265
2266         * mini-x86.c (mono_arch_output_basic_block): Same.
2267
2268         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
2269
2270         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
2271
2272 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2273
2274         * basic-simd.cs: Tests for Vector16sb.
2275
2276 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
2277
2278         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
2279
2280 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
2281
2282         * mini-ops.h: Add packed signed min, max and compare greater.
2283         
2284         * cpu-x86.md: Same.
2285
2286         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
2287         saturation.
2288
2289         * simd-methods.h: Add CompareGreaterThan.
2290
2291         * simd-methods.h: Remove CompareEquals.
2292
2293         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
2294
2295         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
2296
2297         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
2298         CompareEqual.
2299
2300 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
2301
2302         * basic-simd.cs: Fix tests due to change in the API.
2303
2304 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2305
2306         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
2307
2308 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2309
2310         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
2311
2312         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
2313         inst_offset as this has invalid values for LDADDR.
2314
2315 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2316
2317         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2318
2319         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
2320
2321 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2322
2323         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
2324         for accessing field->data.
2325
2326 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2327
2328         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2329
2330 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2331
2332         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
2333
2334         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
2335
2336 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2337
2338         * dominators.c (mono_compute_natural_loops): Allocate GList enties
2339         from the cfg mempool.
2340
2341 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
2342
2343         * basic-simd.cs: Tests for new methods in Vector8us.
2344
2345 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
2346
2347         * mini-ops.h: Add multiply and store high.
2348         
2349         * cpu-x86.md: Same.
2350
2351         * mini-x86.c (mono_arch_output_basic_block): Same.
2352
2353         * simd-methods.h: Same.
2354
2355         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
2356         and CompareEqual.
2357
2358 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
2359
2360         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
2361         mono_class_setup_vtable ().
2362
2363         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
2364         mono_class_get_vtable_entry () for accessing klass->vtable.
2365
2366         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
2367
2368         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
2369         found.
2370
2371         * method-to-ir.c (mono_save_token_info): Don't save references made from
2372         wrappers.
2373
2374         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
2375         of generic instances.
2376
2377         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
2378
2379 2008-10-19  Mark Probst  <mark.probst@gmail.com>
2380
2381         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
2382         OP_JMP depends on the method signature.  Calculate it properly.
2383
2384 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
2385         
2386         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
2387         called directly.
2388
2389         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
2390         instances.
2391         (emit_extra_methods): Add another table mapping method indexes to 
2392         offsets in the extra_method_info table.
2393
2394         * mini.h: Bump AOT file format version.
2395         
2396         * aot-runtime.c: Merge most of the code from mono_aot_get_method
2397         and mono_aot_get_method_from_token () into one function.
2398
2399 2008-10-19  Mark Probst  <mark.probst@gmail.com>
2400
2401         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
2402         separate counter.
2403
2404 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
2405
2406         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
2407         methods.
2408
2409         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
2410         disable_aot.
2411
2412         * mini.c (mono_patch_info_equal): Compare the generic context as well.
2413
2414         * mini.h: Bump aot file format version.
2415
2416         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
2417         AOT file can contain native code for methods which are not in the METHOD
2418         table. Generate code for non-sharable generic instances of generic methods
2419         found in the METHODSPEC table.
2420         
2421         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
2422         encoding generic type handles.
2423
2424         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
2425         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
2426
2427         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
2428         macros + MONO_ADD_INS.
2429
2430         * mini.c (mono_jump_info_token_new2): New function which takes a generic
2431         context as well.
2432
2433         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
2434
2435         * mini.h: Bump aot file format version.
2436
2437         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
2438
2439 2008-10-17  Mark Probst  <mark.probst@gmail.com>
2440
2441         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
2442         platforms, with definable stack alignment value.  Set to 16 now
2443         for all platforms.
2444
2445         * mini.c, mini.h, driver.c: Command line option for disabling
2446         stack alignment.
2447
2448 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
2449
2450         * basic-simd.cs: Tests for new methods in Vector4ui.
2451
2452 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
2453
2454         * mini-ops.h: Add packed int shuffle.
2455         
2456         * cpu-x86.md: Same.
2457
2458         * mini-x86.c (mono_arch_output_basic_block): Same.
2459
2460         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
2461         extract mask, max, min, shuffle.
2462
2463         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
2464
2465 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
2466
2467         * basic-simd.cs: Tests for new methods in Vector8us.
2468
2469 2008-10-17  Mark Probst  <mark.probst@gmail.com>
2470
2471         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
2472         RuntimeTypeHandle, not a TypedReference.
2473
2474 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
2475
2476         * simd-intrinsics.c: remove relocations.
2477
2478 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
2479
2480         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
2481         optimizations from the x86 backend.
2482
2483 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
2484
2485         * simd-methods.h, simd-intrinsics.c: debloat method names and
2486         prepare for no relocations.
2487
2488 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2489
2490         * mini-ops.h: Add packed min/equal and sum of absolute differences.
2491         
2492         * cpu-x86.md: Same.
2493
2494         * mini-x86.c (mono_arch_output_basic_block): Same.
2495
2496         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
2497         extract mask, max, min and sum of absolute differences.
2498
2499         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
2500         method name.
2501
2502 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2503
2504         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
2505         Renamed one test for consistency.
2506
2507 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2508
2509         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
2510         fix to the code that deal with other blocks.
2511
2512 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2513
2514         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
2515
2516 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2517
2518         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
2519         that deals with vreg interference. Explicitly check for OP_LDADDR to be
2520         able to process the source reg.
2521
2522 2008-10-16  Martin Baulig  <martin@ximian.com>
2523
2524         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
2525
2526         * inssel.brg: Add `OP_HARD_NOP'.
2527
2528         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
2529
2530         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
2531         `OP_HARD_NOP' instruction when running inside the debugger.
2532
2533         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
2534         `OP_HARD_NOP' instruction when running inside the debugger.
2535
2536 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2537
2538         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
2539         now works. The issue with the regalloc tripping up no longer
2540         happens.
2541
2542         * simd-intrinsics.c (load_simd_vreg): Same.
2543
2544 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2545         
2546         * basic-simd.cs: Tests for new Vector8ui methods.
2547
2548 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2549
2550         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
2551         only for type. This fixes crashes where MonoInst::klass is checked
2552         for ops of type != VTYPE or OBJ.
2553
2554         * simd-intrinsics.c (load_simd_vreg): Same.
2555
2556 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2557
2558         * mini-ops.h: Add ops for packed shuffle/max/avg and
2559         extract mask.
2560         
2561         * cpu-x86.md: Same.
2562
2563         * mini-x86.c (mono_arch_output_basic_block): Same.
2564
2565         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
2566         extract mask.
2567
2568         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
2569         to emit extract mask op.
2570
2571         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
2572         to emit word shuffles.
2573
2574 2008-10-15  Mark Probst  <mark.probst@gmail.com>
2575
2576         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
2577         the largest alignment needed by a variable, but at least
2578         sizeof(gpointer).
2579
2580 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2581
2582         * basic-simd.cs: Tests for the fixes in the last commit.
2583
2584 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2585
2586         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
2587         no longer handles STACK_PTR input.
2588
2589         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
2590
2591         * simd-intrinsics.c (load_simd_vreg): New function that works like 
2592         get_simd_vreg   but handles STACK_PTR input.
2593
2594         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
2595         as the input can be an arbitrary pointer.
2596
2597         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
2598         LDADDR local optimization directly otherwise use a store op.
2599
2600 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2601
2602         * basic-simd.cs: Tests for dup low and dup high.
2603
2604 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2605
2606         * mini-ops.h: Add dup low and dup high ops.
2607         
2608         * cpu-x86.md: Same.
2609
2610         * mini-x86.c (mono_arch_output_basic_block): Same.
2611
2612         * simd-intrinsics.c (vector4f_intrinsics): Same.
2613
2614 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
2615
2616         * basic-simd.cs: Tests for recently added functionality.
2617
2618 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
2619
2620         * mini-ops.h: Add remaining sse1 fp ops.
2621         
2622         * cpu-x86.md: Add remaining sse1 fp ops.
2623
2624         * mini-x86.c (mono_arch_output_basic_block): Same.
2625
2626         * mini.h: Add enum for simd FP compare conditions.
2627
2628         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
2629
2630         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
2631         so the backed can generate the appropriate op.
2632
2633 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
2634         This patch squeese one more byte from the SimdIntrinsc struct.
2635
2636         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
2637         a a shift amount intead of simply or'ing it.
2638
2639         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
2640
2641         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
2642         byte so we can have an aditional flags field without increasing struct size.
2643
2644         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
2645         against the simd_supported_versions bitmask.
2646
2647         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
2648
2649 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
2650
2651         * mini.c: remove rawbuffer code (the only use here is unsafe because
2652         it takes locks during signal handling and the kernel now provides much
2653         better info in proc/pid/smaps these days).
2654
2655 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
2656
2657         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
2658         OP_X86_PUSH_OBJ. Fixes #434620.
2659
2660         * objects.cs: Add a test.
2661         
2662 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
2663
2664         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
2665         that the packuswb/packusdw don't work with unsigned numbers for what
2666         would be negative numbers in signed format.
2667
2668         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
2669         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
2670
2671         * mini-ops.h: Add doubleword forms of many ops and packing ones.
2672
2673         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
2674
2675         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
2676
2677         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
2678
2679         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
2680         add more ops.
2681
2682         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
2683         version as the enum in mini.h.
2684
2685         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
2686         for sse3 ops, check the simd_version field if present. This way the code
2687         works with all versions of sse.
2688
2689 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2690
2691         * simd-intrinsics.c: Fixed intrinsic name typo.
2692
2693         * mini.h: Added missing simd exported function.
2694
2695         * basic-simd.cs: Added tests for Vector4ui.
2696         Fixed broken test for Vector16b.
2697
2698 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
2699
2700         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
2701         the max length to 64.
2702
2703 2008-10-10  Mark Probst  <mark.probst@gmail.com>
2704
2705         * method-to-ir.c: Only do the fast virtual generic method call for
2706         non-wrapper methods.
2707
2708         * mini.h, mini-trampolines.c: The new generic virtual remoting
2709         trampoline handles virtual method calls via the vtable (as done by
2710         the fast virtual generic method calls) to remoting proxies.
2711
2712         * mini.c (mono_jit_create_remoting_trampoline): For generic
2713         methods reate a generic virtual remoting trampoline.
2714
2715         * mini-amd64.h: Enable fast virtual generic method calls again.
2716
2717 2008-10-10  Mark Probst  <mark.probst@gmail.com>
2718
2719         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
2720         restore registers when doing tail calls.
2721
2722 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2723
2724         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
2725         Vector4ui.
2726
2727 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2728
2729         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
2730
2731 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2732
2733         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
2734
2735 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2736
2737         * basic-simd.cs: Retrofit for API changes.
2738
2739 2008-10-10  Mark Probst  <mark.probst@gmail.com>
2740
2741         * mini-ppc.c: Handle integer stack arguments for tail calls.
2742
2743 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2744
2745         * optflags-def.h: Removed sse3 optimization.
2746
2747         * driver.c: Same.
2748
2749         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
2750         sse3.
2751
2752         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
2753
2754         * mini.h: Added enumeration with simd versions.
2755
2756         * simd-intrinsics.c (emit_intrinsics): Use the new static var
2757         for detecting SSE3.
2758
2759         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
2760
2761         * mini.c (mini_init): Call mono_simd_intrinsics_init.
2762
2763 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
2764
2765         * basic-simd.cs: Added tests for Vector8u and Vector16u.
2766
2767         * basic-simd.cs: Fixed test naming.
2768
2769 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
2770
2771         * mini-ops.h: Added ops for packed and saturated math, shifts
2772         and packing/unpacking.
2773
2774         * cpu-x86.md: Added descriptors for the above ops.
2775
2776         * mini-x86.c: Added code to emmit the above ops.
2777
2778         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
2779
2780 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
2781
2782         * aot-compiler.c (compile_method): Enable AOT for generic code.
2783
2784         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
2785
2786 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
2787
2788         * mini.c: add a workaround for a common screwup that ends up blamed
2789         to mono (other processes blocking signal delivery).
2790
2791 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
2792
2793         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
2794         in the LDFLD/STFLD opcodes. Fixes #432673.
2795
2796         * iltests.il.in: Add a new test.
2797
2798 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
2799
2800         * mini-arm.c: attach the thread in unmanaged->managed transitions
2801         using delegates (bug #433148).
2802
2803 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
2804
2805        * basic-simd.cs: Use new ShuffleSel constants.
2806
2807 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
2808
2809         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
2810
2811         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
2812         only disable simd intrinsics if no sse2 is detected.
2813
2814         * optflags-def.h: Added sse3.
2815
2816         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
2817         is disabled.
2818
2819 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
2820
2821         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
2822         when adding delegate-invoke wrappers.
2823
2824 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
2825
2826         * Makefile.am: Reenable the simd tests.
2827
2828 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
2829
2830         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
2831           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
2832           other vreg is allocated to that hreg.
2833
2834         Contributed under MIT/X11 license.
2835
2836 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
2837
2838         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
2839         yet checked in.
2840
2841 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
2842
2843         * basic-simd.cs: New test suite for SIMD intrinsics.
2844
2845         * Makefile.am: Added new tests.
2846
2847 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
2848
2849         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
2850
2851         * mini-ops.h: Same.
2852
2853         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
2854
2855         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
2856         using SSE2 aware opcodes.
2857
2858         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
2859         is enabled, this code path is only reachable if conversion ops are emmited after
2860         mono_method_to_ir.
2861
2862         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
2863
2864         This optimization saves 6 bytes per conversion against the old version.
2865
2866 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
2867
2868         * aot-compiler.c (compile_method): Don't skip methods referencing 
2869         generic methods without a corresponding entry in token_info_hash, since
2870         encode_method_ref () can handle all generic methods now.
2871
2872         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
2873         generic context is set.
2874         
2875         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
2876         generic sharing of LDTOKEN.
2877
2878 2008-10-06  Mark Probst  <mark.probst@gmail.com>
2879
2880         * mini-amd64.h: Temporarily disabled fast virtual generic method
2881         calls because it breaks the System.Runtime.Remoting tests.
2882
2883 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
2884
2885         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
2886
2887         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
2888         so inlining actually works.
2889         (check_inline_caller_method_name_limit): Ditto.
2890
2891 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
2892
2893         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
2894         64 bit safety (from Olaf Hering and Andreas Färber).
2895
2896 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
2897         
2898         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
2899         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
2900         unused virtual call support code.
2901
2902         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
2903         
2904         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
2905         which can't use aot trampolines.
2906         (decode_patch): Don't create aot trampolines for methods which can't use
2907         them.
2908
2909         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
2910         use aot trampolines.
2911
2912         * mini.h: Bump AOT image format version.
2913         
2914 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
2915
2916         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
2917         to save_token_info () since cmethod is inflated for constrained calls.
2918
2919         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
2920
2921 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
2922
2923         * Makefile.am: Add build rules for ppc64.
2924         This avoids the build failing at pedump with unresolved symbols
2925         due to lack of arch_sources. Instead it will now fail earlier
2926         due to lack of cpu-ppc64.md.
2927
2928         Contributed under MIT/X11 license.
2929
2930 2008-10-04  Mark Probst  <mark.probst@gmail.com>
2931
2932         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
2933         tail calls.
2934
2935         * iltests.il.in: Add test case for tail call with many arguments.
2936
2937 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
2938
2939         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
2940         to the fast virtual generic method code until the aot case is fixed.
2941
2942 2008-10-03  Mark Probst  <mark.probst@gmail.com>
2943
2944         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
2945
2946 2008-10-03  Mark Probst  <mark.probst@gmail.com>
2947
2948         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
2949         thunks.
2950
2951 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
2952         
2953         * simd-intrinsics.c: Forgot to add this one.
2954
2955         * mini-codegen.c: Fix macro in case SIMD is not supported.
2956
2957 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
2958         
2959         This patch land initial JIT support for simd intrinsics.
2960
2961         * mini-x86.h: Added new define to make --enable_minimal work on x86.
2962
2963         * Makefile.am: Added simd-intrinsics.c
2964
2965         * simd-intrinsics.c: New file with simd instrinsic related
2966         code.
2967
2968         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
2969
2970         * cpu-x86.md: Add simd related instructions.
2971
2972         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
2973
2974         * driver.c: Added two new --regression variants.
2975
2976         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
2977
2978         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
2979
2980         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
2981         extract some complicated logic to helper functions.
2982
2983         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
2984
2985         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
2986
2987         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
2988         the specialized simplification pass.
2989
2990         * method-to-ir.c (mono_spill_global_vars): Use new macro.
2991
2992         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
2993
2994         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
2995         table.
2996
2997         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
2998         if MONO_ARCH_NEED_SIMD_BANK is defined.
2999
3000         * mini-ops.h: Added the new simd ops.
3001
3002         * mini-x86.c: Added mono_arch_xregname.
3003
3004         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
3005
3006         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
3007
3008         * mini-x86.h: Define simd related MONO_ARCH macros.
3009
3010         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
3011
3012         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
3013
3014         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
3015         MONO_CLASS_IS_SIMD to deal with simd related IR.
3016
3017         * mini.h (MonoInst): Added spill_var to the backend union.
3018
3019         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
3020
3021         * mini.h: Added forward declarations of the new simd fuctions.
3022
3023         * optflags-def.h: Added new optimization names SIMD.
3024
3025         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
3026
3027         * regalloc.h: Added support for working with 3 register banks.
3028
3029         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
3030
3031         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
3032
3033 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
3034
3035         * mini-exceptions.c: remove 64 bit related ifdef clutter.
3036
3037 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
3038
3039         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
3040         instead of one on 64 bit systems.
3041
3042         * method-to-ir.c: Remove unused includes.
3043
3044 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
3045
3046         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
3047         cfg->used_int_regs, since the two are different on arm.
3048
3049 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3050
3051         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
3052         mono_method_get_vtable_index() to get the vtable index.
3053
3054 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3055
3056         * method-to-ir.c (mono_method_to_ir2): Don't create native
3057         wrappers for array methods, because they're never called (and if
3058         they were called they wouldn't work).
3059
3060 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3061
3062         * method-to-ir.c (mono_method_to_ir2): Array methods are
3063         special-cased and must not be invoked indirectly via the (M)RGCTX
3064         when generic sharing is turned on.  Fixes #431413.
3065
3066 2008-10-01  Mark Probst  <mark.probst@gmail.com>
3067
3068         * method-to-ir.c: When generic sharing is active, call
3069         non-interface virtual generic methods via the standard trampoline.
3070
3071         * mini-trampolines.c: Handle virtual generic shared methods.
3072
3073         * mini.h, mini-x86.c, mini-x86.h: New argument for
3074         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
3075         method thunks and which is the trampoline to call if the lookup
3076         fails.  Enable the virtual generic method thunk for x86.
3077
3078         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
3079         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
3080         argument but assert that it's NULL, because these archs don't yet
3081         implement the virtual generic method thunk.  Changes in the IMT
3082         thunk data structures.
3083
3084 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
3085
3086         * aot-compiler.c (emit_globals): Avoid invalid characters in
3087         the static linking symbol.
3088
3089         * objects.cs: Add a test for the range check optimization. Fix warnings.
3090
3091         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
3092         optimization from the current JIT.
3093
3094         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
3095         later in decompose_array_access_opts () to allow more optimizations.
3096
3097         * method-to-ir.c (mono_handle_soft_float): Rename this to 
3098         mono_decompose_soft_float () for consistency.
3099
3100         * mini-ops.h: Fix arguments of OP_STRLEN.
3101
3102         * method-to-ir.c (save_cast_details): Extract the cast details saving code
3103         into a separate function.
3104         (reset_cast_details): Ditto.
3105         (handle_unbox): Save cast details. Fixes #431254.
3106
3107         * method-to-ir.c: Remove some obsolete FIXMEs.
3108
3109 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3110
3111         * ir-emit.h (alloc_dreg): Write a warning before crashing.
3112
3113 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3114
3115         * mini-codegen.c: More work on macros to make them
3116         ready for multiple regbanks.
3117
3118 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3119
3120         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
3121
3122         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
3123
3124 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3125
3126         * mini-codegen.c (mono_spillvar_offset): Proper support for
3127         multiple regbanks.
3128
3129 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
3130
3131         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
3132         the stack overflow changes.
3133
3134 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3135
3136         * mini-codegen.c: Make all bank macros depend on reg_bank.
3137
3138         * mini-codegen.c (mono_local_regalloc): Make free mask
3139         initialization regbank aware.
3140
3141 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3142
3143         * mini-codegen.c (mono_local_regalloc): Extract callee
3144         mask selection to a function and make it regbank aware.
3145
3146 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3147
3148         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
3149         code to deal with many regbanks.
3150
3151 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
3152
3153         * mini-codegen.c: More fp->regbank changes.
3154
3155 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
3156
3157         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
3158         of a hardcoded constant.
3159
3160 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
3161
3162         * method-to-ir.c (type_from_stack_type): Fix typo.
3163
3164 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
3165
3166         * mini-ia64.c (emit_move_return_value): Convert float return values to
3167         double.
3168
3169         * objects.cs: Add a new test.
3170         
3171         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
3172         VARARG methods to fix an assert later.
3173
3174         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
3175         end so it at least compiles.
3176
3177 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
3178
3179         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
3180
3181 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
3182
3183         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
3184         optimization to a new function (emit_optimized_ldloca_ir) and enable
3185         it for both ldloca and ldloca_s.
3186
3187 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
3188
3189         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
3190         gshared CASTCLASS code.
3191
3192         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
3193         amd64, where the libc stack unwinder encounters stack frames referring to
3194         native code in unmapped memory.
3195
3196         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
3197         sharing.
3198
3199         * generics.cs: Add new test.
3200
3201 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
3202
3203         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
3204         add a check that one of the ARM_FPU_ constants is defined.
3205
3206         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
3207         
3208         * mini-exceptions.c: Fix build on non-altstack platforms.
3209
3210         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
3211         sharing of vtypes.
3212
3213         * ir-emit.h: Add a comment to NEW_PCONST.
3214
3215         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
3216
3217         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
3218
3219         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
3220         after the changes to MonoJitDomainInfo.
3221
3222 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3223
3224         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
3225
3226 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3227
3228         * mini-ppc.c: Compiler warning fixes.
3229
3230 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3231
3232         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
3233         for pinvokes.
3234
3235 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3236
3237         * exceptions-ppc.c, mini-ppc.h: Compile
3238         mono_arch_handle_altstack_exception() on Darwin, too.
3239
3240 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3241
3242         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
3243         work on archs which don't have generic sharing implemented, only
3244         without the vtable_arg.
3245
3246 2008-09-26  Mark Probst  <mark.probst@gmail.com>
3247
3248         * mini.c: Added comment explaining why delegate ctor icall
3249         wrappers are compiled.
3250
3251 2008-09-26  Mark Probst  <mark.probst@gmail.com>
3252
3253         * mini.c: Don't produce trampolines to delegate ctor icall
3254         wrappers but compile them upfront.
3255
3256 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
3257
3258         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
3259         runtime-set function when going back to managed code. Currently this
3260         is used to set back the protection on the soft ovf pages and/or to
3261         throw the stack overflow exception that happened in unmanaged code.
3262
3263 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
3264
3265         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
3266         runtime-set function when going back to managed code. Currently this
3267         is used to set back the protection on the soft ovf pages and/or to
3268         throw the stack overflow exception that happened in unmanaged code.
3269
3270 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
3271
3272         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
3273         the support code for restoring stack protection after stack overflows
3274         that happen in unmanaged code. Don't set the exec permission on the
3275         soft overflow area.
3276
3277 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
3278
3279         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
3280         delegate->method_ptr is set. Fixes #428054.
3281
3282 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
3283
3284         * tests.cs: Rename to ratests.cs.
3285
3286         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
3287         emit_get_rgctx_... functions.
3288
3289 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3290
3291         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
3292
3293 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3294
3295         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
3296         before asserting that method is sharable.
3297
3298 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3299
3300         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
3301         whether method needs a static RGCTX wrapper used instead of
3302         complex conditions.
3303
3304         * generic-sharing.c, mini.h: A few functions moved to
3305         metadata/generic-sharing.c.
3306
3307 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3308
3309         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
3310         Generic code sharing for value types, which essentially means
3311         treating value type methods like static methods.  The RGCTX is
3312         passed in the same way.
3313
3314 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
3315
3316         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
3317         opcode when creating multi-dimensional arrays of open types.
3318
3319         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
3320         open generic types.
3321
3322         * generics.cs: Add a test.
3323
3324         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
3325
3326 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
3327
3328         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
3329
3330         * mini.c (mini_method_compile): Set it when running under the debugger. 
3331
3332         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
3333         vreg optimization if the flag is set.
3334
3335         * driver.c (mono_main): Add --attach= option to pass options to
3336         the attach agent.
3337
3338         * mini.c (sigquit_signal_handler): Start the attach agent.
3339
3340         * ssapre.c: Disable this to save space since it is not yet ported to
3341         linear IR.
3342
3343         * regalloc2.c: Disable this to save space.
3344
3345         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
3346
3347 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
3348
3349         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
3350         the -v option useful again.
3351
3352 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
3353
3354         * mini-amd64.c (mono_arch_output_basic_block): Add support for
3355         --break-at-bb.
3356
3357         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
3358         arrays of arrays. Fixes #428406.
3359
3360         * method-to-ir.c (mini_emit_castclass): Ditto.
3361
3362         * objects.cs: Add new test.
3363         
3364 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
3365
3366         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
3367         was wrong at it choked against target_type_is_incompatible for byref types.
3368
3369 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
3370
3371         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
3372         places.
3373
3374 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
3375
3376         * mini-exceptions.c: update a few more exceptions-related counters.
3377
3378 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
3379
3380         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
3381         new functions to allocate from persistent mempools.
3382
3383 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
3384
3385         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
3386         multiple register banks in the future.
3387
3388         * mini-codegen.c (mono_local_regalloc): Fix a warning.
3389
3390 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
3391
3392         * mini.c (type_to_eval_stack_type): Remove duplicated function.
3393
3394         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
3395
3396         * mini.h: Export type_to_eval_stack_type.
3397
3398         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
3399         is only ins->klass of byref types.
3400
3401 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
3402
3403         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
3404         (mini_emit_memcpy2): Ditto.
3405
3406         * mini-amd64.c: Fix a warning.
3407
3408 2008-09-21  Mark Probst  <mark.probst@gmail.com>
3409
3410         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
3411         linking.
3412
3413 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
3414
3415         * method-to-ir.c: Extract stloc micro-optimization to a
3416         function and apply it to all cases.
3417
3418 2008-09-19  Mark Probst  <mark.probst@gmail.com>
3419
3420         * method-to-ir.c: Don't fail generic code sharing in cases we
3421         already support.
3422
3423 2008-09-18  Mark Probst  <mark.probst@gmail.com>
3424
3425         * mini-ppc.c: Handle structs in tailcalls on Darwin.
3426
3427 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
3428
3429         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
3430         implementation.
3431
3432 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
3433
3434         * trace.c: make tracing more useful and correct, with per-thread
3435         id and indent info.
3436
3437 2008-09-15  Mark Probst  <mark.probst@gmail.com>
3438
3439         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
3440         doing a method call and the argument is an R4.
3441
3442 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
3443
3444         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
3445         generic methods.
3446
3447 2008-09-13  Mark Probst  <mark.probst@gmail.com>
3448
3449         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
3450
3451 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
3452
3453         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
3454         (MONO_JUMP_TABLE_FROM_INS): Ditto.
3455
3456 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
3457
3458         * driver.c: Add a --agent argument (not supported yet) to load managed
3459         agent assemblies before loading the main assembly, similarly to how the
3460         Java VM handles agents.
3461
3462 2008-09-11  Mark Probst  <mark.probst@gmail.com>
3463
3464         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
3465         function to do stack layout of local variables.
3466
3467 2008-09-11  Mark Probst  <mark.probst@gmail.com>
3468
3469         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
3470         calculation.
3471
3472 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
3473
3474         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
3475         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
3476         JIT if DISABLE_JIT is defined.
3477
3478         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
3479         defined.
3480
3481 2008-09-10  Mark Probst  <mark.probst@gmail.com>
3482
3483         * iltests.il.in: Disable the fconv test on PPC (the result is
3484         undefined according to ECMA).
3485
3486 2008-09-10  Mark Probst  <mark.probst@gmail.com>
3487
3488         * iltests.il.in: Enable tail call tests for PPC.
3489
3490         * mini.h: Add variable for storing incoming valuetype argument
3491         addresses for tail calls.
3492
3493         * mini-ppc.c: Implement valuetype arguments and return values for
3494         tailcalls on Linux.
3495
3496 2008-09-09  Mark Probst  <mark.probst@gmail.com>
3497
3498         * mini-ppc.c: Partially implement tail calls (struct arguments and
3499         return values not supported).
3500
3501         * method-to-ir.c: Enable tail calls on PPC.
3502
3503 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
3504
3505         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
3506         runtime-invoke wrappers to work around the problem of them getting
3507         assigned to a random class.
3508
3509         * aot-runtime.c (mono_aot_get_method): Ditto.
3510         
3511 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
3512
3513         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
3514         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
3515
3516 2008-09-07  Mark Probst  <mark.probst@gmail.com>
3517
3518         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
3519         until they're implemented properly.
3520
3521         * exceptions-ppc.c: Use arch-independent exception-handling code
3522         instead of custom one.
3523
3524         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
3525         for Linear IR.
3526
3527         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
3528
3529         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
3530         applies when __powerpc__ is defined.
3531
3532 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
3533
3534         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
3535         methods to their code to avoid computing the full name of wrappers and
3536         doing a lookup in a string hash table.
3537
3538 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
3539
3540         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
3541         we identify bblocks before method_to_ir () is ran.
3542
3543         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
3544         Also avoid optimizing branches pointing to themselves.
3545
3546         * mini.c (mini_method_compile): Ditto. Fixes #422947.
3547
3548 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
3549
3550         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
3551
3552 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
3553
3554         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
3555         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
3556         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
3557         'buf'.
3558
3559         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
3560         jumped to the same entry in plt_jump_table.
3561
3562 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
3563
3564         * method-to-ir.c (initialize_array_data): Handle field with RVA from
3565         dynamic images.
3566
3567 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
3568
3569         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
3570         other assignment can be if converted. Saves 1.5% on corlib size and fixes
3571         #421807.
3572
3573 2008-08-29  Geoff Norton  <gnorton@novell.com>
3574
3575         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
3576         segment, and doesn't properly handle .space as .text.  Fixes
3577         AOT Mach/ARM
3578
3579 2008-08-29  Geoff Norton  <gnorton@novell.com>
3580
3581         * mini.c: Disable the mach exception handler when running on 
3582         ARM
3583
3584 2008-08-29  Geoff Norton  <gnorton@novell.com>
3585
3586         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
3587         globals on Darwin/ARM
3588
3589 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
3590
3591         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
3592         since too many things depend on it. Instead, call 
3593         mono_runtime_set_no_exec ().
3594         
3595         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
3596         the new JIT.
3597
3598         * aot-compiler.c: Add an 'asm-only' AOT option.
3599
3600         * mini.c: Avoid initializing the runtime when doing AOT compilation.
3601                 
3602         * aot-compiler.c (compile_method): Disable gshared support for now as it
3603         doesn't yet work.
3604
3605 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
3606
3607         * mini-amd64.h : Fix a compiler warning.
3608
3609         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
3610           Changed to use a callback function to retrieve the unwind info.
3611           This avoids problems observed when code blocks were removed by
3612           unloading an app domain.
3613
3614         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
3615           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
3616           to work properly.
3617
3618         Contributed under MIT/X11 license.
3619
3620 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
3621
3622         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
3623           case to keep the stack aligned to 8.
3624
3625         Contributed under MIT/X11 license.
3626
3627 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
3628
3629         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
3630         avoid repeated linear searches.
3631
3632 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
3633
3634         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
3635         methods it can't handle.
3636         
3637         * aot-compiler.c (add_method): Avoid adding a method twice.
3638         (add_wrappers): Add runtime invoke wrappers for all methods.
3639
3640         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
3641         function to create an aot-compatible version of this trampoline.
3642
3643         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
3644
3645 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
3646
3647         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
3648
3649         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
3650         with a generic sharing failure.
3651
3652         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
3653
3654         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
3655         CEE_RETHROW. Fixes #419634.
3656
3657         * mini.c (mono_method_to_ir): Ditto.
3658
3659         * exceptions.cs: Add a new test.
3660         
3661         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
3662         to mono_type_stack_size_internal () since some callers might not pass in
3663         an rgctx.
3664
3665         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
3666         instrument_prolog. Fixes #419878.
3667
3668         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
3669         doubles in soft float mode volatile.
3670
3671 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
3672
3673         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
3674
3675         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
3676         to handle soft float correctly.
3677
3678         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
3679         the fast path.
3680
3681         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
3682
3683         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
3684         to sp, since the generics catch code requires it.
3685
3686         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
3687         copying.
3688
3689         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
3690         mono_arch_emit_imt_argument ().
3691
3692         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
3693
3694         * mini-arm.c tramp-arm.c: Generic sharing updates.
3695
3696 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
3697
3698         * mini-arm.c: Fix the arm build.
3699
3700         * generic-sharing.c (mini_type_get_underlying_type): New helper function
3701         handling enums, generic instances and generic sharing.
3702         (mini_type_stack_size_full): Ditto.
3703
3704         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
3705         
3706         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
3707
3708         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
3709
3710         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
3711         trampolines.
3712
3713         * mini-arm.c: Various small generic sharing changes.
3714
3715         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
3716         this for x86.
3717         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
3718         custom code.
3719
3720         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
3721         helper function to return a generic class init trampoline.
3722
3723         * method-to-ir.c mini.c: Use it.
3724         
3725         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
3726         arch-specfic function to return a generic class init trampoline.
3727
3728         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
3729         the GENERIC_CLASS_INIT custom code.
3730
3731         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
3732         a fatal error, not a sharing failure.
3733
3734         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
3735         needed.
3736
3737         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
3738         trampoline argument from MONO_ARCH_VTABLE_REG.
3739
3740         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3741         order of the arguments to the C trampoline: pass 'slot' as the trampoline
3742         argument, and pass the vtable in VTABLE_REG.
3743
3744         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3745         order of the arguments to the C trampoline: pass 'slot' as the trampoline
3746         argument, and pass the vtable in VTABLE_REG.
3747         (mono_arch_create_trampoline_code_full): Remove some special casing for
3748         the rgctx fetch trampoline.
3749
3750         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
3751         Fixes #419273.
3752
3753         * iltests.il: Add a test for it.
3754
3755 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
3756
3757         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
3758
3759         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
3760         no longer needed.
3761
3762         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
3763         use mono_jit_info_table_find () to avoid recursion.
3764         (mono_delegate_trampoline): Add a sync wrapper here.
3765
3766         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
3767         here.
3768
3769         * mini.c (mono_method_to_ir): Ditto.
3770         
3771         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
3772         add_sync_wrapper argument. Don't add a sync wrapper here.
3773         (mono_create_jump_trampoline): Don't add a sync wrapper here.
3774
3775         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
3776         
3777 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
3778
3779         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
3780           of nonvolatile registers back from MonoContext to CONTEXT.
3781
3782         Contributed under MIT/X11 license.
3783
3784 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
3785
3786         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
3787           arguments on Winx64 there are only 4 argument registers.  For this
3788           logic to work the last argument must be pulled from the stack.  
3789
3790         Contributed under MIT/X11 license.
3791
3792 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
3793
3794         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3795
3796         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
3797         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
3798         encode/decode_method_ref ().
3799
3800         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
3801
3802         * aot-runtime.c (decode_patch): Ditto.  
3803
3804         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
3805         MONO_PATCH_INFO_METHOD.
3806
3807         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
3808         MonoGenericJitInfo.
3809
3810         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
3811         MonoGenericJitInfo.
3812
3813         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
3814
3815         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
3816         one from the caller.
3817
3818         * aot-runtime.c (decode_generic_inst): New function to decode and
3819         return a interned generic inst.
3820         (decode_klass_ref): Use it.
3821         (decode_method_ref): Ditto.
3822
3823         * aot-compiler.c (emit_exception_debug_info): Save 
3824         jinfo->has_generic_jit_info too.
3825
3826 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
3827
3828         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
3829
3830         * iltests.il.in: Add a test for fconv_to_i.
3831
3832         * liveness.c: Disable the liveness2 pass for now to save space.
3833
3834         * regalloc2.c: Include mempool-internals.h to fix warnings.
3835
3836         * aot-compiler.c (encode_method_ref): Encode the context of generic
3837         instance methods.
3838
3839         * aot-runtime.c (decode_method_ref): Inflate generic methods using
3840         the context saved in the aot file.
3841
3842         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3843
3844         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
3845
3846         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
3847         volatile so they won't be optimized away.
3848
3849 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
3850
3851         * ssa.c:
3852         * ssa2.c:
3853         * mini.c:
3854         * regalloc2.c:
3855         * dominators.c: Remove duplicated functions that now are in
3856         mempool-internals.h.
3857
3858 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
3859
3860         * aot-compiler.c: Fix warnings.
3861
3862         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
3863
3864         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
3865
3866         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
3867         as the patch type.
3868
3869         * mini.c (mono_resolve_patch_target): Ditto.
3870         
3871         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
3872         (encode_klass_ref): Add support for encoding VARs/MVARs.
3873
3874         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
3875
3876         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
3877         the handling of the got entries into a separate 'decode_got_entry' function.
3878         Add support for RGCTX_FETCH.
3879
3880         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
3881         clobbered by the trampoline code.
3882
3883         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
3884         not clobbered by the indirect calling code.
3885
3886 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
3887
3888         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
3889         to fix the build.
3890
3891 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
3892
3893         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
3894         signature using the compilation mempool otherwise we would leak it.
3895
3896 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
3897
3898         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
3899         mono_emit_abs_call ().
3900
3901         * patch-info.h: Add GENERIC_CLASS_INIT.
3902
3903         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
3904
3905         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
3906         as their target as a near call.
3907
3908         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
3909         ABS handling code.
3910         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
3911
3912         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
3913         call to a runtime function described by a patch.
3914
3915         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
3916         mono_emit_abs_call, this has the advantage that the ABS handling code in
3917         mono_codegen () can handle them both, and can handle other stuff in the
3918         future without additional code.
3919
3920         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
3921         entry.
3922         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
3923         abs addresses.
3924
3925         * mini.h: Add missing bblock related prototypes.
3926
3927         * mini.h (MonoCompile): Remove unused reverse_inst_list and
3928         reverse_inst_list_len fields.
3929
3930         * mini.c: Refactor this file a bit by moving branch optimizations to 
3931         branch-opts.c.
3932
3933         * method-to-ir.c: Merge generic sharing changes missed earlier.
3934
3935         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
3936
3937         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
3938         shared patches. Process METHODCONST as a shared patch.
3939
3940         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
3941         as it crashes on the 2.0 mscorlib.
3942
3943         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
3944         to cause crashes.
3945         
3946         * aot-compiler.c: Use is_plt_patch () in a few additional places.
3947         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
3948         by IMT.
3949
3950         * aot-compiler.c: Reorganize the got handling code to be a bit more
3951         understandable.
3952
3953 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
3954
3955         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
3956         mono_patch_info_equals/hash, and use it to massively simplify
3957         get_plt_index ().
3958
3959         * mini.c (mono_patch_info_hash): Simplify this and add support for
3960         more patch types.
3961
3962         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
3963
3964         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
3965         handling code, since an offset is not enough to identify a trampoline.
3966
3967         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
3968
3969 2008-08-17  Mark Probst  <mark.probst@gmail.com>
3970
3971         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
3972
3973         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
3974
3975         * mini-ops.h: Argument and result types for OVF_CARRY ops.
3976
3977         * decompose.c: PPC decompositions for various ops.
3978
3979         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
3980
3981 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
3982
3983         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
3984         call the generic trampoline code using a call, instead of a jump, to
3985         remove some special casing from the generic trampoline code.
3986
3987         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
3988         (mono_codegen): Ditto.
3989
3990         * aot-compiler.c aot-runtime.c: Ditto.
3991
3992         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
3993
3994         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
3995         helper function to find the offset corresponding to a lazy fetch trampoline.
3996
3997         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
3998         when doing generic sharing.
3999
4000         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
4001         places.
4002         
4003         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
4004         mini-trampolines.c to be with the other trampoline creation functions.
4005
4006         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
4007         as it is equal to method->signature in most cases, add a 
4008         mono_emit_method_call_full variant which takes a signature and an imt
4009         argument as well.
4010
4011 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
4012
4013         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
4014         to this function, since it could be computed easily from the method 
4015         argument.
4016         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
4017         more.
4018
4019         * method-to-ir.c mini.c: Remove references to 
4020         compile_generic_method_wo_context.
4021
4022         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
4023         generic method calls.
4024         
4025         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
4026         dimensional non-szarrays.
4027
4028         * mini.c (mini_init): Register mono_array_new_1.
4029
4030         * jit-icalls.c (mono_array_new_1): New jit icall.
4031
4032         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
4033         pointing to the method.
4034
4035         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
4036         method addresses belonging to METHOD_JUMP patches in the 
4037         jump_target_got_slot_hash.
4038         (mono_aot_load_method): Ditto.
4039
4040         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
4041         METHOD_JUMP patches.
4042
4043         * mini.c (mini_create_jit_domain_info): New helper function which 
4044         initializes/frees domain->runtime_info.
4045         (mini_free_jit_domain_info): Ditto.
4046         (mini_init): Install the domain hook functions with the runtime.
4047
4048         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
4049         information maintained by the JIT.
4050
4051         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
4052         insertion into jump_table_hash into mono_codegen (), also implement proper
4053         locking.
4054
4055         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
4056         tail calls, it is already done by the aot code.
4057         
4058         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
4059         mechanism on amd64.
4060
4061         * iltests.il.in: Make the jmp test a bit more complex.
4062
4063         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
4064         generic instances which doesn't have a token.
4065
4066         * aot-runtime.c (decode_method_ref): Ditto.
4067         
4068         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
4069         can handle this case now.
4070         (handle_box): Ditto.
4071
4072 2008-08-15  Geoff Norton  <gnorton@novell.com>
4073
4074         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
4075         debugging check.
4076
4077 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
4078
4079         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
4080         calling generic methods.
4081
4082         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
4083
4084         * aot-runtime.c (decode_patch_info): Ditto.
4085
4086         * mini.c (mono_resolve_patch_target): Ditto.
4087         
4088         * patch-info.h: Add METHOD_RGCTX.
4089
4090         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
4091
4092 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
4093
4094         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
4095         arguments in registers.
4096
4097         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
4098         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
4099
4100         * mini.c (mini_method_compile): Abort aot compilation for generic
4101         methods if generic sharing is disabled.
4102         
4103         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
4104         an mrgctx.
4105
4106         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
4107         requiring an mrgctx.
4108
4109         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
4110         store instructions when converting a vcall to a normal call.
4111
4112         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
4113         mono_arch_find_jit_info.
4114
4115 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
4116
4117         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
4118         avoid calling mono_method_full_name () for every method even if the
4119         env var is not set.
4120         (check_inline_caller_method_name_limit): Ditto.
4121
4122 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
4123
4124         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
4125         assemblies in one run.
4126
4127         * aot-compiler.c (mono_compile_assembly): Only print out a count of
4128         skipped methods if it is not 0.
4129
4130         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
4131
4132 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
4133
4134         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
4135           MONO_ARCH_HAVE_UNWIND_TABLE.
4136
4137         Contributed under MIT/X11 license.
4138
4139 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
4140
4141         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
4142           from default optimizaton list on Winx64.
4143
4144         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
4145
4146         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
4147           the LMF from the MonoJitTlsData structure.
4148
4149         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
4150
4151         Contributed under MIT/X11 license.
4152
4153 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
4154
4155         * mini.c (sigsegv_signal_handler): Fix the build.
4156
4157         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
4158         assembly->aot_module.
4159
4160         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
4161         hash table. This simplifies and speeds up a lot of code, and fixes support
4162         for .netmodules.
4163
4164         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
4165         with the runtime.
4166
4167         * mini-exceptions.c: Ditto.
4168         
4169         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
4170         'native_offset' argument, since these are computed in the 
4171         mono_find_jit_info () function.
4172
4173         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
4174         is used by exceptions-ppc.c.
4175
4176         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
4177         mono_arch_find_jit_info ().
4178         
4179         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
4180         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
4181         generic code in mini-exceptions.c.
4182
4183 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
4184
4185         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
4186
4187         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
4188         
4189         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
4190         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
4191         called while holding the loader lock. Fixes #415608.
4192         (mono_aot_get_method_from_token_inner): Ditto.
4193
4194 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
4195
4196         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
4197         to reduce differences between this and the generic implementation in
4198         mini-exceptions.c.
4199         (ves_icall_get_frame_info): Ditto.
4200
4201         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
4202
4203         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
4204         longer neccesarry.
4205
4206         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
4207         mono_arch_get_call_filter () and make it non-static, for consistency with the
4208         other architectures.
4209
4210 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
4211
4212         * mini.c:
4213         * local-propagation.c:
4214         * mini-x86.c: Correct the name of arch defines.
4215
4216 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
4217
4218         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
4219         NO_EMULATE_LONG_SHIFT_OPS define.
4220
4221 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
4222
4223         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
4224         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
4225
4226         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
4227         MACH fixes. Merged from the 2.0 branch.
4228
4229         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
4230
4231         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
4232         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
4233
4234         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
4235
4236         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
4237         mono_marshal_get_native_wrapper () signature changes.
4238
4239 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
4240
4241         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
4242         conversion bug under arm.
4243
4244 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
4245
4246         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
4247
4248         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
4249         with overflow checking.
4250
4251 2008-08-05  Marek Habersack  <mhabersack@novell.com>
4252
4253         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
4254         to the genmdesc.pl file
4255
4256 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
4257
4258         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
4259         arg_array in the soft-float versions of the LOAD/STORE macros.
4260
4261         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
4262         implementation.
4263
4264         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
4265
4266 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
4267
4268         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
4269         a float HFA. Fixes #413621.
4270
4271 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
4272
4273         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
4274         frame_size to args_size. Fixes build.
4275
4276 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
4277
4278         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
4279         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
4280
4281         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
4282         the stack are not unaligned. Fixes #413247.
4283         
4284 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
4285
4286         * mini.c: update jitted methods performance counters.
4287
4288 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
4289
4290         * mini-exceptions.c: increase the exceptions thrown performance
4291         counter in mono_handle_exception ().
4292
4293 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
4294
4295         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
4296         can work with netmodules.
4297
4298 2008-07-28  Geoff Norton  <gnorton@novell.com>
4299
4300         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
4301         regression tests.
4302
4303 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
4304
4305         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
4306         correct place.
4307
4308 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
4309
4310         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4311           The float param registers and other param registers must be the 
4312           same index on Windows x64.
4313
4314         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
4315           ArgValuetypeAddrInIReg argument case.  Setting the argument
4316           op to OP_VTARG_ADDR (OP_REGOFFSET)).
4317
4318         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
4319           variable computed above as the copy length for arguments of storage
4320           type ArgValuetypeAddrInIReg.
4321
4322         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
4323           ArgValuetypeAddrInIReg argument case.  This case will rely on
4324           mono_arch_emit_outarg_vt to emit the correct code later in the process.
4325
4326         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
4327           a 32 byte stack allocation for all calls.  We will omit the adjustment for
4328           jump and tail call instructoins as they do not follow the typical call behavior.
4329
4330         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
4331           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
4332           local variable and pass the local variable by reference to the called method.
4333
4334         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
4335           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
4336           of a struct is passed in a register it must be saved with the other
4337           volatile argument on the stack.
4338
4339         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
4340           frame pointer the stack adjustment value must be saved to the unwind 
4341           info structure.
4342
4343         Contributed under MIT/X11 license.
4344
4345 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
4346
4347         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
4348         which got lost in the merge.
4349
4350 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
4351
4352         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
4353         build.
4354
4355         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
4356         
4357         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
4358         icalls, since they won't be patched.
4359
4360         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
4361         different code sequence when running under valgrind to prevent some valgrind
4362         errors.
4363
4364         * iltests.il.in: Add new regression test.
4365
4366         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
4367         end with a throw.
4368
4369         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
4370         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
4371
4372         * iltests.il.in: Add new test.
4373
4374         * aot-compiler.c: Fix some warnings.
4375
4376         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
4377         Fixes #412494.
4378
4379 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
4380
4381         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
4382         (mini_usage_jitdeveloper): Add a missing --wapi option.
4383
4384 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
4385
4386         * mini-codegen.c: Simplify the is_fp macros.
4387         (free_up_ireg): Remove, use free_up_reg instead.
4388         (free_up_reg): Fix the fp case.
4389
4390 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
4391
4392         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
4393         lowered earlier.
4394
4395         * exceptions-x86.c: Merge some changes which seemed to have got lost
4396         in the linear-ir merge.
4397
4398         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
4399
4400         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
4401         long vreg volatile even if the variable was already created.
4402
4403         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
4404         volatile variables.
4405
4406 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
4407
4408         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
4409
4410         * mini.c (mono_jit_compile_method_inner): Add support for 
4411         MONO_EXCEPTION_BAD_IMAGE.
4412
4413         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
4414         mini_method_get_context () returns NULL. Fixes #356531.
4415
4416         * mini.c (mono_method_to_ir): Ditto.
4417         
4418         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
4419         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
4420
4421 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
4422
4423         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
4424         in the LDFTN implementation.
4425
4426 2008-07-25  Mark Probst  <mark.probst@gmail.com>
4427
4428         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
4429         code, patch calls to icalls, too, even if they're not in the
4430         shared generic code hash.  Fixes #411962.
4431
4432 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
4433
4434         * cpu-x86.md: Increase the length of the fcall opcodes.
4435
4436         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
4437         calls returning floats.
4438
4439         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
4440         on NEWARR.
4441         
4442         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
4443         missed earlier.
4444
4445         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
4446         into the domain->method_code_hash.
4447
4448         * aot-compiler.c: Fix win32 build.
4449
4450         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
4451         
4452         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
4453         gshared NEWARR implementation.
4454
4455         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
4456
4457         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
4458         can be used outside of method_to_ir.
4459
4460         * mini.h (MonoCompile): Add arg_types field.
4461
4462         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
4463         
4464         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
4465         the values of the local arg_array and param_types array.
4466
4467 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
4468
4469         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
4470         got accesses might only get generated later when NEWOBJ is decomposed.
4471         
4472         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
4473         looking up the native code of the target method when a delegate is called
4474         for the first time.
4475
4476         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
4477         optimization.
4478
4479         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
4480
4481         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
4482         AOT work on platforms without a working dlsym implementation.
4483
4484         * mini.h: Bump AOT image format version.
4485         
4486 2008-07-24  Mark Probst  <mark.probst@gmail.com>
4487
4488         * mini-exceptions.c: Free a MonoType with
4489         mono_metadata_free_type() instead of g_free().
4490
4491         * aot-runtime.c: Free a MonoType.
4492
4493 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
4494
4495         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
4496         optimization.
4497
4498         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
4499         fp stack on x86.
4500
4501 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
4502         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
4503         profiler hook.
4504
4505 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
4506
4507         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
4508         NEWOBJ calls on valuetypes.
4509
4510         * iltests.il.in: Add new test.
4511
4512         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
4513
4514 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
4515
4516         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
4517         is no longer needed.
4518
4519         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
4520         non register sized integer arguments.
4521         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
4522         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
4523         emit_memcpy2 ().
4524
4525         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
4526         CEE_MONO_RETOBJ.
4527         
4528         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
4529         two a binop with different sized arguments is emitted.
4530
4531         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
4532         instruction in the ins==NULL case.
4533
4534 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
4535
4536         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
4537
4538         * mini-x86.c: Fix osx build.
4539
4540         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
4541         opcodes as well.
4542
4543         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
4544         instruction for non int sized variables.
4545
4546         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
4547         implementation.
4548
4549 2008-07-23  Robert Jordan  <robertj@gmx.net>
4550
4551         * method-to-ir.c: Fix MSVC build.
4552
4553 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
4554
4555         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
4556         a non int sized type, widen it to an int since newer versions of gcc seem to
4557         generate code which needs this.
4558
4559         * ssa2.c abcremoval2.c: Fix warnings.
4560
4561         * *: Merge the Linear IR branch.
4562
4563         The original branch is at trunk/branches/vargaz/mini-linear-il, and
4564         the ChangeLog file there describes all the changes done over the years. 
4565         Further documentation can be found at www.mono-project.com/Linear_IL.
4566
4567 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
4568
4569         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4570           The float param registers and other param registers must be the 
4571           same index on Windows x64.
4572
4573         Contributed under MIT/X11 license.
4574
4575 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
4576
4577         * mini.c: Make the previous fix GC safe.
4578
4579 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
4580
4581         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
4582
4583 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
4584
4585         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
4586           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
4587           ArgValuetypeAddrInIReg instead.
4588
4589         Contributed under MIT/X11 license.
4590
4591 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
4592
4593         * mini-codegen.c (get_register_spilling): Fix a warning.
4594
4595 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
4596
4597         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
4598         for types which the initialization fails. Raises the provided exception
4599         at the right stop after cleanup.
4600
4601 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
4602
4603         * aot-compiler.c: Free most of the memory allocated during compilation.
4604
4605         * mini.c (mini_parse_debug_options): Fix a leak.
4606         
4607         * mini.c (mini_method_compile): Don't add the method to the jit info tables
4608         during aot compilation.
4609
4610 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
4611
4612         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
4613         it has too much register pressure.
4614
4615 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
4616
4617         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
4618
4619 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
4620
4621         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4622         on x86.
4623
4624         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4625         on amd64 similar to the way it is done on arm.
4626
4627         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4628
4629         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
4630         consistency, normalize error messages, avoid loading aot-only modules in
4631         normal mode.
4632
4633         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
4634         for consistency.
4635
4636         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
4637
4638 2008-07-11  Martin Baulig  <martin@ximian.com>
4639
4640         * debug-debugger.h
4641         (MonoDebuggerInfo): Add `interruption_request'.
4642
4643 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
4644
4645         * aot-compiler.c (emit_plt): Remove some dead code.
4646
4647         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
4648
4649         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
4650         return the plt info offset belonging to a given plt entry.
4651
4652         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
4653         mono_aot_get_plt_info_offset.
4654         
4655         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
4656         similar to the amd64 code by makeing jumps through a separate jump table 
4657         instead of embedding the jump addresses into the code.
4658
4659 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
4660
4661         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
4662         method.
4663
4664 2008-07-10  Martin Baulig  <martin@ximian.com>
4665
4666         * mini.c (mini_method_compile): Disable generics sharing when
4667         running in the debugger.
4668
4669 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
4670
4671         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
4672
4673         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
4674         the local register allocator from running out of registers on x86 when 
4675         using aot.
4676
4677 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
4678
4679         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
4680         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
4681         C4146.
4682
4683         Contributed under MIT/X11 license.
4684
4685 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
4686
4687         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
4688         speed up the assembler.
4689
4690 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
4691
4692         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
4693         support.
4694
4695         * mini.c: Move the soft float handling macros a bit earlier, add 
4696         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
4697         place.
4698
4699         * mini.h: Add prototype for mono_arch_fixup_jinfo.
4700
4701         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
4702         read-only to help catch code allocation requests.
4703         
4704         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
4705         and turn it off when using --aot-only or when compiling with --aot=full.
4706
4707         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
4708         jump table for switches from the normal domain mempool, not the code
4709         manager.
4710
4711         * mini-trampolines.c (get_unbox_trampoline): New function to return an
4712         unbox trampoline which handles aot-only mode too.
4713
4714         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
4715         an AOTed unbox trampoline.
4716
4717         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
4718
4719 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
4720
4721         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
4722         ""
4723
4724         Contributed under MIT/X11 license.
4725
4726 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
4727
4728         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
4729           the unwind information for the method at the end of the allocated block.
4730           
4731         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
4732           MonoCompileArch to hold the unwind info for SEH on Winx64
4733         
4734         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
4735           frame pointer info for the method being compiled.
4736           
4737         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
4738           the call to mono_exception_from_token.
4739           
4740         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
4741           storing the method prolog information in a format that the Winx64 SEH can understand.  This
4742           information is stored a the end of the method block because it is all 32-bit offset based.
4743
4744         Contributed under MIT/X11 license.
4745
4746 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
4747
4748         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
4749
4750         * wapihandles.c: Fix warnings.
4751
4752         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
4753         mode.
4754
4755         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
4756         mono_jit_compile_method in aot-only mode since that calls the type 
4757         initializer.
4758         
4759         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
4760         get_delegate_invoke_impl in aot-only mode.
4761
4762         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
4763
4764 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
4765
4766         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
4767
4768         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
4769         is on by default.
4770
4771         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
4772
4773         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
4774         init trampoline from the AOT file as well.
4775
4776         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
4777         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
4778         code.
4779
4780         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
4781         mono_init.
4782
4783         * exceptions-amd64.c: Add _full variants for the remaining exception code
4784         creation functions as well, allow emission of relocatable code, remove
4785         caching since that is now done by the caller.
4786
4787         * mini-exceptions.c: Add _full variants for the remaining exception code
4788         creation functions as well, add aot-only support.
4789
4790         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
4791         if we can determine a proper token for them.
4792         (add_wrappers): Add a few more wrappers.
4793         (emit_method_code): Remove some dead code.
4794         (emit_trampolines): Emit exception code too.
4795
4796         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
4797
4798         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
4799         mono_array_new_va which avoids varargs.
4800
4801         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
4802
4803         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
4804         mono_arch_create_specific_trampoline () in all places.
4805
4806         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
4807         a bit so it can be used for other things as well.
4808         
4809         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
4810         on demand as well.
4811
4812         * exceptions-amd64.c: Rename the caching from the exception code creation
4813         functions, it is done by the caller instead.
4814         
4815         * exceptions-amd64.c: Change the signature of the exception code creation 
4816         functions to allow the creation of relocatable code later.
4817
4818         * mini-exceptions.c: Add a set of functions to query the various 
4819         runtime-generated exception functions.
4820
4821         * mini.c mini-exceptions.c: Use the newly added functions instead of the
4822         mono_arch_.. () functions.
4823         
4824 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
4825
4826         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
4827
4828         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
4829
4830         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
4831         (mini_get_vtable_trampoline): Ditto.
4832
4833         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
4834         code in the AOT case by returning the code size and a list of relocations to
4835         the caller.
4836
4837         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
4838
4839 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
4840
4841         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
4842           clean the stack.
4843
4844         Contributed under MIT/X11 license.
4845
4846 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
4847
4848         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
4849         so the buffer size can be computed correctly. Fixes #404735.
4850
4851         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
4852         normally as cfg->debug_info is already freed.
4853
4854 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
4855
4856         * mini-amd64.c: For calls returning vtypes in registers, don't store
4857         the return address on the stack, instead allocate a separate local for
4858         it. Fixes #404729.
4859
4860 2008-07-05  Mark Probst  <mark.probst@gmail.com>
4861
4862         * mini-trampolines.c, mini.h: Add an argument to
4863         mono_create_jit_trampoline_in_domain() for turning off the adding
4864         of the sync wrapper.
4865
4866         * mini.c: Use the JIT trampoline without sync instead of
4867         ldftn_nosync in static RGCTX invoke wrappers so that the call can
4868         be patched.
4869
4870 2008-07-04  Mark Probst  <mark.probst@gmail.com>
4871
4872         * driver.c: Turn on GSHARED optimization by default.
4873
4874 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
4875
4876         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
4877         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
4878
4879         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
4880         create a variant of the generic trampoline code callable from AOTed trampolines.
4881
4882         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
4883         trampoline code callable from AOTed trampolines.
4884
4885         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
4886
4887 2008-07-04  Mark Probst  <mark.probst@gmail.com>
4888
4889         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
4890         pass-through manner.
4891
4892         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
4893         and don't fail sharing for them anymore.
4894
4895         * mini-exceptions.c: Handle exceptions in shared generic methods.
4896
4897         * generic-sharing.c: When checking the context of a generic
4898         method, also check its class's context.  Don't treat wrappers as
4899         sharable.
4900
4901         * mini-trampolines.c: Some code factored out to
4902         metadata/generic-sharing.c.  Handle the MRGCTX case.
4903
4904         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
4905         we must deal with the method being of another instantiation of the
4906         class.  Add static rgctx invoke wrappers to generic methods.
4907
4908 2008-07-04  Mark Probst  <mark.probst@gmail.com>
4909
4910         * mini.c: Provide all jit infos of generic shared methods with a
4911         generic jit info.
4912
4913         * mini-exceptions.c: Handle the new situation that a generic info
4914         might be available, but not info about the this/vtable/mrgctx
4915         variable.
4916
4917 2008-07-03  Mark Probst  <mark.probst@gmail.com>
4918
4919         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
4920         generic methods.
4921
4922 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
4923
4924         * dominators.c (check_dominance_frontier): Fix a warning.
4925
4926         * mini.h: Add some missing prototypes.
4927
4928         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
4929
4930         * driver.c (mono_jit_init_version): Correct the comments since the first
4931         argument should be the name of the root domain, not a filename.
4932
4933         * aot-runtime.c (make_writable): Error out if this is called while running
4934         with --aot-only.
4935         (load_aot_module): Ditto.
4936
4937         * aot-compiler.c: Really fix the computation of method indexes.
4938
4939         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
4940         optimizations as this is no longer called frequently.
4941
4942         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
4943         method and the invoke impl code and pass it to the delegate trampoline instead of
4944         just the delegate class.
4945
4946 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
4947
4948         * aot-compiler.c: Fixup the computation of method indexes.
4949         (add_wrappers): Create the base methods of the runtime invoke wrappers using
4950         the method builder infrastructure.
4951
4952         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
4953         has no header.
4954
4955         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
4956         mode, load the method right away instead of creating a trampoline.
4957
4958         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
4959
4960         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
4961         some checks a bit.
4962
4963 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
4964
4965         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
4966         (mono_aot_load_method): Use method_index instead of method->token.
4967
4968         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
4969         can handle icalls etc. properly.
4970
4971         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4972
4973         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
4974
4975         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
4976         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
4977         JIT_ICALL_ADDR patch type.
4978
4979         * patch-info.h: Add JIT_ICALL_ADDR patch type.
4980
4981         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
4982         request flag.
4983         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
4984
4985         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
4986
4987 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
4988
4989         * mini.c: Use domain->jit_code_hash_lock for controlling access to
4990         domain->jit_code_hash.
4991
4992 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
4993
4994         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
4995
4996 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
4997
4998         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
4999         get_this_arg_from_call, let it compute it when needed.
5000
5001         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
5002         gsctx from code only when needed.
5003
5004         * mini-trampolines.c (get_generic_context): Rename this to 
5005         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
5006         it can be called by the arch backends.
5007
5008         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
5009
5010 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
5011
5012         * driver.c (mono_main): Add experimental --aot-only command line option.
5013
5014         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
5015         set.
5016
5017 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
5018
5019         * driver.c (DllMain): Remove mono_module_handle.
5020
5021         Contributed under MIT/X11 license.
5022
5023 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
5024
5025         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
5026         for emitting methods which are not in the source assembly. Detect and report
5027         failure of assembling+linking.
5028         
5029         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
5030
5031         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
5032
5033 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
5034
5035         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
5036
5037 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
5038
5039         * mini.h: Remove some obsolete prototypes.
5040
5041         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
5042
5043 2008-06-24  Mark Probst  <mark.probst@gmail.com>
5044
5045         * mini.c (get_object_generic_inst): Variable-sized arrays are not
5046         supported by Visual Studio, so use alloca().
5047
5048 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
5049
5050         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
5051         Fixes #402585.
5052
5053 2008-06-23  Mark Probst  <mark.probst@gmail.com>
5054
5055         * mini.c: Fail sharing of a generic method if it contains an open
5056         catch clause (because we don't pass MRGCTXs yet).
5057
5058 2008-06-23  Mark Probst  <mark.probst@gmail.com>
5059
5060         * mini.c: When compiling a method with generic sharing, insert the
5061         method instantiated with an all-Object generic context into the
5062         jit info table, instead of the context of the first instantiation
5063         of the method we happen to compile.
5064
5065 2008-06-18  Martin Baulig  <martin@ximian.com>
5066
5067         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
5068         `major_version' and `minor_version'.
5069
5070 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5071
5072         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
5073         mono_method_is_generic_sharable_impl() takes an additional
5074         argument specifying whether to treat type variables as reference
5075         types.
5076
5077 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5078
5079         * mini.h: Removed obsolete prototypes.
5080
5081 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5082
5083         * mini.c: Don't fail generic sharing for initobj and sizeof - we
5084         already handle them.
5085
5086 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5087
5088         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
5089         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
5090         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
5091         tramp-x86.c: Added a MonoGenericContext* argument to
5092         mono_arch_get_unbox_trampoline() so that it can call other
5093         functions which require it.
5094
5095 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5096
5097         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
5098         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
5099         mono_arch_get_this_arg_from_call() takes a
5100         MonoGenericSharingContext* as well.
5101
5102 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5103
5104         * mini.c: Factor out code for emitting unbox into emit_unbox() and
5105         implement generic sharing of unbox.
5106
5107 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5108
5109         * mini.c: Don't compute the vtable to determine whether a field is
5110         special static, because it might not work for open types.
5111
5112 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5113
5114         * mini.c: Removed the unused token_type and token_source arguments
5115         from get_runtime_generic_context_ptr().
5116
5117 2008-06-17  Marek Habersack  <mhabersack@novell.com>
5118
5119         * mini.c (ADD_BINOP): fix the build
5120
5121 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
5122
5123         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
5124         a widening op.
5125
5126 2008-06-16  Mark Probst  <mark.probst@gmail.com>
5127
5128         * mini.h: Removed class relations enum that's not used anymore.
5129
5130 2008-06-16  Mark Probst  <mark.probst@gmail.com>
5131
5132         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
5133
5134         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
5135         the lazy fetch trampoline access code.
5136
5137 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
5138
5139         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
5140
5141 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
5142
5143         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
5144
5145         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
5146
5147         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
5148
5149 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5150
5151         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
5152         intrinsics.
5153
5154         * mini-ops.h: Add MIN/MAX_UN opcodes.
5155
5156         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
5157         intrinsics.
5158
5159         * basic-math.cs: Add more min/max tests.
5160
5161         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5162
5163 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5164
5165         * mini.c: Small fix in the prologue of emit_castclass.
5166
5167 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5168
5169         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5170
5171         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
5172         do not work even for unsigned types. Fixes #400014.
5173
5174         * basic-math.cs: Add regression tests for unsigned Min/Max.
5175
5176 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5177
5178         * mini.c: Added additional context_used argument to several
5179         functions, which will be needed for sharing generic methods.  Use
5180         GET_RGCTX macro wherever appropriate.  Declare only one
5181         context_used in mono_method_to_ir().
5182
5183 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5184
5185         * mini.c, generic-sharing.c: Removed generic class relations.
5186
5187         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
5188         functions due to MRGCTX changes.
5189
5190 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5191
5192         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
5193         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
5194         with calculated IMT.
5195
5196         * mini.c: Generic sharing of calls via generic interfaces.
5197
5198         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
5199         generic method with non-constant MonoGenericContext*.  Instead,
5200         the context is taken out of the method itself.
5201
5202 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5203
5204         * mini.c: Generic sharing of ldvirtftn.
5205
5206 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5207
5208         * mini.c: Generic sharing of ldftn.
5209
5210 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5211
5212         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
5213
5214 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5215
5216         * mini.c: Generic sharing of the special case of ldtoken followed
5217         by a call to GetTypeFromHandle.
5218
5219 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5220
5221         * mini.c: Generic sharing of box for nullable types.
5222
5223 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5224
5225         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
5226         are passed on the stack. Fixes #324807.
5227
5228 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
5229
5230         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
5231         for the ArgValuetypeAddrInIReg case.
5232
5233         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
5234         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
5235
5236         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
5237         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
5238         local variable and pass the local variable by reference to the called method.
5239           
5240         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
5241         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
5242
5243         Contributed under MIT/X11 license.
5244
5245 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
5246
5247         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
5248
5249         * debug-mini.c (mono_debug_print_vars): Release memory after printing
5250         everything.
5251
5252 2008-06-10  Martin Baulig  <martin@ximian.com>
5253
5254         * debug-mini.c
5255         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
5256
5257 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
5258
5259         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
5260         possible error when no arguments are passed.
5261
5262         Contributed under MIT/X11 license.
5263
5264 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
5265
5266         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
5267         where the file name is NULL.
5268
5269 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
5270
5271         * mini.c: Fix s390 build.
5272
5273 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
5274
5275         * trace.c (mono_trace_parse_options): Fix warnings.
5276
5277         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
5278
5279 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
5280
5281         * mini.c (remove_block_if_useless): Avoid printing the method name.
5282         
5283         * mini.c: Remove needless setting of ins->cil_code which is now done by 
5284         MONO_INST_NEW.
5285
5286         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
5287         LMF. Not yet used.
5288
5289         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
5290         translated code after it has been patched.
5291
5292 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
5293
5294         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
5295         avoid problems during code patching on SMP systems.
5296         (emit_call): Avoid adding a patch info which is already added by 
5297         emit_call_body.
5298         (mono_arch_emit_exceptions): Ditto.
5299
5300 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
5301
5302         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
5303         MONO_TYPE_ISSTRUCT already checks for it.
5304
5305 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
5306
5307         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
5308           structs with floats on Winx64 the float registers are not used.  
5309           The integer registers are always used..
5310         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
5311           only one register will be used and only if the size of the struct 
5312           is 1,2,4, or 8 bytes.
5313
5314         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
5315           to work for Winx64.
5316
5317         Contributed under MIT/X11 license.
5318
5319 2008-06-05  Martin Baulig  <martin@ximian.com>
5320
5321         * debug-debugger.c (debugger_lookup_class): Also call
5322         mono_class_setup_methods() here; we're only called from RTI.
5323
5324 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
5325
5326         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
5327         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
5328         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
5329         Post-process object files and add dtrace-generated object, if necessary.
5330
5331         Contributed under MIT/X11 license.
5332
5333 2008-06-04  Mark Probst  <mark.probst@gmail.com>
5334
5335         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
5336         element class.
5337
5338         * mini.c: Generic sharing for unbox.any and castclass.
5339
5340 2008-06-04  Mark Probst  <mark.probst@gmail.com>
5341
5342         * mini.c: Ignore tailcall prefix in shared generic code and when
5343         doing calls which require a vtable/rgctx argument.
5344
5345 2008-06-04  Mark Probst  <mark.probst@gmail.com>
5346
5347         * mini.c: Don't free the JIT info.
5348
5349         * driver.c: Changes in the JIT info table testing code.
5350
5351 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
5352
5353         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
5354         interruption. Fix some warnings.
5355
5356         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
5357         interruption_checkpoint.
5358
5359 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
5360
5361         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
5362         from embedding applications.
5363
5364 2008-06-02  William Holmes  <billholmes54@gmail.com>
5365
5366         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
5367           reserving 32 bytes on the stack when making calls. 
5368
5369         Contributed under MIT/X11 license.
5370
5371 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
5372
5373         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
5374         the linear IL branch.
5375
5376         * driver.c: Print out more information for --version on arm.
5377
5378 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
5379
5380         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
5381         bb_exit instead, since out of line bblocks might not actually be emitted
5382         out-of-line.
5383         
5384         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
5385         maximum epilog size for out of line bblocks if tracing is enabled.
5386
5387         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
5388
5389 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
5390
5391         * arrays.cs: Regression tests for allocating arrays with negative sizes.
5392
5393 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
5394
5395         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
5396         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
5397         opcodes.
5398
5399 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
5400
5401         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
5402         the 'value' to store is a constant.
5403
5404         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
5405
5406         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
5407         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
5408
5409 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
5410
5411         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
5412         for accessing method->generic_container.
5413
5414 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
5415
5416         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
5417         
5418         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
5419
5420         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
5421
5422         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
5423         fails.
5424
5425 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
5426
5427         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
5428
5429         * mini.c: Handle the case when mono_class_vtable () fails.
5430
5431 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
5432         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
5433         the stat profiler.
5434
5435 2008-05-22  Mark Probst  <mark.probst@gmail.com>
5436
5437         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
5438         together with domain sharing.
5439
5440 2008-05-22  Mark Probst  <mark.probst@gmail.com>
5441
5442         * mini.c: Treat callvirts to final methods like non-virtual calls
5443         when doing generic sharing, i.e. look them up in the runtime
5444         generic context.
5445
5446 2008-05-22  Mark Probst  <mark.probst@gmail.com>
5447
5448         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
5449         with computed types (for generic sharing).
5450
5451         * mini.c: Generic sharing for mkrefany and refanyval.
5452
5453 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
5454
5455         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
5456         possible.
5457
5458         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
5459         the generic sharing code.
5460         
5461         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
5462         when needed.
5463
5464 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
5465
5466         * mini.h: Remove the declaration of mono_aot_init_vtable ().
5467
5468 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
5469
5470         * driver.c: updated copyright date
5471
5472 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
5473
5474         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
5475         needed.
5476
5477 2008-05-19  Martin Baulig  <martin@ximian.com>
5478
5479         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
5480         pointing to the new `_mono_debug_using_mono_debugger' variable.
5481
5482         * driver.c
5483         (mono_main): Check mono_debug_using_mono_debugger() rather than
5484         the `MONO_INSIDE_MDB' environment variable to check whether we're
5485         inside the debugger.
5486
5487 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
5488
5489         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
5490         argument.
5491
5492 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
5493
5494         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
5495
5496         * mini.c: Added mini_assembly_can_skip_verification. This
5497         function checks if the assembly requested to skip verification. 
5498         Fixes part of #387274.
5499
5500 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
5501
5502         * mini.c (mini_get_method): Disable the check for open generic classes when
5503         using generic sharing.
5504
5505         * generics.cs: Add a test for #387034.
5506
5507         * mini.c (mini_get_method): Check whenever the method class is an open generic
5508         type, and return NULL in that case, causing a verification error. Fixes
5509         #384123.
5510
5511 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
5512
5513         * driver.c (mono_main): Revert r102623. The right
5514         thing to do is to enable the verifier under verifiable
5515         unless a --security flag was passed.
5516
5517         We need this non-trivial behavior for --verify-all otherwise
5518         mcs-compileall won't be able to use it. As it needs everything to
5519         be verified under validil.
5520
5521 2008-05-06  Martin Baulig  <martin@ximian.com>
5522
5523         Fix #383749.
5524
5525         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
5526         (mono_debugger_thread_cleanup): Likewise.
5527         (mono_debugger_extended_notification): Likewise.
5528
5529 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
5530
5531         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
5532         against both inflated and non-inflated methods. We need to check against the
5533         generic definition for cases where the instantiated method is not visible.
5534         We need to check against the inflated types for cases where the instantiation
5535         changes any super type. This fixes #382986.
5536
5537         Note that this doesn't need to be applied to other parts of mono_method_to_ir
5538         that check for visibiliy as generic params only appears as the type subject
5539         of tokens on call opcodes. Field manipulation and ldftn must always
5540         target an exact type.
5541
5542 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
5543
5544         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
5545         if no related --security flag is passed.
5546
5547 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
5548
5549         * mini-arch.h: Prepare support for ppc64.
5550
5551         Contributed under MIT/X11 license.
5552
5553 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
5554
5555         * aot-runtime.c: Prepare support for ppc64.
5556
5557         Contributed under MIT/X11 license.
5558
5559 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
5560
5561         * mini-ops.h: Prepare support for ppc64.
5562
5563         Contributed under MIT/X11 license.
5564
5565 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
5566
5567         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
5568
5569         Contributed under MIT/X11 license.
5570
5571 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
5572
5573         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
5574         assemblies, since aot_name is not a full path, causing us to load MS.NET 
5575         assemblies on windows.
5576
5577 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
5578
5579         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
5580         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
5581         * main.c: Use UTF-8 encoded command line instead of Windows default code
5582         page on Windows to support Unicode.
5583         * driver.c (DllMain): New function for mixed-mode assembly support.
5584         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
5585         export __stdcall functions without decoration.
5586
5587         Contributed under MIT/X11 license.
5588
5589 2008-04-28  Mark Probst  <mark.probst@gmail.com>
5590
5591         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
5592         saving it very early.
5593
5594 2008-04-28  Mark Probst  <mark.probst@gmail.com>
5595
5596         * mini.h, mini.c: Lots of code for accessing the old RGCTX
5597         deleted.  The only way to access the new RGCTX is via the
5598         trampline.
5599
5600         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
5601         vtable instead of the RGCTX to static methods.
5602
5603         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
5604         accessing the new RGCTX.
5605
5606         * generic-sharing.c: There is no separation between self, type
5607         arguments and other types in the RGCTX anymore.
5608
5609 2008-04-25  Jonathan Chambers <joncham@gmail.com>
5610
5611         * mini-amd64.c (add_general): Remove previous stack adjustment.
5612         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
5613         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
5614         for 32 bytes of stack space reserved for all calls.
5615         
5616         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
5617         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
5618         adjustment.
5619         
5620         Code contributed under MIT/X11 license.
5621
5622 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
5623
5624         * mini.c (mini_method_verify): Only verify non-inflated methods, check
5625         against the root definition, peeling out method and type instantiations.
5626         Cache verify success results, code that fails verification is still
5627         checked multiple times.
5628
5629 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
5630
5631         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
5632
5633 2008-04-23  Jonathan Chambers <joncham@gmail.com>
5634
5635         * mini-amd64.c (add_general): Always increment stack on Win64.
5636         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
5637         on Win64.
5638         
5639         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
5640         stack based argument handling on Win64.
5641         
5642         Code contributed under MIT/X11 license.
5643
5644 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
5645
5646         * Makefile.am (version.h): Add support for git-svn.
5647
5648 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
5649
5650         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
5651         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
5652         avoiding allocations and libc functions which might deadlock.
5653         
5654         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
5655         'no-gdb-backtrace' option is set.
5656
5657         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
5658
5659         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
5660
5661 2008-04-21  Martin Baulig  <martin@ximian.com>
5662
5663         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
5664         and `get_lmf_addr'; `notification_address' is no longer a pointer.
5665
5666 2008-04-21  Martin Baulig  <martin@ximian.com>
5667
5668         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
5669         `thread_vtable', `event_handler_ptr' and `event_handler'.
5670
5671 2008-04-21  Martin Baulig  <martin@ximian.com>
5672
5673         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
5674         allows delayed initialization of the `executable_code_buffer' when
5675         attaching.
5676
5677 2008-04-21  Martin Baulig  <martin@ximian.com>
5678
5679         * mini.h (mono_debugger_create_notification_function): Removed.
5680         * tramp-*.c (mono_debugger_create_notification_function): Removed.
5681
5682         * mdb-debug-info64.s
5683         (MONO_DEBUGGER__notification_function): Added this in the .text section.
5684
5685         * mdb-debug-info32.s
5686         (MONO_DEBUGGER__notification_function): Added this in the .text section.
5687
5688         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
5689         currently only works on x86 and x86_64, so don't create it on ppc.
5690
5691 2008-04-21  Martin Baulig  <martin@ximian.com>
5692
5693         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
5694
5695         * mini.c
5696         (mini_method_compile): In the fp elimination check, check
5697         `debug_options.mdb_optimizations' in addition to
5698         mono_debug_using_mono_debugger().       
5699
5700         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
5701         disable some JIT optimizations which are only disabled when
5702         running inside the debugger.
5703         Added `--help-debug' option to describe the debugging options.
5704         (parse_debug_options): New static function to parse the `--debug'
5705         options, so we can easily add more stuff in future.
5706
5707 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
5708
5709         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
5710         the method has no body.
5711
5712 2008-04-19  Jonathan Chambers <joncham@gmail.com>
5713
5714         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
5715         assembly is not allowed in MSVC 64-bit compiler. 
5716         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
5717         as we get floating point exceptions everywhere.
5718         
5719         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
5720         correctly align arguments for call to throw_exception.
5721         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
5722         
5723         Code contributed under MIT/X11 license.
5724
5725 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
5726
5727         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
5728
5729 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
5730
5731         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
5732
5733         * mini-amd64.c (NEW_INS): Set cil_code.
5734
5735         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
5736         from mini-amd64.c so all debugger related logic is in one place.
5737
5738         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
5739         later won't have a random ip assigned to them.
5740
5741 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
5742
5743         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
5744         the arch specific function initializes code_size.
5745         (mono_create_delegate_trampoline): Ditto.
5746
5747         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
5748         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
5749         platforms.
5750
5751         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
5752         running under the debugger.
5753
5754         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
5755         debugger.
5756
5757         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
5758         debugger. Also move the disabling of optimizations here from driver.c.
5759         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
5760         debugger.
5761
5762         * mini.h (MonoCompile): Add a few new flags.
5763
5764 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
5765
5766         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
5767         so the cil_code field of created MonoInst's is properly set.
5768         (mini_select_instructions): Ditto.
5769
5770         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
5771         (MONO_INST_NEW_CALL): Ditto.
5772
5773         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
5774         in many places so the ins->cil_code field is properly initialized.
5775
5776         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
5777         place.
5778
5779 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
5780
5781         * mini.c (mini_method_compile): Print a different message when compiling a 
5782         shared method.
5783         
5784         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
5785         > 1.
5786
5787 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
5788
5789         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
5790         SSE2 instructions.
5791
5792         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
5793         
5794 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
5795
5796         * mini.c (handle_stack_args): Make this return void since its return value was
5797         never used. Also set cfg->unverifiable for invalid IL instead of calling
5798         G_BREAKPOINT ().
5799
5800 2008-04-10  Mark Probst  <mark.probst@gmail.com>
5801
5802         * mini.c: Make sure "this" is live in catch clauses with type
5803         variables in shared generic code.
5804
5805 2008-04-08  Mark Probst  <mark.probst@gmail.com>
5806
5807         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
5808         generic_class_is_reference_type() to ensure the proper behaviour
5809         when sharing generic code and the type in question is a type
5810         argument.
5811
5812 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
5813
5814         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
5815         race conditions when printing thread dumps. Fixes #377738.
5816
5817 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
5818         
5819         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
5820         shows up when both MonoInst arguments can cause aliasig.
5821         There is likely no way in the current JIT to trigger this problem, but
5822         it showed up in the development of generics sharing, when in a new
5823         opcode both args of an OP_GROUP can be aliases (addresses of a local).
5824         When the generics sharing code will be committed, its tests will be
5825         valid also for this bug.
5826
5827 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
5828
5829         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
5830         PATCH_INFO_METHOD.
5831
5832         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
5833         NULL.
5834
5835 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
5836
5837         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
5838         use a more detailed exception message for InvalidCastException.
5839
5840         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
5841
5842         * driver.c (mono_main): Add --debug=casts option to turn on better 
5843         InvalidCastException message details.
5844
5845         * mini.c (mini_get_debug_options): New helper function to return the address of
5846         the debug_options variable.
5847
5848         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
5849         the jit_tls TLS variable.
5850
5851         * mini.c (mono_jit_tls): New TLS variable.
5852
5853         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
5854         option is used.
5855
5856 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
5857
5858         * mini.h: Removed verifer related stuff. This code was moved to verify.c
5859
5860         * mini.c: Removed verifer related stuff, code moved to verify.c.
5861
5862         * driver.c: Using code from verify.c instead of mini.c.
5863
5864 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
5865
5866         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
5867         longer valid.
5868
5869 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
5870
5871         * mini.c (check_for_method_verify): Enabling verification of
5872         corlib if mono_verify_all is set. Bugs in the verifier preventing that
5873         have been fixed.
5874
5875 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
5876
5877         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
5878         caller saved registers as well.
5879         
5880         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
5881         saved registers as well.
5882
5883 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
5884
5885         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
5886
5887         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
5888         code.
5889
5890 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
5891
5892         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
5893         to get_call_info.
5894         (get_call_info): Take a gsctx argument instead of 'cfg'.
5895
5896 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
5897
5898         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
5899         mono_verify_all is set.
5900
5901         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
5902
5903         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
5904
5905 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
5906
5907         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
5908         an exception.
5909
5910         * driver.c mini.c mini.h: Add a --verify-all development option to test the
5911         verifier and the code generated by the compiler.
5912
5913 2008-03-25  Mark Probst  <mark.probst@gmail.com>
5914
5915         * mini.c: Generic sharing of the non-nullable case of the box
5916         instruction.
5917
5918 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
5919
5920         * inssel.brg: Fix the build.
5921
5922         * iltests.il.in: Add a test for lconv.ovf.u8.un.
5923
5924 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
5925
5926         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
5927         Array:Address. Fixes #372410.
5928
5929         * iltests.il.in: New tests for readonly prefix.
5930
5931 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
5932
5933         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
5934         mini-trampolines.c.
5935
5936         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
5937         mini-exceptions.c.
5938
5939         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
5940         
5941         * mini.c (mono_decompose_op_imm): New helper function.
5942
5943         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
5944         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
5945         return value.
5946
5947         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
5948         mono_arch_output_basic_block. Fix warnings.
5949
5950         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
5951         for now.
5952
5953 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
5954
5955         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
5956         since the extra frame is now detected automatically inside the loop.
5957
5958         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
5959         opts which are now in mono_peephole_ins ().
5960         
5961         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
5962
5963         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
5964         frames and skip duplicate managed-to-native frames. Fixes #367665.
5965
5966         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
5967         opts which are now in mono_peephole_ins ().
5968         (mono_arch_peephole_pass_2): Ditto.
5969
5970         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
5971
5972         * mini-codegen.c (mono_peephole_ins): New helper function containing the
5973         arch independent peephole optimizations.
5974
5975         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
5976         opts which are now in mono_peephole_ins ().
5977
5978         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
5979         
5980         * mini-s390.c (mono_arch_output_basic_block): Fix build.
5981
5982         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
5983         pattern.
5984
5985         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
5986         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
5987         opcode. 
5988
5989 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
5990
5991         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
5992         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
5993         return value.
5994
5995         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
5996         mono_arch_output_basic_block. Fix warnings.
5997
5998 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
5999
6000         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6001         conv.ovf.u.un.
6002
6003 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
6004
6005         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6006         conv.ovf.u.un.
6007
6008         * iltests.il: Add new tests.
6009
6010 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
6011
6012         * mini.c: Removed Windows version macros.
6013
6014 2008-03-20  Mark Probst  <mark.probst@gmail.com>
6015
6016         * generic-sharing.c: Put reflection types in the extensible part
6017         of the runtime generic context.
6018
6019         * mini.c: Generic sharing of the GetTypeHandle special case of the
6020         ldtoken instruction.
6021
6022 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
6023
6024         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
6025
6026         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
6027         
6028         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
6029         consistency with the other version on the linear IR branch.
6030
6031         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
6032
6033         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
6034
6035         * iltests.il.in: Add new tests.
6036
6037 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
6038
6039         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
6040
6041         * iltests.il.in: Add new tests.
6042
6043 2008-03-19  Mark Probst  <mark.probst@gmail.com>
6044
6045         * mini.c: Two variables with the same name were declared in
6046         nesting contexts and one wasn't initialized.  Fixed.
6047
6048 2008-03-19  Mark Probst  <mark.probst@gmail.com>
6049
6050         * mini.c: Generic sharing of the initobj instruction.
6051
6052 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
6053
6054         * mini.c: make the test to optimize ldtoken from typeof() more
6055         precise.
6056
6057 2008-03-18  Mark Probst  <mark.probst@gmail.com>
6058
6059         * mini.c: Generic sharing of the initobj instruction for reference
6060         types.
6061
6062 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
6063
6064         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
6065         the mono_breakpoint_clean_code() code to perform bound checks.
6066
6067 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
6068
6069         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
6070         mono_arch_patch_callsite() to include the start of the managed method
6071         to be able to perform bound checks.
6072
6073 2008-03-17  Mark Probst  <mark.probst@gmail.com>
6074
6075         * mini.c: Generic sharing for the isinst instruction.
6076
6077 2008-03-17  Mark Probst  <mark.probst@gmail.com>
6078
6079         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6080         inssel-long32-mips.brg: Added opcodes for doing indirect calls
6081         with the runtime generic context argument.
6082
6083         * mini.c: Share calls to several types of unsharable methods by
6084         putting the address of the method code in the runtime generic
6085         context and doing an indirect call.
6086
6087         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6088         to switches.
6089
6090 2008-03-16  Mark Probst  <mark.probst@gmail.com>
6091
6092         * generic-sharing.c: Change due to a change in the runtime genric
6093         context API.
6094
6095 2008-03-15  Martin Baulig  <martin@ximian.com>
6096
6097         * tramp-x86.c
6098         (mono_arch_nullify_class_init_trampoline): Add call to
6099         mono_breakpoint_clean_code() to make things work when running
6100         inside the debugger.
6101
6102         * tramp-amd64.c
6103         (mono_arch_nullify_class_init_trampoline): Add call to
6104         mono_breakpoint_clean_code() to make things work when running
6105         inside the debugger.
6106
6107 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
6108
6109         * inssel-long.brg (reg): Fix 64 bit build.
6110
6111 2008-03-14  Mark Probst  <mark.probst@gmail.com>
6112
6113         * mini.c, mini.h: Share static generic code by passing it an
6114         implicit argument pointing to the runtime generic context.
6115
6116         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6117         inssel-long32-mips.brg: New opcodes for calling shared static,
6118         which need to be passed the runtime generic context.
6119
6120         * mini-amd64.c, mini-x86.c: Save the runtime generic context
6121         argument on the stack in the prologue if needed.  New function for
6122         finding the runtime generic context argument from the registers
6123         saved by the trampoline.
6124
6125         * mini-amd64.h, mini-x86.h: Specify which register to use for the
6126         runtime generic context argument.
6127
6128         * tramp-amd64.c: Also restore the register used for the runtime
6129         generic context argument.
6130
6131         * mini-trampoline.c: Resolve shared static calls by consulting the
6132         runtime generic context via the new argument.
6133
6134         * generic-sharing.c: Add an argument to sharability-checking
6135         functions that specifies whether type variables should be treated
6136         as sharable type arguments.
6137
6138         * inssel-x86.brg: Removed a superfluous, buggy rule.
6139
6140         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6141         to switches.
6142
6143 2008-03-14  Martin Baulig  <martin@ximian.com>
6144
6145         * debug-debugger.c (main_thread_handler): Call
6146         mono_runtime_run_main() without sending any notifications.
6147
6148         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
6149
6150 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
6151
6152         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
6153
6154 2008-03-14  Mark Probst  <mark.probst@gmail.com>
6155
6156         * tramp-x86.c: Fixed register restore offsets in the trampoline
6157         code for ECX and EDX.
6158
6159 2008-03-12  Geoff Norton  <gnorton@novell.com>
6160
6161         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
6162         different ucontext_t implementations.
6163         * exceptions-arm.c: Use the above defines to get exceptions working on 
6164         iPhone (based on a patch by Luke Howard lukeh@padl.com)
6165         * mini-arm.c: Implement iPhone icache support (based on a patch by
6166         Luke Howard lukeh@padl.com)
6167
6168 2008-03-12  Mark Probst  <mark.probst@gmail.com>
6169
6170         * mini.c: Enable generic sharing of calls to non-static
6171         non-interface non-generic non-value-type methods.
6172
6173         * mini-trampolines.c: Resolve calls from shared generic code.
6174
6175 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
6176
6177         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
6178
6179         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
6180
6181 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
6182
6183         * mini.c: some fixes for the AOT compiler.
6184
6185 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
6186
6187         * cpu-amd64.md: Add clob:1 to some float opcodes.
6188
6189 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
6190
6191         * mini.h: Added MiniVerifierMode enumeration.
6192
6193         * mini.c: Added mini_verifier_set_mode to control
6194         the usage of the new verifier.
6195
6196         * mini.c (mono_method): Integrated the new verifier.
6197
6198         * driver.c: Extended --security option with validil and
6199         verifiable options to activate the new verifier.
6200
6201 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
6202
6203         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
6204         optimization to ctors taking 0 or 2 arguments too.
6205
6206         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
6207         a bit.
6208
6209         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
6210
6211         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
6212
6213 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
6214
6215         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
6216         non-aot case as well.
6217
6218         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
6219
6220         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
6221         changes.
6222
6223         * aot-compiler.c (encode_patch): Ditto.
6224
6225         * mini.h (G_MININT32): Fix the definition of this.
6226
6227 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
6228
6229         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
6230
6231         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
6232
6233 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
6234
6235         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
6236         methods returning vtypes in registers.
6237         (mono_arch_allocate_vars): Ditto.
6238
6239         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
6240
6241         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
6242
6243         * generics.cs: Add a test from the linear IR branch.
6244
6245         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
6246
6247         * mini.c (inline_method): Cache failed inline attempts.
6248
6249 2008-03-04  Mark Probst  <mark.probst@gmail.com>
6250
6251         * mini.c: For shared methods of generic classes put the location
6252         of "this" into the MonoGenericJitInfo.
6253
6254         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
6255         register out of a MonoContext by register number.  Add the generic
6256         sharing context as an argument to mono_arch_find_this_argument().
6257
6258         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
6259         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
6260         for new arch function.
6261
6262         * mini-exception.c: Handle open exception clauses in shared
6263         generic code.
6264
6265         * mini-trampolines.c: Supply additional argument to
6266         mono_arch_find_this_argument().
6267
6268 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
6269
6270         * Makefile.am (regtests): Run the bench.exe tests last.
6271
6272 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
6273
6274         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
6275         a bit.
6276
6277 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
6278
6279         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
6280         with MS.
6281
6282         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
6283         
6284         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
6285
6286         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
6287         whose class has no cctor.
6288
6289         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
6290
6291 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
6292
6293         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
6294         unverified.
6295
6296 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
6297
6298         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
6299         to be in sync with the code on the linear IR branch.
6300
6301         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
6302
6303         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
6304
6305 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
6306
6307         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
6308
6309         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
6310
6311         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
6312
6313         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
6314
6315         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
6316         
6317         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
6318         body.
6319
6320 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
6321
6322         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
6323         OP_LOADR4_MEMBASE emission.
6324
6325         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
6326         (mono_spillvar_offset_float): Ditto.
6327
6328         * mini-mips.c (mono_arch_emit_prolog): Ditto.
6329
6330         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
6331         emission.
6332
6333         * basic-long.cs: Add regression tests for them.
6334
6335         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
6336         use.
6337         (mono_arch_allocate_vars): Fix representation of single-precision float
6338         argument.
6339         (mono_arch_output_basic_block): Ditto.
6340
6341         * inssel-mips.brg: Ditto, remove duplicate items.
6342
6343         * mini-mips.c (emit_load_volatile_arguments): New function to handle
6344         arguments of tail calls as on other platforms.
6345         (mono_arch_output_basic_block): Handle tail calls.
6346
6347         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
6348         register.
6349
6350         * objects.cs (test_5_pass_static_struct): Add test for it.
6351
6352         Contributed under MIT/X11 license.
6353
6354 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
6355
6356         * Makefile.am: Use gmcs for compiling the regression tests.
6357
6358         * *.2.cs *.2.il: Rename to *.cs and *.il.
6359
6360 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
6361
6362         * regalloc.h: Make the vassign array smaller.
6363
6364         * mini.c (mini_method_compile): Remove an unused field in cfg.
6365
6366         * mini-codegen.c: Add a bunch of micro optimizations.
6367
6368 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
6369
6370         * regalloc.h: Remove some unused fields.
6371
6372 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
6373
6374         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
6375
6376         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
6377
6378 2008-02-22  Mark Probst  <mark.probst@gmail.com>
6379
6380         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
6381
6382         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
6383         trampoline: Fetch an entry from the runtime generic context.  If
6384         it's NULL, jump to the actual trampoline to fill the runtime
6385         generic context.  Otherwise, return it.
6386
6387         * mini.c: Call the lazy fetch trampoline to get entries out of the
6388         runtime generic context.
6389
6390         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
6391         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
6392         tramp-sparc.c: Stubs for the lazy fetch trampoline.
6393
6394 2008-02-21  Mark Probst  <mark.probst@gmail.com>
6395
6396         * mini.c: Fetch data out of the extensible part of the runtime
6397         generic context instead of calling a helper function.
6398
6399         * generic-sharing.c: Some functions moved into
6400         metadata/generic-sharing.c.  Helper function for fetching other
6401         types now checks and asserts against extensible rgctx (just for
6402         debugging purposes - the helper function isn't called anymore
6403         unless for debugging).
6404
6405 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
6406
6407         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
6408         for tail calls up to the point that the tests in iltests.exe run. Also add a
6409         dummy CKFINITE implementation.
6410         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
6411         needed for trampoline LMF frames.
6412
6413         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
6414         trampoline LMF frames.
6415
6416 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
6417
6418         * mini.c (inline_method): clean any pending loader error when inlining fail.
6419         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
6420
6421 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
6422
6423         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
6424
6425         * aot-runtime.c (decode_patch_info): Ditto.
6426
6427         * mini.c (mono_resolve_patch_target): Ditto.
6428         
6429         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
6430         icall wrappers.
6431
6432         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
6433         
6434         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
6435         if it references an icall address.
6436
6437 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
6438
6439         * cpu-s390x.md: Remove some more unused opcodes.
6440         
6441         * cpu-s390x.md: Remove some unused opcodes.
6442
6443         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
6444         mono_op_imm_to_op ().
6445
6446         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
6447         instead of a switch statement.
6448         
6449         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
6450         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
6451
6452         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
6453         
6454         * mini-codegen.c: Remove unused mono_regstate2_... functions.
6455
6456         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
6457         -1.
6458
6459 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
6460
6461         * driver.c (mono_main): Improve error reporting when an assembly cannot be
6462         opened. Fixes #362607.
6463
6464         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
6465
6466         * iltests.il.in: Add a test for static methods in interfaces.
6467
6468 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
6469
6470         * genmdesc.c (build_table): Fix a crash on older glib versions.
6471
6472         * cpu-sparc.md: Remove some unused opcodes.
6473         
6474         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
6475         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
6476
6477         * cpu-amd64.md: Remove some unused opcodes.
6478
6479         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
6480         like the other opcodes.
6481
6482 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
6483
6484         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
6485
6486         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
6487
6488         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
6489         variables 'cfg' instead of 'm' for consistency.
6490
6491         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
6492
6493         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
6494         argument holding the vtype return address, to avoid the ambigious use of
6495         cfg->ret for this purpose.
6496
6497         * mini.c (NEW_RETLOADA): Use vret_addr if set.
6498
6499         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
6500         
6501         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
6502         new mono_print_ins () function which only takes one argument.
6503
6504 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
6505
6506         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
6507         macro arguments.
6508
6509 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
6510
6511         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
6512
6513         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
6514
6515         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
6516         opcodes and other small changes.
6517
6518         * mini-ops.h: Add some new opcodes from the linear IR branch.
6519
6520         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
6521
6522         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
6523         opcodes, use the REG_MEMBASE opcodes instead.
6524         
6525         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
6526         opcodes, use the REG_MEMBASE opcodes instead.
6527         
6528         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
6529         linear IR branch.
6530
6531         * mini.c (mono_op_imm_to_op): New helper function.
6532
6533         * mini-ops.h: Add some opcodes from linear IR branch.
6534
6535 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
6536
6537         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
6538         <tsv@solvo.ru>.
6539
6540 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
6541
6542         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
6543         OP_ICONV_TO_R4/R8.
6544
6545         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
6546
6547 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
6548
6549         * aot-compiler.c (emit_method_code): Add an assert.
6550
6551         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
6552         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
6553         methods.
6554
6555 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
6556
6557         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
6558         some load/store opcodes so they are consistent. 
6559         (mono_arch_emit_prolog): Simplify some code.
6560
6561         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
6562
6563         * objects.cs: Add tests for large argument offsets on ARM.
6564
6565         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
6566         stack offsets. Fixes #359651.
6567
6568         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
6569
6570         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
6571
6572         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
6573
6574         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
6575
6576         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
6577
6578         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
6579         rid of CEE_CONV_R_UN.
6580
6581         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
6582
6583 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
6584
6585         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
6586
6587         * mini.c (mono_normalize_opcodes): Add some more opcodes.
6588
6589         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
6590
6591         * cpu-amd64.md: Remove some unused opcodes.
6592
6593         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
6594
6595         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
6596
6597         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
6598         arch specific functions for its parts. Call the peephole pass after local
6599         regalloc so the prolog can compute a more accurate max_offset.
6600         
6601         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
6602         the corresponding OP_I/OP_L opcodes.
6603
6604         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
6605
6606         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
6607
6608 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
6609
6610         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
6611         as they are handled in mini.c.
6612
6613         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
6614         
6615         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
6616         case since it is handled in mini.c.
6617
6618         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
6619
6620         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
6621
6622         * *.c: Use the new opcodes in the IR and back end code.
6623
6624         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
6625
6626         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
6627
6628 2008-02-06  Mark Probst  <mark.probst@gmail.com>
6629
6630         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
6631         an assert because it has a race condition.
6632
6633 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
6634
6635         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
6636
6637         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
6638
6639         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
6640
6641         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
6642         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
6643
6644 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
6645
6646         * cpu-amd64.md (move): Correct the maximum size of move.
6647
6648 2008-02-05  Mark Probst  <mark.probst@gmail.com>
6649
6650         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
6651         the generic class init trampoline to return quickly if the class
6652         is already inited.
6653
6654 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
6655
6656         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
6657         issues where an 32 bit callsite cannot be patched by a 64 bit address.
6658
6659 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
6660
6661         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
6662         branch.
6663
6664 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
6665
6666         * objects.cs: Add some soft-float tests.
6667
6668         * mini.c: Fix a couple more soft-float issues.
6669
6670         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
6671
6672         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
6673         avoid a REX prefix.
6674
6675 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
6676
6677         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
6678         exception happens while compiling a virtual method.
6679
6680 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
6681
6682         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
6683         
6684         * mini-sparc.c: Fix build.
6685
6686         * mini-sparc.c (get_call_info): Add support for generic sharing.
6687
6688         * mini-exceptions.c: Add a FIXME.
6689
6690 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
6691
6692         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
6693         altstack handling code.
6694
6695         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
6696         
6697         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
6698
6699         * mini-s390.c: Add support for generic sharing.
6700
6701         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
6702         Fix CAS on s390.
6703         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6704
6705         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
6706
6707         * mini-s390x.c: Add support for generic sharing.
6708         
6709         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
6710         Fix CAS on ia64.
6711         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6712
6713         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
6714         can be used since it takes a 16 bit signed immediate.
6715
6716         * inssel-s390x.brg: Fix OP_SETRET.
6717
6718         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
6719
6720         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
6721
6722         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
6723
6724         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
6725
6726         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
6727         in one place.
6728
6729         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
6730         stuff.
6731
6732         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
6733         of the unused mono_arch_patch_delegate_trampoline stuff.
6734
6735 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
6736
6737         * basic-long.cs: Move the fp related tests to basic-float.cs.
6738
6739         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
6740
6741         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
6742
6743         * basic-calls.cs: Add a test for proper float argument passing.
6744
6745         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
6746         if the context corresponds to an exception received through a signal.
6747
6748         * exceptions.cs: Add a test for nullref handling at the start of a try
6749         clause.
6750
6751         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
6752
6753         * jit-icalls.c (mono_break): New JIT icall.
6754
6755         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
6756
6757         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
6758
6759 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
6760
6761         * cpu-*.md: Get rid of unused opcodes.
6762
6763         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
6764
6765         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
6766         by all platforms.
6767
6768         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
6769         define.
6770
6771         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
6772         the arch independent trampoline code in mini-trampolines.c.
6773
6774         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
6775
6776         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
6777
6778         * mini-s390.h: Remove an unused define.
6779         
6780         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
6781         the arch independent trampoline code in mini-trampolines.c.
6782
6783         * mini-arm.c (mono_arch_emit_prolog): Fix build.
6784
6785 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
6786
6787         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
6788
6789         * mini-s390.c (mono_arch_emit_prolog): Fix build.
6790
6791         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
6792
6793         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
6794
6795         * cpu-amd64.md: Use smaller sizes for int opcodes.
6796
6797         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
6798
6799         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
6800         objects.cs.
6801
6802         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
6803         debugging.
6804
6805         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
6806         instead of though a pointer to save an indirection when accessing elements of
6807         the array.
6808
6809         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
6810         some typos.
6811         (NOT_IMPLEMENTED): New helper macro.
6812         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
6813         of a bb.
6814
6815         * *.c: Use the new helper macro.
6816
6817 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
6818
6819         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
6820
6821 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
6822
6823         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
6824         stack slots.
6825
6826 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
6827
6828         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
6829         profiling is enabled.
6830         
6831         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
6832         the end.
6833         (mono_arch_emit_prolog): Add more first bblock optimizations.
6834
6835         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
6836         in order if possible.
6837         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
6838         bblock, since the arguments are still in their original registers.
6839
6840         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
6841
6842 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
6843
6844         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
6845         as well.
6846
6847         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
6848         offset 0.
6849
6850         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
6851
6852         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
6853         process async exceptions received while in unmanaged code.
6854
6855         * mini.c (mini_init): Install a callback with the runtime which will be called
6856         when a thread receives an async exception while in unmanaged code.
6857
6858         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
6859
6860         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
6861
6862 2008-01-16  Wade Berrier  <wberrier@novell.com>
6863
6864         * cpu-g4.md:
6865         * cpu-arm.md:
6866         * cpu-s390x.md:
6867         fix build
6868
6869 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
6870
6871         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
6872         compilation with sun cc.
6873
6874         * cpu-*.md: Fix the build.
6875
6876         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
6877
6878         * mini-amd64.h: Add some comments to the MonoLMF structure.
6879
6880         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
6881         
6882         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
6883         in the LMF structure if possible. This saves two instructions in the
6884         managed->native wrappers.
6885
6886         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
6887
6888 2008-01-16  Mark Probst  <mark.probst@gmail.com>
6889
6890         * generic-sharing.c: New type argument lookup code which uses the
6891         runtime generic context template.
6892
6893 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
6894
6895         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
6896
6897         * mini-arm.c (add_general): Fix arm eabi parameter passing.
6898         (mono_arch_output_basic_block): Fix localloc implementation.
6899
6900         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
6901
6902         * mini-ia64.c (peephole_pass): Fix ia64 build.
6903
6904         * mini-amd64.c (peephole_pass): Fix a warning.
6905         
6906         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
6907         at a constant offset from sp/fp.
6908
6909         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
6910         instead of obtaining it from *lmf in the managed method case.
6911
6912 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
6913
6914         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
6915
6916 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
6917
6918         * mini.h (MonoInstList): New type.
6919         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
6920         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
6921         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
6922         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
6923         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
6924         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
6925         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
6926         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
6927         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
6928         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
6929         MONO_INST_LIST_FOR_EACH_ENTRY,
6930         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
6931         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
6932         mono_inst_list_first, mono_inst_list_last,
6933         mono_inst_list_next, mono_inst_list_prev): New instruction
6934         list handling interfaces.
6935         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
6936         list head 'ins_list'.
6937         (MonoInst): Replace next pointer with list head 'node'.
6938         (MonoCallInst): Make 'out_args' a MonoInstList.
6939         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
6940         (MonoCompile): Delete reverse_inst_list and
6941         reverse_inst_list_len.
6942         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
6943         mono_arch_lowering_pass, mono_arch_local_regalloc,
6944         mono_arch_output_basic_block, mono_arch_emit_prolog):
6945         Convert to new instruction lists.
6946         (insert_after_ins): Delete.
6947         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
6948         instruction lists.
6949         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
6950         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
6951         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
6952         mono_emulate_opcode, mono_emit_load_got_addr,
6953         inline_method, mono_method_to_ir, mono_print_bb_code,
6954         print_dfn, decompose_pass, nullify_basic_block,
6955         replace_out_block_in_code, remove_block_if_useless,
6956         merge_basic_blocks, move_basic_block_to_end,
6957         try_unsigned_compare, optimize_branches, mono_print_code,
6958         mini_select_instructions, remove_critical_edges): Likewise.
6959         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
6960         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
6961         mono_arch_output_basic_block, mono_arch_emit_prolog):
6962         Likewise.
6963         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
6964         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
6965         mono_arch_output_basic_block): Likewise.
6966         (inst_list_prepend, insert_after_ins): Delete.
6967         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
6968         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
6969         instruction lists.
6970         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
6971         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
6972         mono_arch_emit_prolog): Likewise.
6973         * cfold.c (mono_constant_fold): Likewise.
6974         * liveness.c (visit_bb, mono_analyze_liveness,
6975         optimize_initlocals): Likewise.
6976         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
6977         * graph.c (mono_draw_code_cfg): Likewise.
6978         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
6979         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
6980         mono_ssa_cprop): Likewise.
6981         * abcremoval (get_relations_from_previous_bb, process_block):
6982         Likewise.
6983         * local-propagation (mono_cprop_invalidate_values,
6984         mono_local_cprop_bb): Likewise.
6985         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
6986         peephole_pass, mono_arch_output_basic_block,
6987         mono_arch_emit_prolog): Likewise.
6988         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
6989         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
6990         mono_arch_emit_prolog): Likewise.
6991         (insert_after_ins): Delete.
6992         * aliasing.c (print_code_with_aliasing_information,
6993         mono_build_aliasing_information, mono_aliasing_deadce):
6994         Convert to new instruction lists.
6995         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
6996         peephole_pass, NEW_INS, mono_arch_lowering_pass,
6997         mono_arch_local_regalloc, mono_arch_output_basic_block):
6998         Likewise.
6999         (insert_after_ins): Delete.
7000         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
7001         peephole_pass, mono_arch_output_basic_block): Convert to
7002         new instruction lists.
7003         * mini-codegen (InstList, inst_list_prepend,
7004         insert_after_ins): Delete.
7005         (insert_before_ins, get_register_force_spilling,
7006         get_register_spilling, free_up_ireg, free_up_reg,
7007         create_copy_ins, create_spilled_store, alloc_int_reg,
7008         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
7009         to new instruction lists.
7010         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
7011         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7012         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
7013         (insert_after_ins): Delete.
7014         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
7015         mono_arch_local_regalloc, mono_arch_output_basic_block,
7016         mono_arch_call_opcode): Convert to new instruction lists.
7017         (insert_after_ins): Delete.
7018         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
7019         peephole_pass, mono_arch_output_basic_block,
7020         mono_arch_emit_prolog): Convert to new instruction lists.
7021
7022 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
7023
7024         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
7025
7026         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
7027         Fixes #353182.
7028
7029         * Makefile.am (version.h): Make this work with non-bash shells.
7030
7031 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
7032
7033         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
7034
7035 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
7036
7037         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
7038         the InitializeArray optimization.
7039
7040 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
7041
7042         * mini.c driver.c: Don't include os/gc_wrapper.h.
7043
7044 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
7045
7046         * mini.c (print_jit_stats): Print GC statistics if available.
7047
7048 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
7049
7050         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
7051
7052 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
7053
7054         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
7055
7056 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
7057
7058         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
7059         
7060         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
7061
7062         * driver.c (mono_main): Ditto.
7063
7064 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
7065
7066         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
7067
7068         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
7069         in the vtable can't be encoded.
7070         (compile_method): Ditto.
7071
7072 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
7073
7074         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
7075         defined.
7076
7077         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
7078         lmf->rbp.
7079
7080         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
7081         the top LMF entry belongs to the current method.
7082
7083         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
7084
7085 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
7086
7087         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
7088         
7089         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
7090
7091         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
7092
7093         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
7094
7095         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
7096
7097         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
7098         implementation.
7099
7100         * basic-float.cs: Add an ulong->double cast test.
7101
7102 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
7103
7104         * mini.c (mono_method_to_ir): Fix a warning.
7105
7106 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
7107
7108         * mini-ops.h: Add OP_SWITCH.
7109
7110         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
7111         CEE_SWITCH in back-end code, use OP_SWITCH instead.
7112
7113 2007-12-11  Geoff Norton  <gnorton@novell.com>
7114
7115         * mini-s390x.c: Minor change to the MAX() define to allow
7116         it to compile with other gcc versions.
7117
7118 2007-12-11  Geoff Norton  <gnorton@novell.com>
7119
7120         * cpu-s390x.md:
7121         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
7122
7123 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
7124
7125         exceptions-arm.c (mono_arch_get_restore_context): Restore
7126         the frame pointer.
7127
7128         exceptions-arm.c (throw_exception): Save the frame pointer.
7129         This is a partial fix for #323747. Only the client side is
7130         fixed.
7131
7132 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
7133
7134         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
7135         was using an unrelated variable to log the class which
7136         needed the cctor to be called. This was crashing on arm.
7137
7138 2007-12-09  Robert Jordan  <robertj@gmx.net>
7139
7140         * mini-x86.c (mono_arch_emit_epilog):
7141         Consider all kinds of 64-bit types. Fixes #323114.
7142
7143 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
7144
7145         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
7146
7147 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7148
7149         * mini-amd64.c (peephole_pass): Add a missing instruction check.
7150
7151 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7152
7153         * mini.c: run type ctor before allocating an object, not only
7154         when running it's constructor method (fixes at least part of bug #342507).
7155
7156 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7157         
7158         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
7159         
7160         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
7161         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
7162         function.
7163
7164         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
7165         mono_generic_class_init_trampoline () the same as it is done with the other
7166         trampolines.
7167
7168         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
7169         aot-runtime.c aot-compiler.c: Implement AOT support.    
7170
7171 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7172
7173         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
7174         build for archs which don't have the vtable trampoline defined
7175         yet.
7176
7177 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7178
7179         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
7180
7181         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
7182
7183         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
7184
7185         * tramp-<ARCH>.c: Use the new helper function.
7186
7187 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7188
7189         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
7190         trampoline call, which takes a vtable argument.
7191
7192         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
7193         OP_TRAMPCALL_VTABLEs like other calls.
7194
7195         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
7196         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
7197         call.  Implemented a support function which fetches the vtable
7198         from a register set.
7199
7200         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
7201         Implemented a generic class init trampoline, using the
7202         OP_TRAMPCALL_VTABLE opcode.
7203
7204         * mini.c: Implemented static field access when sharing generic
7205         code.  This implies initing the class using the new
7206         OP_TRAMPCALL_VTABLE call.
7207
7208 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7209
7210         * mini.c: Don't compile methods with sharing enabled if their
7211         classes are disabled for sharing.
7212
7213 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
7214
7215         * inssel.brg: Add a missing sign extension to the GETCHR and array access
7216         opcodes. Fixes #346563.
7217
7218         * objects.cs: Add a new test.
7219
7220         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
7221
7222         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
7223         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
7224
7225 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
7226
7227         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
7228
7229 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
7230
7231         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
7232         code stream.
7233
7234 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
7235
7236         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
7237
7238         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
7239         optimization in the AOT case.
7240         
7241 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
7242
7243         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
7244         
7245         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
7246
7247         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
7248
7249         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
7250
7251         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
7252         is created by the inlined delegate ctor.
7253
7254         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
7255
7256         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
7257
7258 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
7259
7260         * cpu-x86.md: Fix the length of ckfinite.
7261
7262 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
7263
7264         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
7265         
7266         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
7267         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
7268
7269         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
7270
7271         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
7272         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
7273
7274 2007-11-28  Martin Baulig  <martin@ximian.com>
7275
7276         * mini-x86.c
7277         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
7278         after creating the trampoline.
7279
7280 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
7281
7282         * aot-runtime.c (load_aot_module): Check runtime version if needed.
7283
7284         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
7285         the same version.
7286
7287         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
7288         instead of the calling method to help AOT.
7289
7290         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
7291
7292 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
7293
7294         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
7295         is defined.
7296
7297 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
7298
7299         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
7300         
7301         * aot-compiler.c (compile_method): Correct check for generic method definitions.
7302         (encode_method_ref): No need to handle generic method definitions specially.
7303
7304         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
7305
7306         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
7307         decode_klass_info.
7308
7309         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
7310         encode_klass_info.
7311         (compile_method): Enable generic sharing.
7312
7313 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
7314
7315         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
7316         (mini_method_compile): Add preliminary support for AOTing shared generic code.
7317
7318         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
7319         generic code.
7320
7321         * mini-trampolines.c: Fix a warning.
7322
7323         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
7324         NEW_PCONST.
7325         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
7326         (generic_class_is_reference_type): Remove unused function.
7327
7328         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
7329         in the generic vtable trampoline case.
7330
7331         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
7332         
7333         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
7334         return an AOT method based on a vtable slot.
7335
7336         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
7337
7338         * mini.c (mini_get_vtable_trampoline): Export this.
7339
7340 2007-11-22  Martin Baulig  <martin@ximian.com>
7341
7342         * debug-debugger.h
7343         (MonoDebuggerInfo): Move `debugger_version' up.
7344
7345 2007-11-22  Martin Baulig  <martin@ximian.com>
7346
7347         * mini-amd64.c
7348         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
7349
7350         * mini-trampolines.c
7351         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
7352         after compiling the method.
7353
7354 2007-11-20  Martin Baulig  <martin@ximian.com>
7355
7356         * debug-mini.c
7357         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
7358         (mono_debugger_remove_breakpoint): Likewise.
7359         (mono_debugger_check_breakpoints): Likewise.
7360
7361         * debug-debugger.c: Implement the new breakpoint interface here.
7362
7363 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
7364
7365         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
7366         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
7367
7368         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
7369
7370 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
7371
7372         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
7373
7374         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
7375         mini.c.
7376
7377         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
7378         mini.c.
7379
7380         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
7381         returning a vtype in a register.
7382
7383         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
7384         here from the arch specific code.
7385
7386         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
7387         mini.c.
7388
7389         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
7390         (mono_arch_emit_prolog): Increment maximum prolog size.
7391
7392         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
7393         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
7394
7395         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
7396         MonoGenericSharingContext.
7397
7398         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
7399         MonoGenericSharingContext. Allocate memory from the cfg mempool.
7400
7401 2007-11-15  Mark Probst  <mark.probst@gmail.com>
7402
7403         * mini.c, mini.h, generic-sharing.c: Functions for producing code
7404         which extract fields out of the runtime generic context.  Full
7405         sharing of the NEWARR opcode.
7406
7407 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
7408
7409         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
7410         --enable-minimal=ssa.
7411
7412 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
7413
7414         * mini-trampolines.c (mono_delegate_trampoline): Update after 
7415         mono_marshal_get_delegate_invoke () signature change.
7416
7417 2007-11-13  Mark Probst  <mark.probst@gmail.com>
7418
7419         * mini.c: Removed the shared context in favor of the generic
7420         sharing context.  Allocate the MonoJitInfo structure with room for
7421         the generic sharing context if it's needed.
7422
7423         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
7424         domain-internals.h now.
7425
7426         * mini-x86.c: Pass the generic sharing context to get_call_info ().
7427
7428         * generic-sharing.c: Several changes for working without a shared
7429         context and instead operating on open types instead.
7430
7431 2007-11-12  David S. Miller  <davem@davemloft.net>
7432
7433        * inssel-sparc.brg: Fix double instruction emit.
7434
7435 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
7436
7437         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
7438         Get/Set/Address methods.
7439         
7440         * mini.c debug-debugger.c mini-trampolines.c: Update after 
7441         mono_marshal_get_delegate_invoke signature change.
7442
7443 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
7444
7445         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
7446         This can happens with dynamic methods. Fixes the other bug in #322722.
7447
7448 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
7449
7450         * tramp-arm.c (mono_arch_patch_callsite): Support patching
7451         BX call sequence.
7452
7453         * mini-arm.c (arm_patch): Implement patching of BX call
7454         sequence. Fixes one of the bugs in #322722.
7455
7456 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
7457
7458        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
7459        under Linux.  We only need to flush every 32-byte cache line.    
7460
7461 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
7462
7463         * mini.c:
7464         move_basic_block_to_end: Add branches when needed, eventually creating
7465         a new BB.
7466         optimize_branches: added a parameter that tells if it's ok to create
7467         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
7468         and avoid calling move_basic_block_to_end when it's not ok.
7469         Fixes bug 318677.
7470
7471 2007-11-07  Mark Probst  <mark.probst@gmail.com>
7472
7473         * mini.c: Abort inlining call to InitializeArray if something
7474         looks wrong.  Let the icall handle it, which now has proper safety
7475         checks.
7476
7477 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
7478
7479         * mini.c (mono_spill_call): add support for soft-float.
7480
7481         * mini.c (mono_method_to_ir): add support for soft-float
7482         to inlined functions that return float.
7483
7484         * mini.c (mono_method_to_ir): add support for soft-float
7485         to cee_stsfld opcode on float fields.
7486
7487 2007-11-05  Geoff Norton  <gnorton@novell.com>
7488
7489         * mini-x86.h: Fix the structure access for X86 Leopard.
7490
7491
7492 2007-11-05  Martin Baulig  <martin@ximian.com>
7493
7494         * mini-trampolines.c
7495         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
7496         after compiling the method to notify the debugger.
7497
7498 2007-11-05  Martin Baulig  <martin@ximian.com>
7499
7500         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
7501
7502 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
7503
7504         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
7505         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
7506
7507 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
7508
7509         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
7510         native-to-managed wrappers.
7511         
7512 2007-11-01  Geoff Norton  <gnorton@novell.com>
7513
7514         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
7515         members.
7516
7517 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7518
7519         * mini.c, mini-x86.c: when getting back from unmanaged code
7520         to managed via a marshaled delegate we also need to set the
7521         right domain.
7522
7523 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7524
7525         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
7526         for amd64.
7527
7528 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
7529
7530         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
7531         let the debugger or other external agents to tell the JIT when
7532         a sw breakpoint has been inserted in the code that the JIT needs
7533         to be able to inspect.
7534
7535 2007-10-31  Martin Baulig  <martin@ximian.com>
7536
7537         * debug-debugger.h
7538         (MonoDebuggerInfo): Remove `runtime_class_init'.
7539
7540 2007-10-30  Martin Baulig  <martin@ximian.com>
7541
7542         * debug-mini.h
7543         (mono_debugger_thread_created): Added `MonoThread *' argument.
7544         (mono_debugger_extended_notification): New public method.
7545         (mono_debugger_trampoline_compiled): New public method.
7546
7547         * debug-mini.c
7548         (MonoDebuggerThreadInfo): Added `thread' and
7549         `extended_notifications' fields.
7550
7551         * debug-debugger.c
7552         (debugger_executable_code_buffer): New static variable.
7553
7554         * debug-debugger.h
7555         (MonoDebuggerInfo): Added `executable_code_buffer',
7556         `executable_code_buffer_size', `breakpoint_info_area',
7557         `breakpoint_table' and `breakpoint_table_size'.
7558
7559 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
7560
7561         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
7562         that IP  either is an unused value or the vtable pointer. IMT 
7563         calls use vtable + offset now. Reduced by almost half the size
7564         of IMT entries.
7565
7566 2007-10-26  Jonathan Chambers <joncham@gmail.com>
7567
7568         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
7569         defines to access param registers. Replace long usage with
7570         gsize as sizeof(long) != sizeof(void*) on Win64.
7571
7572         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
7573         on Win64. Fix intrinsic, use _AddressOfReturnAddress
7574         instead of non-existant _GetAddressOfReturnAddress.
7575
7576         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
7577         param registers. Save/restore %rdi and %rsi in MonoLMF.
7578
7579         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
7580         param registers. Modify (throw_exception) signature to take 
7581         %rdi and %rsi on Win64. 
7582
7583         Code is contributed under MIT/X11 license.
7584
7585 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7586
7587         * helpers.c: unlink debugging output files.
7588
7589 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
7590
7591         * mini.c: Move mono_create_ftnptr () to object.c.
7592
7593 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
7594
7595         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
7596         optional. This function can now be used to disassemble code generated
7597         outside the JIT such as trampolines and IMT thunks.
7598
7599         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
7600
7601         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
7602         vtable pointer from a ldr instruction.
7603
7604         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
7605         new IMT call sequence.
7606
7607         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
7608         call sequence for interface invocations.
7609
7610         * mini-arm.c (mono_arch_emit_imt_argument): added, required
7611         for imt support. This function is empty since IMT on ARM requires no
7612         special handling on the IR side.
7613
7614         * mini-arm.c (mono_arch_find_imt_method): added, required for
7615         imt support.
7616
7617         * mini-arm.c (mono_arch_find_this_argument): added, required
7618         for imt support.
7619
7620         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
7621         a ldr instruction to load a value stored in the code stream.
7622
7623         * mini-arm.c (mono_arch_build_imt_thunk):added, required
7624         for imt support.
7625
7626
7627 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
7628
7629         * mini.c (mini_init): Install the jump trampoline callback.
7630
7631 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7632
7633         * mini-trampolines.c: handle synchronized methods with the common
7634         vtable trampoline (bug #335601).
7635
7636 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
7637
7638         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
7639
7640         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
7641         64 bit platforms.
7642
7643         * mini-ia64.h mini-ia64.c: Add support for IMT.
7644
7645         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
7646         prolog. Fixes #331958.
7647
7648 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
7649
7650         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
7651
7652 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7653
7654         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
7655         trampoline.
7656
7657 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7658
7659         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
7660         trampoline.
7661
7662 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
7663
7664         * mini-x86.c, mini-x86.h: x86 support for the common vtable
7665         trampoline.
7666
7667 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
7668
7669         * mini-trampolines.c: changed the magic rampoline to understand
7670         the common vtable trampoline method: the method to invoke is
7671         determined by the vtable displacement of the call.
7672
7673 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7674
7675         * mini.c, mini.h: register the common vtable trampoline if the
7676         architecture supports it.
7677
7678 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7679
7680         * cpu-amd64.md: use the correct max length for tls_get.
7681
7682 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
7683
7684         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
7685         CEE_STELEM_ANY. Fixes #333696.
7686
7687 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
7688
7689         * exceptions-x86.c: provide more graceful handling of the case where
7690         we followed a bogus function pointer from managed code (bug #332866).
7691
7692 2007-10-11  Mark Probst  <mark.probst@gmail.com>
7693
7694         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
7695         replaces the generic_shared flag and will carry more information
7696         in the future.
7697
7698         * generic-sharing.c: Added mini_type_stack_size() which allows
7699         allows open types if given a generic sharing context.
7700         mini_get_basic_type_from_generic() takes a
7701         MonoGenericSharingContext* instead of a MonoCompile* now.
7702
7703         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
7704         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
7705         mini-sparc.c, mini-x86.c: Trivial changes required by the two
7706         changes above.  Just passing arguments through to the right
7707         places.
7708
7709 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7710
7711         * mini-arm.c: unify the call emission to emit_code_seq().
7712
7713 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
7714
7715         * tramp-arm.c: reduced the trampoline size.
7716
7717 2007-10-10  Mark Probst  <mark.probst@gmail.com>
7718
7719         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
7720         variable handling out of arch-specific code.
7721
7722 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7723
7724         * mini-arm.c: implemented fast delegate dispatch.
7725
7726 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
7727
7728         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
7729         that fp elimination is turned off if the space required by locals is too
7730         big. Fixes #331958.
7731
7732 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7733
7734         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
7735         ARM to the new style trampoline.
7736
7737 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
7738
7739         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
7740
7741         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
7742
7743 2007-10-09  Martin Baulig  <martin@ximian.com>
7744
7745         * debug-debugger.h
7746         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
7747         `field_info_offset_offset'.     
7748
7749 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
7750
7751         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
7752         removed more internal usage of the r11 register and made it available
7753         to the register allocator.
7754
7755 2007-10-08  Mark Probst  <mark.probst@gmail.com>
7756
7757         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
7758         when sharing generics and treat type variables as references.
7759
7760 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7761
7762         * mini-ppc.c: started removing the internal uses of register r11
7763         to eventually allow the register allocator to manage it as an
7764         additional available register.
7765
7766 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
7767
7768         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
7769
7770 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
7771
7772         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
7773         specific trampolines as they are not performance critical as a jump
7774         target (maybe align as before only for AOT code?). This saves about
7775         200 KB of native code on x86 for monodevelop startup.
7776
7777 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
7778
7779         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
7780         monodevelop startup.
7781
7782 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
7783
7784         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
7785
7786         * mini-sparc.h mini-sparc.c: Implement IMT support.
7787
7788         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
7789         its smaller and doesn't clobber sparc_g1.
7790
7791         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
7792
7793 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7794
7795         * mini-ppc.c: optimized the size of the IMT thunks a bit.
7796
7797 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
7798
7799         * mini-ppc.c: implemented fast delegate invocation.
7800
7801 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
7802
7803         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
7804
7805 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7806
7807         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
7808         code to the new style trampoline in preparation for IMT support.
7809
7810 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
7811
7812         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
7813         systems already. This also reduces the specific trampiline sizes and
7814         prepares for the use of r12 as the IMT identifier register.
7815
7816 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7817
7818         * mini-mips.h: endianess fix (simplified from a patch by
7819         Thomas Kunze <thommy@tabao.de>, bug #323737).
7820
7821 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7822
7823         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
7824         to access ucontext fields and enable netbsd support
7825         (partially from Magnus Henoch <mange@freemail.hu>).
7826
7827 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7828
7829         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
7830         use the preprocessor from the CPP env var if it is set.
7831
7832 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7833
7834         * mini-trampolines.c: fixed an assertion and moved it earlier in the
7835         code, before interface_offset gets used.
7836
7837 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
7838
7839         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
7840         mono_class_setup_vtable () before accessing klass->vtable.
7841
7842 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
7843
7844         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
7845         hackish.
7846
7847 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7848
7849         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
7850         IMT slots (this saves hundreds of KB of memory in programs like
7851         IronPython and Monodevelop).
7852
7853 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
7854
7855         * mini.c: print the delegate counter.
7856
7857 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
7858
7859         * mini-x86.c: make it easier to enable the debugging code for IMT
7860         slots.
7861
7862 2007-09-28  Martin Baulig  <martin@ximian.com>
7863
7864         * debug-debugger.h
7865         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
7866         `mono_method_klass_offset' and `mono_method_token_offset'.
7867
7868 2007-09-20  Mark Probst  <mark.probst@gmail.com>
7869
7870         * mini.c: First generics sharing implementation.  Can only share
7871         in very simple cases.  If sharing doesn't work it falls back to
7872         dedicated compilation.
7873
7874         * mini.h: Flag in MonoCompile to specify whether generic
7875         compilation is shared.  Flags enum for marking which generic inst
7876         of a context is used.  Prototypes for helper functions.
7877
7878         * generic-sharing.c: Helper functions for generic method sharing.
7879
7880         * optflags-def.h: Optimization flag (gshared) for enabling generic
7881         method sharing added.
7882
7883         * Makefile.am: generic-sharing.c added.
7884
7885 2007-09-19 Daniel Nauck <dna@mono-project.de>
7886
7887         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
7888
7889 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
7890         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
7891         fixes bug 325507.
7892
7893 2007-09-19  Martin Baulig  <martin@ximian.com>
7894
7895         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
7896         mono_debug_cleanup() is now part of mono_cleanup().
7897
7898 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
7899
7900         * driver.c (mono_main): Fix a warning.
7901
7902 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
7903
7904         * aot-compiler.c: Optimize various parts when processing large assemblies.
7905         Fixes ##325568.
7906
7907         * mini.c (mono_patch_info_hash): Improve hash function.
7908
7909 2007-09-14  Jonathan Chambers <joncham@gmail.com>
7910
7911         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
7912         
7913         Code is contributed under MIT/X11 license.
7914
7915 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
7916
7917         * mini.c (mini_init): Fix a leak.
7918
7919         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
7920
7921 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
7922
7923         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
7924
7925 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
7926
7927         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
7928
7929 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
7930
7931         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
7932         variance tests.
7933
7934         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
7935
7936         * mini.c (handle_alloc): Enable managed allocators in AOT code.
7937
7938         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
7939
7940         * aot-runtime.c (decode_patch_info): Ditto.
7941
7942 2007-09-12  Jonathan Chambers <joncham@gmail.com>
7943
7944         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
7945         static case. Cache delegates in architecture specific code, 
7946         based on number of parameters.
7947         
7948         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
7949         in architecture specific code, based on number of parameters.
7950         
7951         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
7952         caching happen in architecture specific code now.
7953         
7954         Code is contributed under MIT/X11 license.
7955
7956 2007-09-12  Jonathan Chambers <joncham@gmail.com>
7957
7958         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
7959         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
7960         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
7961
7962         Code is contributed under MIT/X11 license.
7963
7964 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
7965         * mini.c: (mono_thread_abort) Fixed bug #82416.
7966
7967 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
7968
7969         * mini.: hook the new managed GC allocation feature into the JIT.
7970
7971 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
7972
7973         * mini.c: implementation for the new runtime tls opcode.
7974
7975 2007-09-11  Martin Baulig  <martin@ximian.com>
7976
7977         * debug-debugger.h
7978         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
7979         `mono_method_inflated_offset'.
7980
7981 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
7982
7983         * driver.c mini.h mini.c: Add a new devel command line option for injecting
7984         async exceptions into a method.
7985
7986         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
7987         purpose of testing whenever the unwinder works at every instruction.
7988
7989 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
7990
7991         * mini.c: check accessibility of method used in ldftn (fixes
7992         bug #82635).
7993
7994 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
7995
7996         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
7997
7998         * inssel.brg: Fix a warning.
7999
8000 2007-09-03  Martin Baulig  <martin@ximian.com>
8001
8002         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
8003         now takes the `main_method' as argument.
8004
8005 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
8006
8007         * cpu-sparc.md (endfilter): Add missing src1:i argument.
8008
8009 2007-08-30  Jonathan Chambers <joncham@gmail.com>
8010
8011         * driver.c: include the cil-coff.h header on Windows.
8012         
8013         Code is contributed under MIT/X11 license.
8014
8015 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8016
8017         * mini.c, driver.c: don't include the cil-coff.h header.
8018
8019 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
8020
8021         * mini.c: flag places that needs fixes fo soft-float support.
8022
8023 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
8024
8025         * mini.h, inssel-float.brg: fix soft-float constant loads on big
8026         endian systems (partially from Dean Jenkins, bug #81924).
8027
8028 2007-08-28  Mark Probst  <mark.probst@gmail.com>
8029
8030         * mini.c (check_linkdemand): Remove embedded reference object in
8031         call to LinkDemandSecurityException.
8032         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
8033         with an IntPtr instead of a reference object.
8034
8035 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
8036
8037         * mini.c (handle_initobj): Handle alignment properly.
8038
8039         * inssel.brg (mini_emit_memset): Ditto. 
8040
8041         * inssel.brg (mini_emit_memcpy): Ditto. 
8042
8043         * inssel-sparc.brg: Ditto.              
8044
8045         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
8046
8047 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
8048
8049         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
8050         exceptions raised in unmanaged code. Fixes part of #82594.
8051
8052 2007-08-24  Mark Probst  <mark.probst@gmail.com>
8053
8054         * mini.c (mono_method_to_ir), declsec.c
8055         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
8056
8057 2007-08-22  Martin Baulig  <martin@ximian.com>
8058
8059         * debug-mini.h
8060         (MonoDebuggerThreadInfo): New typedef.
8061         (mono_debugger_thread_table): New global variable.
8062         (mono_debugger_thread_created): New public function.
8063         (mono_debugger_thread_cleanup): New public function.
8064
8065         * debug-debugger.h
8066         (MonoDebuggerInfo):
8067         - removed `get_current_thread' and `lookup_assembly'.
8068         - removed `data_table'.
8069         - added `thread_table'.
8070
8071         * mini.c
8072         (mono_thread_start_cb): Call mono_debugger_thread_created().
8073         (mono_thread_attach_cb): Likewise.
8074         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
8075         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
8076         initial domain.
8077
8078         * driver.c (mono_main): Move mono_debug_init() up, before calling
8079         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
8080
8081 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8082
8083         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
8084         together when passing several arguments of type double (gives a small
8085         speedup and saves a few bytes of generated code).
8086
8087 2007-08-20  Jb Evain  <jbevain@novell.com>
8088
8089         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
8090
8091 2007-08-20  Jb Evain  <jbevain@novell.com>
8092
8093         * mini.c (mono_method_to_ir): throw MethodAccessException
8094         and FieldAccessException instead of InvalidProgramException.
8095
8096 2007-08-20  Mark Probst  <mark.probst@gmail.com>
8097
8098         * mini.c: CoreCLR security checks.
8099
8100         * mini.h: Removed MonoSecurityMode (moved to
8101         metadata/security-manager.h) and mono_security_mode global var
8102         (replaced by set/get functions in security-manager.h).
8103
8104         * driver.c: Added "core-clr-test" security mode for testing.  Used
8105         set-function for setting security mode.
8106
8107 2007-08-17  Mark Probst  <mark.probst@gmail.com>
8108
8109         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
8110         the new jit_info_table.
8111
8112         * driver.c: Test code for the new jit_info_table (enabled by the
8113         define MONO_JIT_INFO_TABLE_TEST).
8114
8115 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
8116
8117         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
8118         detection of call <REG> instruction sequence. Fixes build on freebsd.
8119
8120 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
8121
8122         * mini-exceptions.c: Fix a warning.
8123
8124 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
8125
8126         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
8127         stack overflow handling code on amd64 too.
8128
8129         * mini-exceptions.c (mono_setup_altstack): Make this use 
8130         mono_thread_get_stack_bounds ().
8131
8132         * mini-x86.h: Disable sigaltstack on solaris x86.
8133
8134 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
8135
8136         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
8137
8138 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
8139
8140         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
8141
8142 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
8143
8144         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
8145
8146         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
8147
8148 2007-08-03  Neale Ferguson <neale@sinenomine.net>
8149
8150         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
8151         due to alignment.
8152
8153 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8154
8155         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
8156         to be emitted (bug #82281).
8157
8158 2007-08-01  Martin Baulig  <martin@ximian.com>
8159
8160         Merged the `debugger-dublin' branch.
8161
8162         * debug-debugger.h (MonoDebuggerInfo):
8163         Removed the `old_*' compatibility entries.
8164         Added `debugger_version' and `data_table'.
8165         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
8166         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
8167
8168         * debug-mini.c
8169         (MiniDebugMethodBreakpointInfo): Add `address_list'.
8170         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
8171         instead of a `gconstpointer'.
8172         (mono_debugger_insert_method_breakpoint): Return a
8173         `MonoDebugMethodAddressList *'.
8174
8175 2007-06-28  Martin Baulig  <martin@ximian.com>
8176
8177         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8178
8179 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
8180
8181         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
8182         __builtin_frame_address () since it is broken on older gcc versions.
8183
8184 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
8185
8186         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
8187         on the stack overflow handling and made the managed stack overflows
8188         catchable in most cases using soft guard pages.
8189         * exceptions-x86.c: added code to restore the protection in the soft
8190         guard pages at the end of exception handling.
8191
8192 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
8193
8194         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
8195
8196 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8197
8198         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
8199         exception handling.
8200
8201 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8202
8203         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
8204         signal handling support until it has been ported to the new mechanism.
8205         * mini.c: fixed stack overflow detection and use the new
8206         architecture code  to handle signals on the altstack.
8207
8208 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
8209
8210         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
8211         stack overflows on the alt stack.
8212
8213 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
8214
8215         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
8216         stack overflows on the alt stack.
8217
8218 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
8219
8220         * exceptions-ppc.c: cleanup preparing for altstack support.
8221
8222 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8223
8224         * exceptions-arm.c: cleanup preparing for altstack support.
8225
8226 2007-07-27  Mark Probst  <mark.probst@gmail.com>
8227
8228         * mini.c (print_jit_stats): Output hazard pointer stats.
8229
8230 2007-07-26  Mark Probst  <mark.probst@gmail.com>
8231
8232         * driver.c, mini.c: Replaced security mode flags with a single
8233         enum variable.
8234
8235 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8236
8237         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
8238
8239 2007-07-25  Mark Probst  <mark.probst@gmail.com>
8240
8241         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
8242         (which doesn't do anything yet) for activating Core CLR
8243         (Silverlight) security.
8244
8245 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
8246
8247         * mini-codegen.c: work around a possible gcc bug on arm.
8248
8249 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
8250
8251         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
8252         message for platforms that don't support AOT compilation.
8253
8254 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
8255
8256         * mini.h, mini.c, driver.c: temporary smcs hack.
8257
8258 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
8259
8260         * mini-arm.h, mini-arm.c: arm EABI fixes.
8261
8262 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
8263
8264         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
8265         case.
8266
8267         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
8268         trampolines taking a method argument.
8269
8270         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
8271
8272         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
8273         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
8274
8275         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
8276         JIT compilation throws an exception. Fixes #82050.
8277
8278 2007-07-19  Mark Probst  <mark.probst@gmail.com>
8279
8280         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
8281         with the MONO_EXCEPTION_ defines.
8282
8283 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
8284
8285         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
8286         #82117.
8287         
8288         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
8289         the cause of an assertion.
8290
8291 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
8292
8293         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
8294         removed.
8295
8296 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
8297
8298         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
8299         assert. Should fix #82103.
8300
8301 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
8302
8303         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
8304         here too. Fixes #82095.
8305
8306         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
8307         addresses.
8308
8309         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
8310
8311         * mini-amd64.h: Enable IMT for amd64.
8312         
8313         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
8314
8315 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
8316
8317         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
8318
8319 2007-07-12  Mark Probst  <mark.probst@gmail.com>
8320
8321         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
8322         as soon as check_linkdemand sets an exception_type.
8323
8324 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8325
8326         * mini-x86.c: fixed offsets for IMT call sequence.
8327         * mini-x86.h: enable IMT again.
8328
8329 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
8330
8331         * trace.c (mono_trace_enter_method): Decode MonoType too.
8332
8333         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
8334
8335         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
8336
8337         * mini-amd64.c: Add preliminary IMT implementation.
8338         
8339 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
8340
8341         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
8342         understand the new IMT-base interface invocation (thanks to
8343         Daniel Nauck for the report and the remote debugging session).
8344
8345 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
8346
8347         * mini-x86.c: size and speed optimizations for the IMT bsearch.
8348
8349 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
8350
8351         * Makefile.am (aotcheck): Make this actually use the AOTed code.
8352
8353 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
8354
8355         * mini-trampolines.c: implement AOT IMT support.
8356         * mini-x86.h: enable IMT support for wider testing.
8357
8358 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
8359
8360         * inssel.brg (emit_imt_argument): Add aot support here.
8361
8362         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
8363
8364 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
8365
8366         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
8367         of the IMT implementation, partially from massi, with my
8368         implementation of the bsearch sequence. Disabled by default until
8369         the AOT code is implemented.
8370
8371 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
8372
8373         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
8374
8375         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
8376
8377 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8378
8379         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
8380         arch-independent IMT JIT code from Massimiliano
8381         Mantione (massi@ximian.com) with small cleanups from me.
8382
8383 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8384
8385         * Makefile.am: fix svn invocation to get the svn revision to be
8386         independent of the local language (build fix).
8387
8388 2007-07-09  Mark Probst  <mark.probst@gmail.com>
8389
8390         * mini.c (inline_method): Reset cfg->exception_type if the
8391         inlining is aborted.  Fixes: 82049.
8392
8393 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
8394
8395         * mini.c: remove assert from exception handling code when exception_ptr
8396         is not set.
8397
8398 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
8399
8400         * mini.c (mono_codegen): Add an assert.
8401
8402         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
8403         enter and leave code.
8404         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
8405
8406 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8407
8408         * mini-ppc.c: fixed memory corruption for localloc(0)
8409         (bug #81852).
8410
8411 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
8412         
8413         * mini.c: Fix warnings.
8414
8415 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
8416
8417         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
8418         to emit better double->int conversions.
8419
8420 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8421
8422         * mini.c: the provided Min/Max optimizations are valid for unisgned
8423         ints.
8424
8425 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
8426
8427         * 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
8428
8429 2007-06-28  Miguel de Icaza  <miguel@novell.com>
8430
8431         * mini.c (mono_running_on_valgrind): Add support for reporting the
8432         method and  its boundaries to valgrind.
8433
8434 2007-06-28  Martin Baulig  <martin@ximian.com>
8435
8436         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8437
8438 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
8439
8440         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
8441
8442         * generic.2.cs: Add new test case.
8443
8444 2007-06-25  Martin Baulig  <martin@ximian.com>
8445
8446         Merged the `debugger-dublin' branch.
8447
8448         * debug-mini.c
8449         (mono_debugger_insert_method_breakpoint): New public method.
8450         (mono_debugger_remove_method_breakpoint): Likewise.
8451         (mono_debugger_check_breakpoints): New static method.
8452         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
8453
8454         * debug-debugger.h (MonoDebuggerInfo):
8455         Renamed (to keep backward compatibility in the vtable):
8456         `insert_breakpoint' -> `old_insert_breakpoint'.
8457         `remove_breakpoint' -> `old_remove_breakpoint'.
8458         `create_string' -> `old_create_string'.
8459         `lookup_class' -> `old_lookup_class'.
8460         `lookup_type' -> removed; changed into a dummy field.
8461         `lookup_assembly' -> `old_lookup_assembly'.
8462         Added (same functionality, but different signature):
8463         `create_string', `lookup_class', `lookup_assembly'
8464         Added new:
8465         `get_method_addr_or_bpt', `remove_method_breakpoint',
8466         `runtime_class_init'.
8467
8468         * debug-debugger.c: Merged the `debugger-dublin' branch.
8469
8470 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
8471
8472         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
8473         well.
8474         (peephole_pass): Likewise.
8475
8476 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
8477
8478         * driver.c: hopefully make setaffinity work also for ancient
8479         versions of linux.
8480
8481 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
8482
8483         * driver.c : win32 build fix.
8484
8485 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
8486
8487         * driver.c: check for the MONO_NO_SMP env var and bind to a single
8488         processor if it is set.
8489
8490 2007-06-21  Martin Baulig  <martin@ximian.com>
8491
8492         * debug-mini.h: New file.
8493
8494         * debug-mini.c
8495         (mono_debugger_insert_breakpoint_full): Moved here from
8496         ../metadata/mono-debug-debugger.c.
8497         (mono_debugger_remove_breakpoint): Likewise.
8498         (mono_debugger_breakpoint_callback): Likewise.
8499
8500 2007-06-15  Raja R Harinath  <rharinath@novell.com>
8501
8502         * jit-icalls.c (mono_helper_compile_generic_method): Update to
8503         changes in MonoGenericClass.
8504
8505 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
8506
8507         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
8508
8509 2007-06-14  Raja R Harinath  <rharinath@novell.com>
8510
8511         * jit-icalls.c (mono_helper_compile_generic_method): Update to
8512         removal of MonoGenericMethod.
8513
8514 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8515
8516         * mini-exceptions.c: hooks for the exception events profiling API.
8517
8518 2007-06-14  Randolph Chung  <tausq@debian.org>
8519
8520         * Makefile.ma: Add hppa target.
8521         * mini-arch.h: Include mini-hppa.h
8522         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
8523         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
8524         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8525
8526 2007-06-14  Randolph Chung  <tausq@debian.org>
8527
8528         * inssel.brg: Add rules for "chained" compare-branch operations so that
8529         a single compare op can affect multiple branches.  Adjust cost for
8530         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
8531         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
8532         cost for some rules so that they can more easily be overridden by
8533         per-arch rules (with fixes from lupus).
8534         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8535
8536 2007-06-13  Randolph Chung  <tausq@debian.org>
8537
8538         * mini-ops.h: Reorder branch ops so that they match the order of the
8539         corresponding CEE_* ops.  The code expects them this way.
8540         Add new ops for HPPA target.
8541         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8542
8543 2007-06-13  Randolph Chung  <tausq@debian.org>
8544
8545         * mini-exceptions.c: Handle cases where the stack grows towards
8546         larger addresses.
8547         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8548
8549 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8550
8551         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
8552         counter.
8553         * driver.c: explain where a non-matching corlib is found.
8554
8555 2007-06-13  Mark Probst  <mark.probst@gmail.com>
8556
8557         * mini.c (print_jit_stats): Output dynamic code allocation stats.
8558
8559 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
8560
8561         * mini-exceptions.c: Generate a method profile leave event during
8562         an exception to ensure that the profiler gets notified.
8563
8564 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
8565
8566         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
8567         branch.
8568
8569         * cpu-amd64.md: Add long_and/or/xor opcodes.
8570
8571 2007-06-06  Wade Berrier  <wberrier@novell.com>
8572
8573         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
8574         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
8575         length of instruction shr_imm (expected 8, got 10)
8576
8577 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
8578
8579         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
8580
8581 2007-06-06  Mark Probst  <mark.probst@gmail.com>
8582
8583         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8584         MonoInternalHashTable again (fixed bug in the internal hash table
8585         code).
8586
8587 2007-06-06  Mark Probst  <mark.probst@gmail.com>
8588
8589         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
8590         Have to figure out what makes it crash the SWF regression.
8591
8592 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
8593
8594         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
8595
8596 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8597
8598         * mini.c: optimize out the type check when storing null in a
8599         reference array.
8600
8601 2007-06-04  Mark Probst  <mark.probst@gmail.com>
8602
8603         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8604         MonoInternalHashTable.
8605
8606 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
8607
8608         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
8609         signed integer methods.
8610
8611 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
8612
8613         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
8614         permanently since the current approach doesn't work.
8615
8616 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
8617
8618         * inssel.brg (stmt): Only call delegate->invoke_impl if 
8619         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
8620
8621 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
8622
8623         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
8624         the sreg2==rdx case.
8625         
8626         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
8627         account if it contains a rex prefix.
8628         (peephole_pass): Handle OP_FMOVE as well.
8629
8630 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
8631
8632         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
8633         as it causes regressions.
8634
8635 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
8636
8637         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
8638         static case as well.
8639
8640         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
8641
8642         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8643         (mono_arch_get_this_arg_from_call): Ditto.
8644
8645         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
8646
8647         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
8648         invoke_impl field.
8649
8650         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8651         (mono_arch_get_this_arg_from_call): Ditto.
8652
8653         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
8654         
8655         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
8656         try to create optimized invoke code and use that for further invocations. 
8657         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
8658
8659         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
8660
8661 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
8662
8663         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
8664         sealed classes or methods.
8665         *devirtualization.cs: tests for the new optimization
8666
8667 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
8668
8669         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
8670         by the update_volatile () function.
8671
8672 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
8673
8674         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
8675         require it.
8676
8677         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
8678
8679 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
8680
8681         * mini.c: Add configure checks for header files.
8682         * mini-x86.c: Add configure checks for header files.
8683         * trace.c: Add configure checks for header files.
8684         * aot-runtime.c: Add configure checks for header files.
8685         * aot-compiler.c: Add configure checks for header files.
8686         * driver.c: Add configure checks for header files.
8687         * mini-codegen.c: Add configure checks for header files.
8688         
8689         Code is contributed under MIT/X11 license.
8690
8691 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
8692
8693         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
8694         icompare_imm -128 + op_iclt. Fixes #81703.
8695
8696 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
8697
8698         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
8699
8700 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
8701
8702         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
8703         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
8704         so that all isinst checks now use "interface_bitmap".
8705
8706 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
8707
8708         * cpu-amd64.md (jmp): Fix a warning.
8709
8710         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
8711
8712         * basic.cs: Add new regression test.
8713
8714         * basic.cs: Remove test which is now in basic-long.cs.
8715
8716         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
8717
8718         * basic-long.cs: Add new test.
8719         
8720 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
8721
8722         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
8723
8724 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
8725
8726         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
8727
8728         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
8729         places.
8730         
8731         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
8732         throwing code a bit.
8733
8734         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
8735         the exception throwing code a bit.
8736
8737         * mini-x86.c (get_call_info): Allocate result from a mempool.
8738
8739 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
8740
8741         * aot-compiler.c (find_typespec_for_class): Fix the assert.
8742
8743         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
8744
8745         * mini.h (MonoCompile): Add 'token_info_hash' field.
8746
8747         * mini.c: Save token->method associations during compilation so the AOT 
8748         compiler can use it.
8749         
8750         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
8751         which reference generic classes and methods.
8752
8753 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
8754
8755         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
8756
8757         * aot-compiler.c (compile_method): Fix a typo in a comment.
8758
8759         * aot-runtime.c (decode_cached_class_info): Skip generic types.
8760
8761         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
8762         everything generic.
8763
8764         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
8765
8766 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
8767
8768         * mini.h (MonoCompile): Add 'args' field.
8769
8770         * mini.c (mono_compile_create_vars): Store variables representing the arguments
8771         into cfg->args.
8772
8773         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
8774
8775 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
8776
8777         * mini.c (mono_compile_get_interface_var): Remove this unused function.
8778
8779         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
8780
8781         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
8782         opcodes for some opcodes.
8783
8784         * mini.h *.brg *.c: Use the new opcodes.
8785
8786 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
8787
8788         * mini.h: Bumped aot revision.
8789
8790         * inssel.brg: modified code generation of type checks for interfaces
8791         to use the new "MonoClass.interface_bitmap" instead of the old
8792         "MonoClass.interface_offsets".
8793
8794 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
8795
8796         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
8797
8798 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
8799
8800         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
8801         64 bit platforms.
8802
8803 2007-04-27  Neale Ferguson <neale@sinenomine.net>
8804
8805         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
8806
8807 2007-04-27  Wade Berrier  <wberrier@novell.com>
8808
8809         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
8810         mini.h) to fix build.
8811
8812 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
8813
8814         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
8815         
8816         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
8817         causes the corlib unit tests to fail.
8818
8819 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
8820
8821         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
8822
8823         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
8824
8825         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
8826         opcodes to the comparison relations.
8827
8828         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
8829         opcodes to their types.
8830         
8831         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
8832
8833         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
8834         it in cfg->arch.cinfo.
8835
8836         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
8837
8838         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
8839         cfg->cil_offset_to_bb.
8840
8841 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
8842
8843         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
8844         created becase of initlocals.
8845
8846 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
8847
8848         * mini-alpha.c cpu-alpha.md: More alpha port work from 
8849         Sergey Tikhonov <tsv@solvo.ru>.
8850
8851 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
8852
8853         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
8854
8855 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
8856
8857         * cpu-s390.md (break): Correct the length of break instruction.
8858
8859 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8860
8861         * mini.c: fix a couple of soft-float issues and comments.
8862
8863 2007-04-15  Miguel de Icaza  <miguel@novell.com>
8864
8865         * trace.c (is_filenamechar): - is also a filename char.
8866
8867 2007-04-15  Neale Ferguson <neale@sinenomine.net>
8868
8869         * mini-s390.c: Correct checking for enum type in return value processing.
8870
8871 2007-04-14  Raja R Harinath  <rharinath@novell.com>
8872
8873         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
8874         (version.h): Makefile is in the build directory.
8875
8876 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
8877
8878         * mini-amd64.h: fix for assertion failure on Solaris/amd64
8879
8880 2007-04-11  Martin Baulig  <martin@ximian.com>
8881
8882         * mini.c (can_access_member): Fix handling of generic classes;
8883         fixes #81259.
8884
8885 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
8886
8887         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
8888
8889 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
8890
8891         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
8892
8893 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
8894
8895         * mini-codegen.c: make sure the right spill amount is
8896         used for fp or integer registers (fixes the float_sub_spill() on ppc).
8897
8898 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
8899
8900         * mini-ppc.c: fixes for the fp_branch_nan test.
8901
8902 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
8903
8904         * basic.cs: Comment out new test which still fails on ia64.
8905
8906 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
8907
8908         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
8909
8910 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
8911
8912         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
8913
8914 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
8915
8916         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
8917         on 64 bit machines. Fixes part of #80738.
8918
8919         * basic.cs: Add regression test.
8920
8921 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
8922
8923         * inssel.brg basic.cs: Revert previous change to fix build.
8924
8925         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
8926         platforms.
8927         
8928         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
8929
8930         * basic.cs: Add new regression test.
8931
8932 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
8933
8934         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
8935         many arguments.
8936
8937 2007-03-16  Neale Ferguson <neale@sinenomine.net>
8938
8939         * cpu-s390x.md: Correct length of break instruction.
8940
8941 2007-03-16  Neale Ferguson <neale@sinenomine.net>
8942
8943         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
8944         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
8945
8946 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
8947
8948         * *.c: Begin WIN64 port.
8949         * mini.c:  Use correct register in profiler.
8950         * mini-amd64.c: No inline assembly on Win64.
8951         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
8952         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
8953         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
8954         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
8955         mono_arch_ip_from_context for Win64.
8956         
8957         Contributed under MIT/X11 license.
8958
8959 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
8960
8961         * exceptions-amd64.c (seh_handler): Ditto.
8962
8963         * exceptions-x86.c (seh_handler): Fix a memory leak.
8964
8965 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
8966
8967         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
8968         mini-s390x.c: fixed peephole optimizations to deal
8969         correctly with 1 and 2 byte reload avoidance.
8970
8971 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
8972
8973         * cpu-s390.md, cpu-s390x.md: update localloc length.
8974
8975 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
8976
8977         * cpu-g4.md: added missing descriptions.
8978
8979 2007-03-14  Miguel de Icaza  <miguel@novell.com>
8980
8981         *  Makefile.am: Add support so the tail tests are not executed on
8982         PowerPC as that is a known limitation of the PowerPC port.
8983
8984 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
8985
8986         * runmdesc.bat:  Move to msvc directory.
8987         
8988 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
8989
8990         * runmdesc.bat:  Run executable that was produced by the current
8991         target and sent via an argument.
8992         
8993 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
8994
8995         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
8996         #81102.
8997
8998         * generics.2.cs: Add regression test.
8999
9000 2007-03-09  Wade berrier  <wberrier@novell.com>
9001
9002         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
9003
9004 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
9005
9006         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
9007         AOT code depends on this.
9008
9009 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9010
9011         * mini.c: more precise tracking of types in the eval stack
9012         (part of fix for bug #81044).
9013
9014 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
9015
9016         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
9017
9018         * aot-compiler.c (encode_patch): Remove an obsolete comment.
9019
9020 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
9021
9022         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
9023
9024         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
9025
9026 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
9027
9028         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
9029         a pointer on 64 bit systems. Fixes #80190.
9030
9031         * iltests.il: Add new regression test.
9032
9033 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9034
9035         * mini.c: inline a constant for Environment.IsRunningOnWindows.
9036
9037 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
9038
9039         * trace.c: Remove an erroneous alignemnt check when tracing.
9040           Fixes --trace on OSX86.
9041
9042 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9043
9044         * mini-$(arch).h: initialize SP in context for all the archs.
9045
9046 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
9047
9048         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
9049         regressions in the thread tests.
9050
9051 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
9052
9053         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
9054         - fixed implementation of LOCALLOC opcode
9055         - implemented non-un compare for floats
9056         - code cleanup
9057         - implementation of FDIV and CKFINITE opcodes
9058         - fixes for latest mono updates
9059         - additional arch opcodes
9060
9061 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9062
9063         * Makefile.am: simplify and merge rules for cross-compilation.
9064
9065 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
9066
9067         * local-propagation.c: Actually *apply* the fix for bug 80591...
9068
9069 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9070
9071         * mini-exceptions.c: backuot part of the last change
9072         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
9073
9074 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
9075         * inssel.brg: Fix bug 59286.
9076
9077
9078 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
9079
9080         * mini-exceptions.c: patch from Zoltan to correctly check for
9081         stack boundaries (using the stack register, not the frame register),
9082         fixes bugs #80724, #79717.
9083
9084 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
9085
9086         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
9087         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
9088
9089         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
9090         presence of frame pointer elimination.
9091
9092 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
9093         
9094         * mini-x86.h: NetBSD UCONTEX_REG defines.
9095
9096 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
9097
9098         * inssel-amd64.brg: Fix amd64 build.
9099
9100 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
9101
9102         * mini.h: remove extern to workaround what looks likes gcc bug 26905
9103         on amd64.
9104
9105 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
9106
9107         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
9108         ends.
9109
9110         * mini-<ARCH>.c: Use mono_is_regsize_var ().
9111
9112 2007-01-30 Mark Mason <mason@broadcom.com>
9113
9114            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
9115            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
9116            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
9117            beginning support for CEE_JMP [not quite working yet]
9118            * tramp-mips.c: LMF handling now works
9119         
9120 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
9121
9122         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
9123
9124         * mini.h (NULLIFY_INS): New macro.
9125
9126 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9127
9128         * mini.c: statistical profiler fix for windows, patch
9129         from Tor Lillqvist (tml@novell.com).
9130
9131 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
9132         * local-propagation.c: Fix bug 80591.
9133
9134 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9135
9136         * Makefile.am: put back the --export-dynamic option as with
9137         the previous gmodule flags (thanks to Robert Jordan).
9138
9139 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
9140
9141         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
9142
9143         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
9144         simplify and speed up the local register allocator. Also rename some fields
9145         like iassign->vassign.
9146         
9147         * regalloc.c: Remove some functions which are no longer used since their
9148         inlined version is in mini-codegen.c.
9149         
9150         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
9151
9152         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
9153
9154 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
9155
9156         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
9157         narrowing. Fixes #80622.
9158
9159         * iltests.il: Add new regresssion test. 
9160
9161 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9162
9163         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
9164         debug-debugger.c, debug-debugger.h: warning fixes.
9165         * driver.c: updated copyright year and made it fit in one line.
9166
9167 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
9168
9169         * aot-runtime.c: updated to use mono-dl instead of gmodule.
9170
9171 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
9172
9173         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
9174
9175         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
9176
9177         * iltests.il: Add new test for bug #80507.
9178
9179 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9180
9181         * mini-arm.h: use soft-float also on vfp for now.
9182
9183 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9184
9185         * mini.c: fix some more soft-float issues.
9186
9187 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
9188
9189         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
9190
9191 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
9192         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
9193         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
9194         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
9195
9196 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
9197
9198         * mini-arm.c: typo fix.
9199
9200 2007-01-23  Neale Ferguson <neale@sinenomine.net>
9201
9202         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
9203
9204 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
9205
9206         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
9207         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
9208
9209         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
9210
9211         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
9212
9213         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
9214         
9215         * inssel.brg: Fix a warning.
9216
9217         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
9218
9219         * abcremoval.c ssa.c ssapre.c: Update after this change.
9220         
9221         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
9222
9223         * dominators.c (df_set): Use mono_bitset_union_fast.    
9224
9225 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9226
9227         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
9228         mini-codegen.c: reduce relocations and memory usage for the cpu
9229         description.
9230
9231 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
9232
9233         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
9234
9235         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
9236         to reduce their size.
9237
9238 2007-01-19 Mark Mason <mason@broadcom.com>
9239
9240         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
9241         * mini-mips.c: more configuration macros, support long conditional branches, additional
9242         asserts, fix epilog instrumentation.
9243         * mini-mips.h: use standard stack walk
9244         * cpu-mips.md: increase size of div, rem and conditional branches
9245         
9246 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
9247
9248         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
9249         to cpu spec data.
9250
9251 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
9252
9253         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
9254         (compile_method): Ditto.
9255
9256         * aot-runtime.c (decode_klass_info): Ditto.
9257
9258         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
9259         needed by the code generated by inssel.brg. Also fix a warning.
9260
9261 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
9262
9263         * mini.c: deal with enums that become genericinsts by
9264         being nested in a generic class (bug #79956).
9265
9266 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9267
9268         * mini.c: match the generic definition to check for
9269         private access with generic types (bug #78431).
9270
9271 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9272
9273         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
9274         to make life easier for people cross-compiling that insist on not
9275         using scratchbox.
9276
9277 2007-01-17 Mark Mason <mason@broadcom.com>
9278
9279         * inssel-long.brg: patch to deal with mips missing flags
9280         * inssel-long32-mips.brg: implement overflow checks
9281         * insset-mips.brg: implement overflow checks
9282         * mini-mips.h: implement conditional exception handling
9283         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
9284           Remove unused code, minor cleanups.
9285         * exceptions-mips.c: minor cleanups
9286         * mini-ops.h: add mips conditional exception ops
9287         * cpu-mips.md: add mips conditional exception ops
9288
9289         
9290 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9291
9292         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
9293         to deal with mips missing of flags.
9294
9295 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9296
9297         * exceptions-ppc.c: execute fault handlers.
9298
9299 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
9300
9301         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
9302
9303 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9304
9305         * mini.c: handle also floating point values in initialize_array.
9306
9307 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9308
9309         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
9310         array initialization and make it conditional on the intrins option.
9311
9312 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9313
9314         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
9315         relocations and put the patch info names close to the enum definition.
9316
9317 2007-01-15 Mark Mason <mason@broadcom.com>
9318
9319         * basic.cs, exceptions.cs: break up large tests to increase debugability.
9320
9321 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
9322
9323         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
9324
9325 2007-01-12  Raja R Harinath  <rharinath@novell.com>
9326
9327         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
9328
9329 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
9330
9331         * Makefile.am: distribute the mips sources.
9332
9333 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9334
9335         * mini-codegen.h: handle bug #80489 here, by excluding ecx
9336         directly.
9337
9338 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
9339
9340         * cpu-x86.md: back out for now as this triggers other regressions.
9341
9342 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9343
9344         * cpu-x86.md: force src1 and dest regpair for long shift instructions
9345         to eax:edx, so ecx can't get allocated to them (bug #80489).
9346
9347 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
9348
9349         * mini.c, mini-exceptions.c: enabled running fault handlers
9350         (bug #80469).
9351
9352 2007-01-03  Miguel de Icaza  <miguel@novell.com>
9353
9354         * driver.c: If nothing fail, do not use the string "failed",
9355         because it makes it very annoying to view test result logs on the
9356         web. 
9357
9358 2006-12-30  Miguel de Icaza  <miguel@novell.com>
9359
9360         * debug-debugger.c (mono_debugger_main): Rename "main" to
9361         "main_method" to prevent a warning.
9362
9363         Remove a warning for unused field.
9364
9365 2006-12-28  Martin Baulig  <martin@ximian.com>
9366
9367         * debug-debugger.c
9368         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
9369
9370 2006-12-22  Martin Baulig  <martin@ximian.com>
9371
9372         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
9373         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
9374         seperate `.mdb_debug_info' section, so we can access it from the
9375         debugger even if the binary is stripped.
9376
9377         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
9378         from the `.mdb_debug_info' here to prevent the linker from
9379         removing that section.
9380
9381         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
9382         mdb-debug-info64.s.
9383
9384 2006-12-19  Robert Jordan  <robertj@gmx.net>
9385
9386         * mini-x86: enable the code to return small structures in
9387         registers for FreeBSD as well. Fixes bug #80278.
9388         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
9389
9390 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9391
9392         * mini-x86.c: align the stack when calling the profiler
9393         function instrumenting the prolog (on OSX).
9394
9395 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
9396
9397         * mini.c: emit a break opcode where Debugger.Break () is called.
9398
9399 2006-12-13  Miguel de Icaza  <miguel@novell.com>
9400
9401         * mini.c (mono_method_to_ir): Provide useful information on this
9402         assert, to prevent others from debugging like I did.
9403
9404 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9405
9406         * mini.c: enable code which was incorrectly commented
9407         (bug #80235).
9408
9409 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9410
9411         * mini-x86.c: enable on OSX, too, the code to return small
9412         structures in registers.
9413
9414 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9415
9416         * mini-x86.c: remove the use of the dynamic code manager here, too.
9417
9418 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9419
9420         * mini.h, debug-debugger.c, tramp-*.c: fixed 
9421         mono_debugger_create_notification_function() to use
9422         mono_global_codeman_reserve () instead of a dynamic code manager.
9423
9424 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
9425
9426         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
9427         ves_array_element_address() jit icall and use a generated
9428         managed method instead (which is about 4 times faster for a rank 3
9429         array access).
9430
9431 2006-11-29  Mark Mason  <mason@broadcom.com>
9432
9433         * basic-calls.cs: additional tests for passing
9434         structures as function arguments.
9435
9436 2006-11-29  Mark Mason  <mason@broadcom.com>
9437
9438         * mini-mips.h: disable custom exception handling
9439         * mini-mips.c: throw/rethrow should use jalr to call
9440         exception stubs.  Fixed bug with passing structures
9441         by value. More support for tracing floating point
9442         functions.
9443
9444 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9445
9446         * mini.c: fixed typo in the soft-float ldind.r4 handling
9447         (bug #80086).
9448
9449 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9450
9451         * mini.c, mini.h, driver.c: added --runtime command line
9452         option to select a different runtime than the autodetected one.
9453         * jit.h: added API for embedders to initialize with a specific
9454         runtime version.
9455
9456 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9457
9458         * mini.c: handle also boxing of r4 values (bug #80024).
9459
9460 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9461
9462         * mini-ppc.c: force indirect calls until we reserve
9463         enough address space for all the generated code.
9464
9465 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
9466
9467         * exceptions-arm.c: workaround bugs in the libc definition
9468         of struct ucontext.
9469
9470 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9471
9472         * inssel.brg: fixes from me and Mark Mason.
9473
9474 2006-11-23  Dick Porter  <dick@ximian.com>
9475
9476         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
9477         semaphore display now we've fixed the initial value
9478
9479 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9480
9481         * inssel.brg: partially revert the last change to fix the build.
9482
9483 2006-11-21  Mark Mason  <mason@broadcom.com>
9484
9485         * inssel.brg: Add and use compare-and-branch macros to support
9486         architectures that do not have condition code registers (ie. MIPS).
9487         * *-mips.{c,brg,md}: Fix copyright statements
9488
9489 2006-11-20  Mark Mason  <mason@broadcom.com>
9490
9491         * Makefile.am: remove mini-codegen.c from list of MIPS sources
9492         * mini.c: Allow GET_CONTEXT to be specified by the arch port
9493         * mini.h: Added declaration for mono_print_ins()
9494         * mini-codegen.c: added ins_spec initializer for MIPS
9495         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
9496         vreg to be virtual and hreg to be non-virtual.
9497         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
9498         is not yet working/implemented correctly.
9499         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
9500         non-static, fixup calls to print_ins() from other parts in the file.
9501
9502 2006-11-20  Mark Mason  <mason@broadcom.com>
9503
9504         * basic-calls.cs: added tests for passing structures as arguments
9505         to calls.
9506
9507 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9508
9509         * inssel-long32.brg: optimize signed division by power of two.
9510
9511 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
9512
9513         * mini-arm.c: added support for interworking with thumb code
9514         (mono must be still be built using the ARM instruction encoding).
9515
9516 2006-11-19  Miguel de Icaza  <miguel@novell.com>
9517
9518         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
9519         verifier has different rules for it.   Fixes a few verifier issues
9520         in the test suite.
9521
9522         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
9523         at the end, so people know what happened.
9524
9525 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9526
9527         * brach-opts.c: in optimize_exception_target() make sure we
9528         are in a catch clause (fixes bug #79871).
9529
9530 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9531
9532         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
9533         more soft-float support fixes.
9534
9535 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
9536
9537         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
9538         that are passed half on the stack and half in registers.
9539
9540 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
9541
9542         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
9543         more mips integration work from Mark E Mason 
9544         <mark.e.mason@broadcom.com>.
9545
9546 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9547
9548         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
9549         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
9550         tramp-mips.c: added sources for the mips port, not
9551         integrated in the build yet. Contributed by
9552         Mark E Mason <mark.e.mason@broadcom.com>.
9553
9554 2006-11-14  Neale Ferguson <neale@sinenomine.net>
9555
9556         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
9557
9558 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9559
9560         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
9561         put the soft-float rules in its own file since it seems to
9562         break s390 compilation.
9563
9564 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9565
9566         * mini-arm.c: fixed wrnings.
9567
9568 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
9569
9570         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
9571         inssel-arm.brg: ARM support for soft-float.
9572
9573 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9574
9575         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
9576         loads and stores of 32 bit fp values.
9577
9578 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
9579
9580         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
9581
9582         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
9583         works. Fixes #79852 and #79463.
9584
9585 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9586
9587         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
9588         more soft-float support WIP and fixes.
9589
9590 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
9591
9592         * mini-arm.c: some VFP updates.
9593
9594 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9595
9596         * mini-exceptions.c: 0 is a valid local var offset in some
9597         architectures, don't assert (bug #78508).
9598
9599 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
9600
9601         * exceptions-arm.c: fixed off by one error in stack walk code.
9602
9603 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
9604
9605         * mini.h, mini.c: more precise tracking of type load exceptions.
9606
9607 2006-11-03  Robert Jordan  <robertj@gmx.net>
9608
9609         * Makefile.am: [WIN32] Add monow.exe target.
9610         * driver.c: [WIN32] Don't detach the console when debugging.
9611         Fixes bug #79797.
9612         
9613 2006-10-30  Miguel de Icaza  <miguel@novell.com>
9614
9615         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
9616
9617 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
9618
9619         * aot-compiler.c (emit_method_info): Add a case missed earlier.
9620
9621         * driver.c (mini_regression): Fix --regression with AOT.
9622
9623         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
9624
9625 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
9626
9627         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
9628
9629         * mini-sparc.h: Don't use sigaction on sparc/linux.
9630
9631         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
9632
9633         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
9634
9635         * mini-exceptions.c: Add proper include files for getpid ().
9636
9637 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
9638
9639         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
9640         address instead of a MonoJitInfo* to avoid decoding the exception info for the
9641         method.
9642
9643         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
9644         name cache to reduce its size.
9645
9646         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
9647
9648 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
9649
9650         * mini-x86.c: Save/restore the current LMF structure more efficiently using
9651         the mono_lmf TLS variable.
9652
9653         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
9654         trampoline lmf frames.  
9655
9656         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
9657
9658 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
9659
9660         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
9661         the mono_lmf TLS variable.
9662
9663         * mini-exceptions.c: Access the LMF structure through accessors.
9664
9665         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
9666         variable instead of in jit_tls->lmf.
9667
9668         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
9669         
9670         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
9671         trampoline lmf frames.
9672
9673         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
9674
9675 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
9676
9677        * mini.c trace.c mini-x86.c: Revert these too.
9678         
9679        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
9680        signature change.
9681
9682 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
9683
9684         * genmdesc.c: removed now dead code.
9685
9686 2006-10-09  Robert Jordan <robertj@gmx.net>
9687
9688         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
9689
9690 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
9691
9692         * mini.h: do not leave gaps in the opcode values.
9693
9694 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
9695
9696         * jit-icalls.h: flag functions as internal here, too.
9697
9698 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
9699
9700         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
9701         functions with the internal attribute.
9702
9703 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
9704
9705         * aot-compiler.c: fclose the file descriptor in the profile read loop.
9706
9707 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
9708
9709         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
9710         for soft-float.
9711
9712 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
9713
9714         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
9715         tail calls as on other platforms.
9716
9717         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
9718
9719         * iltests.il: Add a few tailcall tests.
9720
9721 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9722
9723         * driver.c: fix loop for old compilers (bug #79521).
9724
9725 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
9726
9727         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
9728
9729         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
9730
9731         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
9732         metadata without any code.
9733
9734         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
9735         more precise debugging information using gdb.
9736
9737 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
9738
9739         * inssel-ia64.brg: Make the helper methods static.
9740
9741 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9742
9743         * inssel-x86.brg: make the helper methods static.
9744
9745 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
9746
9747         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
9748
9749 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9750
9751         * mini.c: updates for monoburg changes.
9752         * inssel.brg: make a few helper functions static as they should.
9753
9754 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
9755
9756         * Makefile.am: Move mini-codegen.c to common_sources.
9757
9758 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9759
9760         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
9761         instructions.
9762         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
9763         mini-ppc.h: port to use the common local register allocator.
9764
9765 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
9766
9767         * mini.h: Remove the comment too then.
9768
9769 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
9770
9771         * mini.h: put back backend.data which is to be used shortly and
9772         doesn't increase the size of MonoInst. If any 64 bit arch aligned
9773         pointers on 4 byte boundaries it'd have much bigger issues running
9774         and you can ifdef it out anyway.
9775
9776 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
9777
9778         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
9779         MonoInst size by 4 bytes on 64 bit machines.
9780
9781 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
9782
9783         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
9784         replacement with more meaningful field names. Arch maintainers, please
9785         check the assigned names are good enough for your arch.
9786
9787 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
9788
9789         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
9790         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
9791
9792 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
9793
9794         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
9795         relocations and memory requirements, put the optimization flags
9796         definitions in their own file.
9797
9798 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
9799
9800         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
9801
9802         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
9803
9804 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
9805
9806         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
9807
9808 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
9809
9810         * inssel.brg: use the correct function to get the size of an item
9811         in an array, given an element class.
9812         * aot-compiler.c: do not access class->class_size directly.
9813
9814 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
9815
9816         * mini.h, debug-mini.c: added a debugging function to print
9817         info about local variables and arguments in a jitted method.
9818
9819 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
9820
9821         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
9822
9823         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
9824
9825 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
9826
9827         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
9828         inner and outer loops when passing vtypes.
9829
9830 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
9831
9832         * mini-ppc.c: take into account the cpu errata for cache flushing
9833         which caused some random errors (bug #79381).
9834
9835 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
9836
9837         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
9838         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
9839
9840 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
9841
9842         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
9843         loaded.
9844
9845         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
9846         freebsd ports tree.
9847
9848         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
9849         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
9850
9851         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
9852         displacement.
9853
9854 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
9855
9856         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
9857
9858 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
9859
9860         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
9861         macro does not have to be changed during debugging.
9862
9863         * 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>.
9864
9865         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
9866
9867         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
9868         
9869         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
9870         MONO_ARCH_NO_EMULATE_MUL is defined.
9871
9872         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
9873
9874         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
9875
9876         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
9877
9878         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
9879         
9880 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
9881
9882         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
9883         stuff to mini-exceptions.c where it is used.
9884
9885         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
9886         setup code, the real one is in mini-exceptions.c.
9887
9888         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
9889         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
9890         some changes from the freebsd ports tree.
9891
9892         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
9893         constants.
9894         
9895         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
9896
9897 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
9898
9899         * mini.c: on Linux, check for /proc to be mounted
9900         (bug# 79351, novell bug#201204).
9901
9902 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
9903
9904         * mini.c: handle cases where pthread_attr_getstack() behaves
9905         incorrectly (bug #78096).
9906
9907 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
9908
9909         * mini-arm.c: support larger stack frames (bug #79272).
9910
9911 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
9912
9913         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
9914
9915         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
9916         tokens.
9917
9918         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
9919         mono_class_from_name () to find a class from its name.
9920
9921         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
9922
9923 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
9924
9925         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
9926
9927 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
9928
9929         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
9930
9931 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
9932
9933         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
9934         callinfo->trampoline.
9935
9936         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
9937         fixes #79271.
9938         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
9939         future.
9940
9941 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
9942
9943         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
9944
9945 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
9946
9947         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
9948         stats.method_trampolines, it is already done by the generic trampoline code.
9949
9950         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
9951         
9952 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
9953
9954         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
9955
9956         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
9957
9958         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
9959
9960         * mini.c (print_jit_stats): Print mscorlib mempool size too.
9961         
9962         * mini.c (print_jit_stats): Print new stats.
9963
9964         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
9965
9966 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
9967
9968         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
9969         Address on two dimensional arrays. Fixes #78729.
9970
9971         * mini.h (MonoCompile): Add a 'skip_visibility' field.
9972
9973         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
9974         a method.
9975
9976         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
9977
9978         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
9979         #79130.
9980         
9981         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
9982         a race condition.
9983         (mini_get_ldelema_ins): Ditto.
9984
9985 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
9986
9987         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
9988         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
9989         Fixes #79213.
9990
9991 2006-08-29 Neale Ferguson <neale@sinenomine.net>
9992
9993         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
9994         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
9995
9996         * exceptions-s390x.c: Cosmetic change.
9997
9998         * tramp-s390.c: Fix warning.
9999
10000         * cpu-s390.md: Correct length of mul_imm.
10001
10002 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
10003
10004         * aot-compiler.c: added binary writer with ELF backend
10005         implementation (only on Linux/x86 for now).
10006
10007 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
10008
10009         * Makefile.am: Don't run net 2.0 AOT tests.
10010
10011         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
10012         (mono_compile_assembly): Skip net 2.0 assemblies as well.
10013
10014         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
10015
10016 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10017
10018         * aot-compiler.c: simplified and refactored the asm-writing code
10019         to allow different backends.
10020
10021 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
10022
10023         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
10024
10025         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
10026         little. Share patches of type TYPE_FROM_HANDLE as well.
10027
10028         * mini.c (mono_patch_info_equal): New helper function.
10029         (mono_patch_info_hash): Ditto.
10030
10031         * aot-compiler.c (emit_method_code): Fix s390 build.
10032
10033         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
10034         is not handled because it is stored as a flag and not as a type ctor. Fixes
10035         #79016.
10036
10037 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
10038
10039         * aot-compiler.c: Fix computation of GOT slot statistics.
10040         
10041         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
10042         Also remove support for not PIC AOT.
10043
10044         * mini.h: Bump AOT file format version.
10045
10046         * objects.cs: Add a test for #78990.
10047
10048         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
10049         (peter.dettman@iinet.net.au). Fixes #79087.
10050
10051         * basic-long.cs: Add a test for the above.
10052
10053 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
10054
10055         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
10056         
10057         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
10058         code somewhat.
10059
10060 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
10061
10062         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
10063         exceptions.
10064
10065 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
10066
10067         * mini.c: Don't verify COM proxy invoke calls
10068         
10069
10070 2006-08-10  Dick Porter  <dick@ximian.com>
10071
10072         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
10073         which process is holding semaphores locked.
10074
10075 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
10076
10077         * mini-ia64.c mini-amd64.c: Fix #79027.
10078
10079         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
10080
10081         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
10082
10083         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
10084         implicit arguments in a vararg call. Fixes #79027.
10085
10086 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
10087
10088         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
10089         (mono_get_array_new_va_signature): Ditto.
10090
10091 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
10092
10093         * aot-runtime.c: Call init_plt lazily.
10094
10095         * inssel-long.brg: Fix unsigned long->int conversion.
10096
10097         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
10098
10099         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
10100         that most data is now in the .rss/.data section.
10101
10102 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
10103
10104         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
10105
10106         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
10107
10108         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
10109
10110         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
10111
10112         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
10113         virtual call. Fixes #79010.
10114
10115         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
10116         and use the result as the this argument in the real call.
10117
10118         * generics.2.cs: Add a new test for #79010.
10119         
10120 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
10121
10122         * mini-x86.c: Fix a warning.
10123
10124         * aot-compiler.c: Add a bunch of statistics.
10125
10126         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
10127
10128 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
10129
10130         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
10131
10132 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
10133
10134         * 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>.
10135
10136 2006-07-13  Miguel de Icaza  <miguel@novell.com>
10137
10138         * mini.c (mono_method_to_ir): Obtain the original method in the
10139         CIL stream and use this to perform validation.
10140
10141         Fixed: #78816
10142
10143 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
10144
10145         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
10146         (mono_arch_call_opcode): Ditto.
10147
10148         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
10149         #78826.
10150
10151         * mini.c (mono_patch_info_dup_mp): New helper function.
10152         
10153         * aot-compiler.c (compile_method): Fix some of the memory allocated during
10154         compilation. Fixes #78827.
10155
10156 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
10157
10158         * declsec.c: Use original security informations for
10159           MONO_WRAPPER_MANAGED_TO_MANAGED.
10160
10161 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
10162
10163         * mini.c: Allow Com Interop methods/classes and
10164         don't verify COM wrapper calls
10165         
10166
10167 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
10168
10169         * inssel-long32.brg: Fix long->i4 checked conversion.
10170
10171         * exceptions.cs: Add a test for the above.
10172
10173 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
10174
10175         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
10176
10177         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
10178         leaks.
10179
10180         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
10181         #78775.
10182
10183 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
10184
10185         * mini.c: Fix solaris/x86 exception handling.
10186
10187         * Makefile.am: Get rid of $(ICU_LIBS).
10188
10189 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
10190
10191         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
10192         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
10193         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
10194
10195         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
10196
10197         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
10198         this function causes a SIGSEGV.
10199
10200 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
10201
10202         * mini.c: Remove unused solaris/x86 includes.
10203
10204 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
10205
10206         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
10207
10208 2006-06-20  Jb Evain  <jbevain@gmail.com>
10209
10210         * cpu-g4.md: fix max length of start_handler instruction.
10211
10212 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
10213         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
10214
10215 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
10216         * ssa.c: Fixed bug 78653 for SSA based deadce.
10217         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
10218         MonoInst.flags, used in SSA based deadce.
10219         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
10220         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
10221
10222 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
10223
10224         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
10225         it can end up using non executable memory on ppc64 systems
10226         running ppc32 userspace (fix from Johannes Berg).
10227
10228 2006-06-14  Dick Porter  <dick@ximian.com>
10229
10230         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
10231         4.1.1
10232
10233 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
10234         * mini.c: Made so that inline is locally disabled if it would
10235         trigger a .cctor, because too many apps depend on this behavior
10236         (which seems to be also the one of the MS CLR).
10237
10238 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
10239
10240         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
10241         No idea why this worked before.
10242
10243         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
10244         which branch to outer exception clauses since they could skip the
10245         inner finally clauses. Fixes #78633.
10246
10247         * exceptions.cs: Add a test for the above.
10248
10249         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
10250         Fixes #78629.
10251
10252         * iltests.il: Add a test for the above.
10253
10254 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
10255
10256         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
10257         after the end of a try bblock, to prevent asserts in mini_method_compile ().
10258
10259         * iltests.il: Add a test for the above.
10260
10261 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
10262
10263         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
10264         
10265         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
10266         methods as instrinsics.
10267
10268 2006-06-09  Wade Berrier <wberrier@novell.com>
10269
10270         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
10271         (simple-cee-ops.h ssapre-mini-ops.h)
10272
10273 2006-06-09  Neale Ferguson <neale@sinenomine.net>
10274
10275         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
10276         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
10277         instruction).
10278         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
10279         * cpu-s390x.md: Fix max. length values for a couple of instructions.
10280
10281 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
10282
10283         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
10284
10285 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
10286
10287         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
10288         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
10289         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
10290         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
10291         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
10292         of opcodes, so that bug 78549 should not happen again.
10293         * ssapre.c: Updated to use the renamed files.
10294
10295 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
10296
10297         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
10298         in OP_ATOMIC_EXCHANGE_I4.
10299
10300 2006-06-07  Wade Berrier <wberrier@novell.com>
10301
10302         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
10303         in mono_debugger_create_notification_function)
10304
10305 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
10306
10307         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
10308         
10309         * mini.c (type_from_stack_type): Disable some changes which do not
10310         seem to work.
10311
10312         * driver.c: Reenable opts.
10313
10314         * mini.h (MonoStackSlot): New structure to keep track of the verification state
10315         of the evaluation stack.
10316         
10317         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
10318         evaluation stack trace at entry to the bblock.
10319
10320         * mini.c (merge_stacks): New function to perform verification of stack merges.
10321         Turned off by default.
10322
10323         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
10324         STACK_MP.
10325         
10326 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
10327
10328         * local-propagation.c: Fixed bug 78549.
10329
10330 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
10331
10332         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
10333
10334 2006-06-02  Miguel de Icaza  <miguel@novell.com>
10335
10336         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
10337         tramp-arm.c, tramp-ia64.c
10338         (mono_debugger_create_notification_function): Update signature to
10339         new signature and use new protocol for creating the notification
10340         function.  
10341
10342         Should fix the build.
10343
10344 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
10345
10346         * exceptions-ppc.c (mono_jit_walk_stack)
10347         (ves_icall_get_frame_info): Fix the build
10348
10349 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
10350
10351         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
10352
10353 2006-05-31  Raja R Harinath  <rharinath@novell.com>
10354
10355         * il2tests.2.il: New file for generics CIL tests.  Add test for
10356         #78019.
10357         * Makefile.am: Update.
10358
10359         Fix #78019
10360         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
10361         to nullable types.
10362
10363 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
10364
10365         * aliasing.c: Fixed bug 78311.
10366
10367 2006-05-29  Martin Baulig  <martin@ximian.com>
10368
10369         * mini-exceptions.c (mono_find_jit_info): When computing the
10370         native offset, check whether we're actually inside the method's
10371         code; call mono_debug_print_stack_frame() to format the frame.
10372         (ves_icall_System_Exception_get_trace): Call
10373         mono_debug_print_stack_frame() to format the stack frame.
10374         (ves_icall_get_trace): Update to the new debugging API.
10375         (mono_jit_walk_stack_from_ctx): Likewise.
10376         (ves_icall_get_frame_info): Likewise.
10377
10378         * mini.c (get_method_from_ip): Use the new debugging API.
10379         (mono_print_method_from_ip): Likewise.
10380
10381         * exceptions-ppc.c
10382         (mono_jit_walk_stack): Use the new debugging API.
10383         (ves_icall_get_frame_info): Likewise.   
10384
10385 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
10386
10387         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
10388
10389 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
10390
10391         * mini.c: Added "limitator" to inline for debugging.
10392
10393 2006-05-24  Martin Baulig  <martin@ximian.com>
10394
10395         * debug-debugger.c (mono_debugger_init): Create a private,
10396         malloc()-based code manager for the notification function and
10397         intentionally leak it on exit.  This fixes the crash-on-exit race
10398         condition.
10399
10400         * tramp-amd64.c
10401         (mono_debugger_create_notification_function): Added
10402         `MonoCodeManager *' argument.
10403
10404         * tramp-x86.c
10405         (mono_debugger_create_notification_function): Added
10406         `MonoCodeManager *' argument.
10407
10408 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
10409
10410         * aliasing.c: Fixed 64 bit issue.
10411         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10412         default since all known bugs are fixed (one more time!).
10413
10414 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10415
10416         * mini.c: write barrier support.
10417
10418 2006-05-23  Martin Baulig  <martin@ximian.com>
10419
10420         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
10421         check at the top of the file.
10422
10423 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
10424
10425         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
10426         reverting changes without reason and without changelog entries.
10427
10428 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
10429
10430         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
10431         to a few opcodes. Fixes #78439.
10432
10433         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
10434         consistency with other archs.
10435
10436         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
10437
10438 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10439
10440         * debug-debugger.c: fix the build.
10441
10442 2006-05-17  Martin Baulig  <martin@ximian.com>
10443
10444         * debug-debugger.c
10445         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
10446         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
10447         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
10448         (debugger_attach): Call GC_mono_debugger_add_all_threads().
10449
10450 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
10451
10452         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
10453
10454 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
10455
10456         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
10457         MONO_TYPE_GENERICINST.
10458         
10459         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
10460         MONO_TYPE_GENERICINST.
10461
10462 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
10463
10464         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
10465         #78325.
10466
10467 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
10468
10469         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
10470         mempool.
10471         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
10472
10473 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
10474
10475         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
10476         mono_trace_cleanup ().
10477
10478         * iltests.il: Fix problem with the newly added test.
10479
10480         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
10481         due to register constraints, free up the previous hreg. Fixes #78314.
10482
10483         * iltests.il: Add new test for #78314.  
10484
10485         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
10486         Interlocked.Add. Fixes #78312.
10487
10488         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
10489         
10490 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
10491
10492         * inssel.brg (mini_emit_virtual_call): Fix a warning.
10493
10494 2006-05-05  Martin Baulig  <martin@ximian.com>
10495
10496         * debug-mini.c (mono_debug_open_block): New method.
10497
10498         * mini-amd64.c
10499         (mono_arch_output_basic_block): Call mono_debug_open_block() at
10500         the beginning of each basic block.
10501
10502         * mini-x86.c
10503         (mono_arch_output_basic_block): Call mono_debug_open_block() at
10504         the beginning of each basic block.
10505
10506 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
10507
10508         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10509         default until I understand why they break the build on amd64.
10510
10511 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
10512
10513         * mini.c (mini_cleanup): Call mono_cleanup ().
10514
10515         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
10516         errors.
10517
10518 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
10519
10520         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
10521         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10522         default since all known bugs are fixed, and I cannot reproduce bug
10523         77944... I'm asking Matt Hargett to test again after this commit.
10524
10525 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
10526
10527         * mini-codegen.c: Fixed typo that thrashed inline.
10528
10529 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
10530
10531         * dominators.c (compute_dominators): Avoid using a worklist since
10532         it is not correct in some cases. Instead, iterate over all bblocks as
10533         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
10534
10535 2006-04-28  Miguel de Icaza  <miguel@novell.com>
10536
10537         * mini.c (mono_jit_compile_method_inner): Use
10538         mono_prepare_exception_from_error that resets the value
10539         internally.
10540
10541 2006-04-27  Miguel de Icaza  <miguel@novell.com>
10542
10543         * mini.c: Move the mini_loader_error_to_exception to metadata. 
10544         
10545 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
10546
10547         * aliasing.c: Fixed bug 78210.
10548
10549 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
10550
10551         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10552         default until all their problems (or the ones they trigger) are fixed.
10553
10554 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
10555
10556         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
10557         
10558         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
10559         as loaded only after resolving patches since that could invoke the same method.
10560
10561         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
10562
10563         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
10564         functions.
10565
10566         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
10567         AOT loader.
10568
10569         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
10570         stack.
10571
10572         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
10573         made from AOT code through the PLT table.
10574
10575         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
10576         holding the plt offset when a call is made to the aot plt trampoline.
10577         
10578 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
10579
10580         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
10581         amd64 AOT support.
10582
10583         * Makefile.am (common_sources): Fix build breakage.
10584
10585         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
10586         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
10587         intra-assembly calls if possible.
10588         
10589         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
10590
10591         * mini-trampolines.c: Handle PLT entries.
10592
10593         * mini.c: Avoid creating a GOT var for calls.
10594
10595         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
10596         from mscorlib code.
10597
10598         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
10599         from mscorlib code.
10600
10601         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
10602         AOT code.       
10603
10604         * mini.h: Bump AOT file format version.
10605         
10606         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
10607         covers more cases.
10608
10609 2006-04-25  Martin Baulig  <martin@ximian.com>
10610
10611         * driver.c: Disable copyprop, consprop and inline when running
10612         inside the debugger.
10613
10614 2006-04-25  Martin Baulig  <martin@ximian.com>
10615
10616         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
10617         with `get_current_thread' and added `detach'.
10618         (MonoDebuggerMetadataInfo): Added `thread_size',
10619         `thread_tid_offset', `thread_stack_ptr_offset' and
10620         `thread_end_stack_offset'.
10621
10622 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
10623
10624         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
10625         aot-runtime.c.
10626
10627         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
10628         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
10629
10630         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
10631
10632         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
10633
10634         * aot.c: Add support for ADJUSTED_IID.  
10635
10636 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
10637
10638         * aot.c (emit_method_order): Don't align method_order_end.
10639
10640         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
10641         the interface ID changes.
10642
10643 2006-04-21  Dick Porter  <dick@ximian.com>
10644
10645         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
10646         cleaning up a thread.  Fixes the new part of bug 77470.
10647
10648 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
10649
10650         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
10651         to managed wrapper.
10652                      
10653 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
10654
10655         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
10656         
10657         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
10658         SIGSEGV. Fixes #78072.
10659
10660         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
10661         unregister our SIGABRT handler.
10662
10663 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
10664
10665         * mini.c: Disabled inline where it can alter the call stack in a
10666         way visible from managed code.
10667         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
10668         default.
10669
10670 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
10671
10672         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
10673         on other platforms. Fixes #78089.
10674
10675 2006-04-13  Martin Baulig  <martin@ximian.com>
10676
10677         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
10678         determine whether we're inside the debugger.
10679
10680         * debug-debugger.h
10681         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
10682
10683 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
10684
10685         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
10686         handler clauses. Fixes #78024.
10687
10688         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
10689         in the CALL_MEMBASE opcodes. Fixes #78088.
10690         (mono_arch_get_vcall_slot_addr): Ditto.
10691
10692 2006-04-10  Martin Baulig  <martin@ximian.com>
10693
10694         * debug-debugger.c: The thread handling code has now been moved
10695         into ../metadata/threads.c.
10696
10697 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
10698
10699         * driver.c (mono_main): Fix --with-gc=none build.
10700
10701         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
10702         (mono_spillvar_offset_float): Ditto.
10703         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
10704         hreg, not when its !global, since on ia64, there is a third category: stacked
10705         registers.      
10706
10707 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
10708
10709         * mini.c: set MonoInst->klass for load field address and a few other
10710         places.
10711
10712 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
10713
10714         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
10715
10716 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
10717
10718         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
10719         the branch opt changes.
10720
10721 2006-04-06  Dick Porter  <dick@ximian.com>
10722
10723         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
10724         
10725         * wapihandles.c (mini_wapi_seminfo): 
10726         * driver.c (mono_main): Add semaphore info option
10727
10728 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
10729
10730         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
10731         branch optimization changes. Fixes #78009.
10732
10733 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10734
10735         * mini.c: ignore accessibility of methods in managed->native wrappers.
10736
10737 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
10738
10739         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
10740         
10741         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
10742
10743 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
10744
10745         * mini.c: Modify the branch optimizations to preserve the invariant that
10746         the entries inside the in_bb and out_bb arrays are unique.
10747         (mono_unlink_bblock): Avoid creation of new arrays.
10748
10749 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
10750
10751         * mini.c (mono_unlink_bblock): Fix regression caused by previous
10752         change (#77992).
10753
10754 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
10755
10756         * mini.c (optimize_branches): Remove the "optimizations" in
10757         the cbranch1/cbranch2 -> branch cases which were causing several
10758         problems in the past. Fixes #77986.
10759
10760 2006-03-31  Chris Toshok  <toshok@ximian.com>
10761
10762         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
10763         default optimizations :(
10764
10765 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
10766
10767         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
10768         branch.
10769
10770 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
10771
10772         * local-propagation.c: Added comments to structs and removed
10773         "Mono" prefixes from local tree mover types.
10774
10775 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
10776
10777         * Makefile.am (arch_sources): Define this for each architecture so 
10778         libmono_la_SOURCES is defined in one place.
10779
10780 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
10781
10782         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
10783         from handles/.
10784
10785 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
10786
10787         * driver.c: print the GC name supplied by configure.
10788
10789 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
10790
10791         * local-propagation.c: Added tree mover, and moved here all the
10792         local propagation code from mini.c
10793         * mini.c: Added support for treeprop, and moved all the local
10794         propagation code to local-propagation.c
10795         * mini.h: Added support for treeprop
10796         * driver.c: Added support for treeprop, enabled consprop, copyprop,
10797         treeprop, inline and deadce by default
10798         * Makefile.am: Added local-propagation.c
10799
10800 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
10801
10802         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
10803
10804 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
10805
10806         * debug-debugger.c: make it compile without the Boehm GC.
10807
10808 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
10809
10810         * mini.c: fixed issue with mismatch when an icall is registered
10811         with multiple names but same address.
10812
10813 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
10814
10815         * declsec.c, mini-exceptions.c: use write barrier to set reference
10816         fields of managed objects.
10817
10818 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
10819
10820         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
10821         (can_access_internals): Fix a warning.
10822
10823         * mini.c (print_method_from_ip): Rename this to 
10824         mono_print_method_from_ip so it gets exported.
10825
10826         * trace.c: Deal with strings inside StringBuilder's containing garbage
10827         and fix memory leaks. Fixes #77848.
10828
10829 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
10830
10831         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
10832         fixes #77787.
10833
10834 2006-03-16 Neale Ferguson <neale@sinenomine.net>
10835         
10836         * mini-s390.c: Remove OP_X86_TEST_NULL.
10837
10838 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
10839
10840         * mini.c: use the correct GetHashCode() for the moving collector.
10841
10842 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
10843
10844         * liveness.c: Regalloc spill cost tuning.
10845
10846 2006-03-15 Neale Ferguson <neale@sinenomine.net>
10847         
10848         * mini-s390x.h: Correct S390_LONG macro.
10849
10850         * mini-s390x.c: Cleanup unused code.
10851
10852 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
10853
10854         * jit-icalls.h: New file.
10855
10856         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
10857         icalls and include that instead of including jit-icalls.c.
10858
10859         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
10860         OP_X86 opcodes.
10861
10862 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
10863
10864         * mini.c: when checking for member accessibility, also check for
10865         friend assemblies and for explicit interface implementations.
10866
10867 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
10868
10869         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
10870
10871         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
10872
10873         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
10874         common cases are done first.    
10875
10876         * mini-ops.h: Only define platform specific opcodes on the given platform.
10877
10878         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
10879         branch.
10880         
10881 2006-03-14  Martin Baulig  <martin@ximian.com>
10882
10883         Revert Paolo's change from r57348:
10884
10885         * mini.h: don't use gboolean for bitfields.
10886         * mini.c: verifier changes for fields and methods accessibility.
10887
10888 2006-03-13  Neale Ferguson <neale@sinenomine.net>
10889
10890         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
10891
10892         * mini-s390x.c: Fix conv_r_un.
10893
10894         * cpu-s390, cpu-s390x.md: Fix lengths.
10895
10896 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
10897
10898         * mini.c: nested types have access to all the nesting
10899         levels, not just the enclosing types.
10900
10901 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
10902
10903         * mini.c: added a few more verification checks.
10904
10905 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
10906
10907         * liveness.c: Merge optimizations from the linear-il branch.
10908
10909 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
10910
10911         * mini-ia64.c (emit_call): Add a comment.
10912
10913         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
10914
10915         * tramp-ia64.c: Fix some warnings.
10916
10917 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
10918
10919         * mini.h: don't use gboolean for bitfields.
10920         * mini.c: verifier changes for fields and methods accessibility.
10921
10922 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
10923
10924         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
10925         lazy icall wrapper changes.
10926
10927         * dominators.c: Replace all the dominator algorithms with faster
10928         ones from the linear-il branch.
10929
10930         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
10931         the mempool.
10932
10933         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
10934         common cases are done first.
10935
10936         * mini-amd64.c: Fix some warnings.
10937
10938         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
10939         from the mempool.
10940
10941         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
10942         added code.
10943
10944         * mini.h: Add a missing prototype.
10945
10946 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
10947
10948         * mini.c: Compile icall wrappers lazily.
10949
10950         * mini-codegen.c: Use printf instead of g_print since its much faster.
10951
10952         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
10953         function.
10954
10955         * mini.c (optimize_branches): Cache the negative result from 
10956         remove_block_if_useless ().
10957
10958         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
10959         Also fix some bblock linking issues.
10960
10961         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
10962         assembly files.
10963
10964         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
10965
10966         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
10967         accessed fields first, for better cache behavior.
10968         
10969 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
10970
10971         * mini.c: speedup IList<T> array accesses.
10972
10973 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
10974
10975         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
10976         inline_costs counter. Fixes #77190.
10977
10978 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
10979
10980         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
10981         trace messages. Fixes #77706.
10982
10983 2006-03-04  Martin Baulig  <martin@ximian.com>
10984
10985         * tramp-amd64.c, tramp-x86.c
10986         (mono_debugger_create_notification_function): Use
10987         mono_global_codeman_reserve() to allocate a buffer at runtime and
10988         return it.
10989
10990         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
10991
10992         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
10993         notification function at runtime and then call `initialize' in the
10994         `MONO_DEBUGGER__debugger_info' vtable.
10995
10996 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
10997
10998         * iltests.il: Fix a visibility problem.
10999
11000 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11001
11002         * driver.c, mini.c: add hooks for the counters API.
11003
11004 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
11005
11006         * driver.c: show disabled options.
11007
11008 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
11009
11010         * linear-scan.c: always use cost-driven selection.
11011
11012 2006-02-28  Raja R Harinath  <rharinath@novell.com>
11013
11014         * jit-icalls.c (helper_compile_generic_method): Revert change from
11015         2006-02-24.
11016
11017 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
11018
11019         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
11020
11021 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
11022
11023         * inssel.brg: style fixes, mostly to force the updated monoburg
11024         to run for people using svn.
11025
11026 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
11027
11028         * mini.c: match monoburg changes.
11029
11030 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
11031
11032         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
11033         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
11034         declaration in the header file.
11035
11036 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
11037
11038         * helpers.c: reduce relocations and mem usage.
11039
11040 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
11041
11042         * mini.h, mini-codegen.c: disable logging features if
11043         requested by configure.
11044
11045 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
11046
11047         * mini.c: tiny verifier changes.
11048
11049 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11050
11051         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
11052         cpu-pentium.md: stack alignment changes for osx/x86,
11053         partially from Geoff Norton <gnorton@customerdna.com>.
11054
11055 2006-02-24  Raja R Harinath  <harinath@gmail.com>
11056
11057         * jit-icalls.c (helper_compile_generic_method): Update to changes
11058         in metadata/class.c.
11059
11060 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
11061         
11062         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
11063         
11064         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
11065         interface calls with large offsets.
11066
11067 2006-02-23  Raja R Harinath  <rharinath@novell.com>
11068
11069         * jit-icalls.c (helper_compile_generic_method): Document the
11070         special-case we depend on so that we can inflate the method twice
11071         with the same context with no bad side-effects.
11072
11073 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
11074
11075         * mini-x86.c, mini-amd64.c: fix for case when xen support
11076         is disabled.
11077
11078 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
11079
11080         * mini-x86.c, mini-amd64.c: generate code to access tls items
11081         in a faster way for Xen systems.
11082
11083 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11084
11085         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
11086         updates and compilation fixes for the OSX/x86 port, mostly from
11087         Geoff Norton <gnorton@customerdna.com>.
11088
11089 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
11090
11091         * inssel.brg: faster interface call implementation
11092         to sync with the interface_offsets MonoVTable changes.
11093
11094 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
11095
11096         * mini.c: more verification checks.
11097
11098 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
11099
11100         * mini.c: added a few more verification checks.
11101
11102 2006-02-17      Neale Ferguson <neale@sinenomine.net>
11103
11104         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
11105         facility on the processor and use it if available.
11106
11107 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11108
11109         * driver.c, aot.c, mini.c: throw exception if the IL code is
11110         invalid or unverifiable.
11111
11112 2006-02-17  Raja R Harinath  <rharinath@novell.com>
11113
11114         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
11115         m.StructField.
11116
11117 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
11118
11119         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
11120
11121 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11122
11123         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
11124         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
11125         handling of instantiated generic valuetypes.
11126
11127 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
11128
11129         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
11130         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
11131         instead.
11132
11133         * generics.2.cs: Revert the nullable reftypes tests.
11134
11135 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
11136
11137         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
11138         using __builtin_frame_address (1) as it doesn't work in the presence
11139         of optimizations. Hopefully fixes #77273.
11140
11141         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
11142         -> generics.cs change as it doesn't work with some automake versions.
11143
11144 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
11145
11146         * mini.c: handle systems that sue a different way to
11147         retrieve the stack address of the current thread.
11148
11149 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
11150
11151         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
11152         it specially in the makefile.
11153
11154         * generics.2.cs: Add tests for nullable reference types.
11155
11156 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11157
11158         * mini.c: always handle the case when mono_jit_init()
11159         is called in a thread different from the main thread,
11160         confusing libgc (bug #77309).
11161
11162 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
11163
11164         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
11165
11166 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
11167
11168         * mini.c: change optimize_branches () to use a single loop
11169         and introduce a new optimization to simplify some range checks.
11170
11171 2006-02-03  Martin Baulig  <martin@ximian.com>
11172
11173         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
11174         and merged with debugger_thread_manager_add_thread().
11175         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
11176         inform the debugger about the main thread.
11177
11178 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
11179
11180         * basic.cs: Add test for div.un/rem.un constant folding.
11181
11182 2006-02-03  Neale Ferguson <neale@sinenomine.net>
11183
11184         * cpu-s390x.md: correct int_xor_imm length
11185
11186 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
11187
11188         * generics.2.cs: New test for #77442.
11189
11190         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
11191         #77442.
11192
11193 2006-02-02  Martin Baulig  <martin@ximian.com>
11194
11195         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
11196         <mono/metadata/mono-debug-debugger.h>   
11197
11198         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
11199
11200 2006-02-02  Martin Baulig  <martin@ximian.com>
11201
11202         * debug-debugger.h: New header file for debug-debugger.c.
11203
11204         * debug-debugger.c: Big API cleanup; don't run the managed Main()
11205         function is a separate thread anymore; add support for attaching.
11206
11207 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
11208
11209         * tramp-x86.c: Fix a warning.
11210
11211 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
11212
11213         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
11214         on very large methods.
11215
11216         * aot.c (load_patch_info): Fix a warning.
11217
11218 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
11219
11220         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
11221         mini-ops.h: alu membase optimizations.
11222
11223 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
11224
11225         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
11226         to speedup StringBuilder.
11227
11228 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
11229
11230         * dominators.c (mono_compute_natural_loops): Fix detection of
11231         loop body start blocks.
11232
11233         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
11234
11235 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
11236
11237         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
11238         #75145.
11239
11240 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
11241
11242         * aliasing.c: Fixed aliasing issue on 64 bit archs.
11243
11244 2006-01-25  Martin Baulig  <martin@ximian.com>
11245
11246         * debug-debugger.c: Moved the `MonoDebuggerManager' and
11247         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
11248         started to cleanup this file a little bit.
11249
11250 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
11251
11252         * mini.c: optimize a codepath frequently happening in generics code.
11253
11254 2006-01-23  Martin Baulig  <martin@ximian.com>
11255
11256         * Makefile.am: Only compile debug-debugger.c on supported platforms.
11257
11258         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
11259         functions directly.
11260
11261         * driver.c: debug-debugger.c is only available if
11262         `MONO_DEBUGGER_SUPPORTED' is defined.   
11263
11264 2006-01-23  Martin Baulig  <martin@ximian.com>
11265
11266         * debug-debugger.c: Only enable this on platforms where the Mono
11267         Debugger is working (x86 and x86_64).
11268
11269 2006-01-21  Martin Baulig  <martin@ximian.com>
11270
11271         The Mono Debugger is now using the normal `mono' instead of the
11272         `mono-debugger-mini-wrapper' when executing managed code.
11273
11274         * debug-debugger.c: New file; previously known as
11275         debugger/wrapper/wrapper.c.
11276
11277         * debug-mini.c (mono_init_debugger): Removed.
11278
11279         * driver.c (mono_main): Added new `--inside-mdb' command line
11280         argument which is used when running inside the debugger.
11281
11282 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
11283
11284         * liveness.c (mono_analyze_liveness): Remove some unused data
11285         structures.
11286
11287 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
11288
11289         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
11290
11291 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
11292
11293         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
11294         depends on implementation details of monobitset.
11295
11296         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
11297         Fixes #77271.
11298
11299 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
11300
11301         * liveness.c: Update after monobitset changes.
11302
11303 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
11304
11305         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
11306
11307 2006-01-11 Neale Ferguson <neale@sinenomine.net>
11308
11309         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
11310
11311         * mini-s390x.c: Remove warning messages.
11312
11313 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
11314
11315         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
11316
11317 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
11318
11319         * generics.2.cs: Add ldelem/stelem_any test.
11320
11321 2006-01-10 Neale Ferguson <neale@sinenomine.net>
11322
11323         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
11324
11325 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
11326
11327         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
11328         
11329 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
11330
11331         * generics.2.cs: Reenable vtype tests.
11332
11333         * inssel-x86.brg: Remove an icorrect valuetype rule.
11334
11335 2006-01-06 Neale Ferguson <neale@sinenomine.net>
11336
11337         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
11338         initial support for OP_ABS.
11339
11340 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11341
11342         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
11343
11344 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11345
11346         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
11347         conversion and implement LADD/LSUB.
11348
11349         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
11350         architectures.
11351
11352 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11353
11354         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
11355
11356         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
11357         architectures.
11358
11359 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11360
11361         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
11362         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
11363         (stack walk problem).
11364
11365 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
11366
11367         * aot.c (mono_aot_load_method): Fix a warning.
11368
11369 2006-01-03  Neale Ferguson <neale@sinenomine.net>
11370
11371         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
11372
11373 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
11374
11375         * iltests.il: Add test for #77148.
11376
11377         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
11378         #77148.
11379
11380 2006-01-03  Neale Ferguson <neale@sinenomine.net>
11381
11382         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
11383
11384 2006-01-03  Neale Ferguson <neale@sinenomine.net>
11385
11386         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
11387         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
11388
11389         * basic-long.cs: Add lconv-to-r4/r8 tests.
11390
11391 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
11392
11393         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
11394
11395         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
11396         here as on other archs.
11397
11398 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11399
11400         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
11401
11402 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11403
11404         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
11405         
11406         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
11407
11408         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
11409         instrument_prolog; Add memory_barrier instruction.
11410
11411 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
11412
11413         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
11414
11415 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
11416
11417         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
11418
11419         * aliasing.c inssel.brg: Fix warnings.
11420
11421         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
11422         could skip initialization of some parts of memory.
11423
11424         * mini.c mini-ia64.c: Fix warnings.
11425
11426         * inssel-sparc.brg: Add an implementation of lneg which actually works.
11427
11428 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
11429
11430         * aliasing.c (mono_build_aliasing_information): Add a workaround for
11431         a crash seen on sparc.
11432
11433         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
11434         
11435         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
11436
11437 2005-12-21 Neale Ferguson <neale@sinenomine.net>
11438
11439         * mini-ops.h: Add s390_backchain instruction
11440
11441         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
11442
11443         * cpu-s390.md: Add s390_backchain instruction
11444
11445         * mini-s390.c: Significant ABI changes
11446
11447         * mini-s390.h: Cater for zero length structures
11448
11449 2005-12-20 Neale Ferguson <neale@sinenomine.net>
11450
11451         * mini-s390.c: ABI fixes
11452
11453         * inssel-s390.brg: Remove debug statements
11454
11455         * cpu-s390.md: Fix length of ATOMIC_xx operations
11456
11457 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
11458
11459         * basic-float.cs: Add float<->long conversion tests.
11460
11461 2005-12-16 Neale Ferguson <neale@sinenomine.net>
11462
11463         * mini-s390.c: Fix LOCALLOC processing.
11464
11465         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
11466
11467 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
11468
11469         * iltests.il: Add tests for some opcodes not covered by the other
11470         tests.
11471
11472 2005-12-15 Neale Ferguson <neale@sinenomine.net>
11473
11474         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
11475         register loading for Tail processing; Correct trace output.
11476
11477         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
11478
11479         * cpu-s390.md: Correct size of jmp instruction. 
11480
11481 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11482
11483         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
11484
11485 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11486
11487         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
11488           Bring s390 up to current level.
11489
11490 2005-12-12  Zltan Varga  <vargaz@gmail.com>
11491
11492         * generics.2.cs: Disable the newly added tests as they do not work yet.
11493         
11494         * generics.2.cs: Add valuetype tests.
11495
11496 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
11497
11498         * basic-long.cs: Add i4->u8 test.
11499
11500         * objects.cs: Add tests for JIT intrinsic.
11501
11502         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
11503         optimizations lost by a mistake.
11504
11505 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
11506
11507         * basic-long.cs: Remove a test moved to objects.cs.
11508
11509         * arrays.cs: Add more array tests.
11510
11511 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
11512
11513         * arrays.cs: Add new tests for multi-dimensional arrays.
11514
11515 2005-12-06  Raja R Harinath  <rharinath@novell.com>
11516
11517         * Makefile.am (test_sources2): Add generics.2.cs.
11518         (EXTRA_DIST): Add test_sources2.
11519
11520 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
11521
11522         Support for boxing and unboxing nullable types as well as the
11523         isinst operation on nullables, per the CLI ammendment.
11524
11525         * inssel.brg (CEE_ISINST): Special case for nullable
11526
11527         * mini.c (handle_unbox_nullable): new method
11528         (handle_box): Special case for nullable types
11529         (mono_method_to_ir): Call handle_unbox_nullable in correct
11530         places.
11531
11532         * generics.2.cs: New test suite
11533
11534         * Makefile.am: Support for regression tests with generics.
11535
11536 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
11537
11538         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
11539         allocated to registers. Fixes #76800.
11540
11541 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
11542
11543         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
11544
11545 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
11546
11547         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
11548         of platforms.
11549
11550 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
11551
11552         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
11553         objects.cs.
11554
11555         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
11556         
11557         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
11558 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
11559
11560         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
11561         single precision before storing to a single precision location.
11562
11563 2005-11-28  Raja R Harinath  <rharinath@novell.com>
11564
11565         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
11566
11567 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
11568
11569         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
11570         correct files.
11571
11572         * basic.cs: Remove test_0_byte_compares test which was moved to
11573         objects.cs a long time ago.
11574
11575 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
11576
11577         * aliasing.c: Fixed aliasing issue on 64 bit archs.
11578
11579 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
11580
11581         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
11582         handlers are called.
11583
11584         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
11585         throwing code.
11586
11587          * mini-ia64.c: Add support for the throw->branch exception 
11588         optimization.   
11589
11590         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
11591
11592 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
11593
11594         * mini.c: Enabled "fastpath" deadce :-)
11595         
11596 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
11597
11598         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
11599         alias analysis pass to support it.
11600         * mini.h: Likewise.
11601         * ssa.c: Likewise.
11602         * liveness.c: Likewise (liveness computation can use aliasing
11603         information to be more accurate).
11604         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
11605         moreover made so that "--compile-all" uses the given optimization
11606         flags and not the default ones.
11607         * aliasing.c: Alias analysis (new file).
11608         * aliasing.h: Likewise.
11609         * Makefile.am: added "aliasing.c" and "aliasing.h".
11610         
11611 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
11612
11613         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
11614         OP_L opcodes.
11615
11616 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
11617
11618         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
11619         fp >= end_of_stack exit condition, as it is not needed, and it might
11620         become true for fp eliminated frames.
11621
11622 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
11623
11624         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
11625         coded offsets.
11626
11627 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
11628
11629         * mini-arm.c: fixed alignment of doubles/longs to match
11630         the C ABI (bug #76635).
11631
11632 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
11633
11634         * aot.c: fix compilation with --enable-minimal=aot.
11635
11636 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
11637
11638         * mini-arm.c: fixed compatibility with the new
11639         floating point emulator package for compares.
11640
11641 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
11642
11643         * mini.c : reverted sig->pinvoke changes (r51396-51397).
11644
11645 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
11646
11647         * mini-exceptions.c (print_stack_frame): Output to stderr.
11648         (mono_handle_native_sigsegv): Ditto.
11649
11650 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
11651
11652         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
11653         OP_LCONV_TO_OVF_I implementation.
11654
11655         * mini-amd64.c: Add support for the throw->branch exception 
11656         optimization.
11657
11658         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
11659         when the catch clause catches a more general exception, i.e. Object.
11660
11661 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
11662
11663         * cpu-ia64.md: Remove unused opcodes.
11664
11665         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
11666         specific defines for architectures defining USE_SIGACTION.
11667
11668         * mini-ia64.c: Fix some warnings.
11669
11670         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
11671         version seemed to skip a frame.
11672
11673 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
11674
11675         * mini.c: Clean up the usage of sig->pinvoke flag. Now
11676         only calls which are made to native code use this flag.
11677
11678 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
11679
11680         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
11681         varargs methods as well.
11682         
11683         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
11684         which have save_lmf set. Reorganize methods prologs a bit.
11685
11686         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
11687         debugger to the proper place.
11688
11689 2005-10-29  Martin Baulig  <martin@ximian.com>
11690
11691         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
11692         when running inside the debugger until the debugger has support
11693         for it.
11694
11695 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
11696
11697         * mini.h: Fix a warning.
11698
11699 2005-10-24  Miguel de Icaza  <miguel@novell.com>
11700
11701         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
11702         we expose publicly, this returns the string.
11703
11704 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
11705
11706         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
11707         with fp elimination.
11708
11709 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
11710
11711         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
11712         native stacktrace using the glibc 'backtrace' function if available.
11713
11714 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
11715
11716         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
11717
11718         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
11719         handle SIGSEGVs received while in native code.
11720
11721         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
11722         code, call mono_handle_native_sigsegv which will abort the runtime
11723         after printing some diagnostics, instead of converting it into a
11724         confusing NullReferenceException.
11725
11726 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
11727
11728         * cpu-pentium.md: Remove unused opcodes.
11729
11730 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
11731
11732         * mini-amd64.h (MonoLMF): Add rsp field.
11733
11734         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
11735         the lmf too.
11736
11737 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
11738
11739         * mini-codegen.c (get_register_spilling): Fix some warnings.
11740
11741 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
11742
11743         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
11744         elimination during exception handling. Enable fp elimination by
11745         default.
11746
11747         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
11748         elimination.
11749
11750 2005-10-16  Martin Baulig  <martin@ximian.com>
11751
11752         * mini-exceptions.c
11753         (mono_debugger_run_finally): New public method for the debugger.
11754
11755 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
11756
11757         * debug-mini.c (mono_debug_init_method): Fix warning.
11758
11759         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
11760         the 'exname' parameter const to fix some warnings.
11761
11762 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
11763
11764         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
11765         introduced by the previous patch.
11766
11767 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
11768
11769         * basic-float.cs: Add test for precision of float arithmetic.
11770
11771         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
11772         when loading/storing single values from/to memory.
11773
11774         * mini.c (mono_jit_compile_method_with_opt): Create the function
11775         pointers in the correct domain.
11776
11777 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
11778
11779         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
11780         introduced by previous patch.
11781         
11782         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
11783         when out_filter_idx is NULL.
11784
11785         * mini-exceptions.c: Don't run filter clauses twice during exception
11786         handling. Fixes #75755.
11787
11788 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
11789
11790         * aot.c: Add support for ldflda wrappers.
11791
11792         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
11793         #75902.
11794
11795 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
11796
11797         * mini.c, mini.h: do not consider exception handlers blocks when
11798         setting up interface variables.
11799
11800 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
11801
11802         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
11803
11804 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
11805
11806         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
11807         causes a regression.
11808
11809         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
11810
11811 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
11812
11813         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
11814         of the OP_P definitions.
11815
11816         * TODO: Add a proposal for dealing with the CEE/OP mess.
11817
11818         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
11819         optimizations from the x86 port.
11820
11821         * cpu-amd64.md: Ditto.
11822
11823         * basic.cs basic-long.cs: Add tests.
11824
11825 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
11826
11827         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
11828         Patrik Torstensson's implementation of my exception-handling
11829         optimization idea, when the exception object is not used
11830         (bug #62150).
11831
11832 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
11833
11834         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
11835         of the mul_imm optimizations from the old jit.
11836
11837 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
11838
11839         * mini.c, liveness.c: patch by Patrik Torstensson and
11840         Zoltan Varga to improve performance in methods with
11841         exception clauses.
11842
11843 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
11844
11845         * driver.c: Remove 'Globalization' entry from --version.
11846
11847 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
11848
11849         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
11850         there is a profiler interested in JIT events.
11851
11852         * aot.c: Load profile files produced by the AOT profiling module, and
11853         reorder methods based on the profiling info. Add a 'method_order' table
11854         to the AOT file to make mono_aot_find_jit_info work with the reordered
11855         methods.
11856
11857         * mini.h: Bump AOT file version info.
11858
11859 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
11860
11861         * mini-arm.h: work around what looks like a gcc bug when optimizations
11862         are enabled.
11863
11864 2005-09-28  Raja R Harinath  <rharinath@novell.com>
11865
11866         * Makefile.am (AM_CFLAGS): Don't use += to append inside
11867         conditionals.  Use ...
11868         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
11869
11870 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
11871
11872         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
11873         to determine the amount of memory to copy when passing valuetypes.
11874
11875         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
11876         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
11877
11878 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
11879
11880         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
11881         information about aot.
11882
11883 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
11884
11885         * *.c: Replace the use of {Enter,Leave}CriticalSection with
11886         macros. This will allow a deadlock debugger to easily be plugged
11887         in.
11888
11889 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
11890
11891         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
11892
11893 2005-09-27  Raja R Harinath  <rharinath@novell.com>
11894
11895         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
11896         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
11897         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
11898         ($(arch_built)) [CROSS_COMPILING]: Error out.
11899
11900 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
11901
11902         * aot.c: Add support for the no_special_static flag for classes.
11903
11904 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
11905
11906         * Reapply reverted patches.
11907
11908         * *: Revert r50174 as well.
11909
11910         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
11911
11912 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
11913
11914         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
11915
11916 2005-09-23  Miguel de Icaza  <miguel@novell.com>
11917
11918         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
11919         part of the SIG_HANDLER_SIGNATURE.  
11920
11921 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
11922
11923         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
11924         statistics.
11925
11926         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
11927         introduced by previous patch.
11928
11929 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
11930
11931         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
11932         saved registers too.
11933
11934         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
11935         upon the information returned by get_call_info ().
11936         
11937         * mini-x86.c (add_float): Fix stack size calculation.
11938         (mono_arch_call_opcode): Rewrite this so it works based up the
11939         information returned by get_call_info ().
11940         (mono_arch_get_this_vret_args): Ditto.
11941
11942 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
11943
11944         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
11945         in cinfo to determine the registers which need to be used.
11946
11947 2005-09-20  Miguel de Icaza  <miguel@novell.com>
11948
11949         * driver.c (mono_main): Add --server and --desktop flags. 
11950
11951 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
11952
11953         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
11954         registers as global registers.
11955
11956         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
11957         longer needed with the new register allocator.
11958
11959         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
11960
11961         * cpu-ia64.md: Remove unused opcodes.
11962         
11963         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
11964         
11965 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
11966
11967         * cpu-amd64.md: Remove unused opcodes.
11968
11969         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
11970         needed with the new register allocator.
11971
11972         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
11973         reg-reg moves.
11974
11975 2005-09-16  Raja R Harinath  <rharinath@novell.com>
11976
11977         * Makefile.am (check-local): Don't invoke semdel-wrapper.
11978
11979 2005-09-16  Martin Baulig  <martin@ximian.com>
11980
11981         * exceptions-amd64.c
11982         (throw_exception): Don't call mono_debugger_throw_exception() if
11983         we're a rethrow - see the FIXME in the code.
11984
11985 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
11986
11987         * mini.c (mono_init_exceptions): This only works on some architectures.
11988         
11989 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
11990
11991         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
11992         on ia64.
11993
11994         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
11995
11996         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
11997         now in mini-exceptions.c.
11998
11999 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
12000
12001         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
12002         now in mini-exceptions.c.
12003
12004 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
12005
12006         * exceptions-x86.c: Applied patch from Patrik Torstensson 
12007         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
12008
12009         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
12010         code into mini-exceptions.c. Add some assertions to it.
12011
12012 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
12013
12014         * aot.c (emit_section_change): Applied patch from "The Software Team" 
12015         (<software@solmersa.com>). Fix as errors on windows.
12016
12017 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
12018
12019         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
12020         method info into the LMF.
12021
12022 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
12023         
12024         * mini-ia64.c: Add proper unwind info for method epilogs.
12025
12026         * exceptions-ia64.c: Add some code to help debugging.
12027         
12028         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
12029
12030         * mini-exceptions.c: Fix warning.
12031
12032 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
12033
12034         * mini.c: Really fix build.
12035
12036         * mini-x86.c mini-amd64.c: Fix build.
12037
12038 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
12039
12040         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
12041
12042         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
12043         some Interlocked methods as intrinsics.
12044
12045         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
12046         for Thread methods as well.
12047
12048         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
12049
12050         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
12051
12052         * mini-ia64.c mini-x86.c mini-amd64.c 
12053         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
12054         OP_MEMORY_BARRIER.
12055         
12056         * mini.c (mono_init_exceptions): Fix build breakage.
12057
12058 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
12059
12060         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
12061         of instructions. Use the new ia64_unw_op macros for emitting unwind
12062         info.
12063
12064         * mini.c (mono_init_exceptions): Initialize exception handling
12065         related trampolines at startup.
12066
12067 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
12068
12069         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
12070
12071 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
12072
12073         * mini.c: Handle type loading errors gracefully during compilation and
12074         throw the appropriate exception.
12075
12076 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
12077
12078         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
12079         for the mono binary.
12080
12081 2005-09-09  Martin Baulig  <martin@ximian.com>
12082
12083         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
12084         the release.
12085
12086 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12087
12088         * mini-arm.h: use emulation for conv.r.un for the release.
12089
12090 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12091
12092         * mini-arm.c, objects.cs: more fixes and tests for them.
12093
12094 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12095
12096         * mini-arm.c: align structures to at least 4 bytes to be able
12097         to keep our current optimized memcpy.
12098
12099 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
12100
12101         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
12102
12103 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12104
12105         * mini.c: ignore SIGPIPE.
12106
12107 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
12108
12109         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
12110
12111         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
12112
12113 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
12114
12115         * mini.h: Add prototype for mono_allocate_stack_slots_full.
12116
12117 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12118
12119         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
12120         exception handling support.
12121         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
12122         patch by Brian Koropoff <briank@marakicorp.com>).
12123
12124 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
12125
12126         * mini.c: revert another 'optimization' which breaks when
12127         items on the eval stack need to be saved at a basic block end
12128         (bug #75940).
12129
12130 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12131
12132         * jit-icalls.c: for arrays, ensure we always provide
12133         lower bounds.
12134
12135 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
12136
12137         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
12138         
12139         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
12140
12141 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
12142
12143         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
12144         arguments in their original register.
12145
12146 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
12147
12148         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
12149         memset/memcpy.
12150
12151         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
12152         when ssapre is enabled.
12153
12154         * inssel-long.brg: Fix bug in previous patch.
12155
12156         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
12157         multiplication by a constant.
12158
12159 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
12160
12161         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
12162         icc.
12163
12164         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
12165         saving registers.
12166
12167 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
12168
12169         * inssel-arm.brg: apply changes tested by Brian Koropoff
12170         <briank@marakicorp.com>.
12171
12172 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
12173
12174         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
12175         
12176 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
12177
12178         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
12179         to the same register if dreg is just a base register.
12180         (print_ins): Improve printing of membase opcodes.
12181
12182         * inssel-x86.brg: Add optimized ldind(reg) rules.
12183
12184         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
12185
12186 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
12187
12188         * mini.c: when running under valgrind, set the stack bottom for
12189         the GC at the actual approximate stack for the app (fixes running
12190         mono with valgrind).
12191
12192 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
12193
12194         * mini.c: do no break at the first valuetype to init found
12195         (fixes bug #75791).
12196
12197 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
12198
12199         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
12200
12201 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
12202
12203         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
12204
12205 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
12206
12207         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
12208
12209 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12210
12211         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
12212
12213         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
12214         code.
12215
12216         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
12217         code.
12218
12219         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
12220         methods.
12221
12222 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
12223
12224         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
12225
12226 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12227
12228         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
12229         in the tail recursion optimization.
12230
12231         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
12232         debug info into the assembly file.
12233
12234         * iltests.il: Add test for filter regions.
12235
12236         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
12237         initial stack of filter regions. Fixes #75755.
12238
12239 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
12240
12241         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
12242         stack requirements.
12243
12244 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12245
12246         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
12247         the check for an already compiled method on non-ia64 platforms.
12248         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
12249         proper domain.
12250
12251         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
12252
12253         * inssel-x86.brg: Add some optimized call rules.
12254
12255 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
12256
12257         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
12258         method here.
12259
12260         * mini.h mini-trampolines.c: Pass the trampoline argument to 
12261         mono_arch_patch_delegate_trampoline.
12262
12263         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
12264
12265         * mini-trampolines.c: Fix build.
12266
12267         * mini-amd64.h: Add delegate trampolines.
12268
12269         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
12270
12271         * inssel-amd64.brg: Add optimized call rules.
12272         
12273         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
12274
12275         * inssel-ia64.brg: Add optimized ldind(reg) rules.
12276
12277 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
12278
12279         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
12280         change.
12281
12282         * mini-ia64.c: Remove LMF fixmes.
12283
12284         * mini-ia64.h: Remove most fields from LMF.
12285
12286         * inssel-ia64.brg (stmt): Fix unaligned access errors.
12287
12288         * mini-trampolines.c: Add support for IA64 function descriptors.
12289
12290         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
12291         for IA64 function descriptors.
12292
12293 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
12294
12295         * tramp-arm.c: patch the vtable for virtual calls. Added
12296         support code to register/unregister the LMF.
12297         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
12298         more LMF work.
12299
12300 2005-08-19  Dick Porter  <dick@ximian.com>
12301
12302         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
12303         bit value if needed.
12304
12305 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
12306
12307         * mini.c (mini_get_method): Move handling of wrapper data here.
12308
12309         * mini.c (mono_method_to_ir): Add support for dynamic methods.
12310
12311         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
12312         virtual.
12313
12314         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
12315         bblock->code does not remain empty.
12316
12317 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
12318
12319         * arrays.cs: Add regression test for #75832.
12320
12321         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
12322         rules. Fixes #75832.
12323
12324         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
12325         instruction scheduling.
12326
12327 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
12328
12329         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
12330
12331 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
12332
12333         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
12334
12335         * mini-codegen.c: Fix VC build.
12336
12337         * cpu-pentium.md: Increase length of atomic_exhange_i4.
12338
12339 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12340
12341         * mini.h: fix signature for mono_register_opcode_emulation.
12342
12343 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
12344
12345         * mini.c: Get rid of most of the helper_sig_... constants using
12346         mono_create_icall_signature ().
12347
12348 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
12349
12350         * jit-icalls.c (helper_ldstr): New helper function.
12351
12352         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
12353
12354         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
12355         throw, load the string using a helper call instead of creating a string object.
12356
12357         * aot.c: Update after LDSTR changes.
12358
12359         * mini.h: Bump AOT file version.
12360         
12361         * aot.c: Save class size info into the AOT file. Print more statistics during
12362         compilation.
12363
12364         * mini.h: Bump AOT file version.
12365
12366         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
12367         ordering of disasm cases. Fixes #74957.
12368
12369 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
12370
12371         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
12372         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
12373         the generic code needed for the ARM port.
12374
12375 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
12376
12377         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
12378         inssel-arm.brg: more ARM features and fixes.
12379
12380 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
12381
12382         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
12383         ARM port work in progress.
12384
12385 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
12386
12387         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
12388
12389         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
12390
12391         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
12392
12393         * inssel.brg (mini_emit_memset): Add support for unaligned access.
12394
12395         * *-ia64.*: Ongoing IA64 work.
12396         
12397         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
12398
12399 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
12400
12401         * TODO: Remove out-of-data todo stuff.
12402
12403         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
12404         dead code.
12405
12406         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
12407
12408         * mini.h: Bump corlib version.
12409
12410 2005-07-27  Martin Baulig  <martin@ximian.com>
12411
12412         * mini-codegen.c
12413         (create_copy_ins): Added `const unsigned char *ip' argument; set
12414         `copy->cil_code' from it.
12415
12416 2005-07-27  Martin Baulig  <martin@ximian.com>
12417
12418         * mini-exceptions.c (mono_handle_exception): Don't call
12419         mono_debugger_handle_exception() for filters.
12420
12421 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
12422
12423         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
12424         as well.
12425
12426 2005-07-26  Martin Baulig  <martin@ximian.com>
12427
12428         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
12429
12430         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
12431         helper_compile_generic_method() if the method is actually virtual
12432         and non-final.
12433
12434 2005-07-26  Martin Baulig  <martin@ximian.com>
12435
12436         * mini.c
12437         (trampoline_code): Renamed to `mono_trampoline_code' and made it
12438         public; this is now accessed directly by the debugger.
12439         (mono_generic_trampoline_code): Removed.
12440
12441         * debug-mini.c
12442         (mono_debug_init_method): Also add interncalls and wrappers.
12443
12444 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
12445
12446         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
12447
12448 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
12449
12450         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
12451
12452 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
12453
12454         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
12455
12456 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
12457
12458         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
12459         getting TLS offsets on AMD64 too.
12460
12461 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
12462
12463         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
12464
12465 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
12466
12467         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
12468         inssel-arm.brg, mini-arm.h: ARM port work in progress.
12469
12470 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
12471
12472         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
12473
12474         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
12475         to mini.c.
12476
12477         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
12478         mono_sparc_is_virtual_call ().
12479         
12480         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
12481
12482         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
12483         trampoline parameters.
12484
12485         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
12486         
12487         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
12488         to mono_arch_get_vcall_slot_addr.
12489
12490         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
12491         trampoline code.
12492
12493         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
12494
12495 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
12496
12497         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
12498
12499 2005-07-19  Martin Baulig  <martin@ximian.com>
12500
12501         * exceptions-amd64.c (throw_exception): Call
12502         mono_debugger_throw_exception() here like we're doing it on i386.
12503
12504 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
12505
12506         * mini-ia64.c: Add optimized TLS access support.
12507
12508 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
12509
12510         * mini-exceptions.c: Ongoing IA64 work.
12511
12512         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
12513
12514         * mini.c: Use the default optimization set when embedding. Fixes
12515         #75194.
12516
12517 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
12518
12519         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
12520         of trampolines to a separate file.
12521
12522         * mini-trampolines.c: New file.
12523
12524         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
12525         separate file.
12526         
12527         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
12528         amd64/ia64 code.
12529
12530         * mini-codegen.c: Fix cygwin build.
12531
12532 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
12533
12534         * mini.c: Add some minor changes needed by the IA64 port.
12535
12536         * *-ia64.*: Ongoing IA64 work.
12537
12538 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
12539
12540         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
12541         trampolines into arch-independent and arch-dependent parts.
12542
12543         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
12544
12545 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
12546
12547         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
12548
12549         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
12550         the xp-regalloc-branch for amd64.
12551
12552         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
12553         xp-regalloc-branch for x86.
12554
12555 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
12556
12557         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
12558
12559 2005-07-06  Martin Baulig  <martin@ximian.com>
12560
12561         * mini.c
12562         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
12563         (mono_jit_runtime_invoke): Likewise.
12564
12565 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
12566
12567         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
12568         on x86 too.
12569         
12570         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
12571         without loading their metadata. Reorganize the file format so exception handling+
12572         debug info is kept separate from normal method info. Create MonoJitInfo 
12573         structures for methods lazily.
12574
12575         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
12576         loading metadata.
12577         (x86_class_init_trampoline): Patch AOT class init trampolines too.
12578
12579         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
12580
12581         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
12582         in AOT code.
12583
12584         * mini.h: Bump AOT file version.
12585
12586 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
12587
12588         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12589
12590 2005-07-01  Raja R Harinath  <rharinath@novell.com>
12591
12592         * Makefile.am (check-local): Call semdel-wrapper.
12593
12594 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
12595
12596         * mini-x86.c: Revert the last change as it seems to break the build..
12597
12598 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
12599
12600         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12601         
12602         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
12603
12604 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
12605
12606         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
12607         outside of the macro, so strange stuff doesn't happen with gcc4
12608         (NEW_AOTCONST_TOKEN): Likewise.
12609
12610 2005-06-28  Martin Baulig  <martin@ximian.com>
12611
12612         * mini.c (mini_class_is_system_array): New static method; use this
12613         instead of `klass->parent == mono_defaults.array_class' everywhere
12614         since this also works for the new generic array class.
12615
12616 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
12617
12618         * inssel.brg: Remove warnings.
12619
12620 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
12621
12622         * mini-ia64.c: Ongoing IA64 work.
12623
12624         * basic-float.cs: Add float->i1 conversion test.
12625
12626         * iltests.il: Add conv.u4 test.
12627
12628 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
12629
12630         * inssel-long.brg: Fix bug caused by last change.
12631
12632 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
12633
12634         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
12635         BSDs.  Allows the x86 JIT to work on OSX86
12636
12637 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
12638
12639         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
12640         u4->i8 conversion.
12641
12642         * mini-ia64.c: Ongoing IA64 work.
12643
12644 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
12645
12646         * mini-ia64.c: Ongoing IA64 work.
12647
12648         * driver.c: Clean up jit_code_hash as well when using --regression.
12649
12650         * inssel-long.brg: Fix long->i4/u4 conversion rules.
12651
12652         * basic-long.cs: Add tests for long->u4 conversion.
12653
12654 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
12655
12656         * mini.c: Take mono_get_domainvar out of macros. This makes sure
12657         that we do not depend on undefined C behavior: the order stuff
12658         gets evaluated within an expression. Fixes mono when compiled on
12659         GCC 4.
12660
12661 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
12662
12663         * *-ia64.*: Ongoing IA64 work.
12664
12665         * aot.c: Lower memory usage while loading AOT methods.
12666
12667         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
12668
12669         * mini.h: Bump AOT file format version.
12670
12671 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
12672
12673         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
12674
12675 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
12676
12677         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
12678         not on callee assembly). Fixed some comments.
12679
12680 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
12681
12682         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
12683         it gets proper disassembly.
12684         (emit_method_info): Remove some dead code.
12685
12686         * mini.c (mini_method_compile): Allways allocate the GOT var in
12687         mono_method_to_ir for emulating opcodes.
12688
12689 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
12690
12691         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
12692         before freeing the code memory. Fixes #74990.
12693
12694         * objects.cs: Add regression test for #74992.
12695
12696         * liveness.c: Extend live ranges of arguments to the beginning of the
12697         method. Fixes #74992.
12698
12699         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
12700         so it points into the faulting instruction.
12701
12702 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
12703
12704         * jit-icalls.c (mono_imul_ovf): Add exception handling.
12705
12706         * *-ia64.*: Ongoing IA64 work.
12707
12708         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
12709
12710 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
12711
12712         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
12713
12714         * *-ia64.*: Ongoing IA64 work.
12715
12716 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
12717
12718         * basic-long.cs: Add tests for add/sub.ovf.
12719
12720         * basic.cs: Add tests for sub.ovf.
12721
12722         * *-ia64.*: Ongoing IA64 work.
12723
12724 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
12725
12726         * *-ia64.*: Ongoing IA64 work.
12727
12728         * basic.cs: Add conv.ovf.i4.un test.
12729
12730 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
12731
12732         * mini.c: (remove_block_if_useless) Fixed bug 75061.
12733         
12734 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12735
12736         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
12737
12738 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
12739
12740         * *-ia64.*: Ongoing IA64 work.
12741
12742 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12743
12744         * trace.[ch]:
12745         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
12746
12747 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
12748
12749         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
12750
12751 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
12752
12753         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
12754
12755         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
12756         of a call is callable by a near call.
12757
12758 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
12759
12760         * mini-ia64.c: Ongoing IA64 work.
12761
12762 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
12763
12764         * genmdesc.c: Make the generated array non-static.
12765
12766         * inssel-long.brg: Fix LSHR_IMM rule.
12767
12768         * *-ia64.*: Ongoing IA64 work.
12769
12770         * *-ia64.*: Ongoing IA64 work.
12771
12772 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
12773
12774         * *-ia64.*: Ongoing IA64 work.
12775
12776         * *-ia64.*: Ongoing IA64 work.
12777         
12778         * mini-ia64.c: Ongoing IA64 work.
12779
12780         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
12781
12782 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
12783
12784         * objects.cs basic-calls.cs: Move some tests to objects.cs.
12785         
12786         * objects.cs basic-long.cs: Move some tests to objects.cs.
12787
12788 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
12789
12790         * *-ia64.*: Ongoing IA64 work.
12791
12792         * iltests.il: Add a new test.
12793
12794         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
12795         newobj. Fixes #75042.
12796
12797 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
12798
12799         * *-ia64.*: Ongoing IA64 work.
12800         
12801         * *-ia64.*: Ongoing IA64 work.
12802         
12803         * *-ia64.*: Ongoing IA64 work.
12804
12805         * basic.cs objects.cs: Move tests accessing static variables as well.
12806
12807         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
12808
12809 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
12810
12811         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
12812
12813         * driver.c: Always print failed tests.
12814
12815         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
12816         frame pointer.
12817
12818         * *ia64*: Ongoing IA64 work.
12819
12820 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
12821
12822         * basic.cs: Add tests for add.ovf. Fix warnings.
12823
12824 2005-05-18  Miguel de Icaza  <miguel@novell.com>
12825
12826         * driver.c (mono_main): Avoid crash if no argument is passed to
12827         --break;  Do not use g_error, but f_printf.   And fix all other
12828         ocurrences of the same crash.
12829
12830 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
12831
12832         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
12833         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
12834         Fixes #74742.
12835
12836 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
12837
12838         * *-ia64.*: Add beginnings of IA64 backend.
12839
12840         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
12841
12842 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
12843
12844         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
12845         Fixes #74925.
12846
12847         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
12848
12849         * mini-amd64.c: Fix a warning.
12850
12851 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
12852
12853         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
12854         in float_neg. Fixes #74897.
12855
12856         * mini-amd64.c (emit_call): Fix another near call bug.
12857
12858 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
12859
12860         * declsec.c: Keep the appdomain information in the structure. Added a 
12861         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
12862         value gets overwritten).
12863         * declsec.h: Set the default MonoArray for the the stack to 6. Added
12864         an MonoAppDomain member to MonoSecurityFrame.
12865         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
12866         used in the stack walk. Now use a MonoArray which grow (double) when
12867         it gets full.
12868
12869 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
12870
12871         * mini.c: Re-enabled runtime cleanup, since running threads should
12872         now properly stop when exiting.
12873
12874 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
12875
12876         * mini-codegen.c: New file contaning the arch-independent local
12877         register allocator. Not used by any architectures yet.
12878
12879         * mini.h linear-scan.c: Merge some changes from the 
12880         mini-xp-local-regalloc branch.
12881
12882 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
12883
12884         * mini-amd64.c (emit_call): Fix calls to native functions when the
12885         runtime is compiled as a shared library. Fixes #74756.
12886
12887         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
12888         on a literal field. Fixes #74751.
12889
12890 2005-04-25  Raja R Harinath  <rharinath@novell.com>
12891
12892         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
12893
12894 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
12895
12896         * objects.cs: Add missing null casting test.
12897
12898 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
12899
12900         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
12901         in wrapper methods. Also rename 'address' variable to 'offset'.
12902
12903 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
12904
12905         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
12906         warnings.
12907         
12908         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
12909
12910         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
12911         work on windows.
12912
12913 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12914
12915         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
12916
12917 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
12918
12919         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
12920         just the last bytes.
12921
12922 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
12923
12924         * aot.c (mono_compile_assembly): Fix warning.
12925
12926         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
12927         by the _MSC_VER stuff.
12928
12929 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
12930
12931         * inssel-long.brg: Fix #74588.
12932
12933         * cpu-amd64.md: Fix #74591.
12934
12935         * iltests.il: Add new regression tests.
12936
12937 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
12938
12939         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
12940         valuetype.
12941
12942 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
12943
12944         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
12945
12946         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
12947         from Bill Middleton <flashdict@gmail.com>.
12948
12949 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
12950
12951         * arrays.cs: Add new regression test. Fix warnings.
12952
12953 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
12954
12955         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
12956         and leakage in CKFINITE.
12957
12958         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
12959         this to a null op since it is called on amd64 too.
12960
12961         * exceptions-amd64.c (get_throw_trampoline): Align stack.
12962
12963         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
12964         body since this is not used on amd64.
12965         
12966         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
12967
12968         * mini-amd64.c: Remove obsolete fixmes.
12969
12970         * mini.c (print_method_from_ip): Fix debugging support.
12971
12972 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
12973
12974         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
12975         so that expressions that don't give much gain are not reduced.
12976         * ssapre.h: Likewise.
12977
12978 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
12979
12980         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
12981
12982         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
12983
12984         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
12985
12986 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
12987
12988         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
12989
12990         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
12991
12992 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
12993
12994         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
12995         stack touching.
12996
12997         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
12998
12999         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
13000
13001         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
13002
13003         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
13004         MONO_ARCH_USE_SIGACTION. Fixes #74252.
13005
13006         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
13007
13008         * mini-x86.c: Fix up stack overflow handling.   
13009
13010         * exceptions.cs: Add new regression test.
13011
13012 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
13013
13014         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
13015         mono_jit_thread_attach.
13016
13017         * mini.c (mono_method_to_ir): Verify called method is not abstract.
13018
13019 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
13020
13021         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
13022         avoid calling constructors using callvirt.
13023
13024         * inssel.brg: Fix #74073.
13025
13026 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
13027
13028         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
13029         compilation with non-GCC compilers.
13030         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
13031         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
13032
13033 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
13034
13035         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
13036         klass->interface_offsets (will likely fix bug#74073).
13037
13038 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
13039
13040         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
13041
13042 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
13043
13044         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
13045         to amd64_div_reg_size ().
13046         
13047         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
13048
13049 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
13050
13051         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
13052
13053 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
13054
13055         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
13056
13057 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
13058
13059         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
13060         
13061         * mini.c (mono_precompile_assembly): Load and precompile referenced
13062         assemblies as well. Fixes #74015.
13063
13064 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
13065
13066         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
13067
13068 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
13069
13070         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
13071         a lot of checks and (anyway) permissions cannot work until corlib is 
13072         loaded.
13073
13074 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
13075
13076         * mini-ppc.c: fixed ABI issue on sysv/ppc.
13077
13078 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
13079
13080         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
13081         calls (fixes bug#72824).
13082
13083 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13084
13085         * mini.c: fix tail recursion elimination (see test in bug#73936).
13086
13087 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
13088
13089         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
13090         some fp functions in sse2 mode.
13091
13092 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
13093
13094         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
13095
13096 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
13097
13098         * mini.h mini.c: Add mono_get_jit_tls_key ().
13099
13100         * mini-x86.c: Enable fast TLS support on windows.
13101
13102 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
13103
13104         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
13105         * mini.c: Check for p/invoke method when generating code. If a
13106         p/invoke method, or it's class, isn't decorated with [Suppress
13107         UnmanagedCodeSecurity] then generate code to call System.Security.
13108         UnmanagedDemand (only if the security manager is active).
13109
13110 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
13111
13112         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
13113         last change as it seems to cause strange crashes.
13114         
13115 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13116
13117         * *.c: handle unsafe function pointers where needed.
13118
13119 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
13120
13121         * mini.c (mono_jit_free_method): Remove the fixme too.
13122
13123 2005-03-15  Miguel de Icaza  <miguel@novell.com>
13124
13125         * mini.c: As discussed, make the code actually free the delegate
13126         thunk now, to enable the debugging of delegate problems, use
13127         MONO_DEBUG=1 when running Mono. 
13128
13129         This takes also care of parts of the leaks as seen by Joe.
13130
13131 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
13132
13133         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
13134         thread_tls_offset calculation.
13135
13136 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
13137
13138         * declsec.c: Reworked linkdemand checks for icall. The previous code
13139         was using the declaration code (untrusted) and didn't work as expected
13140         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
13141         specific case.
13142
13143 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
13144
13145         * iltests.il: Add new localloc test.
13146
13147         * mini-amd64.c: Handle large stack allocations the same way as on
13148         windows if stack overflow handling is working.
13149         
13150         * mini-amd64.c: Allocate the signal stack using mmap.
13151
13152         * mini.c (sigsegv_signal_handler): Fix reading of context.
13153
13154         * mini-exceptions.c: Fix up stack overflow handling.
13155
13156         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
13157
13158         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
13159
13160         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
13161
13162         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
13163
13164         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
13165         tramp_init functions as they are no longer needed.
13166
13167 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
13168
13169         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
13170         
13171         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
13172
13173         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
13174         
13175         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
13176         support that now.
13177
13178         * mini-ops.h: Add OP_LMUL_IMM.
13179
13180         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
13181         long mul/div opcodes as intrinsic.
13182
13183         * mini-amd64.c (emit_call): Handle the case when the callee might be
13184         an AOT method.
13185
13186 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
13187
13188         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
13189         extra safe.
13190         
13191         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
13192
13193         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
13194
13195 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
13196
13197         * mini.c (mono_codegen): Don't leak here, to help people running
13198         monogrind.
13199
13200 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
13201
13202         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
13203         conversions in sse2 mode.
13204
13205         * basic-float.cs: Add regression test.
13206         
13207         * mini-amd64.c: Reenable sse2.
13208
13209 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
13210
13211         * mini-amd64.c: Disable sse2 until some regressions are fixed.
13212
13213 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
13214
13215         * driver.c: Copyright text should include 2005.
13216         
13217 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
13218
13219         * cpu-amd64.md (load_membase): Fix more max lengths.
13220
13221 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
13222
13223         * cpu-amd64.md (load_membase): Fix max length.
13224
13225         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
13226
13227         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
13228
13229         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
13230         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
13231
13232         * basic-float.cs: Add rounding regression test.
13233
13234         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
13235
13236 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
13237
13238         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
13239         structures in registers for pinvoke wrappers.
13240
13241 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
13242
13243         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
13244
13245 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
13246
13247         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
13248         wrapper to mono_jit_thread_attach.
13249
13250         * mini.c (mini_jit_thread_attach): New jit icall.
13251
13252         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
13253         native->managed wrappers.
13254
13255         * exceptions.cs: Add new regression test.
13256
13257         * mini.c (optimize_branches): Check regions in the cbranch to throw
13258         block case as well. Fixes #73242.
13259
13260 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
13261
13262         * mini.c: thread safety fixes.
13263
13264 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
13265
13266         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
13267         patching stuff, since delegates use jump trampolines so there is
13268         no caller.
13269
13270         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
13271         jump trampolines.
13272         
13273         * tramp-amd64.c: Fix build.
13274
13275         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
13276         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
13277
13278         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
13279         Rename this to mono_arch....
13280         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
13281
13282         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
13283
13284         * mini-amd64.c (emit_call): If both the caller and the callee is
13285         guaranteed to have 32 bit addresses, emit a normal call.
13286
13287         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
13288
13289         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
13290         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
13291         method_ptr inside delegates.
13292
13293 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
13294
13295         * mini.c (mono_jit_free_method): Free the method info even if the native code is
13296         invalidated. Fixes #73001.
13297
13298         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
13299
13300         * mini-x86.c: Only use stdcall for pinvokes on windows.
13301
13302 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
13303
13304         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
13305         * mini-x86.c: remove unreliable __thread var offset detection,
13306         use the correct accessors and enable by default.
13307
13308 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
13309
13310         * mini.c (mono_jit_free_method): Fix memory leak.
13311
13312 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
13313
13314         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
13315
13316 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
13317
13318         * cpu-amd64.md: Fix lengths of atomic opcodes.
13319
13320 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
13321
13322         * driver.c: try to not imply using ICU is any good.
13323
13324 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
13325
13326         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
13327         functions as inline ops.
13328
13329         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
13330         some Interlocked functions as inline ops.
13331
13332         * mini.c (move_basic_block_to_end): Fix bug in last patch.
13333
13334         * mini.h (MonoBasicBlock): Reorganize fields a bit.
13335
13336         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
13337
13338         * mini.c: Add support for OP_NOT_TAKEN.
13339
13340         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
13341         structures in registers for pinvoke wrappers.
13342
13343         * mini-amd64.c: Fix warnings.
13344
13345 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
13346
13347         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
13348
13349         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
13350
13351         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
13352         address instead of loading the address from it.
13353
13354         * mini-x86.c: Add support for returning small structs in registers
13355         on Win32. Fixes part of #70864.
13356         
13357 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
13358
13359         * trace.c (get_token): Improve error checking.
13360
13361 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
13362
13363         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
13364
13365 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
13366  
13367         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
13368         it can be reused for MonoClass.
13369         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
13370         _LINKDEMAND.
13371
13372 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
13373
13374         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
13375         instead of a MonoReflectionMethod. The method information wasn't used
13376         when displaying SecurityException details (but will be now).
13377
13378 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
13379
13380         * Makefile.am : windows build fix.
13381
13382 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
13383
13384         * iltests.il: Add new regression test.
13385
13386         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
13387         #72522.
13388
13389 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
13390  
13391         * mini.c: Moved linkdemand check into helper function check_linkdemand
13392         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
13393         LDFTN, LDVIRTFTN).
13394
13395 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
13396
13397         * declsec.c: Added statistics counter for different kinds of 
13398         LinkDemands.
13399         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
13400         (and commented) declaration.
13401         * mini.c: Added statistics counter for security Demand code 
13402         generation. Added display of security statistics.
13403
13404 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
13405
13406         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
13407         Fix compilation errors under gcc-2.95.
13408
13409 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
13410
13411         * mini.c, driver.c: Use the new jit trampoline hashtable
13412
13413 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13414
13415         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
13416
13417 2005-02-11  Martin Baulig  <martin@ximian.com>
13418
13419         * debug-mini.c (mono_debug_close_method): Free the line number array.
13420
13421 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
13422
13423         * aot.c: Break up large methods into smaller ones. Share GOT slots for
13424         icalls.
13425
13426         * mini.h: Bump AOT file format version. 
13427
13428 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
13429
13430         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
13431         APTC and P/Invoke.
13432         * declsec.h: Added macros to get/set lazyly initialized security 
13433         informations about assemblies. Added new enum for different type of
13434         possible LinkDemand violation. Added function to check LinkDemands.
13435         * mini.h: Added a field to MonoCompile to hold any security violation
13436         detected when JITting a method (so it can be thrown later).
13437         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
13438         and CEE_CALLVIRT. Added code to throw exception at the end of
13439         mini_method_compile (note: the exception is unhandled right now).
13440
13441 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
13442
13443         * mini.c, jit-icalls.c: use the managed implementation of
13444         memset for initobj and memset, to avoid managed <-> unmanaged
13445         transitions.
13446
13447 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
13448
13449         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
13450         optimization if it would need a GOT var.
13451
13452         * basic.cs: Add tests for constant propagation and switch statements.
13453
13454         * ssa.c: Fix out-of-range constant propagation and switch statements.
13455
13456 2005-02-09    <vargaz@freemail.hu>
13457
13458         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
13459
13460 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
13461
13462         * cpu-amd64.md (load_membase): Fix max length of load_membase.
13463
13464 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13465
13466         * mini.c: update to new signature of mono_class_get_allocation_ftn().
13467
13468 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
13469
13470         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
13471         arithmetic operations.
13472
13473 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
13474
13475         * mini-ppc.c: add a workaround for broken user code that
13476         DllImports vararg functions with non-vararg signatures.
13477
13478 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
13479
13480         * mini.c (mono_jit_compile_method_inner): Add detection and a 
13481         meaningfull error message for assemblies written in Managed C++.
13482
13483         * tramp-amd64.c mini-amd64.h: Add support for 
13484         create_trampoline_from_token ().
13485
13486         * aot.c mini-x86.c abcremoval.c: Applied patch from
13487         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
13488
13489 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
13490
13491         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
13492         which takes a MonoImage/token as parameter instead of a MonoMethod.
13493
13494         * aot.c: Use the new trampoline for initializing vtables.
13495
13496         * aot.c: Add support for ldfld/stfld_remote wrappers.
13497
13498         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
13499         rules for compare <MEM>, IMM.
13500
13501         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
13502
13503         * aot.c: Handle inherited finalizers correctly.
13504
13505 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
13506
13507         * inssel.brg (stmt): Add a missing _setup_... ().
13508
13509         * aot.c: Save some parts of the class state to the AOT file and use it
13510         to recompute that state when a class is initialized.
13511
13512         * mini.c: Install AOT hooks into the runtime.
13513
13514         * mini.h: Bump AOT file format version.
13515         
13516         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
13517         Fixes #72148.
13518
13519         * iltests.il: Add new test.
13520
13521 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
13522
13523         * mini.c: fix typo.
13524
13525 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
13526
13527         * mini.c: setup the statistical profiler in the thread attach
13528         callback to cope with the new single thread code.
13529
13530 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
13531
13532         * mini-ppc.c: ensure we have enough room for the profiler
13533         calls (fixed bug#72084).
13534
13535 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
13536
13537         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
13538         it.
13539
13540 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13541
13542         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
13543
13544 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13545
13546         * ssapre.c: Fixed an issue with down safety (this allows IronPython
13547         to succesfully execute parrotbench).
13548         * ssapre.h: Likewise.
13549
13550 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13551
13552         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
13553         variable for stores to method arguments (fixes a SSAPRE issue).
13554
13555 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13556
13557         * mini.c: handle value types in dup, fixes gen-112.cs.
13558
13559 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
13560
13561         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
13562         sequence for calls in dynamic methods to avoid thunks.
13563
13564 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
13565
13566         * mini.c: correctly remove dynamic methods from the hashtable.
13567
13568 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13569
13570         * driver.c: Disabled SSAPRE until fix the bug that appears
13571         in IronPython's parrotbench.
13572
13573 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
13574
13575         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
13576
13577         * mini.c (mono_method_to_ir): Revert the previous change.
13578         
13579         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
13580         when AOT compiling.
13581
13582         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
13583         mono_jit_info_table_find () etc. when running under valgrind.
13584
13585         * inssel.brg: Fix warnings.
13586
13587         * mini-exceptions.c: Fix warnings.
13588
13589 2005-01-31  Martin Baulig  <martin@ximian.com>
13590
13591         * driver.c (compile_all_methods_thread_main): Don't try to compile
13592         generic methods or anything which has type parameters.
13593
13594 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
13595
13596         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
13597
13598         * TestDriver.cs: Add --verbose flags.
13599
13600         * graph.c ssa.c: Fix 64 bit warnings.
13601         
13602         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
13603         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
13604         Fix 64 bit warnings.
13605
13606         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
13607         variable not spotted by gcc.
13608         
13609         * mini-amd64.c inssel-amd64.brg: Applied patch from  
13610         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
13611         X86_COMPARE_MEMBASE opcodes.
13612
13613         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
13614
13615 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
13616
13617         * *: MonoMethod->signature might be NULL now. You *MUST* use
13618         mono_method_signature.
13619
13620 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
13621
13622         * driver.c (compile_all_methods_thread_main): Compile the methods
13623         without invoking cctors.
13624
13625 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13626
13627         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
13628         * basic-calls.cs: test for the above.
13629
13630 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
13631
13632         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
13633         MonoJitInfo changes.
13634
13635 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
13636
13637         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
13638         eagerly if it contains dynamic methods.
13639         
13640         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
13641
13642         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
13643         trace, it is now computed by an icall from trace_ips.
13644         
13645         * mini-exceptions.c: Fix a warning.
13646
13647 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
13648
13649         * mini-exceptions.c: don't bother getting stack trace info if
13650         it's not going to be used.
13651
13652 2005-01-27  Raja R Harinath  <rharinath@novell.com>
13653
13654         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
13655         ssapre-mini-ops.h.
13656
13657 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
13658
13659         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
13660
13661         * aot.c: Avoid calling mono_method_get_header () if not needed.
13662
13663         * mini.h: Bump AOT file format version.
13664         
13665         * mini.c (mono_emit_native_call): Allocate a GOT var here.
13666
13667         * mini.c (mono_print_tree): Print more info for calls.
13668
13669 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
13670
13671         * declsec.h: Remove warning by adding missing include for marshal.h
13672
13673 2005-01-26  Martin Baulig  <martin@ximian.com>
13674
13675         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
13676         `ip' twice.
13677
13678 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
13679
13680         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
13681         flags.
13682
13683         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
13684
13685         * aot.c (mono_compile_assembly): Fix a warning.
13686
13687 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
13688
13689         * declsec.c: Look for security attributes on the original MonoMethod 
13690         (and not the wrapped one). This fix permissions on icalls.
13691
13692 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
13693
13694         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13695
13696         * mini.c (mono_allocate_stack_slots): Add a fixme.
13697
13698         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13699
13700 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13701
13702         * inssel.brg: optimize casts of sealed types (more
13703         optimizations waiting for fixes in remoting).
13704
13705 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
13706
13707         * inssel.brg (stmt): Add another dummy rule.
13708
13709         * driver.c: Fix warnings.
13710
13711         * driver.c (mono_main): If running under valgrind, instruct glib to use
13712         the system allocation functions so valgrind can track the memory
13713         allocated by the g_... functions.
13714
13715         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
13716
13717         * mini-ops.h: Add OP_DUMMY_STORE opcode.
13718
13719         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
13720
13721         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
13722         variables in try regions.
13723
13724         * mini.c (mini_method_compile): Don't disable optimizations on large
13725         methods when AOT compiling.
13726
13727         * mini.c (mono_allocate_stack_slots): New arch independent method to 
13728         allocate stack slots. Not yet used.
13729
13730 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
13731
13732         * debug-mini.c (mono_debug_close_method): Plug some leaks.
13733
13734 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
13735
13736         * mini-ppc.c: make the branch info relative as the code
13737         buffer can be reallocated.
13738
13739 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
13740
13741         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
13742         * driver.c: Removed the AOT/security restriction. Now initialize the
13743         security manager (in metadata) if --security is used.
13744         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
13745         rather than the pointer to declarative security, when AOT is used.
13746
13747 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
13748
13749         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
13750         basic blocks, reduced intrinsic exception throwing code size.
13751
13752 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
13753
13754         * driver.c (mini_usage): Reorder the usage screen.
13755
13756 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
13757
13758         * mini.c (mono_resolve_patch_target): Fix warning.
13759
13760 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
13761
13762         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
13763         previous patch.
13764
13765         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
13766
13767         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
13768         breaks the amd64 build.
13769
13770         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
13771         register allocation. Fixes #71454.
13772
13773         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
13774
13775         * arrays.cs: Add new regression test.   
13776
13777 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13778
13779         * ssapre.c: Turned usage of snprintf to GString.
13780         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
13781         (I left it on by mistake in my previous commit).
13782
13783 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
13784
13785         * mini.c, cfold.c, basic-calls.cs: preserve side effects
13786         on cond branch optimization (fixes bug# 71515).
13787
13788 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13789
13790         * abcremoval.c: Fixed bug 71062.
13791         * abcremoval.h: Likewise.
13792
13793 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13794
13795         * mini.c: Added a new functionality to optimize_branches, the removal
13796         of useless basic blocks, and fixed some problem in the removal of
13797         critical edges; some utility functions added for both purposes.
13798         * ssapre.c: Added complex expression support, and fixed bug 70637.
13799         * ssapre.h: Likewise.
13800         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
13801         enabled in SSAPRE.
13802         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
13803         * driver.c: Re-enabled SSAPRE.
13804
13805 2005-01-19  Martin Baulig  <martin@ximian.com>
13806
13807         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
13808         the result of mono_get_method_constrained().
13809
13810 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
13811
13812         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
13813         manager.
13814
13815 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
13816
13817         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
13818         be detected.  Fixes #59296.
13819
13820 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
13821
13822         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
13823         which can happen. Fixes #71361.
13824
13825 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
13826
13827         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
13828         manager.
13829
13830 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
13831
13832         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
13833         appdomain-unload.exe to fail.
13834         
13835         * mini.c: Fix some memory leaks.
13836
13837 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
13838
13839         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
13840         Fixed bug and sped up some codepaths.
13841
13842 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
13843
13844         * mini.c: Fix some memory leaks.
13845
13846         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
13847         conversion.
13848
13849         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
13850
13851         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
13852         #71320.
13853
13854         * iltests.il: Add regression test for #71320.
13855
13856 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
13857
13858         * mini.c (mono_codegen): Fix installation of profiler hooks.
13859
13860         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
13861
13862 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
13863
13864         * mini.h, mini.c, cfold.c: optimize access to enum
13865         readonly fields, too. Eval conditional branches if possible
13866         to perform unreachable code removal in more cases.
13867
13868 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
13869
13870         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
13871
13872         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
13873         code manager.
13874
13875         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
13876         WinXP DEP. Fixes #71244.
13877
13878 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
13879
13880         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
13881
13882 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
13883
13884         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
13885
13886 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
13887
13888         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
13889         changes.
13890
13891         * mini.h: Bump AOT version.
13892
13893         * mini.h (MonoCompile): Change exvar to a hash table.
13894
13895         * mini.c: Allocate a separate exvar for each handler block.
13896
13897         * mini.c: Get rid of the computation of filter_lengths, its not needed.
13898
13899         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
13900         ex var with the pending exception and only throw if the two are equal.
13901         Fixes #68552.
13902         
13903         * exceptions.cs: Add tests for rethrow and nested catch clauses.
13904
13905         * mini-x86.c: Fix warnings.
13906
13907         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
13908         used by all the ports now.
13909
13910         * aot.c: Add write-symbols and save-temps options.
13911
13912 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
13913
13914         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
13915
13916 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
13917
13918         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
13919         operations.
13920
13921         * tramp-s390.c: Check vtable slot belongs to the domain.
13922
13923         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
13924         as per other platforms.
13925
13926         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
13927
13928 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
13929
13930         * driver.c: we don't run the Main() code in a subthread anymore.
13931
13932 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
13933
13934         * mini.c: added experimental rtc support in the statistical
13935         profiler: if the user has the permission, more accurate statistics
13936         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
13937         The MONO_RTC value must be restricted to what the linux rtc allows:
13938         power of two from 64 to 8192 Hz.
13939
13940 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
13941
13942         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
13943
13944 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
13945
13946         * mini-ppc.c: better icache flush for smp.
13947
13948 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
13949
13950         * mini-amd64.c (emit_move_return_value): Fix memory leak.
13951
13952         * mini-x86.c (get_call_info): Add the get_call_info () code from the
13953         amd64 port, not yet used.
13954
13955 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
13956
13957         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
13958         a struct type.
13959
13960 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
13961
13962         * driver.c: Added --security option to activate the security manager.
13963         Right now this will allow code generation for declarative demands and
13964         is disabled when AOT is specified.
13965         * mini.c: Add code generation for declarative security demands.
13966         * mini.h: Add mono_use_security_manager as an extern gboolean.
13967
13968 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
13969
13970         * aot.c (mono_compile_assembly): Speed up compilation a bit by
13971         emitting more dense assembly code.
13972
13973         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
13974         exception throwing stuff.
13975
13976 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
13977
13978         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
13979         dead code.
13980
13981         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
13982         left in by mistake.
13983
13984         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
13985         fixed.
13986
13987         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
13988
13989         * tramp-*.c: Only patch vtable slots if the object is in the current
13990         domain. Fixes appdomain-unload.exe.
13991
13992         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
13993         
13994         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
13995         x86 branch.
13996
13997 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
13998
13999         * mini.c (reverse_branch_op): New helper function.
14000
14001         * mini.c (optimize_branches): Run the new optimization only on 
14002         platforms which support it. Also reverse all kinds of branches.
14003
14004         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
14005
14006         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
14007         a throw statement.
14008
14009         * mini.c (optimize_branches): Reverse not-equals branches if the false
14010         bblock is a throw. This happens a lot of time with argument checking in
14011         corlib.
14012
14013         * mini.c (mono_codegen): Add support for placing basic blocks after
14014         the function epilogue.
14015
14016         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
14017         function epilogue.
14018         
14019 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
14020
14021         * mini.c (setup_stat_profiler): Only set this up if the platform
14022         supports ITIMER_PROF.
14023
14024 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
14025
14026         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
14027         previous patch.
14028
14029         * inssel.brg: Fix a warning.
14030
14031 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
14032
14033         * mini.c: added support for statistical profiler 
14034         (run with: --profile=default:stat).
14035
14036 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
14037
14038         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
14039
14040         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
14041
14042         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
14043         related to global registers from the amd64 port.
14044
14045 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
14046
14047         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
14048
14049         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
14050         with global registers.
14051         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
14052
14053         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
14054
14055 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
14056
14057         * debug-mini.c (encode_value): Fix off-by-one.
14058
14059         * aot.c (encode_value): Likewise.
14060
14061         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
14062
14063 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
14064
14065         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
14066         AOT.
14067
14068         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
14069         
14070         * aot.c (emit_method_info): Increase size of temp buffer.
14071
14072         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
14073         the AOT case.
14074
14075 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
14076
14077         * aot.c (emit_method_info): Fix build.
14078         
14079         * aot.c: Further rework of the AOT file format to reduce the size of
14080         the method info data.
14081
14082         * mini.h: Bump AOT file format version.
14083
14084 2004-12-27  Martin Baulig  <martin@ximian.com>
14085
14086         * mini.c (mini_get_method): New static method; call
14087         mono_get_method_full() and mono_get_inflated_method().
14088         (mono_method_to_ir): Use mini_get_method() instead of
14089         mono_get_method_full(). 
14090
14091 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
14092
14093         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
14094
14095 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
14096
14097         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
14098
14099         * inssel-amd64.brg: Add some optimization rules.
14100
14101 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
14102
14103         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
14104         standard not GC'd stuff is fine.
14105
14106 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
14107
14108         * aot.c: Rework the AOT file format to get rid of most of the global
14109         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
14110
14111         * mini.h: Bump AOT file format version.
14112         
14113 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
14114
14115         * mini.h: Bump AOT file format version.
14116
14117         * aot.c (mono_aot_is_got_entry): New function to determine if an 
14118         address is inside a GOT.
14119
14120         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
14121
14122         * cpu-pentium.md: Increase the maximum size of some instructions which
14123         might involve a got access.
14124         
14125         * mini.c (get_method_from_ip): Another debug helper function.
14126
14127         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
14128         when got var accesses are created during the decompose phase.
14129
14130         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
14131
14132         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
14133         argument mini_compile_method and to MonoCompile, and use this to
14134         determine whenever a given method is compiled for AOT. This allows the
14135         other methods compiled during AOT compilation to be free of AOT stuff,
14136         so the backends does not need to add special support for them by
14137         creating a fake GOT etc.
14138
14139         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
14140         longer needed.
14141
14142 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
14143
14144         * mini.c (mono_method_to_ir): It turns out that some of the
14145         x-appdomain wrappers are lax with types, so just ignore this for
14146         all wrappers.
14147
14148         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
14149         at the vtable->klass. If it is non-shared code we can just use the
14150         vtable.
14151
14152 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
14153
14154         * mini-ppc.c: access MonoDomain from tls, too.
14155
14156 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
14157
14158         * declsec.c: Removed unused variable (and related warning ;-)
14159
14160 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
14161
14162         * iltests.il: New test for LDELEMA on an array of ref types.
14163
14164         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
14165         all ldelema's on reftypes.
14166         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
14167         it was the wrong place to put it.
14168
14169         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
14170         register to pop to make this cleaner, at the request of Paolo.
14171
14172 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
14173
14174         * mini-ops.h (OP_GETHASHCODE): New op.
14175
14176         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
14177
14178         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
14179         operation.
14180
14181         For a microbenchmark, this reduces the cost of Hashtable.get_Item
14182         by 25%.
14183         
14184         * mini-x86.c (mono_arch_output_basic_block): Rather than
14185
14186         add ebp, 4
14187
14188         Emit
14189
14190         pop edx
14191
14192         The first is 3 bytes while the second is 1. This saves 36 kb on
14193         mscorlib, quite a big saving. When bootstraping mcs, I was able to
14194         see a small boost because of icache locality.
14195
14196         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
14197
14198 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
14199
14200         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
14201         started code sharing with the generic code.
14202
14203 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
14204
14205         * mini-ppc.c, cpu-g4.md: added code for direct access to
14206         tls data slots.
14207
14208 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
14209
14210         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
14211          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
14212         to OP_TLS_GET.
14213
14214 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
14215
14216         * declsec.c|h: Added functions to cache the declarative stack modifiers
14217         in MonoJitInfo and to create a security frame from a MonoJitInfo 
14218         structure.
14219         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
14220         created. Register internal calls for System.Security.SecurityFrame::
14221         _GetSecurityFrame and _GetSecurityStack.
14222         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
14223         the definitions for the new stack walk/callback mechanism.
14224         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
14225         first security frame for LinkDemands and InheritanceDemands) and
14226         GetSecurityStack for Demands. Both use the new mono_walk_stack code
14227         from lupus.
14228         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
14229         walk initialization (lupus).
14230
14231 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
14232
14233         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
14234         idiom.
14235         (handle_loaded_temps): Do not create a temporary variable for
14236         things that we know are temps. They will never be modified.
14237         (mono_spill_call): Set MONO_INST_IS_TEMP
14238         (mono_emulate_opcode): ditto
14239         (emit_tree): ditto
14240         (mono_method_to_ir.CEE_DUP): ditto
14241
14242 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
14243
14244         * mini.c (type_to_eval_stack_type): Make this handle the void type
14245         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
14246         (emit_tree): use ip_in_bb to special case some common idioms
14247         Update all callers to pass in the IP.
14248         (mono_method_to_ir): Make CEE_CALL* do the above as well.
14249
14250         This gives us a nice 2% speedup in mcs bootstrap.
14251
14252         * mini-x86.c (peephole_pass): Peephole pass to make
14253         mov  [foo], eax
14254         push [foo]
14255
14256         into
14257
14258         mov [foo], eax
14259         push eax
14260
14261         * mini.c (ip_in_bb): new method.
14262         (mono_method_to_ir): use this method rather than doing the hash
14263         lookup ourselves.
14264
14265         * linear-scan.c (mono_linear_scan): When expiring actives, you
14266         don't need to keep around variables that expire on this
14267         instruction. This makes it so that:
14268              a = b + 1
14269         will turn into:
14270              store (ebx add (ebx, 1))
14271         which will become
14272              add ebx, 1
14273
14274 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
14275
14276         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
14277         combination to avoid doing two copies. Fix up problems with previous
14278         patch.
14279
14280         * mini.c: Fix 64 bit warnings.
14281
14282         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
14283
14284 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
14285
14286         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
14287         changes from the x86 code.
14288
14289         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
14290
14291 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
14292
14293         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
14294         throwing code to reduce its size, unify the AOT and non-aot code and 
14295         get rid of relocations in the AOT case.
14296
14297         * mini-x86.h mini.c exceptions-x86.c 
14298         (mono_arch_get_throw_corlib_exception): New arch specific function to 
14299         raise corlib exceptions which doesn't require relocations in the 
14300         caller.
14301
14302         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
14303
14304 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
14305
14306         * mini.c (mono_emit_method_call): Only allocate the got var when it is
14307         needed.
14308
14309         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
14310         in the AOT case.
14311
14312 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14313
14314         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
14315         with add function when used from Inc/dec atomic 
14316         functions. Re-enabled optimization on x86.
14317         * mini-ops.h: renamed atomic_add functions to
14318         allow _add to match the Interlocked::Add and
14319         _add_next to match Interlocked::Inc/Dec.
14320
14321 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
14322
14323         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
14324         linking of BBs to the end BB, and enabled SSAPRE also with
14325         consprop and copyprop (which was prevented by that bug).
14326
14327 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14328
14329         * mini-x86.c: disabling the Interlocked optimizing code. 
14330
14331 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
14332
14333         * aot.c (load_aot_module): Move reading of got_addr after the AOT
14334         file version check.
14335         
14336 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14337
14338         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
14339         interlocked optimization due lack of support on x86, rewrote 
14340         exchange to take into account that base may be in eax.
14341         
14342         xsp works again; activated Interlocked optimizing code.
14343         
14344 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
14345
14346         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
14347
14348 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
14349
14350         * mini-ops.h: Add new opcodes.
14351
14352         * mini.h: Add new patch types. Add got_var to MonoCompile.
14353
14354         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
14355         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
14356         make it work with all kinds of patchable code.
14357
14358         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
14359         address of the GOT, and referencing entries in the GOT.
14360
14361         * mini.c: Add code to load the GOT address if needed by an opcode.
14362
14363         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
14364         independent AOT code on the x86 using an elf-style Global Offset Table.
14365
14366 2004-12-14  Raja R Harinath  <rharinath@novell.com>
14367
14368         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
14369
14370 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14371
14372         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
14373         when running xsp.
14374
14375 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
14376
14377         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
14378         of Interlocked:Increment/Decrement/Add as inline ops.
14379         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
14380
14381 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
14382
14383         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
14384         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
14385
14386 2004-12-12  Duncan Mak  <duncan@ximian.com>
14387
14388         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
14389         again. `patch_info->table_size' is no longer valid after Zoltan's
14390         commit #37636.
14391
14392 2004-12-12  Martin Baulig  <martin@ximian.com>
14393
14394         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
14395         if we are the "real" method, ie. not an inlined method inside it.
14396
14397 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
14398
14399         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
14400         before we look in the special fields table. This fixes
14401         ../tests/thread-static-init.cs.
14402
14403 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14404
14405         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
14406         for Array get_Rank and get_Length. Fixes bug #70465.
14407
14408 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
14409
14410         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
14411         separate structure to reduce the size of MonoJumpInfo.
14412
14413 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
14414
14415         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
14416
14417 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
14418
14419         * mini.c (mini_get_inst_for_method): Changed to allow ports
14420         to return a MonoInst instead of opcode 
14421         (renamed mini_get_opcode_for_method to better reflect the new functionality)
14422         
14423         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
14424         Allow ports to return a created MonoInst instead of op-code, will enable
14425         new optimizations.
14426         (renamed mini_get_opcode_for_method to better reflected the functionality)
14427
14428 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
14429
14430         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
14431
14432 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
14433
14434         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
14435         Fixes #69985.
14436
14437 2004-12-08  Martin Baulig  <martin@ximian.com>
14438
14439         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
14440         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
14441
14442 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
14443
14444         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
14445         correctly.
14446
14447         * exceptions.cs: Disable some tests which depend on properties of x86 fp
14448         arithmetic.
14449
14450 2004-12-08  Raja R Harinath  <rharinath@novell.com>
14451
14452         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
14453
14454 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
14455
14456         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
14457         bug introduced by the previous patch.
14458
14459 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14460
14461         * mini-ppc.c, objectc.cs: handle large structs passed by value
14462         (fixes bug #69972).
14463
14464 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
14465
14466         * mini-ppc.c: OP_ARGLIST implementation from
14467         Geoff Norton  <gnorton@customerdna.com>.
14468
14469 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14470
14471         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
14472         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
14473
14474 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14475
14476         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
14477
14478 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14479
14480         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
14481         support.
14482
14483 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
14484
14485         * mini-sparc.c: Zero out localled-ed memory.
14486
14487         * iltests.il: Add tests for zeroing out localloc-ed memory.
14488
14489 2004-12-04  Martin Baulig  <martin@ximian.com>
14490
14491         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
14492         mono_method_get_signature_full().       
14493
14494 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
14495
14496         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
14497         and some utility functions (always for SSAPRE), integrated SSAPRE.
14498         * mini.h: Likewise.
14499         * driver.c: Added ssapre option.
14500         * ssa.c: Small fix on OP_ARG handling.
14501         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
14502         * Makefile.am: Likewise.
14503
14504 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
14505
14506         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
14507         now in the xp code.
14508
14509         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
14510         icall.
14511
14512 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14513
14514         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
14515         
14516         * cpu-s390.md : Increase instruction length of oparglist.
14517
14518         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
14519
14520 2004-11-30  Martin Baulig  <martin@ximian.com>
14521
14522         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
14523         virtual generic methods.  We call a special helper_compile_generic_method()
14524         icall to retrieve the method from the vtable, inflate and compile
14525         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
14526
14527         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
14528
14529 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
14530
14531         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
14532
14533 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
14534
14535         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
14536         Fixes #69929.
14537
14538 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
14539
14540         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
14541         platforms with PIC aot.
14542
14543 2004-11-28  Martin Baulig  <martin@ximian.com>
14544
14545         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
14546         Fixes gen-112.cs.
14547
14548 2004-11-28  Martin Baulig  <martin@ximian.com>
14549
14550         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
14551         the result of mono_type_get_underlying_type() to check whether
14552         we're byref.
14553
14554 2004-11-26  Martin Baulig  <martin@ximian.com>
14555
14556         * mini.c
14557         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
14558         in the g_assert().
14559
14560 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
14561
14562         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
14563         the same way as the other arguments so they won't get clobbered.
14564
14565         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
14566         calls through R11 since it is clobbered by the trampoline code.
14567
14568 2004-11-26  Raja R Harinath  <rharinath@novell.com>
14569
14570         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
14571         pick up in-tree mscorlib.dll.
14572
14573 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
14574
14575         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
14576
14577         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
14578         runtime data/code are now stored in a table similar to the GOT in ELF. 
14579         This allows the code itself to be position independent.
14580
14581         * aot.c: Fix loading of referenced assemblies after the lazy assembly
14582         loading changes.
14583
14584         * aot.c: Attach ELF type (object/function) directives to all global
14585         symbols.
14586
14587         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
14588
14589         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
14590
14591         * mini-amd64.h: Turn on PIC AOT code.
14592
14593         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
14594         returning the offset within an OP_AOTCONST instruction where the GOT
14595         offset needs to be added.
14596
14597         * mini.h: Bump AOT file format version.
14598
14599 2004-11-25  Martin Baulig  <martin@ximian.com>
14600
14601         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
14602         uninflated generic methods.
14603
14604 2004-11-25  Martin Baulig  <martin@ximian.com>
14605
14606         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
14607
14608 2004-11-24  Martin Baulig  <martin@ximian.com>
14609
14610         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
14611         original klass (this only applies for generic instances).
14612
14613 2004-11-24  Martin Baulig  <martin@ximian.com>
14614
14615         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
14616         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
14617         that array).
14618
14619 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
14620
14621         * mini.c (mono_method_to_ir): Disable inlining for methods containing
14622         localloc. Fixes #69678.
14623
14624         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
14625         
14626 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
14627
14628         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
14629         used SSE registers on pinvoke calls. Fixes #69774.
14630
14631 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
14632
14633         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
14634         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
14635
14636 2004-11-23  Raja R Harinath  <rharinath@novell.com>
14637
14638         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
14639         Refer directly to the mcs/ tree.
14640
14641 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14642
14643         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
14644         Check if a trampoline for a synchronized method is required. 
14645
14646 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
14647
14648         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
14649         with localloc if needed. Throe arithmetric exception in
14650         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
14651         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
14652
14653 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
14654
14655         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
14656         types before switching on type.  Fixes #69622.
14657
14658 2004-11-19  Raja R Harinath  <rharinath@novell.com>
14659
14660         * Makefile.am (check-local): New.  Integrate into 'make check'.
14661         (MCS,RUNTIME): Define using in-tree mono and mcs.
14662         (ILASM): New.
14663         (%.exe): Use $(ILASM).
14664
14665 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
14666
14667         * mini-ppc.c: adjust initial prolog size (bug #69691).
14668
14669 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
14670
14671         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
14672         #69664.
14673
14674 2004-11-17  Raja R Harinath  <rharinath@novell.com>
14675
14676         * Makefile.am (clean-local): Rename from 'clean'.
14677
14678 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14679
14680         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
14681         to mono_arch_is_int_overflow. 
14682         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
14683         SIGFPE events.
14684
14685 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
14686
14687         * declsec.c|h: New files to support declarative security attributes.
14688         Added function to check if a method has (applicable) security.
14689         * mini.c|h: Add check for declarative security attributes in
14690         mono_method_check_inlining.
14691         * Makefile.am: Added declsec.c and declsec.h to the build.
14692
14693 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
14694
14695         * mini.c, mini.h: update to keep dynamic code info per-domain.
14696
14697 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
14698
14699         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
14700         (mini_init): Get rid of it from here too.
14701
14702 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
14703
14704         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
14705         implemented OP_RETHROW (patch by Geoff Norton
14706         <gnorton@customerdna.com>).
14707
14708 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
14709
14710         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
14711         between appdomains.  Fixes appdomain-unload on PPC.
14712
14713 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
14714
14715         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14716         mini-exceptions.c: handle the new wrapper types.
14717         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
14718         token value as a MonoClass* when compiling a wrapper.
14719         mono_jit_create_remoting_trampoline now takes an additional
14720         MonoRemotingTarget parameter.
14721         
14722 2004-11-10  Martin Baulig  <martin@localhost>
14723
14724         * mini.c (mono_method_to_ir): Use `generic_container->context'
14725         rather than creating a new one.
14726
14727 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14728
14729         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
14730
14731         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
14732
14733 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
14734
14735         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
14736         the experimental aot cache stuff.
14737
14738 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14739
14740         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14741         mini-exceptions.c: update to exception clause structure changes.
14742
14743 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
14744
14745         * exceptions-x86.c (throw_exception): Fix warnings.
14746
14747         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
14748         for OP_RETHROW.
14749
14750 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
14751
14752         * exceptions-sparc.c (get_throw_exception): Really fix this.
14753
14754 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
14755
14756         * tramp-*.c: we no longer support icalls without wrappers, so
14757         a bit of code can be removed here
14758
14759 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
14760
14761         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
14762         patch.
14763
14764         * cpu-sparc.md: Add op_rethrow.
14765
14766         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
14767
14768         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
14769
14770         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
14771         * mini-ops.h: Add OP_RETHROW.
14772
14773         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
14774
14775         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
14776
14777 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
14778         
14779         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
14780         Makes the output much easier to read
14781
14782 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
14783
14784         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
14785         prevents another huge leak when compiling with ssa. Secondly, the
14786         performance of doing this rather than freeing the lists is much
14787         better. GList does a lock every time you allocate a list link,
14788         so that it can use a memory pool. So, it is better to just use
14789         a memory pool of our own.
14790         
14791         * ssa.c, linear-scan.c: replace g_list_remove_link with
14792         g_list_delete.  The remove one does not free the GList, so we were
14793         leaking memory. On -O=all --compile-all with corlib, this cut down
14794         3 MB of allocations.
14795
14796 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
14797
14798         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
14799
14800         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
14801
14802         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
14803         into a new function mono_create_jit_trampoline ().
14804
14805 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
14806
14807         * trace.c (get_spec): Allow tracing of classes without a namespace.
14808
14809 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
14810
14811         * mini.c: Fix pointer overwrite in mini_method_compile.
14812
14813 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
14814
14815         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
14816         The darwin ABI needs some special handling for 1 and 2 byte structs
14817         Lets use lbz/lhz instead of lwz everywhere.
14818         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
14819         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
14820         Use stb/sth for the former, and put the latter always on stack instead of in
14821         argument registers.
14822
14823 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
14824
14825         * trace.c (is_filenamechar): Add '_'.
14826
14827 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
14828
14829         * mini-s390.c: Fix prolog length to allow for large trace requirements.
14830
14831         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
14832
14833 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
14834
14835         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
14836         depends on libmonogc. Fixes #68805.
14837
14838 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
14839
14840         * mini.c (mono_jit_free_method): Provide extra information for
14841         this error.  Currently this leaks, but will be turned into a
14842         developer option in the future.
14843
14844 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
14845
14846         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
14847
14848 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
14849
14850         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
14851         boundary. Fixes reading of PATCH_INFO_R4 and R8.
14852         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
14853
14854 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
14855
14856         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
14857         trampolines for AOT code.
14858
14859 2004-10-22    <vargaz@freemail.hu>
14860
14861         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
14862         constructed types. Fixes #68136.
14863
14864 2004-10-21  Martin Baulig  <martin@ximian.com>
14865
14866         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
14867         if it returns true, unwind the stack to the call instruction.
14868
14869 2004-10-21    <vargaz@freemail.hu>
14870
14871         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
14872
14873         * mini.h: Bump AOT version number.
14874
14875         * objects.cs: Add another test for unbox trampolines.
14876
14877         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
14878         valuetype methods.
14879
14880 2004-10-20    <vargaz@freemail.hu>
14881
14882         * driver.c: Add SHARED to the set of optimizations tested.
14883
14884         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
14885
14886         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
14887         used by CEE_NEWARR.
14888
14889         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
14890
14891 2004-10-20  Martin Baulig  <martin@ximian.com>
14892
14893         * mini-exceptions.c (mono_handle_exception): Call
14894         mono_debugger_handle_exception() to tell the debugger about
14895         catch/finally clauses.
14896
14897 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
14898
14899         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
14900
14901         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
14902         #68447.
14903
14904 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
14905
14906         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
14907         methods as their native size, fixed bug #57543, #57545.
14908         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
14909         This saves a temporary register and mullw call down into 1 (minor perf
14910         increase for cases like sum = sum * 5;  This use to translate into:
14911             li r11,5
14912             mullw r28,r28,r11
14913         It now translates to
14914             mulli r28,r28,5
14915
14916 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
14917
14918         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
14919         #68388.
14920
14921 2004-10-11  Martin Baulig  <martin@ximian.com>
14922
14923         * mini.c (mono_method_to_ir): If we're a generic method, get the
14924         MonoGenericContainer from our MonoMethodNormal and create a
14925         MonoGenericContext from it.
14926
14927 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
14928
14929         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
14930
14931         * basic-long.cs: Add test for checked i8->i2 cast.
14932
14933 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14934
14935         * inssel-ppc.brg: added a couple of speedup rules.
14936
14937 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
14938
14939         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
14940         to speed up rebuilds.
14941
14942 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14943
14944         * mini-s390.c: Minor fix to OP_OR_IMM.
14945
14946 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
14947
14948         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
14949         better. Fixes appdomain-unload.exe on sparc.
14950
14951 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
14952
14953         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
14954         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
14955         see bug 67324.
14956
14957 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
14958
14959         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
14960
14961 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
14962
14963         * mini.c: Always generate a field read/write wrapper for members
14964         of the class MarshalByRefObject since the actual instance could
14965         be a CBO.
14966
14967 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
14968
14969         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
14970
14971 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
14972
14973         * driver.c mini.h trace.c: Move the setting of the main assembly into
14974         a separate function called mono_trace_set_assembly () and call it after
14975         actually loading the main assembly. Fixes #66872.
14976
14977 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
14978
14979         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
14980         using the code manager.
14981
14982 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
14983
14984         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
14985
14986 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
14987
14988         * cpu-amd64.md: Fix bug in previous patch.
14989         
14990         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
14991         #66650.
14992
14993 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
14994
14995         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14996         mini-exceptions.c: updates for changed stack walk interface.
14997
14998 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14999
15000         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
15001
15002 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
15003
15004         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
15005
15006 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
15007
15008         * driver.c (mini_regression_list): Do not call mono_assembly_close 
15009         since assemblies can't be unloaded.
15010         
15011 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
15012
15013         * cpu-amd64.md: Fix more instruction lengths.
15014
15015         * cpu-amd64.md: Fix lengths of some instructions.
15016
15017 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
15018
15019         * inssel.brg: Make the array ldelema check aot friendly.
15020
15021 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
15022
15023         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
15024
15025         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
15026
15027 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
15028
15029         * mini-x86.c: Fix build.
15030
15031         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
15032         mono_type_get_underlying_type () helper function to simplify code.
15033         
15034 2004-09-09  Martin Baulig  <martin@ximian.com>
15035
15036         * mini-amd64.c: Don't access `type->data.klass' directly, call
15037         mono_class_from_mono_type() instead since the type may be a
15038         generic instance.
15039
15040 2004-09-09  Martin Baulig  <martin@ximian.com>
15041
15042         * mini-amd64.c (get_call_info): Fix support for generic instances.
15043         (add_valuetype): Use mono_class_from_mono_type() to get the class
15044         since we can be a generic instance.
15045
15046 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
15047
15048         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
15049
15050 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
15051
15052         * liveness.c: reset spill costs on each scan: bug 62107
15053
15054 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
15055
15056         * exceptions-sparc.c (mono_arch_find_jit_info): remove
15057         unnecessary line that doesn't compile
15058
15059 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
15060
15061         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
15062         trampolines, make them call an error function so people can fix their
15063         code.
15064
15065 2004-09-06  Martin Baulig  <martin@ximian.com>
15066
15067         * mini.c (mono_method_to_ir): When initializing locals, handle a
15068         generic instances like a valuetype if it's a valuetype and like a
15069         class if it's a class.
15070
15071 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
15072
15073         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
15074         stack. Fixes #64674.
15075
15076         * exceptions.cs: Add test for unwinding of call arguments.
15077
15078 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
15079
15080         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
15081         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
15082         set the carry/borrow flag). The sparc and s390 implementations
15083         can now use optimized versions (and simplify the code). ppc bugfixes.
15084
15085 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
15086
15087         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
15088
15089 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
15090
15091         * inssel-amd64.brg: Remove leftover 32 bit rule.
15092
15093         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
15094
15095 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
15096
15097         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
15098         mono_arch_find_jit_info functions into a new function. Fix a memory
15099         leak.
15100
15101         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
15102         refactored code.
15103         
15104 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
15105
15106         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
15107         as well.
15108         
15109         * exceptions.cs: Add array size tests.
15110
15111         * mini.c: Allocate a separate icall wrapper for each arity of 
15112         mono_array_new_va. Fixes #59509.
15113
15114         * exceptions.cs: Add testcase for 64578.
15115
15116         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
15117
15118         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
15119         
15120 2004-09-02  Martin Baulig  <martin@ximian.com>
15121
15122         * mini.c (mono_method_to_ir): When initializing the locals, call
15123         handle_initobj() on the generic instance itself, not its
15124         underlying type.
15125
15126 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
15127
15128         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
15129         MonoJitInfo for dynamic methods.
15130
15131         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
15132
15133         * mini.c: Add support for freeing JIT data for dynamic methods.
15134         
15135 2004-09-01  Martin Baulig  <martin@ximian.com>
15136
15137         * mini-x86.c (is_regsize_var): Added support for generic
15138         instances.
15139         (mono_arch_emit_prolog): Make this compile again, use
15140         `x86_push_imm_template (code)'.
15141
15142 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
15143
15144         * mini-x86.c: make all push_imm instructions that get
15145         patched always emit the long form
15146
15147 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
15148
15149         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
15150         in a per-domain hash.
15151
15152         * mini-amd64.c (merge_argument_class_from_type): Handle generic
15153         types.
15154
15155 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
15156
15157         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
15158         work.
15159         
15160         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
15161         work.
15162
15163         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
15164         Beginnings of SSE2 support.
15165
15166         * exceptions.cs: Add more tests for checked int<->uint casts.
15167
15168 2004-08-28  Martin Baulig  <martin@ximian.com>
15169
15170         * mini-x86.c (mono_arch_instrument_epilog): Added support for
15171         generic instances.
15172
15173         * mini.c
15174         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
15175         Handle generic instances recursively.
15176
15177 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15178
15179         * iltests.il: test for conv.u8 on a constant
15180
15181 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15182
15183         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
15184         LCONV_x4 (shrun_32 (membase)).
15185
15186 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15187
15188         * inssel-x86.brg: c&p rules for push/setret of long
15189
15190 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
15191
15192         * inssel-x86.brg: c&p rules for compare (base, regvar) and
15193         compare (regvar, base)
15194
15195         * inssel-x86.brg: more burg love
15196
15197         * inssel.brg: more cleanup
15198
15199         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
15200
15201 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
15202
15203         * basic-long.cs, basic-calls.cs: new tests for optimization.
15204
15205 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
15206
15207         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
15208         patch.
15209
15210 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
15211
15212         * mini-amd64.c (read_tls_offset_from_method): Add another case.
15213         
15214 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
15215
15216         * inssel.brg (mini_emit_memcpy): use 
15217         NO_UNALIGNED_ACCESS to disable memcpy optimization
15218
15219 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
15220
15221         * mini-amd64.c: Handle generic types in various places.
15222
15223         * mini.c (mono_method_to_ir): Handle generic types in init locals.
15224
15225 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
15226
15227         * mini.c (handle_box): Fix warning.
15228
15229         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
15230
15231         * mini-amd64.h: Enable the emit_state optimization.
15232
15233         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
15234
15235         * mini-amd64.c: Add some new 64 bit peephole opts.
15236
15237         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
15238
15239         * cpu-amd64.md: sreg1 of div instructions must be %rax.
15240
15241         * mini-amd64.c: Register allocator fixes.
15242
15243         * mini.c: Add an optimization to emit_state to avoid allocation of new
15244         registers on some platforms.
15245
15246 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
15247
15248         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
15249
15250         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
15251         allocation. Fixes #63085.
15252
15253         * basic-long.cs: Add new regression test.
15254
15255         * mini-amd64.c: Register allocator improvements.
15256
15257 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
15258
15259         * mini-amd64.c (read_tls_offset_from_method): Add another code
15260         sequence.
15261
15262         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
15263         instruction sequence for nullifying class init trampolines.
15264
15265         * objects.cs: Add new regalloc test.
15266
15267         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
15268
15269 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
15270
15271         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
15272         
15273         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
15274         arguments.
15275
15276         * driver.c: Fix profiling after TLS changes.
15277         
15278         * driver.c (mono_main): Set mono_stats.enabled if needed.
15279
15280         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
15281         CEE_BOX.
15282
15283 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
15284
15285         * mini-x86.c: use a 1 op rather than a 2 op tls access
15286         instruction -> faster.
15287
15288 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
15289
15290         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
15291         x86 backend.
15292
15293 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
15294
15295         * exceptions-sparc.c (throw_exception): fix typo
15296
15297 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
15298
15299         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
15300         set tree->dreg correctly with tls. Allow any
15301         register to be used.
15302
15303         * mini-x86.c (read_tls_offset_from_method): add new code
15304         generation pattern seen with GCC.
15305
15306
15307 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
15308
15309         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
15310         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15311         exceptions-sparc.c: fix some performance issues in exception
15312         handling and setting of the stack trace for exceptions that were
15313         already thrown.
15314
15315 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
15316
15317         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
15318         x86 backend.
15319         
15320         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
15321         registers.
15322
15323 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
15324
15325         This patch inlines tls access, when possible.
15326         
15327         * mini.h: new arch functions for TLS intrinsics.
15328         All platforms updated with a stub.
15329
15330         * mini.c: use the new intrinsics
15331
15332         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
15333         arch specific intrinsic for tls variables
15334
15335 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
15336
15337         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
15338         under windows.
15339
15340 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
15341
15342         * mini.c: thread local allocation
15343
15344 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
15345
15346         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
15347
15348         * Makefile.am: Link against the static version of libmonogc.
15349         
15350         * Makefile.am: Link the static versions of the convenience libraries
15351         into the mono executable.
15352
15353         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
15354
15355 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
15356
15357         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
15358         on integer overflow.
15359
15360         * mini-amd64.c: Reorganize function call code.
15361
15362         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
15363
15364 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
15365
15366         * inssel-x86.brg: use xor eax,eax.
15367         
15368         * basic.cs: new tests
15369
15370 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
15371
15372         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
15373         in exception throwing code.
15374         
15375 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
15376
15377         * inssel-x86.brg: use xor esi,esi.
15378
15379 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
15380
15381         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
15382         can trace methods compiled during mini_init () too.
15383
15384         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
15385         CEE_CONV_U4.
15386
15387 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
15388
15389         * Makefile.am: static link on x86 (r=zoltan)
15390
15391 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
15392
15393         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
15394         code since it causes some programs to fail.
15395
15396 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
15397
15398         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
15399
15400 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
15401
15402         * mini.c: ovfops_op_map - add STACK_OBJ case for
15403         CONV_I 
15404         * basic.cs: add test_0_pin_string as test
15405         case for above.
15406
15407 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
15408
15409         * Makefile.am: build C# if srcdir != builddir
15410
15411 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
15412
15413         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
15414         fall-through blocks.
15415
15416 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15417
15418         * driver.c: enable loop by default again and include abcrem in -O=all.
15419
15420 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
15421
15422         * iltests.il: Add some localloc tests.
15423
15424         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
15425
15426         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
15427         Fixes #62574.
15428
15429         * inssel-amd64.brg: Add some optimizations.
15430
15431         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
15432         for gcc-3.4.
15433
15434         * Makefile.am: Statically link mono against libmono on AMD64.
15435         
15436         * mini-amd64.c inssel-amd64.brg: Optimizations.
15437
15438 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
15439
15440         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
15441
15442         * tramp-amd64.c: Patch calling code in trampolines.
15443
15444 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
15445
15446         * mini-amd64.c: pinvoke struct passing fixes.
15447
15448 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
15449
15450         * mini-sparc.c: redo change, make mono_arch_cpu_init call
15451         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
15452
15453 2004-08-05  Duncan Mak  <duncan@ximian.com>
15454
15455         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
15456         CEE_LDELEM_ANY.
15457
15458 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
15459
15460         * mini-amd64.c (emit_move_return_value): Move return value for normal
15461         calls too.
15462
15463 2004-08-05  Martin Baulig  <martin@ximian.com>
15464
15465         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
15466         `type->type'; just modify `type' itself when dealing with enums
15467         and generic instances.
15468         (check_call_signature): Make `simple_type' a `MonoType *'.
15469
15470 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
15471
15472         * mini.c: Use OP_PADD to add offsets to addresses.
15473
15474         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
15475
15476 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
15477
15478         * mini-sparc.c (mono_arch_emit_epilog): fix check
15479         for folding last op into restore instruction
15480
15481 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
15482
15483         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
15484         helper methods using the code manager.
15485         
15486         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
15487
15488         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
15489
15490 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15491         
15492         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
15493           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
15494
15495         * mini-s390.c: fix tail processing
15496
15497 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
15498
15499         * mini-ppc.c: mul.ovf.un exception name fix.
15500
15501 2004-08-03  Martin Baulig  <martin@ximian.com>
15502
15503         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
15504         instances; before jumping to `handle_enum', also modify `ptype'.
15505
15506 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
15507
15508         * cpu-sparc.md: fcall maximal length too small.
15509
15510 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
15511
15512         * mini-amd64.c mini.h: Add initial support for passing/returning 
15513         structures to/from pinvoked methods.
15514
15515 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
15516
15517         * mini-ppc.c: reg allocator fix.
15518
15519 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
15520
15521         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
15522
15523         * inssel.brg: Optimize memset on 64 bit machines.
15524
15525         * mini-amd64.c: Fix some vararg cases.
15526
15527 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15528
15529         * mini-s390.c: Corrected macro in emit_float_to_int
15530
15531         * s390-abi.cs: Tests to exercise the s390 ABI
15532
15533 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
15534
15535         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
15536         caller saved regs.
15537
15538         * basic.cs: Add a test for add.ovf.un.
15539
15540 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
15541
15542         * mini-sparc.c: add case for OP_IDIV_UN
15543
15544 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
15545
15546         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
15547         
15548         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
15549
15550 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
15551
15552         * basic.cs: regression tests.
15553
15554         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
15555         regressions.
15556
15557 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
15558
15559         * basic.cs: Add a new test.
15560
15561         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
15562         and AOT. Various fixes and optimizations.
15563
15564         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
15565
15566 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
15567
15568         * mini-ppc.c: make sure temp regs are not used for global reg
15569         allocation.
15570
15571 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
15572
15573         * cpu-sparc.md: conv_i8 fix for 64bits
15574
15575         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
15576
15577 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
15578         
15579         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
15580         add opcode for cmp BYTE PTR [eax], imm.
15581
15582         * inssel.brg: Make memcpy and memset takes bases.
15583
15584 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
15585
15586         * *-amd64.*: More AMD64 work.
15587         
15588 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
15589
15590         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
15591         add a compare-not-equal opcode.
15592         
15593 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
15594
15595         * mini.c: Use mono_init_from_assembly instead of mono_init.
15596         
15597 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
15598
15599         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
15600
15601         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
15602
15603         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
15604
15605         * inssel.brg: 64 bit fixes.
15606
15607         * mini.h (MonoCallInst): Add some AMD64 specific data.
15608
15609         * mini.h: Add some OP_P opcodes.
15610
15611 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
15612
15613         * basic.cs: tests for 61797 and 61740
15614
15615 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
15616
15617         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
15618         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
15619
15620 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
15621
15622         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
15623
15624         * *-amd64*.*: Ongoing AMD64 work.
15625
15626 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
15627
15628         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
15629
15630         * *-amd64*: Ongoing AMD64 work.
15631
15632         * mini-arch.h: Add AMD64 support.
15633
15634         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
15635
15636         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
15637
15638         * mini-ops.h: Add new opcodes.
15639
15640         * Makefile.am: Add AMD64 support.
15641
15642         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
15643         rules into the inssel-long*.brg files.
15644
15645         * *-amd64.*: Add beginnings of AMD64 backend.
15646
15647 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
15648
15649         * mini.c (print_dfn): commenting out the code that prints
15650         the cil. With -O=deadce, this makes -v -v crash.
15651         
15652         * cpu-pentium.md: make checkthis have a length of 2
15653
15654 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
15655
15656         * mini-sparc.h: fix implementations of __builtin
15657         functions for Sun compiler for V9.
15658
15659 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
15660
15661         * mini.c: use the new stelem.ref wrapper
15662         * exceptions.cs, arrays.cs: new stelem.ref tests
15663
15664 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
15665
15666         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
15667         new XSP should work with these changes).
15668
15669 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
15670         
15671         * inssel-{long32,x86,}.brg: trivial optimizations.
15672         
15673 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
15674
15675         * mini.c: load value when emitting box operation in
15676         constrained calls.
15677
15678 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
15679
15680         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
15681         is one byte shorter than cmp DWORD PTR [eax], 0.
15682
15683 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
15684
15685         * inssel-ppc.brg: arguments on the stack are always
15686         relative to the stack pointer (spotted by Neale Ferguson).
15687
15688 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15689
15690         * exceptions-x86.c: delay appending the method name to the trace until
15691         after mono_jit_info_table_find is called, as this gets the real
15692         MonoMethod.
15693
15694 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
15695
15696         * aot.c: register roots
15697
15698 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
15699
15700         * aot.c : I could just use PLATFORM_WIN32 flag.
15701
15702 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
15703
15704         * aot.c : Reverting the previous fix. This time it broke linux build.
15705
15706 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
15707
15708         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
15709
15710 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
15711
15712         * mini.c (handle_stack_args): Remove some more debugging code.
15713         
15714         * mini.c (handle_stack_args): Remove debug output left in by mistake.
15715
15716         * driver.c mini.h aot.c: Allow additional options to be specified with
15717         --aot and pass them to mono_compile_assembly.
15718
15719         * aot.c: Add experimental code to AOT compile all loaded assemblies
15720         on demand and save the code into a cache in the filesystem.
15721
15722         * aot.c: Add support for more wrapper methods.
15723         
15724         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
15725         58863.
15726
15727         * cpu-*.md: Remove removed opcodes.
15728
15729         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
15730         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
15731         related icalls to marshal.c.
15732
15733 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
15734
15735         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
15736
15737         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
15738
15739         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
15740
15741 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
15742         * liveness.c: If liveness is recomputated we need to reset the information
15743         for each variable. This way, if the liveness range has been narrowed
15744         by optimizations that happened after the last computation, we can return
15745         a smaller range.
15746         
15747         For example, if you have
15748         
15749         {
15750                 int i = 0;
15751                 
15752                 // Tons of code that does not affect i
15753                 
15754                 i = foo ();
15755                 ...
15756         }
15757         
15758         i = 0 is dead code and will be removed by SSA. However, when
15759         linear scan gets to the code, i will still appear to be live
15760         throughout the entire block. This prevents good register allocation.
15761
15762 2004-07-06  Martin Baulig  <martin@ximian.com>
15763
15764         * debug-mini.c (mono_debug_init_method): Allow
15765         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
15766         (mono_debug_add_icall_wrapper): New method.
15767
15768         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
15769
15770 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
15771
15772         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
15773         optimization.
15774
15775 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
15776
15777         * aot.c (mono_aot_load_method): Fix loading of debug info.
15778
15779 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
15780
15781         * aot.c: Add logging support.
15782
15783 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
15784
15785         * mini.h: Add prototype for mono_print_method_from_ip.
15786
15787         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
15788
15789         * inssel.brg: 64 bit fixes.
15790
15791         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
15792         inssel-long32.brg.
15793
15794         * Makefile.am: Add SPARC64 support.
15795
15796 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
15797
15798         * aot.c: Fix alignment problems on 32 bit platforms.
15799
15800 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
15801
15802         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
15803         SPARC64.
15804
15805         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
15806         problems.
15807
15808         * mini.h: Bump AOT file version. Some 64 bit fixes.
15809
15810 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
15811
15812         * inssel-sparc.brg: Add new rule to avoid register moves.
15813
15814         * inssel.brg: Add ldind_to_load_membase helper function.
15815
15816 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
15817
15818         * mini.c: OffsetToStringData intrinsic.
15819         
15820 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
15821
15822         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
15823
15824         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
15825         regression tests.
15826
15827         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
15828 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
15829
15830         * mini.c: reinstated mono_compile_get_interface_var()
15831         on x86, too, since the change breaks the Gtk# build there as well.
15832
15833 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15834
15835         * driver.c: remove loop from the default optimizations: it seems to
15836         interact badly with some of the other options (see bug #60613).
15837
15838 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
15839
15840         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
15841         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
15842
15843 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
15844
15845         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
15846         vararg-using methods.
15847
15848 2004-06-21  Martin Baulig  <martin@ximian.com>
15849
15850         * mini/mini-exceptions.c
15851         (mono_handle_exception): Added `gpointer original_ip' argument.
15852         After calling mono_unhandled_exception(), call
15853         mono_debugger_unhandled_exception() and if that returns true,
15854         restore the context and return.
15855
15856 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
15857
15858         * mini-ppc.c: prefer the use of relative branches so
15859         they won't need to be patched in aot code (patch from Patrick Beard).
15860
15861 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
15862
15863         * aot.c: patch from Patrick Beard to make the output assembly
15864         more correct for the MacOSX assembler. Small tweak to
15865         generate sane images on Linux/PPC, too.
15866
15867 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15868
15869         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
15870         case until bug #59509 is fixed (shows up in #60332).
15871
15872 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15873
15874         * mini.c: make sure the needed wrappers are compiled, too, with
15875         precomp.
15876
15877 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
15878
15879         * driver.c: remove NPTL reference in --version output.
15880
15881 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15882
15883         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
15884         generate valid assembly for the Mach-O assembler.
15885
15886 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
15887
15888         * driver.c: don't include abcrem in the all optimization specifier
15889         since it slows down jit compilation too much for now.
15890
15891 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
15892
15893         * mini.c: use BIGMUL only if both operands have the same signage.
15894         * iltests.il: Test for bug 60056. (errors related to signage in
15895         BIGMUL).
15896
15897         r=lupus.
15898
15899 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
15900
15901         * mini.c, aot.c: memory leak fixes.
15902
15903 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
15904
15905         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
15906
15907 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
15908
15909         * Makefile.am: remove the -static hack completely, it links in
15910         statically glib as well.
15911
15912 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
15913
15914         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
15915         * exceptions.cs: make it compile with new mcs/csc.
15916
15917 2004-06-03 Massimiliano Mantione <massi@ximian.com>
15918         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
15919         and added relevant test case.
15920
15921 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
15922
15923         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
15924         regressions in gtk-sharp.
15925
15926 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
15927
15928         * exceptions.cs: New regression tests.
15929
15930         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
15931
15932 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
15933
15934         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
15935
15936 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
15937
15938         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
15939
15940         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
15941
15942 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
15943
15944         * mini.c (mono_jit_runtime_invoke): Init class in this
15945         method instead of trusting mono_jit_compile_method to
15946         do the work (because wrappers can be in object class)
15947
15948 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
15949
15950         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
15951
15952         * basic-long.cs: New regression test.
15953
15954 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
15955
15956         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
15957         and div/rem checks.
15958
15959 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
15960
15961         * Makefile.am: fix miguel's change to build mono statically against
15962         libmono (track build dependencies).
15963
15964 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
15965
15966         * cfold.c: Some glib versions do not have G_MININT32.
15967
15968 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
15969
15970         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
15971         with precision of tan, atan, sin and cos, and implemented related
15972         regressions tests (fixes bug 54467, but one new problem appeared and
15973         is not fixed yet).
15974
15975 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
15976
15977         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
15978
15979         * exceptions.cs: Add test for constant folding && division by zero.
15980
15981         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
15982         since driver.c is in libmono too, so the optimization was useless.
15983
15984         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
15985         variable to driver.c so the compiler can emit more efficient code to
15986         access them.
15987
15988 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15989
15990         * Makefile.am: don't distribute generated inssel.[ch] files.
15991
15992 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
15993
15994         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
15995         into the default appdomain. Fixes #58707.
15996
15997         * jit-icalls.c: Remove the broken approximation for truncl, doing
15998         no conversion is better.
15999
16000         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
16001         Fixes #58863.
16002
16003 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16004
16005         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
16006         of the mcrxr instruction which is not available on some processors
16007         even if it's documented to be. Implement add and sub overflow correctly
16008         (still not complete for long unsigned). Speed up icalls a bit.
16009
16010 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
16011
16012         * mini.c (mono_jit_compile_method_with_opt): Make sure that
16013         we run .cctor in the current domain instead of target_domain.
16014         
16015         Fixes bug #58558, .cctor not being called in -O=shared.
16016
16017 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16018
16019         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
16020
16021 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
16022
16023         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
16024         which can be done with an imm8, do it that way.
16025         (mono_arch_output_basic_block): ditto for a jmp
16026         (mono_arch_emit_prolog): Computate maximum offset of a label.
16027
16028 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
16029
16030         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
16031         now tries to allocate prefered physical reg's for virtual
16032         regs. This reduces the number of emited spills/loads with
16033         20-30% on our core assemblies.
16034
16035 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16036
16037         * jit-icalls.c: truncl() is not needed and trunc() is
16038         the correct thing to do anyway (bug #58287).
16039
16040 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
16041
16042         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
16043         if available.
16044
16045 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
16046
16047         * driver.c: enable loop optimizations by default.
16048
16049 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
16050
16051         * mini-x86.c: fix calc of max loop size when aligning loops start.
16052
16053 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
16054
16055         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
16056         the stack.
16057
16058 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
16059
16060         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
16061         should set carry.
16062
16063         * basic-long.cs: Add tests for add/subtract of immediates with carry.
16064
16065         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
16066         
16067         * mini.c (inline_method): Allways inline some wrappers even if the cost
16068         is too large. Fixes #58785.
16069
16070         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
16071         
16072 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
16073
16074         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
16075         (crichton@gimp.org). Beginning of support for sparc/linux.
16076
16077         * mini-sparc.c: Optimize retrieval of LMF address.
16078
16079 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
16080
16081         * exceptions-ppc.c:  handle alloca in methods with clauses.
16082
16083 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
16084
16085         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
16086
16087 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
16088
16089         * mini.c: Delegate most of the abort signal work to 
16090           mono_thread_request_interruption, which also handles Stop and Suspend
16091           states.
16092
16093 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
16094
16095         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
16096         supports the save/restore lmf opcodes.
16097
16098 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
16099
16100         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
16101         by gcc-3.4 as well.
16102
16103         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
16104
16105 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
16106
16107         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
16108         methods which contain array accesses.
16109
16110         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
16111         boundaries. Fixes #58537.
16112
16113         * iltests.il: Add regression test for #58537.
16114
16115 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
16116
16117         * mini-x86.c (mono_arch_local_regalloc): Last part of
16118         fix for bug #58633 (releasing register to early).
16119
16120 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
16121
16122         * basic-long.cs: Add new regression test.
16123
16124 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
16125
16126         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
16127         register too early on the chain.
16128
16129 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
16130
16131         * mini.c (create_helper_signature): Use a helper function to reduce
16132         the code which needs to be written. Also set the calling convention of
16133         icalls on windows. Fixes #57840.
16134
16135 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
16136
16137         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
16138         exceptions-ppc.c: added helper function to get the instruction address
16139         from a signal handler context.
16140
16141 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16142
16143         * helpers.c: use g_get_tmp_dir. Invokes happyness 
16144         from gonzalo.
16145
16146 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16147
16148         * helpers.c: Add new env variable to pass args to objdump.
16149         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
16150
16151 2004-05-17  Radek Doulik  <rodo@ximian.com>
16152
16153         * Makefile.am (common_sources): added abcremoval.h so it get
16154         disted and daily mono packages on go-mono.com will build again
16155
16156 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
16157
16158         * abcremoval.c: Fixed coding style, added copyright header.
16159
16160         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
16161
16162         * mini.h: Added prototype for abc removal main function.
16163
16164         * build_relations_propagation_table.pl: Added copyright header.
16165
16166 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
16167
16168         * basic-long.cs: reg test for complex ceq_long bug.
16169
16170 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
16171
16172         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
16173         reg in long and clob case (bug #58343). Fixed/added comments.
16174
16175 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
16176
16177         * mini.c (mono_jit_runtime_invoke): Follow new convention
16178         of calling the invoke method with an function pointer.
16179
16180 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
16181
16182         * ChangeLog: Fix author of memory leak patch.
16183
16184 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
16185
16186         * Makefile.am: fix make dist as well...
16187
16188
16189 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
16190
16191         * cfold.c: Made so that conversions from pointer to int4 are no-ops
16192         on archs where pointers are 4 bytes long.
16193
16194         * Makefile.am: Added abcremoval.c source file.
16195
16196         * abcremoval.c: Added abcremoval.c.
16197
16198         * abcremoval.h: Added abcremoval.h.
16199
16200         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
16201
16202         * inssel.brg: Enabled bounds check removal.
16203
16204         * mini.c: Added support for abcrem optimization.
16205
16206         * mini.h: Added abcrem optimization label.
16207
16208         * driver.c: Added support for abcrem optimization.
16209
16210         * propagated_relations_table.def: Added propagated_relations_table.def.
16211
16212 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
16213
16214         * mini.c, cfold.c: fix style.
16215
16216 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16217
16218         * mini.c: handle issue with the low-level implementation of
16219         some long opcodes (bug #54209).
16220
16221 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
16222
16223         * basic.cs: test for my new cmov stuff.
16224
16225 2004-05-13      Patrik Torstensson
16226
16227         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
16228         opt and added peephole documentation.
16229
16230 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
16231
16232         * tramp-ppc.c: rewrote the generic trampoline code.
16233
16234 2004-05-11      Patrik Torstensson
16235
16236         * mini-x86.c: optimize long shl/shr asm code (one less branch)
16237
16238 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
16239
16240         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
16241
16242         * mini.h mini.c dominators.c: Applied patch from Derek Woo
16243         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
16244
16245         * mini.c: Add new icalls for AsAny marshalling.
16246
16247 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
16248
16249         * tramp-ppc.c, mini-ppc.c: more cleanups.
16250
16251 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16252
16253         * mini.c: no warnings.
16254
16255 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16256
16257         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
16258
16259 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
16260
16261         * mini.c: In the thread abort signal handler, if the thread is in the
16262         process of being stoped, don't throw the Abort exception, just stop the
16263         thread.
16264
16265 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
16266
16267         * tramp-ppc.c: removed old code.
16268
16269 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16270
16271         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
16272         do some simple speed optimizations on ppc.
16273
16274 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
16275
16276         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
16277         and large offsets in load/store.
16278
16279 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
16280
16281         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
16282         it causes regressions.
16283
16284 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
16285
16286         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
16287         support.
16288
16289 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16290
16291         * jit-icalls.c: remove warnings.
16292         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
16293         speedups for unsafe code.
16294
16295 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
16296
16297         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
16298
16299 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
16300
16301         * basic-calls.cs: Add new regression test.
16302
16303         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
16304         more portable.
16305
16306         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
16307
16308         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
16309         is no longer used.
16310
16311 2004-05-06      Patrik Torstensson
16312
16313         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
16314         long reg allocation in any reg (not only eax:edx) and implemented 
16315         long shl/shr ops in asm instead of helpers.
16316
16317 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
16318
16319         * mini-sparc.h: Fix warnings.
16320
16321         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
16322         stack.
16323
16324         * mini-exceptions.c (mono_handle_exception): Call the filter in a
16325         separate statement for clarity.
16326
16327         * mini-sparc.c: Update status.
16328
16329 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
16330
16331         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
16332         here.
16333
16334 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16335
16336         * inssel-ppc.brg: another small pre-release workaround:
16337         we don't do overflow detection for long_sub_un.
16338
16339 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16340
16341         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
16342         (also works around a weird ppc bug: 57957).
16343
16344 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
16345
16346         * tramp-ppc.c: trampoline fixes.
16347
16348 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
16349
16350         * mini-ppc.c: fixed typos.
16351
16352 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
16353
16354         * mini-ppc.c, exceptions-ppc.c: more code saves registers
16355         at the top of the stack. Fixed typos. Use a frame registers
16356         for all the methods with exception clauses.
16357
16358 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16359
16360         * exceptions-ppc.c: restore fp registers.
16361
16362 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16363
16364         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
16365         order from the stack top (moved the stack room to save the
16366         return value for trace after the param area). Fixed corruption
16367         in restoring registers on unwind.
16368
16369 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
16370
16371         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
16372
16373 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16374
16375         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
16376         and prolog/epilog for methods that use it. Allow
16377         enough param area room for varargs methods. Fix miguel's
16378         breakage in exception handling.
16379
16380 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16381
16382         * Makefile.am: run genmdesc only on current arch.
16383
16384 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16385
16386         * exceptions-x86.c:
16387         * mini-x86.h: fix the build on windows.
16388
16389 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
16390
16391         * 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.
16392
16393         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
16394
16395         * mini-exceptions.c: New file.
16396         
16397         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
16398         Move some parts of the x86 exception handling code to an 
16399         arch-independent file so it can be shared with other ports.
16400
16401 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
16402
16403         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
16404
16405 2004-04-26  David Waite  <mass@akuma.org>
16406
16407         * driver.c: remove comma from end of enumeration declaration
16408
16409 2004-04-26  Jackson Harper  <jackson@ximian.com>
16410
16411         * driver.c: parse config file before loading first assembly. This
16412         allows the user gac to be enabled/disabled. 
16413         
16414 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
16415
16416         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
16417         simpler mechanism: we do not care what is encoded initially
16418         (branch absolute or relative), we care about the code and its
16419         target.  I kept the old code for reference for now.
16420
16421         The new code tries first to determine if the jump is anywhere in
16422         the -/+32 absolute meg range, if it succeeds, it encodes using the
16423         absolute branch;  If not, it tried to find something in the
16424         relative range, if not, it uses the handle_thunk code. 
16425
16426 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
16427
16428         * exceptions-ppc.c: use the correct ip register on macosx.
16429
16430 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
16431
16432         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
16433
16434 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
16435
16436         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
16437         Raise exception on integer divide by zero by hand since the hw
16438         doesn't support it. Handle NaNs in FP compares.
16439
16440 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
16441
16442         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
16443         code reducing duplication between the platforms and enabled
16444         signal exception handling (on linux for now).
16445
16446 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
16447
16448         * exceptions-ppc.c: more macosx support.
16449
16450 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16451
16452         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
16453
16454 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
16455
16456         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
16457
16458 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
16459
16460         * iltests.il: more tests.
16461
16462 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
16463
16464         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
16465         vars as well.
16466
16467 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
16468
16469         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
16470
16471 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
16472
16473         * liveness.c: Mark variables as volatile in all basic blocks reachable
16474         from exception clauses.
16475
16476 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
16477
16478         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
16479         inlining.
16480
16481 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
16482
16483         * iltests.il, basic.cs: more tests for regalloc.
16484
16485 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16486
16487         * iltests.il: Some tests for register allocation modifications
16488         I have locally.
16489
16490 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
16491
16492         * exceptions.cs: Add regression test for bug #56782.
16493
16494         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
16495         original stack trace if an exception is rethrown. Fixes #56782. Oh,
16496         the beauty of fixing the same thing in 5 different files...
16497
16498 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
16499
16500         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
16501         methods.
16502
16503 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
16504
16505         * mini.c: Add support for STRWLPARRAY marshalling convention.
16506
16507 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
16508
16509         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
16510         to init the context to setup the regs pointer).
16511
16512 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16513
16514         * exceptions-ppc.c: more exceptions work.
16515
16516 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16517
16518         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
16519         not allowed.
16520
16521 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
16522
16523         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
16524         can use the memory directly.
16525
16526         * cpu-pentium.md: Update documentation from a post from Zoltan. 
16527
16528         add x86_add_membase, x86_sub_membase, x86_mul_membase
16529
16530 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
16531
16532         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
16533         GENERAL_REGS they were also hardcoded for all PPC ports.
16534
16535         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
16536
16537         Remove hard-coded limit for floating point registers, use
16538         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
16539
16540         Notice that in MacOS X calling conventions you can fit a lot more
16541         floating point values in registers, so I should update the PInvoke
16542         test to excercise the passing of floating point values on the
16543         stack (currently broken).
16544         
16545 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
16546
16547         * tramp-ppc.c (create_trampoline_code): Added
16548         JUMP_TRAMPOLINE_SIZE. 
16549         (ppc_magic_trampoline): Follow the pattern from
16550         x86_magic_trampoline: if code is set to zero, return. 
16551         (create_trampoline_code): Always pass MonoMethod to the jump
16552         trampoline, before it was passing a null.
16553         (mono_arch_create_jump_trampoline): Implement the jump stub, could
16554         share the code with mono_arch_create_jit_trampoline. 
16555
16556         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
16557         implemented.
16558         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
16559         implemented.  
16560
16561         * cpu-g4.md: Added length for jmp instruction, the worst case
16562         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
16563         for save_lmf).
16564
16565 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
16566
16567         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
16568
16569 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
16570
16571         * mini.c: Only set bblock->real_offset when adding a new bblock, and
16572         before each IL instruction.
16573
16574         * mini.c (CEE_BOX): Fix warnings.
16575
16576 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16577
16578         * mini.c: removed a few unused vars and extra whitespace.
16579
16580 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
16581
16582         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
16583         checks.
16584         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
16585         index.
16586         (OP_GETCHR): use the above
16587         (CEE_LDELEMA): use the above.
16588
16589         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
16590         version of the generic impl.
16591         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
16592         (CEE_LDELEMA): use the above.
16593
16594 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
16595
16596         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
16597         Fixes #56317.
16598
16599         * iltests.il: Added new regression test for #56317.
16600
16601 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
16602
16603         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
16604         under NetBSD. Fixes #56450.
16605
16606         * liveness.c (update_gen_kill_set): Fix previous patch.
16607
16608 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16609
16610         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
16611
16612 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
16613
16614         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
16615         ldsfld and ldsflda.
16616
16617         * inssel-sparc.brg: Add more optimizations.
16618
16619         * mini-sparc.c: Replace multiply/divide with shifts if possible.
16620
16621 2004-04-01  Martin Baulig  <martin@ximian.com>
16622
16623         * mini.c (handle_box): New static function; moved the
16624         implementation of CEE_BOX here.
16625         (mono_method_to_ir): Added `constrained_call' variable.
16626         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
16627         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
16628         mono_method_get_constrained() to get the method.
16629
16630 2004-04-01  Martin Baulig  <martin@ximian.com>
16631
16632         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
16633         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
16634         (mono_method_to_ir): We don't need these macros anymore since
16635         mono_class_get_full() already takes care of it. 
16636
16637 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16638
16639         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
16640         use @function (as doesn't accept #function here) and check the return
16641         value of system and stop if fails.
16642
16643 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16644
16645         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
16646
16647 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
16648
16649         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
16650
16651         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
16652
16653         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
16654         #56223.
16655
16656         * basic-long.cs: Add test for negation of Int64.MinValue.
16657
16658 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
16659
16660         * mini-sparc.c: Update status.
16661
16662         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
16663
16664         * exceptions-sparc.c: Fix return value in filters.
16665
16666         * inssel-sparc.brg: Fix register allocation in some rules.
16667
16668 2004-03-28  Martin Baulig  <martin@ximian.com>
16669
16670         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
16671         if neccessary.  
16672
16673 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
16674
16675         * mini-x86.c (mono_arch_patch_code): Fix warnings.
16676         
16677         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
16678         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
16679         remove unused conv_u4 opcode.
16680
16681         * mini-x86.c: Remove valgrind workaround since it slows down things
16682         even when mono is not run under valgrind.
16683
16684 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
16685
16686         * mini-sparc.c: Update status.
16687
16688         * inssel-sparc.brg: Add some optimizations.
16689
16690         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
16691         future delay slot filling. Add support for varargs, tail calls and JMP.
16692
16693         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
16694         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
16695
16696         * inssel.brg: Fix register allocation in OP_ARGLIST.
16697
16698         * inssel.brg: Fix warnings.
16699
16700 2004-03-25  Martin Baulig  <martin@ximian.com>
16701
16702         * mini.c (inflate_generic_field): Removed.
16703         (mini_get_method): Removed, use mono_get_method_full(),
16704         (mini_get_class): Removed, use mono_class_get_full().
16705         (mono_method_to_ir): Pass our generic context to
16706         mono_field_from_token().        
16707
16708 2004-03-25  Martin Baulig  <martin@ximian.com>
16709
16710         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
16711         of a `MonoMethod *'.
16712         (mini_get_method): Take a `MonoGenericContext *' instead
16713         of a `MonoMethod *'.
16714         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
16715         a new local variable called `generic_context' which holds the
16716         current `MonoGenericContext *'; use it to lookup things.
16717
16718 2004-03-24  Martin Baulig  <martin@ximian.com>
16719
16720         * mini.c (mini_get_class): New static method; if we're inside a
16721         generic instance, inflate the class if neccessary.
16722         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
16723
16724 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
16725
16726         * iltests.il: New regression test for #55976.
16727
16728         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
16729         #55976.
16730
16731 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
16732
16733         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
16734         output.
16735
16736 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
16737
16738         * liveness.c: Consider SSA stores as well as loads when making vars
16739         volatile.
16740
16741         * exceptions.cs: New regression tests for register allocation.
16742         
16743 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
16744
16745         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
16746         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
16747           domain lock only to protect puntual access to data structures.
16748           Added access lock for sighash, jit_icall_hash_name, 
16749           jit_icall_hash_addr and domain->code_mp.
16750
16751 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
16752
16753         * driver.c: Print SIGSEGV handling method.
16754
16755         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
16756
16757         * mini.c (setup_jit_tls_data): Handle case when this is called
16758         multiple times for a thread.
16759
16760         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
16761         is different from fbxx_un. Fixes #54303. Also use constants instead of
16762         magic numbers in a lot of places.
16763
16764 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
16765
16766         * exceptions.cs: Fix cctor test when --regression is used.
16767
16768 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
16769
16770         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
16771         for Linux/ppc.
16772
16773 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
16774
16775         * inssel-ppc.brg: fixed register assignments for some rules.
16776
16777 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
16778
16779         * exceptions.cs: Add test for exceptions in static constructors.
16780
16781         * mini.c (mono_jit_compile_method_with_out): Move the calling of
16782         static constructors outside the domain lock. Fixes #55720.
16783
16784 2004-03-17  Martin Baulig  <martin@ximian.com>
16785
16786         * mini.c (get_generic_field_inst): Removed, this'll never happen.
16787         (inflate_generic_field): Take the `MonoMethod *' instead of the
16788         `MonoClass *' and added support for generic method.
16789         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
16790         have a `field->parent->gen_params', only inflate the field if it's
16791         an open constructed type.
16792
16793 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
16794
16795         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
16796         exception object instead of the preconstructed ones.
16797
16798 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16799
16800         * mini.c: reverted changed to sigsegv_signal_handler commited
16801         accidentally in the previous patch.
16802
16803 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16804
16805         * mini.c:
16806         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
16807         running --aot with an old assembly.
16808
16809 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
16810
16811         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
16812         point values.
16813
16814         * mini-sparc.c: Add support for v9 branches with prediction.
16815
16816 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
16817
16818         * mini.c (mini_init): #warning is GNUC only
16819
16820         * mini-sparc.h: implement __builtin_frame_address
16821         and __builtin_return_address for Sun C compiler
16822
16823 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
16824
16825         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
16826
16827 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
16828
16829         * basic-calls.cs: Add test for unaligned byref long argument passing.
16830
16831         * mini-ops.h: Add sparcv9 compare and branch instructions.
16832
16833         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
16834         v9 instructions if we have a v9 cpu.
16835
16836         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
16837         registers for global allocation.
16838
16839         * exceptions-sparc.c: Fixes.
16840         
16841 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
16842
16843         * liveness.c (mono_analyze_liveness): Optimized version.
16844
16845         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
16846
16847         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
16848         sparc work.
16849
16850         * basic-float.cs basic-calls.cs: New regression tests.
16851
16852 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
16853
16854         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
16855         sigaltstack implementation.
16856
16857         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
16858         
16859         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
16860         stuff if SIGSEGV_ON_ALTSTACK is not defined.
16861
16862 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
16863
16864         * mini.c: Fix warnings.
16865         
16866         * mini.c (mono_resolve_patch_target): New function which contains the
16867         arch independent part of the patching process.
16868
16869         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
16870         patching code to a separate function.
16871
16872 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
16873
16874         * mini.c (add_signal_handler): ifdef out on Windows
16875
16876 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
16877
16878         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
16879         cpu-sparc.md: Add exception handling support + other fixes.
16880
16881         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
16882         typed GC detection in --version.
16883
16884         * basic.cs exceptions.cs: New regression tests.
16885
16886         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
16887         the arch specific code can store data during a compilation.
16888
16889         * mini-ops.h: Add OP_SETFRET.
16890
16891         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
16892         function, register a separate icall for each arity, so the icalls can
16893         get a wrapper.
16894         
16895         * mini.c (mono_print_tree): Print negative offsets in a more readable
16896         form.
16897         
16898         * mini.c: Make signal handling work on sparc.
16899         
16900         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
16901
16902         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
16903
16904         * jit-icalls.c: Emulate truncl by aintl on solaris.
16905
16906         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
16907
16908 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
16909
16910         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
16911
16912 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
16913
16914         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
16915         a MarshalByRef type, inline a method that performs the check, taking into
16916         account that the object can be a proxy. Also implemented tow new opcodes:
16917         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
16918         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
16919         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
16920
16921 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
16922
16923         * mini-ppc.c: if a relative branch displacement is too big
16924         but it points to and area reachable with an absolute branch, 
16925         avoid the thunks.
16926
16927 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
16928
16929         * mini.c: optimize small copies in cpblk.
16930
16931 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
16932
16933         * basic-calls.cs basic-float.cs: New regression tests.
16934
16935         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
16936         negative offsets from %fp. Implement localloc. Fix local register 
16937         allocation. Fix the case when the this argument needs to be saved to
16938         the stack. Implement some missing opcodes.
16939
16940 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
16941
16942         * mini.c (mini_method_compile): Reenable global regalloc in methods
16943         with exception handlers.
16944
16945         * linear-scan.c (mono_varlist_sort): Fix warning.
16946
16947         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
16948
16949         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
16950         regalloc costs.
16951
16952         * liveness.c: Make all variables uses in exception clauses volatile, to
16953         prevent them from being allocated to registers. Fixes #42136.
16954
16955 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
16956
16957         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
16958         causes regressions.
16959
16960         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
16961         argument to mono_arch_regalloc_cost.
16962
16963         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
16964         precisely.
16965
16966 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
16967
16968         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
16969         Make the cost of allocating a variable to a register arch dependent.
16970
16971         * basic-calls.cs: Fix compilation of tests.
16972         
16973         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
16974         helper function to cut back on the number of #ifdefs needed.
16975
16976         * mini-ppc.c: Fix compilation.
16977
16978         * basic-calls.cs: New regression tests.
16979
16980         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
16981
16982         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
16983         of l0 since that is callee saved.
16984
16985         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
16986         to virtual calls.
16987
16988         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
16989         of delay instruction.
16990
16991         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
16992
16993         * mini.h (MonoCallInst): Add 'virtual' flag.
16994
16995         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
16996
16997 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
16998
16999         * *.cs: New regression tests.
17000
17001         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
17002         work.
17003
17004         * mini.c (mono_runtime_install_handlers): Fix build.
17005
17006         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
17007         'signal_stack_size' members.
17008
17009         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
17010         alternate signal stack.
17011
17012         * exceptions-x86.c: Add stack overflow handling.
17013
17014         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
17015         functions to arch independent code.
17016
17017         * mini.c (mono_print_tree): Print more detailed info for load_membase
17018         opcodes.
17019         
17020 2004-02-23  Martin Baulig  <martin@ximian.com>
17021
17022         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
17023
17024 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
17025
17026         * mini-x86.c: fixed reg allocation for div/rem.
17027
17028 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
17029
17030         * driver.c (mono_main): Report some configuratio options on --version.
17031
17032 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
17033
17034         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
17035         low in the address space. Correctly flush memory in thunks where we
17036         output native code.
17037
17038 2004-02-20  Martin Baulig  <martin@ximian.com>
17039
17040         * mini.c (mini_get_method): New static method; inflate all generic
17041         methods and methods in open generic instances.
17042         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
17043         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
17044
17045 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
17046
17047         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
17048
17049         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
17050
17051 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
17052
17053         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
17054
17055         * mini-sparc.c (flushi mono_arch_output_basic_block): make
17056         it compile using Sun's compiler.
17057
17058 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
17059
17060         * 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.
17061
17062         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
17063
17064 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
17065
17066         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
17067         code.
17068         * mini-ppc.c: handle calls outside of the allowed range with thunks
17069         allocated using the code manager.
17070         * tramp-ppc.c: use the code manager to hold generated native code.
17071         Fixed the magic trampoline to just patch vtable entries.
17072
17073 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
17074
17075         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
17076         independent file.
17077
17078 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
17079
17080         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
17081         PPC.
17082
17083         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
17084         if we have a working __thread implementation.
17085
17086         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
17087         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
17088
17089 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
17090
17091         * mini-x86.c: Fix compilation under gcc 2.
17092         
17093 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
17094
17095         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
17096         contains a call to the wrapped function.
17097
17098         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
17099         OP_<CALL>_IMM opcodes, and use them under X86.
17100         
17101         * mini.c (mono_jit_find_compiled_method): Fix warning.
17102
17103         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
17104
17105         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
17106
17107         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
17108         functionality to mini.c.
17109
17110         * mini.c (mono_create_jump_trampoline): New function to create a jump
17111         trampoline. Return a compiled method instead of a trampoline if it
17112         exists. Add a cache for jump trampolines.
17113
17114         * mini.c (mono_jit_find_compiled_method): New function to return a
17115         compiled method if it exists.
17116
17117         * mini-x86.c: Call mono_create_jump_trampoline instead of 
17118         mono_arch_create_jit_trampoline.
17119
17120         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
17121         a jump trampoline. Fixes #52092.
17122         
17123 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
17124
17125         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
17126         which is not up-to-date. Add check_corlib_version () instead.
17127
17128         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
17129         have to call it.
17130         
17131         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
17132         since newer valgrind versions do not need it.
17133
17134         * mini.c (mono_jit_compile_method_with_opt): New helper function to
17135         compile a method with a given set of optimizations.
17136
17137         * mini.c: Compile icall wrappers on-demand instead of at startup.
17138
17139         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
17140         wrapper for an icall.
17141
17142 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
17143
17144         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
17145         #54063.
17146
17147         * iltests.il: Add test for non-empty stack before switch instruction.
17148
17149 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
17150
17151         * mini.c: Add support for new stringbuilder marshalling conventions.
17152
17153         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
17154
17155 2004-02-01  Martin Baulig  <martin@ximian.com>
17156
17157         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
17158         in `ginst->mtype_argv'.
17159
17160 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
17161
17162         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
17163         facilitate grepping.
17164
17165 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
17166
17167         * mini.c: fixed buglet in initobj generic implementation for references.
17168
17169 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
17170
17171         * Makefile.am: make the version script conditional.
17172         * jit-icalls.c: handle missing truncl().
17173
17174 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
17175
17176         * exceptions.cs: Add more tests for double->int conversion.
17177
17178         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
17179         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
17180
17181 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
17182
17183         * driver.c: make --verbose --version emit an error
17184         if the loaded corlib doesn't match the runtime version.
17185
17186 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
17187
17188         * mini-ppc.h: export ppc_patch().
17189         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
17190         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
17191         on par or better than on MacOSX.
17192
17193 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
17194
17195         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
17196         mono_lookup_pinvoke_call.
17197
17198         * mini-x86.c: Under windows, the default pinvoke calling convention is
17199         stdcall. Fixes #52834.
17200
17201         * mini.c (optimize_branches): Add an upper bound to the number of
17202         iterations to prevent infinite loops on strange loops. Fixes #53003.
17203
17204 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
17205
17206         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
17207         and ISINST. Fixes #52093.
17208
17209         * objects.cs (test_0_vector_array_cast): New tests.
17210         
17211 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
17212
17213         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
17214         checking in Array.Set ().
17215
17216         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
17217         #52590.
17218
17219         * object.cs (test_0_multi_array_cast): New regression test.
17220
17221 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
17222
17223         * exceptions-ppc.c: fix build on Linux/PPC.
17224
17225 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
17226
17227         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
17228         running under valgrind.
17229         (x86_magic_trampoline): Fix build bustage.
17230
17231         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
17232         negative values as well. This is needed for the encoding of the line number
17233         info, since sometimes the line numbers are not in increasing order.
17234
17235 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
17236
17237         * cpu-pentium.md (localloc): Increase the size of the localloc 
17238         instruction since it is a loop under Win32.
17239
17240         * debug-mini.c (record_line_number): Get rid of unneccesary memory
17241         allocation.
17242
17243 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
17244
17245         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
17246         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
17247         Max Horn (max@quendi.de). Fix file names in comments.
17248
17249 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
17250
17251         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
17252         avoid stack overflow.
17253         (replace_usage): Avoid uninitialized variable warnings.
17254
17255         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
17256         and taking the address of valuetype variables.
17257
17258 2004-01-03  Patrik Torstensson
17259
17260         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
17261         for other purposes than FP later on.
17262
17263 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
17264
17265         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
17266         of tail calls.
17267
17268 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
17269
17270         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
17271
17272 2003-12-30  Patrik Torstensson <p@rxc.se>
17273
17274         * mini-x86.h: Decreased number of availiable fp regs.
17275         Solves corner cases with FP spilling.
17276
17277 2003-12-23  Patrik Torstensson <p@rxc.se>
17278
17279         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
17280         for floating point stack tracking / spilling on x86. 
17281         Fixes bug #49012.
17282         
17283         * basic-float.cs: added float mul overflow test.
17284
17285 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
17286
17287         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
17288
17289 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17290
17291         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
17292         supports for cond branches that overflow the immediate
17293         overflow offset. mcs can compile simple programs.
17294
17295 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17296
17297         * exceptions-ppc.c: exception handling support wip:
17298         finally handlers get run on exception.
17299
17300 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
17301
17302         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
17303         profiling.
17304
17305 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17306
17307         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
17308         initial support for stack walking and unwinding.
17309
17310 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
17311
17312         * driver.c (mono_main): Make corlib-out-of-sync message more 
17313         descriptive. Also remove verify_corlib call.
17314
17315 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17316
17317         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
17318         not overlap with other call's arguments, too.
17319
17320 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
17321
17322         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
17323         move to arch-specific code the choice of arch-specific
17324         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
17325         * mini.c: ensure emulation calls will not interleave
17326         with other calls.
17327
17328 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
17329
17330         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
17331         the magic trampoline stack frame is dropped before executing
17332         the new method.
17333
17334 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
17335
17336         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
17337         and integer to fp conversions. Added support for overflowing
17338         arguments on the stack. Reserve a couple more registers as temps.
17339         Added support for aot compilation (as output still needs to be
17340         tweaked, though).
17341
17342 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17343
17344         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
17345         Don't overwrite return register in some corner cases.
17346
17347 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
17348
17349         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
17350         static constructors when AOT compiling.
17351
17352         * driver.c (mono_main): Call mono_check_corlib_version.
17353
17354 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17355
17356         * cpu-g4.md, basic.cs: fixed div target register.
17357
17358 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
17359
17360         * mini-ppc.c, basic.cs: shl_imm fix with test.
17361
17362 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17363
17364         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
17365         structures by value. Misc fixes.
17366         * objects.cs: more tests.
17367
17368 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
17369
17370         * mini-ppc.c: lconv.ovf.i implemented.
17371
17372 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17373
17374         * mini.c:
17375         (mini_init): don't error out if someone already called g_thread_init.
17376
17377 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17378
17379         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
17380         to be any type per the spec. Fix abnormal memory usage when
17381         the same object is repeatedly thrown.
17382
17383 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
17384
17385         * mini.c: check for overruns in IL code.
17386
17387 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
17388
17389         * TODO: Add/remove some todo entries.
17390
17391 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
17392
17393         * driver.c (mono_main): Call mono_verify_corlib.
17394
17395 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
17396
17397         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
17398         This has been moved to mini.c
17399         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
17400         type being casted is marshalbyref it could be a proxy, so instead of
17401         emitting the type check code, emit a call to a runtime method that will
17402         perform the check by calling CanCastTo if needed.
17403
17404 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
17405
17406         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
17407         methods with large stack frames under Win32.
17408
17409 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
17410
17411         * Makefile.am: Distribute regression tests.
17412
17413         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
17414         at the end instead of inserting each variable into the sorted list.
17415
17416         * linear-scan.c (mono_varlist_sort): New helper function.
17417         
17418 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17419
17420         * mini.c: ensure arguments and locals are within bounds.
17421
17422 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17423
17424         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
17425         related fixes.
17426
17427 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
17428
17429         * mini.c (mono_cprop_copy_values): Fix crash.
17430
17431         * aot.c: Set verbosity back to 0.
17432         
17433 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17434
17435         * regalloc.c: complete memory leak fix by Laurent Morichetti
17436         (l_m@pacbell.net).
17437
17438 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
17439
17440         * driver.c (main_thread_handler): Revert the previous patch.
17441
17442         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
17443         under valgrind.
17444
17445         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
17446         memory from the memory pool.
17447
17448         * driver.c (main_thread_handler): Turn on all optimizations when
17449         --aot is used.
17450
17451         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
17452         an array for better performance.
17453
17454         * regalloc.c (mono_regstate_assign): Fix memory leak.
17455
17456         * debug-mini.c (mono_debug_serialize_debug_info): New function to
17457         serialize the debug info.
17458
17459         * debug-mini.c (mono_debug_add_aot_method): New function to load the
17460         debug info from the serialized representation.
17461
17462         * aot.c: Save debug info into the generated file and load it when 
17463         loading a method.
17464
17465         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
17466
17467 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17468
17469         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
17470         More FP-related fixes.
17471
17472 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
17473
17474         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
17475         and register allocation buglet. Hello world now runs.
17476
17477 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17478
17479         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
17480         * tramp-ppc.c: fixed class init trampoline.
17481         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
17482
17483 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17484
17485         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
17486         mini.c: more ppc changes/fixes.
17487
17488 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
17489
17490         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
17491         Also optimize the case when the arguments are the same in the caller 
17492         and in the callee.
17493
17494         * iltests.il: Add tests for tail calls with valuetype arguments.
17495
17496 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17497
17498         * mini-ppc.c: fixes for struct return type.
17499
17500 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
17501
17502         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
17503         mono_spillvar_offset() to arch-specific code.
17504
17505 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
17506
17507         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
17508
17509 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
17510
17511         * exceptions-x86.c: Fix stack space leaks.
17512         
17513         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
17514         registers from the lmf if the method has save_lmf set.
17515
17516 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
17517
17518         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
17519         of icall wrappers into InvokeInDomain, since these are now per-domain.
17520
17521 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
17522
17523         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
17524         make some opcode emulation and intrinsic ops enabled/disabled 
17525         according to the architecture. More fixes.
17526
17527 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17528
17529         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
17530
17531 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17532
17533         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
17534         arch-specific handling for 'this' and struct return type to
17535         arch-specific code.
17536
17537 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17538
17539         * aot.c: prevent divide by zero error when reporting (it happened with
17540         Accessibility.dll).
17541
17542 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
17543
17544         * mini.h (inst_switch): Remove unused macro.
17545
17546 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17547
17548         * aot.c:
17549         (load_aot_module): free 'info->methods' and 'info' properly. No more
17550         "free(): invalid pointer blah" messages when you have an old aot
17551         compiled assembly.
17552
17553 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
17554
17555         * jit-icalls.c, mini.c: Added support for context static fields.
17556
17557 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
17558
17559         * mini.c (mono_method_blittable): Methods which set LastError are not 
17560         blittable either. Fixes #51108.
17561         
17562 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17563
17564         * mini.c: flush icache.
17565         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
17566
17567 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
17568
17569         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
17570
17571 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
17572
17573         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
17574         safe on IA32.
17575
17576         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
17577         vararg calls.
17578
17579         * inssel.brg (CEE_MKREFANY): Fix AOT case.
17580
17581 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
17582
17583         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
17584         instruction when the result is discarded.
17585
17586         * iltests.il (test_0_div_regalloc): New regression test.
17587
17588         * arrays.cs: Fix compilation error.
17589
17590 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
17591
17592         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
17593         float rules to inssel-x86.brg: sane architectures with FP registers
17594         don't need to implement these rules.
17595
17596 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17597
17598         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
17599
17600 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17601
17602         * mini.h, inssel-long32.brg: fixed endianess issues in int64
17603         implementation of 32 bit systems.
17604
17605 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17606
17607         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
17608         (Jeroen Zwartepoorte).
17609
17610 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
17611
17612         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
17613         the caller and the callee matches.
17614         
17615         * mini.c (mono_method_to_ir): Add comment.
17616
17617         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
17618         signbit is missing on some platforms.
17619
17620 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
17621
17622         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
17623
17624         * mini.c (setup_jit_tls_data): Call the new function.
17625         
17626         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
17627
17628         * mini-x86.c: Add experimental support for fast access to the lmf
17629         structure under NPTL/Linux 2.6.x.
17630
17631 2003-11-06  Martin Baulig  <martin@ximian.com>
17632
17633         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
17634         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
17635         the debugger.
17636
17637 2003-11-02  Martin Baulig  <martin@ximian.com>
17638
17639         * mini.c (inflate_generic_field): New static method.
17640         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
17641         generic instance and the field is declared in a generic type, call
17642         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
17643
17644 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
17645
17646         * mini.h mini.c (mono_method_same_domain): New function to return
17647         whenever the caller and the callee are in the same domain.
17648
17649         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
17650
17651 2003-10-30  Martin Baulig  <martin@ximian.com>
17652
17653         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
17654         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
17655         method parameters.
17656         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
17657         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
17658
17659 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
17660
17661         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
17662         propagation.
17663
17664         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
17665         object here, so it is in the correct appdomain etc.
17666
17667 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
17668
17669         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
17670         already done.
17671         (mono_method_to_ir): Avoid freeing the type created returned from
17672         mono_type_create_from_typespec, since it is put into an internal cache
17673         by the function. Fixes pointer.exe.
17674
17675         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
17676         trampolines for icalls and pinvokes as well. Fixes #33569.
17677
17678 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
17679
17680         * mini.c: Update after appdomain changes.
17681
17682         * mini.c (mono_jit_compile_method_inner): Allways compile native
17683         method wrappers in the root domain, since there can only be one
17684         instance of them, whose address is stored in method->info.
17685
17686 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
17687
17688         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
17689         environment variable. Instead detect automatically whenever running
17690         under valgrind using the magic macro RUNNING_ON_VALGRIND from
17691         valgrind.h.
17692
17693 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
17694
17695         * trace.c, trace.h: New files that implement the new trace option
17696         parsing. 
17697
17698         * driver.c: Document new --trace options.
17699
17700         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
17701         mini-x86.c: Apply:
17702
17703         -       if (mono_jit_trace_calls)
17704         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
17705
17706         * mini.h: prototypes.
17707         
17708 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
17709
17710         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
17711
17712         * mini.c inssel.brg: Implement typedefbyref opcodes.
17713
17714         * mini.c (mono_jit_compile_method): Remove unused local variable.
17715
17716         * mini.c (mono_jit_compile_method_inner): Ditto.
17717         
17718 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
17719
17720         * tramp-x86.c (x86_class_init_trampoline): Fix build.
17721         
17722         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
17723
17724 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
17725
17726         * mini.c (mono_no_aot): Remove unused global variable.
17727
17728         * mini.c: Thread safety fixes.
17729
17730 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
17731
17732         * mini.c (mono_create_class_init_trampoline): Add a lock around
17733         class_init_hash_addr.
17734
17735         * arrays.cs (test_0_newarr_emulation): Add new regression test for
17736         #30073.
17737
17738         * mini.c: Decompose the NEWARR instruction before decomposing its
17739         arguments. Fixes #30073.
17740
17741 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
17742
17743         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
17744         convention.
17745
17746 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
17747
17748         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
17749
17750         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
17751
17752         * driver.c: Add support for compiling icall wrappers to --compile.
17753
17754 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
17755
17756         * inssel.brg: The empty value in class->interface_offsets is -1, not
17757         0. Fixes #49287.
17758
17759 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
17760
17761         * objects.cs: New test for 'is' operator on an array of interfaces.
17762
17763 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17764
17765         * tramp-ppc.c: update trampoline code to support jumps
17766         and class initialization.
17767
17768 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
17769
17770         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
17771
17772         * inssel.brg (OP_UNBOXCAST): Fix #46027.
17773
17774         * inssel.brg (OP_UNBOX): Remove unused rule.
17775
17776         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
17777         region instead of one for each method. Fixes #47813.
17778
17779 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
17780
17781         * exceptions.cs (test_0_nested_finally): New regression test for
17782         nested exception handlers.
17783
17784         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
17785
17786         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
17787
17788         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
17789         inlining.
17790
17791         * mini.c (mono_method_check_inlining): Make the inlining limit 
17792         configurable by an environment variable.
17793         
17794         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
17795
17796         * mini.h: Bump AOT file version.
17797
17798         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
17799         token, store the image along with the token, since the token might not 
17800         refer to the same image as the method containing the relocation, 
17801         because of inlining.
17802
17803 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
17804
17805         * mini.c (mono_precompile_assemblies): New function to compile
17806         all methods in all loaded assemblies.
17807
17808         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
17809
17810         * regalloc.h regalloc.c (MonoRegState): Change the type of 
17811         iassign and fassign to int*, since they can contain large negative
17812         values if the register is spilled. Also added some comments. Fixes
17813         #45817.
17814
17815         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
17816         under Win32. Fixes #42964.
17817
17818 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
17819
17820         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
17821
17822         * aot.c: Added support for AOT compiling methods which contain calls
17823         to wrappers. Currently, only remoting-invoke-with-check wrappers are
17824         handled.
17825         
17826         * driver.c (compile_all_methods): Run the compilation in a thread
17827         managed by mono. Fixes #44023.
17828
17829         * mini.c (mono_codegen): Print full method name in verbose output.
17830
17831         * mini-x86.c (mono_arch_patch_code): Fix warning.
17832         
17833         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
17834         jumps, since the method we are jumping to might be domain-specific.
17835
17836         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
17837
17838 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
17839
17840         * inssel.brg: string chars are unsigned.
17841
17842 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
17843
17844         * TODO: New todo item.
17845
17846         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
17847         which calls mono_runtime_class_init and patches the call site to
17848         avoid further calls.
17849         (mono_arch_create_class_init_trampoline): New arch specific function 
17850         to create a class init trampoline.
17851         (create_trampoline_code): Generalized so it can create
17852         class init trampolines as well.
17853
17854         * mini.c (helper_sig_class_init_trampoline): New helper variable.
17855         (mono_create_class_init_trampoline): New function to create and cache
17856         class init trampolines.
17857         (mono_find_class_init_trampoline_by_addr): New function to lookup the
17858         vtable given the address of a class init trampoline. Used by the
17859         patching process.
17860         (mono_codegen): Generate a call to a trampoline instead of
17861         mono_runtime_class_init in LDSFLD[A].
17862         (mono_codegen): Add relocations for the new trampoline.
17863         
17864         * mini.h mini-x86.c aot.c: Added a new relocation type: 
17865         MONO_PATCH_INFO_CLASS_INIT.
17866
17867         * mini.h: Bump AOT version number.
17868
17869         * aot.c: Create a copy of the loaded code instead of using the original
17870         so methods which call each other will be close in memory, improving
17871         cache behaviour.
17872         
17873         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
17874         patch since it breaks the regression tests.
17875         
17876         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
17877         for the register saving instruction sequence since the 
17878         frame_state_for function in glibc 2.3.2 don't seem to detect it.
17879
17880 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
17881
17882         * TODO: Fix todo item && remove another.
17883
17884 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
17885
17886         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
17887         previous checkin.
17888
17889         * aot.c: Moved the check for MONO_LASTAOT into the initialization
17890         function of the module.
17891
17892         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
17893         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
17894         --no-aot command line option.
17895
17896 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
17897
17898         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
17899         by Bernie Solomon (bernard@ugsolutions.com).
17900
17901         * inssel.brg: Refactor the interface offset table related code into
17902         its separate functions and add support for the AOT case.
17903
17904 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
17905
17906         * aot.c (mono_aot_get_method_inner): Fix memory leak.
17907         
17908         * aot.c: Added mono_aot_verbose variable and made all debugging
17909         output depend on the value of this variable.
17910
17911         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
17912         method_label and info_label.
17913
17914         * mini.h mini-x86.c aot.c: Added a new relocation type 
17915         MONO_PATCH_INFO_IID for klass->interface_id.
17916
17917         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
17918         the MonoJitInfo structure.
17919
17920         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
17921         a non-root appdomain in shared mode.
17922
17923 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17924
17925         * aot.c: make aot loader less verbose. Remove free of unused variable.
17926
17927 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
17928
17929         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
17930
17931         * .cvsignore: Added *.dll.
17932
17933         * mini.c (mono_print_tree_nl): New function callable while debugging.
17934
17935         * mini.c (mono_print_code): Export this.
17936
17937         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
17938         patched code.
17939
17940 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
17941
17942         * mini.h (MonoCompile): Added 'jit_info' field.
17943
17944         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
17945         the cfg structure, since it is needed by the AOT compiler.
17946
17947         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
17948
17949         * aot.c: A major rewrite. Changes include:
17950         - save exception tables for methods which have them.
17951         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
17952         to g_module_symbol.
17953         - reworked the file format so it is now much smaller and needs
17954         fewer relocation entries.
17955         
17956 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
17957
17958         * aot.c (load_aot_module): Fix build bustage on platforms without
17959         Boehm GC.
17960
17961 2003-09-04  Martin Baulig  <martin@ximian.com>
17962
17963         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
17964
17965 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
17966
17967         * TODO: Some new optimization ideas.
17968
17969         * aot.c: Move AOT module loading logic here from mono_assembly_open.
17970
17971         * aot.c: Save the optimization flags used to compile the code into
17972         the AOT module.
17973
17974         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
17975         support emitting domain specific code.
17976         
17977         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
17978         no longer domain neutral. It can be made domain neutral by compiling 
17979         with --optimize=shared.
17980
17981         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
17982         between appdomains.
17983
17984         * driver.c mini.h mini.c: New --no-aot debugging option which disables
17985         loading of AOT code.
17986
17987         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
17988         
17989         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
17990         if there is no domain neutrality information.
17991
17992 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
17993
17994         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
17995         format version into the generated library.
17996
17997         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
17998         callee method into the caller since one of them could be shared.
17999
18000         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
18001         system exceptions from AOT code now works.
18002
18003         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
18004         method if it is domain neutral and the callee is not.
18005
18006         * graph.c (cfg_emit_one_loop_level): Fix warning.
18007
18008 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
18009
18010         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
18011         last checkin.
18012
18013 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
18014
18015         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
18016         is needed  by code which is executed before mono_runtime_init ().
18017         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
18018         
18019         * mini.c (mono_thread_abort): Fix warning.
18020         (mono_jit_compile_method): Call static constructor in the AOT case too.
18021
18022         * aot.c (mono_compile_assembly): Fix warning.
18023
18024 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18025
18026         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
18027
18028 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
18029
18030         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
18031
18032         * cpu-pentium.md: Fix the length of call opcodes so they include the
18033         ESP restoring instruction. Fixes #47968.
18034
18035 2003-08-28  Martin Baulig  <martin@ximian.com>
18036
18037         * mini-x86.c (mono_arch_call_opcode): Added support for
18038         MONO_TYPE_GENERICINST.
18039
18040         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
18041
18042 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
18043
18044         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
18045         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
18046
18047         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
18048         metadata_section.
18049
18050 2003-08-26  Martin Baulig  <martin@ximian.com>
18051
18052         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
18053         when reporting an error, set this to the actual error location.
18054         (mono_method_to_ir): Report the correct error location if
18055         get_basic_blocks() returned an error.
18056
18057 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
18058
18059         * mini.c (mono_type_blittable): OBJECT is not blittable.
18060         (mono_method_blittable): Methods which have marshalling descriptors
18061         are not blittable either. Fixes #47842.
18062
18063 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
18064
18065         * driver.c mini.c: Use an environment variable instead of a global 
18066         variable. Also fix the build.
18067
18068         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
18069         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
18070         reporting this. 
18071
18072         * driver.c mini.c: Added --with-valgrind option to turn off some
18073         code which prevents mono from running under valgrind.
18074
18075         * mini.c (mono_emit_call_args): Fixed warning.
18076
18077         * mini.c (mono_emulate_opcode): Fixed warning.
18078
18079 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18080
18081         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
18082         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
18083         regalloc.c, regalloc.h: specify available registers in arch-specific
18084         code and support floats in the regallocator (patch by Laurent Morichetti 
18085         <l_m@pacbell.net>)
18086
18087 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18088
18089         * mini.c: mono_thread_current() can be called only after
18090         mono_runtime_init(): rearrange code to not call it early on.
18091
18092 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18093
18094         * mini.c: allocate jump tables in the code mempools.
18095
18096 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18097
18098         * mini.c, mini.h: make sure per-thread data allocated by the jit is
18099         freed.
18100
18101 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
18102
18103         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
18104         12 to 16.  This fixes bug #47453.
18105
18106
18107 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
18108
18109         * mini-ppc.c: fixed indexed load and unsigned compares.
18110
18111 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
18112
18113         * mini.c: reenabled installation of handler for
18114           thread abort signal.
18115
18116 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18117
18118         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
18119         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
18120         until it's fixed and actually useful.
18121
18122 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18123
18124         * inssel-long32.brg: couple more opcodes implemented.
18125
18126 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18127         
18128         * mini-sparc.c: Even more opcodes implemeted.
18129
18130 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
18131
18132         * mini-sparc.c: More opcodes implemented.
18133
18134 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
18135
18136         * mini-sparc.c: More opcodes implemented.
18137
18138 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18139
18140         * inssel-sparc.brg: Add some needed rules.  Direct
18141         copy from PPC.
18142         * Makefile.am: Use inssel-sparc.brg
18143         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
18144         an assert happy for now.
18145
18146 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
18147
18148         * mini-sparc.c: Fixed compile errors.
18149         * exceptions-sparc.c: Same.  We now produce a mono binary 
18150         on sparc-linux.  Yea.
18151
18152 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
18153
18154         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
18155         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
18156         They compile, but do not work.
18157
18158 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18159
18160         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
18161         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
18162         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
18163         (ct@gentoo.org).
18164
18165 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18166
18167         * mini.c: more opcodes implemented and better support for generics.
18168
18169 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18170
18171         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
18172         * mini.c, mini.h: first cut at generics support: some new instructions 
18173         added and changed the behaviour of some of the existing ones.
18174
18175 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
18176
18177         * mini.c: Removed definition of metadata_shared mutex here.
18178
18179 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18180
18181         * mini-x86.c: make vararg calls work for instance methods.
18182
18183 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18184
18185         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
18186         returns the arguments in a separte list, now.
18187
18188 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18189
18190         * aot.c, mini.c: updates for array type representation changes.
18191
18192 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
18193
18194         * mini.c: register function to perform jit shutdown.
18195
18196 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18197
18198         * mini.c: use a faster allocator if possible.
18199
18200 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18201
18202         * aot.c: some cleanups and portability changes.
18203
18204 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18205
18206         * mini.c: use faster allocation for CEE_BOX if possible.
18207
18208 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18209
18210         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
18211         Moved inlined mempcy code to its own function so that is can be
18212         reused. Added an inline memset function as well (optimized initobj).
18213         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
18214
18215 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18216
18217         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
18218
18219 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18220
18221         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
18222         arch code can setup the cpu for CLR execution, if needed.
18223         We use it on x86 to set the precision of FP operations.
18224
18225 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18226
18227         * mini.c: disable some optimizations if we can guess they'll cost too
18228         much for a given method.
18229
18230 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18231
18232         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
18233         
18234 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18235         * mini.h mini.c mini-x86.c: Added instruction level coverage 
18236         info collection support.
18237
18238 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18239
18240         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
18241         is now implemented in the profiling API. Get rid of a couple of
18242         unnecessary global variables.
18243
18244 2003-06-15  Nick Drochak <ndrochak@gol.com>
18245
18246         * basic-long.cs: tests for negative values for bigmul, and unsigned.
18247         * cpu-g4.md: add op_bigmul and op_bigmul_un
18248         * cpu_pentium.md: add op_bigmul_un
18249         * inssel-long32.brg: add rule for unsigned bigmul
18250         * mini-ops.h: define OP_BIGMUL_UN
18251         * mini-x86.c: THE BUG: handle (un)signed properly
18252         * mini.c: choose unsigned opcode if needed.
18253         This set of patches fixes bug #44291
18254
18255 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
18256
18257         * mini.c (optimize_branches): improved to handle all kinds of
18258         conditional branches.
18259
18260 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18261
18262         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
18263         don't raise exceptions.
18264
18265 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18266
18267         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
18268         to arch-specific files.
18269
18270 2003-06-09  Martin Baulig  <martin@ximian.com>
18271
18272         * Makefile.am (libs): Added $(LIBGC_LIBS).
18273
18274 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
18275
18276         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
18277         and OP_ATAN (fixes bug#44293).
18278
18279 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
18280
18281         * Makefile.am, mini-x86.c: rename cpu description array to
18282         pentium_desc, since some compilers define the 'pentium' preprocessor
18283         symbol.
18284
18285 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
18286
18287         * mini.c (mini_select_instructions): add explicit branch if the
18288         following block is not the false target of a conditional branch -
18289         we need this with any optimization that reorder or remove bblocks
18290
18291         * mini.c (optimize_branches): bug fixes
18292
18293 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
18294
18295         * mini.c (mono_method_to_ir): inline static readonly fields
18296
18297         * ssa.c (fold_tree): start cfold support for long (very simple
18298         cases only)
18299
18300         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
18301
18302 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18303
18304         * inssel.brg: fixed memcpy (bug #44219).
18305
18306 2003-06-05  Dick Porter  <dick@ximian.com>
18307
18308         * driver.c: Set the glib log levels to not abort if g_message
18309         recurses.
18310
18311         g_set_prgname() has to happen before mini_init() so that the
18312         process handle gets the info.
18313         
18314 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18315
18316         * driver.c: add intrins to the default optimizations to get wider
18317         exposure.
18318
18319 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18320
18321         * mini.h: some large basic blocks will overflow a 16-bit
18322         integers for symbolic registers.
18323
18324 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
18325
18326         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
18327         (mono_arch_output_basic_block): fix bug 43499 
18328
18329 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18330
18331         * mini.c: kill duplicated definition of mono_debug_format.
18332
18333 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18334
18335         * mini-x86.c, arrays.cs: fixed register allocation bug.
18336
18337 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
18338
18339         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
18340
18341         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
18342
18343 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18344
18345         * mini.c:
18346         (print_method_from_ip): also print source location information if
18347         available.
18348
18349 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
18350
18351         * mini.c (mono_find_block_region): bug fix in region code
18352         (mini_method_compile): enable removing unreachable code again, but
18353         only in methods without exception clauses.
18354
18355 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18356
18357         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
18358         Implemented arglist opcode and handling of TypedReference type.
18359         Fixed x86 call convention when a structure is returned.
18360         Minimal support for calling static vararg methods.
18361
18362 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
18363
18364         * mini.c (mini_method_compile):  always remove unreachable code,
18365         because the code in them may be inconsistent  (access to dead
18366         variables for example).
18367
18368 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18369
18370         * driver.c, debug-mini.c: warning fixes.
18371
18372 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
18373
18374         * Makefile.am, jit.h, mini.h: install header for embedding mono.
18375
18376 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
18377
18378         * mini.c: thread-static fields are registered in mono_class_vtable(),
18379         so ensure the function is called before checking for them.
18380
18381 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
18382
18383         * mini.c (optimize_branches): fix for bug 43586
18384
18385         * jit-icalls.c (mono_llmult_ovf): added an additional check for
18386         overflow (fixes Bug #43639)
18387
18388 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18389
18390         * mini.c, objects.cs: allow the use of stobj for primitive types.
18391
18392 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18393
18394         * mini.c: be less strict about argument checking until we support
18395         running the verifier.
18396
18397 2003-05-27  Nick Drochak <ndrochak@gol.com>
18398
18399         * basic-long.cs: tests for (ulong)int * (ulong)int also
18400         * mini.c: use the same trick for (ulong)int * (ulong)int
18401
18402 2003-05-27  Nick Drochak <ndrochak@gol.com>
18403
18404         * basic-long.cs: add regression test for (long)int * (long)int
18405         * cpu-pentium.md: add op_bigmul specification
18406         * inssel-long32.brg: add OP_BIGMUL rule
18407         * mini-ops.h: add OP_BIGMUL
18408         * mini-x86.c: register allocator: handle case where src1 needs to be
18409         in EAX.
18410         * mini.c: substitute special BIGMUL opcode in the tree for 
18411         (long)int * (long)int
18412
18413 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18414
18415         * jit-icalls.c: call the type ctor on field access if needed.
18416
18417 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18418
18419         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
18420         to a method (including results of ldelema, bug#43207).
18421
18422 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
18423
18424         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
18425         colors to show exception handler blocks.
18426
18427         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
18428         (fix for pinvoke7.cs).
18429
18430 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18431
18432         * mini.h, mini.c: ensure correct initialization order for types that
18433         require it. Prepare for lazy compilation of jit icall wrappers.
18434         Provide a name for opcode emulation to reduce unneeded mallocing.
18435
18436 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
18437
18438         * mini-x86.c: better register restoring code and profiling
18439         support for tail calls.
18440
18441 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18442
18443         * mini.h, driver.c: prepare for leaf methods optimization.
18444
18445 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18446
18447         * mini.c: get targets of branches before converting a method.
18448
18449 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
18450
18451         * mini.c (optimize_branches): added some experimental code (disbaled) 
18452
18453 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
18454
18455         * mini.c (optimize_branches): fix branch to branch optimization 
18456
18457         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
18458
18459         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
18460
18461         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
18462
18463         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
18464         if needed.
18465
18466 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
18467
18468         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
18469         enable use of interface variables again.
18470
18471         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
18472         I1 to registers because there is no simply way to sign extend 8bit
18473         quantities in caller saved registers on x86.
18474
18475         * inssel-float.brg: set costs of some rules to 2 so
18476         that monobure always select the arch. specific ones if supplied,
18477         regardless of the order we pass the files to monoburg.
18478
18479 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18480
18481         * mini.c, mini-x86.c: since the magic trampoline for jumps
18482         can't patch the code directly, we do it as soon as the
18483         method gets compiled.
18484
18485 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18486
18487         * mini-x86.c, mini.h: introduce a new patching method
18488         to support CEE_JMP and tail calls.
18489         * mini.c: obey tail.call. Don't precompile methods target
18490         of CEE_JMP.
18491         * tramp-x86.c: new trampoline code to handle methods
18492         reached through a jump.
18493
18494 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
18495
18496         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
18497         bit values to registers
18498
18499 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
18500
18501         * mini.c (mono_compile_get_interface_var): share interface
18502         variables if possible.
18503
18504 2003-05-16  Martin Baulig  <martin@ximian.com>
18505
18506         * debug-mini.c (mono_init_debugger): New function to initialize
18507         the debugger.  This is not in the debugger since it needs to
18508         access some of mini's internals.
18509
18510 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
18511
18512         * mini.c (mono_method_to_ir): inlining fixes/cleanups
18513
18514 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
18515
18516         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
18517         for value type handling.
18518
18519 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
18520
18521         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
18522         (mono_method_check_inlining): enable inlining of all kinds of wrappers
18523
18524 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
18525
18526         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
18527           the constructor through a proxy.
18528
18529 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18530
18531         * jit-icalls.c, inssel.brg: fixes to array element address
18532         calculations.
18533
18534 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
18535
18536         * mini-x86.c (is_regsize_var): allocate pointer to registers
18537
18538 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18539
18540         * driver.c: fixed typo, added intrins to the set of optimizations
18541         tested with regressions.
18542
18543 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18544
18545         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
18546         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
18547         test case.
18548
18549 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
18550
18551         * inssel.brg: remove some common pop instructions without side effects
18552
18553 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18554
18555         * inssel-x86.brg: fixed thinko in int to double conversions.
18556
18557 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18558
18559         * mini.c, jit-icalls.c: added runtime thread-static variable support.
18560
18561 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18562
18563         * inssel-long32.brg: two more missing instructions.
18564
18565 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
18566
18567         * mini.c (mono_emit_call_args): set the cil_code for all arguments
18568         if not already set.
18569
18570 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
18571
18572         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
18573         correctly.
18574
18575         * basic-float.cs: Added tests for negative zero.
18576
18577 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18578
18579         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
18580         a couple of missing operations for long casts, with test cases.
18581
18582 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18583
18584         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
18585
18586 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
18587
18588         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
18589         code size estimation.
18590
18591 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
18592
18593         * mini.c (mono_jit_create_remoting_trampoline): make it work with
18594         abstract methods (fix bug 42542)
18595
18596         * aot.c: add ability to handle array types
18597         
18598 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
18599
18600         * mini.c: Call the _specific versions of the object allocation
18601         functions if possible.
18602
18603 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18604
18605         * driver.c: call setlocale ().
18606
18607 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18608
18609         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
18610         windows build.
18611
18612 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
18613
18614         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
18615
18616         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
18617         wrappers (fix bug 42122)
18618
18619 2003-05-04  Martin Baulig  <martin@ximian.com>
18620
18621         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
18622
18623         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
18624         s/mini_set_defaults/mono_set_defaults/g.
18625
18626 2003-05-04  Martin Baulig  <martin@ximian.com>
18627
18628         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
18629
18630 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18631
18632         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
18633         (reported by Don Roberts).
18634
18635 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18636
18637         * mini.c: temporarily work around two bugs for this release.
18638
18639 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18640
18641         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
18642         that contains -export-dynamic and it makes using the ld script
18643         useless.
18644         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
18645
18646 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18647
18648         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
18649         specific cpu.
18650
18651 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18652
18653         * mini.c: make sure leave calls all the needed finally blocks,
18654         even when the target jumps out of multiple exception clauses.
18655
18656 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18657
18658         * ldscript, Makefile.am: add linker script to reduce the number of
18659         exported symbols (should also fix the issues with libwine defining
18660         some of the same symbols in io-layer).
18661
18662 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
18663
18664         * driver.c (mini_main): Avoid assertion when no file name is given on 
18665         the command line.
18666
18667 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
18668
18669         * driver.c: added --version/-V command line option.
18670         Added the inline optimization in the regression tests.
18671
18672 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18673
18674         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
18675         to the type in the method signature (fixes bug#42134).
18676
18677 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
18678
18679         * mini.c: when inlining, check this is not null only when needed (bug #42135).
18680
18681 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
18682
18683         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
18684
18685 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18686
18687         * driver.c: fixed bug #42100.
18688
18689 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
18690
18691         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
18692
18693 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18694
18695         * mini.c: moved most of the code required to do inlining to its own
18696         function so it can be reused. Inline also ctors if appropriate.
18697
18698 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
18699
18700         * Makefile.am: Link with -export-dynamic so shared libs loaded by
18701         the runtime can call mono API functions.
18702
18703 2003-04-27  Martin Baulig  <martin@ximian.com>
18704
18705         * debug-mini.c (mono_debug_init_method): Added
18706         `guint32 breakpoint_id' argument; if the method has a breakpoint,
18707         send a notification to the debugger.
18708
18709         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
18710         running in the Mono Debugger, just pass the breakpoint number to
18711         mono_debug_init_method().
18712
18713         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
18714
18715 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
18716
18717         * mini.c: allow some more unsafe compares.
18718
18719 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18720
18721         * mini-x86.c, Makefile.am: make distcheck works (partially from
18722         a patch by Richard Lee <r.h.lee@attbi.com>).
18723         * regset.c, regset.h: removed, they are unused.
18724
18725 2003-04-25  Dick Porter  <dick@ximian.com>
18726
18727         * driver.c: Usage reports the name as 'mono' not 'mini'
18728         * exceptions-x86.c: Build and run on freebsd
18729
18730 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
18731
18732         * Makefile.am: install the program with the 'mono' name and
18733         the library as libmono instead of mini and libmini.
18734
18735 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18736
18737         * driver.c: provide the APIs for the embedding interface of the old jit.
18738
18739 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
18740
18741         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
18742
18743 2003-04-23  Martin Baulig  <martin@ximian.com>
18744
18745         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
18746
18747         * driver.c: Added `--debug' command line argument to enable
18748         debugging support.
18749
18750 2003-04-23  Martin Baulig  <martin@ximian.com>
18751
18752         * debug.[ch]: Removed.  The code is now in
18753         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
18754
18755         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
18756         last six months.
18757
18758 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
18759
18760         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
18761
18762 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18763
18764         * mini.c:
18765         (mini_cleanup): moved mono_runtime_cleanup call after the call to
18766         mono_domain_finalize.
18767         (mini_method_compile): use mono_method_profile* if the the option is
18768         enabled.
18769
18770 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
18771
18772         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18773         methods with their wrapper.
18774
18775         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18776         methods with their wrapper.
18777
18778         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
18779         their wrapper.
18780
18781         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
18782         wrapper.
18783
18784         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
18785         methods.
18786
18787 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
18788
18789         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
18790
18791 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
18792
18793         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
18794         of the mempool. This is slightly faster and uses less memory
18795
18796 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18797
18798         * mini.c: avoid O(n) allocation for variables.
18799
18800 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18801
18802         * mini.c: handle items on the stack after inlining methods.
18803
18804 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18805
18806         * mini.c: make the method->opcode optimization dependent
18807         on MONO_OPT_INSTRINS and do it lazily.
18808
18809 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18810
18811         * driver.c: print overall results at the end of regression run.
18812
18813 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
18814
18815         * inssel.brg: don't overwrite symbolic registers.
18816
18817 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
18818
18819         * inssel-x86.brg: fix conversion from long to float.
18820
18821 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
18822
18823         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
18824
18825 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
18826
18827         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
18828
18829         * driver.c: Added --print-vtable option as in the old JIT.
18830
18831 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18832
18833         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
18834
18835 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
18836
18837         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
18838
18839 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
18840
18841         * mini.c regalloc.c regalloc.h: Fix memory leak.
18842
18843 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
18844
18845         * aot.c (mono_aot_get_method): register all used strings
18846
18847 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18848
18849         * mini.c: always intern strings references with ldstr at compile time.
18850
18851 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18852
18853         * Makefile.am: add BUILT_SOURCES.
18854
18855 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
18856
18857         * driver.c: give a better error message when the assembly to execute
18858         doesn't have an entry point.
18859
18860 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
18861
18862         * Makefile.am: added hack for automake
18863
18864         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
18865         correct sematics.
18866
18867         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
18868
18869 22003-04-07  Martin Baulig  <martin@ximian.com>
18870
18871         * Makefile.am: Added Makefile.am.
18872
18873         * debugger-main.c: Removed, this is now in the debugger where it
18874         belongs.
18875
18876         * mini.pc.in: Call this package `mini' for the moment.
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891