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-x86.c (mono_arch_emit_prolog): Emit unwind info.
4
5         * aot-compiler.c (emit_line_number_info): Fix line number emission when
6         the line diff is 0.
7
8         * aot-compiler.c: Add xdebug support on x86.
9
10         * unwind.c: Add x86 support.
11         
12         * aot-compiler.c (emit_exception_debug_info): Control the emission of
13         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
14
15         * mini.c (mini_method_compile): Ditto.
16         
17         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
18         the variable index.
19
20         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
21         which mimic .push_section/.pop_section in GAS.
22         
23         * aot-compiler.c: Emit precise live range information for variables.
24
25         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
26
27         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
28         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
29         them.
30
31         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
32         the live ranges of variables.
33
34         * mini.h (struct MonoMethodVar): Add two fields containing the live range
35         of the variable in terms of native offsets.
36
37 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
38
39         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
40         
41 2009-02-02  Mark Probst  <mark.probst@gmail.com>
42
43         Contributed under the terms of the MIT/X11 license by Steven
44         Munroe <munroesj@us.ibm.com>.
45
46         * exceptions-ppc.c (restore_regs_from_context): Correct operand
47         order (offset then base reg) for ppc_load_multiple_regs.
48         (emit_save_saved_regs) Correct operand order for
49         ppc_store_multiple_regs.
50         (mono_arch_get_call_filter): Correct operand order for
51         ppc_load_multiple_regs.
52
53         * mini-ppc.c (emit_memcpy): Fix operand order for
54         ppc_load_reg_update and ppc_store_reg_update.
55         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
56         (mono_arch_emit_epilog): Correct operand order for
57         ppc_load_multiple_regs.
58
59         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
60         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
61
62 2009-02-02  Mark Probst  <mark.probst@gmail.com>
63
64         * cpu-ppc64.md: Fixed storer4_memindex length.
65
66 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
67
68         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
69         line number info.
70         
71         * aot-compiler.c (emit_line_number_info): Optimize this.
72
73 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
74
75         * aot-compiler.c: Disassemble tokens in the IL disassembly.
76         
77         * aot-compiler.c: Add debug info for methods without debug info by
78         emitting an IL file and having the line number info referencing that file.
79
80         * aot-compiler.c: Optimize the size of the generated line number info.
81
82         * aot-compiler.c: Emit line number info in xdebug mode.
83
84         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
85         million arguments.
86
87 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
88
89         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
90
91         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
92         is used.
93
94 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
95
96         * basic-calls.cs: Test for the weird crash found on arm.
97         
98 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
99
100         * cpu-arm.md: Increase the size of storer8_membase_reg and
101         loadr8_membase_reg to 24 bytes to accomodate the extra add.
102
103         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
104         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
105         reg to LR otherwise we'll be loading/storing from just the offset.
106
107 2009-01-30  Miguel de Icaza  <miguel@novell.com>
108
109         Question: if we are storing gint32's inside the "*native_offset",
110         should we change the signature to "gint32 *native_offset" to
111         ensure that we do not have type definition problems?
112         
113         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
114         an int * as this is what the other function expects, causes
115         problems with Freescale's compiler that defined int32_t to be a
116         long and makes int incompatible 
117
118 2009-01-30  Miguel de Icaza  <miguel@novell.com>
119
120         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
121         filename conflict with bjam.
122
123 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
124
125         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
126         as it might use decomposed ops.
127
128 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
129
130         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
131
132         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
133         is defined.
134
135         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
136
137         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
138         offsets.
139
140         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
141         way registers are stored in MonoContext on arm.
142
143         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
144         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
145
146         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
147
148         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
149
150         * mini.c (mini_init): Register mono_isfinite.
151
152         * jit-icalls.c (mono_isfinite): New jit icall.
153
154         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
155         
156         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
157         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
158         the parent frame.
159
160 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
161
162         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
163         separate frame and stack pointers, so we must use FP to find the register
164         spill area.
165         The FP reg is retrieved from the MonoContext::regs array.
166
167 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
168
169         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
170         as FPA requires it.
171
172 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
173
174         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
175         return R4 and R8 when not running under softfloat.
176
177         Fixes basic-calls.exe
178
179 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
180
181         * mini-arm.c: Implement some overflow opcodes.
182
183 2009-01-29  Miguel de Icaza  <miguel@novell.com>
184
185         * ssa.c: handle another alloca.h
186
187         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
188         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
189         MONO_ARCH_USE_SIGACTION. 
190
191         * aot-runtime.c, mini-exceptions.c: Replace platform define with
192         capability defines.
193
194         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
195
196         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
197         PPC targets as sigaction does not exist on all platforms, define
198         this on a per-platform basis.
199
200         Instead of erroring out if the platform is not defined, include
201         mini-ppc-os.h, and expect that the OS specific setting provides
202         the required information.   
203
204 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
205
206         * aot-compiler.c: Fix --enable-minimal=aot.
207
208 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
209
210         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
211         previous change.
212
213 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
214
215         * exceptions-arm.c: Fix warnings.
216
217         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
218         ARM.
219
220         * mini-x86.c: Fix --enable-minimal=jit build.
221
222         * mini.c: Really fix --enable-minimal=jit build.
223         
224         * mini.c (construct_object_context_for_method): Move this outside
225         the DISABLE_JIT block to fix the --enable-minimal=jit build.
226
227         "Backported" of r124984 from 2.0 branch.
228         
229         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
230
231         "Backport" of r124977 + r124978 from 2.0 branch.
232         
233         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
234         to avoid calling mono_exception_from_token () from the throw trampoline.
235         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
236         for throwing corlib exceptions, this fixes full-aot support for corlib
237         exceptions.
238
239         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
240
241 2009-01-29  Miguel de Icaza  <miguel@novell.com>
242
243         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
244         part of the changes to split the code in mini into operating
245         system specific files.
246
247         This patch was done by copying mini.c to the respective files to
248         preserve SVN history.
249
250 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
251
252         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
253
254 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
255
256         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
257         remoting-invoke-with-check wrappers of shared methods.
258
259         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
260
261 2009-01-27  Mark Probst  <mark.probst@gmail.com>
262
263         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
264         optimization if the top of stack is the last instruction in the
265         bblock.  Otherwise it might have been used after its definition.
266         Fixes #469742.
267
268 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
269
270         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
271         method as well when get_vcall_slot () fails to match a code sequence.
272
273         * mini-arm.c: Fix the android build, which doesn't have
274         __aeabi_read_tp.
275
276 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
277
278         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
279         the s390x build.
280
281 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
282
283         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
284
285 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
286
287         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
288         and put its id into jinfo->used_regs. This is only used on amd64,
289         which is currently the only platform generating unwind info.
290
291         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
292         the dwarf unwinder. This is required to correctly handle async exceptions
293         like thread abort and stack overflows, which can happen while a method
294         is in the middle of its prolog or epilog.
295         
296         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
297         the unwind info belonging to an AOTed method.
298
299         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
300         into cfg->unwind_ops.
301         
302         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
303
304         * mini.c (mini_init): Call mono_unwind_init ().
305         (mini_cleanup): Call mono_unwind_cleanup ().
306
307         * unwind.c: Add functions for managing a set of unwind info entries, allowing
308         unwind info to be shared between methods.
309
310         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
311         saved in the LMF.
312
313         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
314         get_throw_pending_exception () to avoid initialization races.
315
316         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
317         mono_arch_exceptions_init () function.
318
319         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
320
321 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
322
323         * mini.c (mono_get_domain_intrinsic): New helper function.
324         (mono_get_thread_intrinsic): Ditto.
325
326         * mini-arm.c mini-ia64.c: Use the new helper functions.
327         
328         * method-to-ir.c (mono_method_to_ir): Fix the comment for
329         the last constrained_call change, since it is needed in the non-AOT
330         case as well.
331
332         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
333         
334         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
335         mono_get_lmf_addr () on arm eabi linux.
336
337 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
338
339         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
340         code sequence which matches a non-virtual call.
341
342 2009-01-23  Mark Probst  <mark.probst@gmail.com>
343
344         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
345         stack pointer (r1).
346
347 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
348
349         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
350         runtime-invoke wrappers, since they are also shared based on signature.
351
352 2009-01-22  Mark Probst  <mark.probst@gmail.com>
353
354         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
355         info from the (correct) context.
356
357 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
358
359         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
360         
361         * unwind.c (mono_unwind_frame): New function to unwind through a frame
362         using dwarf unwinding info. Not yet used.
363
364         * mini.c (mini_init): When using xdebug, disable freeing of domains.
365
366 2009-01-21  Mark Probst  <mark.probst@gmail.com>
367
368         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
369         descriptors.
370
371         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
372         special case and handle mono_arch_delegate_invoke_impl() returning
373         function descriptors.
374
375         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
376         trampolines return function descriptors, too.
377
378 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
379
380         * method-to-ir.c (handle_alloc): Avoid generic instances in the
381         out_of_line optimization.
382
383 2009-01-21  Martin Baulig  <martin@ximian.com>
384
385         * mini.h
386         (MonoCompile): Added `disable_deadce_vars' to disable removing
387         unused variables.
388
389         * mini.c
390         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
391         inside the debugger.
392
393         * liveness.c (mono_analyze_liveness): Don't remove any unused
394         variables if `cfg->disable_deadce_vars' is set.
395
396 2009-01-21  Mark Probst  <mark.probst@gmail.com>
397
398         * method-to-ir.c: Only apply exception constructor optimization if
399         the the method actually belongs to an exception class.  Fixes
400         #467456.
401
402 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
403
404         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
405         change inside a #ifdef __mono_ppc64__.
406
407         * aot-compiler.c (compile_method): Remove the previous limitation.
408
409         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
410         on type variables in AOTed code.
411         
412         * aot-compiler.c (compile_method): Skip generic methods having type 
413         constraints on their generic parameters.
414
415         * aot-compiler.c (compile_method): Check for methods which cannot be
416         encoded inside RGCTX_FETCH patches as well.
417
418         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
419         build.
420
421 2009-01-20  Mark Probst  <mark.probst@gmail.com>
422
423         * method-to-ir.c: Force the vtable variable in shared generic code
424         for the case that they might show up on a stack trace where they
425         are needed.
426
427         * mini-exceptions.c: Save and use generic sharing info as well as
428         IP in stack traces to resolve shared generic instantiations.
429
430 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
431
432         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
433         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
434
435 2009-01-20  Mark Probst  <mark.probst@gmail.com>
436
437         * method-to-ir.c: Do generic sharing for array constructors.
438
439 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
440
441         * mini-exceptions.c (mono_print_thread_dump): Add information
442         about the thread state using wapi_current_thread_desc.
443
444 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
445
446         * basic-simd.cs: Tests for the new constructors. 
447
448 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
449
450         * mini-ops.h: Added OP_EXPAND_*
451
452         * cpu-x86.md: Same.
453
454         * mini-x86.c (mono_arch_output_basic_block): Same.
455         
456         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
457
458 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
459
460         * iltests.il.in: Add a test for #467385.
461
462 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
463
464         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
465         thread been cleaned up is not the same currently in execution.
466
467         Fixes appdomain-unload crashes on windows, osx and linux variants
468         without the __thread keyword.
469
470 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
471
472         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
473         (koush@koushikdutta.com). Implement this for android.
474
475         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
476         begins with a digit.
477
478         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
479         mono_marshal_get_write_barrier ().
480
481 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
482
483         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
484         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
485         that pass them on a register pair.
486
487         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
488         test was crashing due to that.
489
490 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
491
492         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
493         trampoline code. Include ucontext.h only if available.
494
495 2009-01-15  Mark Probst  <mark.probst@gmail.com>
496
497         * mini.c: mono_domain_lookup_shared_generic() takes an open method
498         and doesn't check whether it's sharable, like it was before
499         removing the shared generics hash.  This brings IronPython
500         performance back to what it was before that change.
501
502 2009-01-14  Mark Probst  <mark.probst@gmail.com>
503
504         * method-to-ir.c: Handle delegate invocation optimization earlier,
505         otherwise it would be handled (much more slowly) by the
506         final/sealed optimization.
507
508 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
509
510         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
511         domain is not set. Fixes #465864.
512
513 2009-01-12  Mark Probst  <mark.probst@gmail.com>
514
515         * method-to-ir.c: Don't stop sharing of generic methods with catch
516         clauses - we already handle those.
517
518 2009-01-12  Mark Probst  <mark.probst@gmail.com>
519
520         * mini.c, mini.h: lookup_generic_method() is now
521         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
522         making the shared_generics_hash obsolete.
523
524 2009-01-12  Mark Probst  <mark.probst@gmail.com>
525
526         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
527         use the red zone.  Make room on the stack first and then use it,
528         not the other way around.
529
530 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
531
532         * mini.c (mini_init): Call mono_xdebug_init ().
533
534         * aot-compiler.c (mono_xdebug_init): Make this non-static.
535
536 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
537
538         * TestDriver.cs: Add an --iter argument to run tests multiple times.
539
540         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
541         trampolines.
542
543         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
544         debug+unwind info for trampolines.
545
546         * mini.c (mono_create_unwind_op): New helper function.
547
548         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
549
550 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
551
552         * aot-compiler.c: Fix the build.
553
554 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
555
556         * Makefile.am: Update dtrace-prelink.sh location.
557
558 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
559
560         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
561         optimization. Fixes #464520.
562
563 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
564
565         * mini-amd64.c : Adding code to save/restore non-volatile registers
566            on Winx64.
567
568         * exceptions-amd64.c : Adding code to save/restore non-volatile 
569           registers on Winx64.
570
571         Contributed under MIT/X11 license.
572
573 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
574
575         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
576         __GNUC_MINOR__ which can break when the major version changes.
577
578 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
579
580         * basic-simd.cs: Add tests for usage of the sizeof opcode.
581
582 2009-01-07  Geoff Norton  <gnorton@novell.com>
583
584         * helpers.c:  Allow mono -v -v -v to work on darwin.
585
586 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
587
588         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
589           pattern. 
590
591         Contributed under MIT/X11 license.
592
593 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
594
595         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
596         instead of directly accessing type->data.klass. Fixes #462016.
597         (mono_allocate_stack_slots_full): Ditto.
598
599         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
600         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
601
602         * aot-compiler.c (emit_plt): Fix ARM build.
603
604 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
605
606         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
607         
608         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
609         change.
610
611         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
612         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
613         #463357.
614
615         * iltests.il.in: Add a regression test.
616
617 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
618
619         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
620
621 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
622
623         * basic-simd.cs: Add a regression test for #462457.
624
625 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
626
627         * mini-ops.h: Add a definition of XPHI.
628
629         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
630
631         * ssa.c (op_phi_to_move): Handle XPHI.
632
633         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
634
635         Fixes #462457
636
637 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
638
639         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
640
641 2008-12-31  Geoff Norton  <gnorton@novell.com>
642
643         * mini-ppc.c: The prolog size allocated can be too small for darwin
644         ppc32 under certain circumstances.  Also fix a small logic bug.
645
646 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
647
648         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
649         while loading AOT methods.
650
651         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
652         since only the former is nulled out after a successful cast. This prevents
653         crashes with rethrown exceptions when using --debug=casts.
654
655 2008-12-24  Mark Probst  <mark.probst@gmail.com>
656
657         * mini.h: New macro for checking whether a method is final,
658         i.e. whether the method or its class is marked final.
659
660         * method-to-ir.c: Use the new macro for all final-checks
661         consistently.  Fixes the crash in the System.ServiceModel tests.
662
663 2008-12-23  Mark Probst  <mark.probst@gmail.com>
664
665         * mini-exceptions.c (get_exception_catch_class): Corrected another
666         overly strict assertion.
667
668 2008-12-23  Mark Probst  <mark.probst@gmail.com>
669
670         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
671         Clobbering it is not allowed because the caller might use it as
672         the vtable register in the interface call.
673
674 2008-12-19  Mark Probst  <mark.probst@gmail.com>
675
676         * mini-exceptions.c (get_exception_catch_class): Corrected an
677         overly strict assertion.
678
679 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
680         
681         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
682
683         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
684
685         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
686
687         * cpu-mips.md: correct lengths for certain long_ opcodes.
688
689         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
690
691         * 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().
692         
693 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
694
695         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
696         
697 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
698         
699         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
700         
701 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
702
703         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
704         next basic block.
705         
706 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
707
708         * 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
709
710         * 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)
711         
712 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
713         
714         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
715         
716 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
717
718         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
719         gshared code. Fixes #458947.
720
721         * generics.cs: Add a test.
722
723 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
724         
725         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
726         
727         * mini-mips.c: first pass n32 code generation.
728
729         * mini-mips.h: datatypes and defines for n32 support.
730
731         * exceptions-mips.c: first pass n32 code generation.
732         
733         * tramp-mips.c: first pass n32 code generation.
734         
735         * cpu-mips.md: add long_ opcodes.
736         
737 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
738
739         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
740
741         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
742         
743         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
744         
745         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
746
747         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
748
749         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
750
751         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
752
753         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
754
755         * helpers.c: for mips/n32, don't pass -mips32 to objdump
756
757 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
758
759         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
760
761 2008-12-12  Andrés G. Aragoneses  <aaragoneses@novell.com>
762
763         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
764
765 2008-12-12  Mark Probst  <mark.probst@gmail.com>
766
767         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
768         descriptors for helper functions directly in front of the code.
769
770 2008-12-11  Mark Probst  <mark.probst@gmail.com>
771
772         * method-to-ir.c: Removed an unnecessary assertion.
773
774 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
775
776         * method-to-ir.c: Merge SGEN changes from the old JIT.
777
778 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
779
780         * driver.c (compile_all_methods_thread_main): Handle failure of
781         mono_get_method ().
782
783 2008-12-10  Mark Probst  <mark.probst@gmail.com>
784
785         * mini-ppc.c: Merged with mini-ppc64.c.
786
787         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
788
789         * Makefile.am: Use the same sources for PPC and PPC64.
790
791         * mini-ppc64.c: Removed.
792
793 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
794
795         * branch-opts.c (remove_block_if_useless): Extract fall through detection
796         code to mono_bb_is_fall_through.
797         
798         * branch-opts.c (mono_remove_critical_edges): Same.
799
800 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
801
802         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
803         expect that an OP_BR_REG will be there.
804
805 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
806
807         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
808         for the many branch ops. The original check miss OP_BR_REG.
809
810         Fixes #457574.
811         
812 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
813
814         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
815
816 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
817
818         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
819         while holding the aot lock.
820
821 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
822
823         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
824         
825 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
826
827         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
828           to release all runtime callable wrappers held by the runtime.
829
830         Contributed under MIT/X11 license.
831
832 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
833
834         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
835           for Winx64.
836
837         Contributed under MIT/X11 license.
838
839 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
840
841         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
842         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
843
844 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
845
846         * cpu-mips.md: fix ckfinite length
847
848         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
849         (mono_arch_lowering_pass): cleanup, rearrange for clarity
850         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
851         
852 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
853
854         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
855         
856 2008-12-08  Geoff Norton  <gnorton@novell.com>
857
858         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
859         size by 8 bytes as well.
860
861 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
862
863         * basic-simd.cs: Fix method names for Vector16b.
864         
865 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
866
867         * basic-simd.cs: Fix method names for Vector16sb.
868
869 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
870
871         * basic-simd.cs: Fix method names for Vector8us.
872         
873 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
874
875         * basic-simd.cs: Fix method names for Vector8s.
876         
877 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
878
879         * basic-simd.cs: Fix method names for Vector4ui.
880
881 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
882
883         * basic-simd.cs: Fix method names for Vector2l.
884
885 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
886
887         * basic-simd.cs: Fix method names for Vector2d.
888
889 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
890
891         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
892         that are extension methods.
893
894 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
895
896         * basic-simd.cs: Fix method names for Vector4f.
897
898 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
899
900         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
901         as such. Fixes #456669.
902
903 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
904
905         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
906         
907 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
908
909         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
910         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
911         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
912         (mips_adjust_stackframe): handle FP spills
913                 
914         * mini-ops.h: add mips_mtc1_s2
915         
916         * cpu-mips.md: add mips_mtc1_s2
917         
918 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
919
920         * unwind.c: New file, move the unwind info encoding functions here from
921         aot-compiler.c, so they could be used at runtime too.
922
923 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
924
925         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
926         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
927         
928 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
929
930         * mini-mips.c: cleanup warnings
931         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
932         (mips_adjust_stackframe): handle case of taking the address of stack locals
933         
934 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
935
936         * aot-compiler.c: Implement a few functions missing from the asm writer.
937         (emit_method_code): Only write symbols for methods when using the bin
938         writer, since the assembler can't deal with the characters in our method
939         names.
940
941         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
942
943         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
944         call.
945
946         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
947         a bit to also restore %rax.
948
949 2008-12-05  Mark Probst  <mark.probst@gmail.com>
950
951         * mini-ppc.c: Some simple merges from mini-ppc64.c.
952
953 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
954
955         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
956         arguments.
957
958 2008-12-05  Mark Probst  <mark.probst@gmail.com>
959
960         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
961
962         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
963         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
964
965         * exceptions-ppc64.c: Removed.
966
967         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
968
969 2008-12-05  Mark Probst  <mark.probst@gmail.com>
970
971         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
972         tramp-ppc64.c.
973
974         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
975
976         * tramp-ppc64.c: Removed.
977
978 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
979
980         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
981         the TYPESPEC table.
982
983 2008-12-05  Mark Probst  <mark.probst@gmail.com>
984
985         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
986
987         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
988         mini-ppc.h instead of mini-ppc64.h.
989
990         * mini-ppc64.h: Removed.
991
992 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
993
994         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
995         
996         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
997         
998 2008-12-05  Mark Probst  <mark.probst@gmail.com>
999
1000         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
1001         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
1002         code easier.
1003
1004 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1005
1006         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
1007
1008 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1009
1010         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
1011
1012 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1013
1014         * basic-simd.cs: Tests for operator == and != on Vector4f.
1015
1016 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1017
1018         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
1019
1020         * simd-intrinsics.c: Kill useless enum.
1021
1022 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1023
1024         * cpu-mips.md: add long_conv_to_ovf_i4_2
1025         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
1026
1027 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1028
1029         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
1030         
1031         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
1032
1033 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1034
1035         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
1036         
1037 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1038
1039         * basic-simd.cs: Add tests for new methods.
1040
1041 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1042
1043         * simd-intrinsics.c: Add support for operator == and !=
1044         on Vector4(u)i.
1045
1046         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
1047
1048 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1049
1050         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
1051
1052 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
1053
1054         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
1055
1056         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
1057         MONO_PATCH_INFO_ICALL_ADDR.
1058
1059         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
1060
1061         * aot-compiler.c: Resurrect full-aot support.
1062
1063 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1064
1065         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
1066         
1067 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1068
1069         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
1070         
1071 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
1072
1073         * basic-simd.cs: Fix tests to work under ppc.
1074         Remove tests for methods that will be removed.
1075
1076 2008-12-03  Mark Probst  <mark.probst@gmail.com>
1077
1078         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
1079         generic type (via a typedef or typeref) correctly.
1080
1081 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
1082
1083         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
1084         diagnose an assertion failure.
1085
1086 2008-12-02  Mark Probst  <mark.probst@gmail.com>
1087
1088         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
1089         Fix trampoline size.
1090
1091         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
1092         conversion opcodes are implemented natively instead via emulation.
1093
1094 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1095
1096         * cpu-mips.md: remove mips_xori
1097
1098         * mini-ops.h:  remove mips_xori
1099
1100         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
1101
1102         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
1103         
1104         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
1105         
1106 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1107
1108         * cpu-mips.md: fix instruction lengths.
1109
1110         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
1111
1112         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
1113
1114         * mini-ops.h: fix slti / sltiu op profiles.
1115         
1116 2008-12-02  Martin Baulig  <martin@ximian.com>
1117
1118         * method-to-ir.c (mono_method_to_ir): Disable debugging
1119         information for the init locals block to make the debugger stop
1120         after all locals have been initalized.
1121
1122 2008-12-02  Martin Baulig  <martin@ximian.com>
1123
1124         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
1125         running inside the debugger.
1126
1127 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
1128
1129         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
1130         is enabled.
1131
1132         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
1133         alu->alu imm optimization which only shows if deadce is disabled.
1134
1135         * aot-compiler.c: Rename the function names for the binary and asm writers
1136         so they can coexist in the same process. Rework the xdebug code to use the
1137         asm writer. This avoids the need to call into the runtime to dump the
1138         debugging info. Add more debugging info for types.
1139
1140         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
1141
1142         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
1143         cpu description tables, they can't occur in cpu-<ARCH>.md.
1144
1145         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
1146         the stack in CEE_LDFLDA. Fixes #450542.
1147
1148         * generics.cs: Add a new test.
1149
1150 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1151
1152         * mini-ops.h: updated MIPS opcodes
1153         * mini-mips.c: decompose long opts
1154         * mini-mips.h: decompose long opts
1155         
1156 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
1157
1158         * cpu-mips.md: fix length on int_rem_un
1159         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
1160         
1161 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
1162
1163         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
1164
1165         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
1166
1167 2008-11-29  Martin Baulig  <martin@ximian.com>
1168
1169         * mini-exceptions.c (mono_handle_native_sigsegv): Check
1170         mono_debug_using_mono_debugger() in addition to the
1171         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
1172
1173 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1174
1175         * mini-ops.h: updated more MIPS opcodes
1176         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
1177         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
1178         
1179 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1180
1181         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
1182
1183 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1184
1185         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
1186         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
1187         * mini-ops.h: correct selected mips opcode entries
1188         
1189 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1190
1191         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
1192         make them work.
1193
1194 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1195
1196         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
1197
1198 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1199
1200         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
1201         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
1202         * mini-mips.h: disable IMT
1203         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
1204         
1205 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1206
1207         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
1208
1209 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1210
1211         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
1212
1213 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
1214
1215         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
1216         consistency.
1217
1218 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1219
1220         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1221         for Set/GetVector aligned versions.
1222
1223 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1224
1225         * basic-simd.cs: Add tests for Get/SetVector.
1226
1227 2008-11-27  Mark Probst  <mark.probst@gmail.com>
1228
1229         * mini.c: Removed g_slist_append_mempool().  Now in
1230         metadata/mempool.c.
1231
1232 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1233
1234         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
1235         size properly and make the bounds check optional.
1236
1237         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1238         for SetVector and IsAligned.
1239
1240 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
1241
1242         * mini.c: Remove unused mono_normalize_opcodes () function.
1243
1244 2008-11-26  Mark Probst  <mark.probst@gmail.com>
1245
1246         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
1247         using the new atomic add ops now.
1248
1249         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
1250         add.
1251
1252 2008-11-26  Mark Probst  <mark.probst@gmail.com>
1253
1254         * mini-ppc64.c: Several fixes.
1255
1256 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1257
1258         * cpu-mips.md: added jump_table
1259         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
1260
1261 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1262
1263         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
1264
1265 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1266
1267         * mini-ops.h: corrected a handful of MIPS opcodes.
1268
1269 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1270
1271         * aot-compiler.c: MIPS to use ELF writer
1272
1273 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1274
1275         * mini-codegen.c: remove MIPS specific assert.
1276
1277 2008-11-25  Mark Probst  <mark.probst@gmail.com>
1278
1279         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
1280         fixes.  PPC64 now passes most of the runtime regressions.
1281
1282 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
1283
1284         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
1285         volatile intervals a bit.
1286
1287 2008-11-24  Mark Probst  <mark.probst@gmail.com>
1288
1289         * basic-long.cs: New test case.
1290
1291 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
1292
1293         * mini.c (mini_method_compile): Disable globalra for large methods for 
1294         now.
1295
1296         * regalloc2.c (order_moves): Add fp support.
1297
1298         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
1299         source bblock ends with an OP_BR_REG.
1300
1301         * ratests.cs: Add a new test.
1302
1303 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1304
1305         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
1306         sharing.  PPC64 now passes generics.exe.
1307
1308 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1309
1310         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
1311
1312 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
1313
1314         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
1315         memory when mono_jit_info_table_find () can't find the method in the
1316         LMF case.
1317
1318         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
1319         AOTed code too.
1320         
1321         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
1322         writer too.
1323
1324 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1325
1326         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
1327         Several fixes.  PPC64 now runs exceptions.exe and
1328         devirtualization.exe.
1329
1330 2008-11-22  Mark Probst  <mark.probst@gmail.com>
1331
1332         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
1333         arrays.exe and basic-math.exe.
1334
1335 2008-11-22  Mark Probst  <mark.probst@gmail.com>
1336
1337         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
1338         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
1339
1340 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1341
1342         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
1343
1344 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1345
1346         * method-to-ir.c: Move bounds checking macros to ir-emit.h
1347
1348         * ir-emit.h: Move macros from method-to-ir.c to here.
1349
1350 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1351
1352         * mini-ops.h: Correct the long simd ops to use LREG.
1353
1354 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
1355
1356         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
1357         
1358         * mini-ops.h: Correct the dreg type of a few long opcodes.
1359
1360         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
1361         Add netbsd support.
1362
1363 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
1364
1365         * mini-ppc.c: remove negative stack references in epilog
1366         for platforms that don't support the red zone.
1367
1368 2008-11-21  Mark Probst  <mark.probst@gmail.com>
1369
1370         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
1371         point regs.  Now PPC64 passes basic-calls.exe.
1372
1373 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1374
1375         * basic-simd.cs: Add tests for accessors of Vector2l.
1376
1377 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1378
1379         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
1380
1381         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
1382         
1383         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
1384
1385 2008-11-21  Mark Probst  <mark.probst@gmail.com>
1386
1387         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
1388         PPC64 passes basic-long.exe.
1389
1390 2008-11-20  Mark Probst  <mark.probst@gmail.com>
1391
1392         * decompose.c: Decompose carry and overflow add on PPC64 like on
1393         other 64 bit archs.  Don't decompose sub at all on PPC64.
1394
1395         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
1396         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
1397         basic-long.exe.
1398
1399 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1400
1401         * basic-simd.cs: Add tests for accessors of Vector2d.
1402
1403 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1404
1405         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
1406
1407         * cpu-x86.md: Same.
1408
1409         * mini-x86.c (mono_arch_output_basic_block): Same.
1410         
1411         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
1412
1413 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1414
1415         * basic-simd.cs: Add tests for accessors of Vector4f.
1416
1417 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1418
1419         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
1420
1421         * cpu-x86.md: Same.
1422
1423         * mini-x86.c (mono_arch_output_basic_block): Same.
1424         
1425         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
1426
1427 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1428
1429         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
1430
1431 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1432
1433         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
1434
1435         * cpu-x86.md: Same.
1436
1437         * mini-x86.c (mono_arch_output_basic_block): Same.
1438         
1439         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
1440
1441 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1442
1443         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
1444
1445 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1446
1447         * simd-intrinsics.c: Enable setters for Vector16sb.
1448
1449 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1450
1451         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
1452
1453         * cpu-x86.md: Same.
1454
1455         * mini-x86.c (mono_arch_output_basic_block): Same.
1456         
1457         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
1458
1459 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
1460
1461         * simd-intrinsics.c: Implement setter for Vector8us.
1462
1463 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
1464
1465         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
1466         for dead variables.
1467
1468 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
1469
1470         * mini-ppc.c: remove references to the red zone in the prolog
1471         (for systems that don't support it).
1472
1473 2008-11-19  Mark Probst  <mark.probst@gmail.com>
1474
1475         * cpu-ppc64.md: Fixed a few instruction lengths.
1476
1477         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
1478         now.
1479
1480 2008-11-19  Mark Probst  <mark.probst@gmail.com>
1481
1482         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
1483         basic.exe now.
1484
1485 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
1486
1487         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
1488
1489 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
1490
1491         * mini-ops.h: Added OP_INSERT_I2.
1492
1493         * cpu-x86.md: Same.
1494
1495         * mini-x86.c (mono_arch_output_basic_block): Same.
1496         
1497         * simd-intrinsics.c: Implement setter for Vector8s.
1498
1499         * simd-methods.h: Add the names of get setters of Vector8s.
1500
1501 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
1502
1503         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
1504         
1505         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
1506         parameters.
1507
1508         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1509
1510 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1511
1512         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
1513         for PPC64.  An empty program runs now.
1514
1515 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
1516
1517         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1518
1519         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
1520         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
1521         info for JITted code is emitted into a shared library, loadable into gdb.
1522
1523 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1524
1525         * Makefile.am: Changes to build PPC64.
1526
1527         * mini-arch.h: Include mini-ppc64.h on PPC64.
1528
1529 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1530
1531         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
1532         in PPC code up to r119147.
1533
1534 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1535
1536         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1537         cpu-ppc64.md: Changes for PPC64.
1538
1539         Based on code submitted by andreas.faerber@web.de at
1540         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
1541         X11/MIT license.
1542
1543 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1544
1545         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1546         cpu-ppc64.md: Copied from the corresponding PPC files from
1547         r118846.
1548
1549 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
1550
1551         * mini-ops.h: Added OP_ROUND.
1552
1553         * cpu-x86.md: Added round.
1554
1555         * mini-x86.c: Added support for intrinsicing Math.Round (double).
1556
1557         * basic-math.cs: Added test_0_round to test rounding.
1558
1559         Contributed under MIT/X11 license.
1560
1561 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
1562
1563         * aot-compiler.c : Fix the Winx64 build.
1564
1565         Contributed under MIT/X11 license.
1566
1567 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
1568
1569         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
1570         in OP_EXTRACT_R8 to avoid possible stack corruption.
1571
1572 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
1573
1574         * mini-ops.h: Added OP_EXTRACT_R8/I8.
1575
1576         * cpu-x86.md: Added extract_r8.
1577
1578         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
1579         
1580         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
1581         a couple of OP_EXTRACT_I4.
1582
1583         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
1584
1585         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
1586
1587 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
1588
1589         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
1590         and not 4.1. 
1591
1592 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
1593
1594         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
1595         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
1596
1597         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
1598         are not needed any more.
1599
1600         * mini.h: Remove the unused INS_LIST macros.
1601
1602         * mini.c (mini_method_compile): Remove a disable globalra case which is no
1603         longer needed.
1604
1605         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
1606         ir-emit.h.
1607
1608         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
1609         mono_alloc_ireg () instead.
1610
1611         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
1612         macros.
1613
1614         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
1615         on amd64.
1616
1617         * aot-runtime.c (load_aot_module): Disable AOT when running under
1618         CAS.
1619
1620         * mini-amd64.h: Change the monitor fastpath defines to check for
1621         !PLATFORM_WIN32 so they work on *bsd too.
1622
1623         * mini.h mini.c mini-hhpa.c: Remove more unused code.
1624
1625         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
1626
1627         * mini.h (MonoCompile): Remove new_ir flag.
1628
1629         * regalloc.h regalloc.c: Remove unused code.
1630
1631         * cpu-*.md: Remove more unused opcodes.
1632
1633         * simple-cee-ops.h simple-mini-ops.h: Removed.
1634
1635         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
1636         
1637 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
1638
1639         * aliasing.h: Removed.
1640
1641         * *.c: Remove references to aliasing.h and inssel.h.
1642
1643         * mini.c: Remove additional unused functions.
1644
1645         * mini-ops.h cpu-*.md: Remove unused opcodes.
1646
1647 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
1648
1649         Remove the old JIT code.
1650
1651         * inssel*.brg: Removed.
1652
1653         * ssa.c abcremoval.c aliasing.c: Removed.
1654
1655         * ssa2.c: Renamed to ssa.c.
1656
1657         * abcremoval2.c: Renamed to abcremoval.c.
1658
1659         * *.c: Removed all !cfg->new_ir code.
1660
1661         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
1662         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
1663
1664         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
1665         
1666 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
1667
1668         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
1669         to simplify the code and cut back on the number of global symbols in the AOT
1670         file.
1671         
1672         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
1673
1674 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
1675
1676         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
1677         with the got/got_info tables.
1678
1679         * mini.h: Bump AOT file format version.
1680         
1681         * unwind.h: New file, contains definitions for stack unwinding.
1682
1683         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
1684         to cfg->unwind_ops.
1685         
1686         * aot-compiler.c: Generalize the emitting of unwind information to use the
1687         information in cfg->unwind_ops.
1688
1689         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
1690
1691         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
1692         AOT method frames. Enable writing symbols for methods by default.
1693
1694 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
1695
1696         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
1697         and make it work with vectors of element sizes 1, 2 and 4.
1698
1699         * simd-intrinsics.c: Enable getter for all vectors with element size
1700         1, 2 or 4.
1701
1702         * simd-methods.h: Add the names of other getters.
1703
1704         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
1705
1706         * cpu-x86.md: Same.
1707
1708         * mini-x86.c: Same.
1709
1710 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
1711
1712         * mini-ppc.h: portability fix.
1713
1714 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
1715
1716         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
1717         buggy and will overwrite it.
1718
1719 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
1720
1721         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
1722         Use it to emit local symbols for all methods so AOTed methods show up with
1723         their full name in gdb/valgrind output.
1724
1725 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
1726
1727         * mini-ppc.c: portability fixes.
1728
1729 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
1730
1731         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
1732         entries out of the if (!generic_shared...) code so it is always done.
1733         (mono_class_init_trampoline): Do the patching when running under valgrind
1734         too, newer versions of valgrind have no problems with it.
1735
1736 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
1737
1738         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
1739         further sections.
1740
1741 2008-11-13  Mark Probst  <mark.probst@gmail.com>
1742
1743         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
1744         filters.
1745
1746 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1747
1748         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
1749
1750 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1751
1752         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
1753
1754         * cpu-x86.md: Same.
1755
1756         * mini-x86.c: Same.
1757
1758         * simd-intrinsics.c: Same.
1759
1760 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1761
1762         * simd-intrinsics.c: Enable constructor intrinsics for all types.
1763
1764 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1765
1766         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
1767         to work with more Vector types.
1768
1769 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1770
1771         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
1772         store the elemens directly instead of using and intermediate.
1773
1774 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
1775
1776         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
1777
1778         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
1779         to preserve %eax for aot plt trampolines.
1780
1781         * aot-compiler.c (compile_method): Don't skip synchronized methods.
1782         (encode_method_ref): Flag synchronized methods so they won't go through
1783         the AOT trampoline.
1784
1785         * aot-compiler.c: Additional work to support AOTing synchronized methods/
1786         wrappers.
1787
1788         * cpu-ia64.md (jmp): Increase max length.
1789
1790 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
1791
1792         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
1793         open generic classes.
1794
1795         * aot-compiler.c: Enable the ELF writer on ELF platforms.
1796
1797         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
1798         box+brtrue optimization since it causes test failures on x86.
1799
1800 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
1801
1802         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
1803
1804         * cpu-x86.md: Same.
1805
1806         * mini-x86.c: Same.
1807
1808         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
1809         for simd ctor values. 
1810
1811         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
1812         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
1813
1814 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
1815
1816         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
1817         LogicalRightShift.
1818
1819         * simd-instrincs.c: Same.
1820
1821         * basic-simd.cs: Same.
1822
1823 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
1824
1825         * ratests.cs: Add more tests.
1826
1827         * regalloc2.c (add_spill_code): Handle more corner cases.
1828
1829 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
1830
1831         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
1832         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
1833         both the source an destination of an instruction.
1834
1835 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
1836
1837         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
1838         wapihandles.c: more portability changes.
1839
1840 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
1841
1842         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
1843         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
1844         safe to execute in a signal handler and the kernel provides better
1845         the info in /proc/self/smaps. Avoid the assert on sigaction during
1846         cleanup.
1847
1848 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
1849
1850         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
1851         do the bblock linking hack if it is actually needed.
1852
1853         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
1854         up linking.
1855
1856         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
1857         crash problem is fixed.
1858
1859         * branch-opts.c (mono_remove_critical_edges): Link up newly added
1860         bblocks.
1861
1862         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
1863         for catch clauses.
1864         (mini_method_compile): Set the starting value of next_vreg to 
1865         MAX_IREGS + MAX_FREGS when using globalra.
1866
1867         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
1868         filter clauses with BB_EXCEPTION_HANDLER.
1869
1870         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
1871
1872 2008-11-10  Mark Probst  <mark.probst@gmail.com>
1873
1874         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
1875         space for stdcall.  Fixes regressions on Win32.
1876
1877 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
1878
1879         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
1880         bblocks.
1881         (linear_scan): Remove an assert which doesn't seem to be needed.
1882
1883         * local-propagation.c (mono_local_deadce): Avoid a call to
1884         MONO_DELETE_INS which would screw up the instruction linking.
1885
1886         * mini.c (mono_decompose_op_imm): Make this work with globalra.
1887
1888         * regalloc2.c: Upgrade to work the current JIT code.
1889
1890 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
1891
1892         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
1893         case.
1894
1895         * aot-runtime.c: Remove some dead code.
1896
1897         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
1898         consistency.
1899         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
1900
1901         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
1902         trampolines using sscanf since atoi doesn't work on large unsigned values.
1903
1904         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
1905         Initialize code_size.
1906
1907 2008-11-08  Mark Probst  <mark.probst@gmail.com>
1908
1909         * method-to-ir.c (mini_emit_inst_for_method): Make
1910         Interlocked.CompareExchange work for Int arguments on 32 bit
1911         archs, as well.
1912
1913 2008-11-07  Mark Probst  <mark.probst@gmail.com>
1914
1915         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
1916
1917 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
1918
1919         * main.c Fix MSVC build.
1920
1921         Contributed under MIT/X11 license.
1922
1923 2008-11-06  Mark Probst  <mark.probst@gmail.com>
1924
1925         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
1926         alignment larger than 8 bytes are aligned correctly, too.
1927
1928         * mini.c: Honor the min_align field of MonoClass when laying out
1929         the stack.
1930
1931 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
1932
1933         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
1934
1935         * aot-compiler.c (emit_plt): Fix a warning.
1936         
1937         * aot-compiler.c: Implement ARM support in the binary writer.
1938
1939 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
1940
1941         * basic-simd.cs: Add test for getter with byref arg.
1942         Fix the naming of a few tests.
1943         Add missing checks to a test.
1944
1945 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
1946
1947         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
1948
1949         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
1950         most of the full-aot support for monitor enter/exit trampolines.
1951
1952         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
1953         enter/exit trampoline creation functions.
1954
1955         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
1956         make dist.
1957
1958 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
1959
1960         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
1961         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
1962         implement the needed functionality without adding crap to the runtime.
1963
1964 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
1965
1966         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
1967         non-x86 builds.
1968
1969         * mini.c (mono_build_date): New global version holding the build date in
1970         string format.
1971         
1972         * Makefile.am (buildver.c): Generate a file containing the build date.
1973
1974         * main.c: Set the build date from the generated file.
1975
1976         * mini.c (mono_get_runtime_build_info): New helper function returning build
1977         information in a string format.
1978         
1979         * driver.c (mono_main): Print the build date in --version.
1980
1981         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
1982         file when the bind-to-runtime-version option is used.
1983
1984 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
1985
1986         * simd-intrinsics.c: Fix bug when using getters and byref args. 
1987
1988 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
1989
1990         * simd-methods.h: Rename prefetch methods.
1991
1992         * simd-intrinsics.c: Same.      
1993
1994 2008-11-05  Mark Probst  <mark.probst@gmail.com>
1995
1996         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
1997         sizes.
1998
1999 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2000
2001         * aot-compiler.c: Use the bundled elf header files instead of depending on
2002         the system one.
2003         
2004         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
2005         mempool.
2006
2007         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
2008         on every call.
2009
2010 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
2011
2012         * cpu-x86.md: Add store nta ops.
2013
2014         * mini-ops.h: Same.
2015
2016         * mini-x86.c: Same.
2017
2018         * mini.h: Add an enum for simd prefetch modes.
2019
2020         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
2021         of store. Use the changed code to support store nta.
2022
2023         * simd-intrinsics.c: Add prefetch ops for all vector types.
2024
2025 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2026
2027         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
2028         threads.
2029         
2030         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
2031         names.
2032
2033         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
2034         trampolines.
2035
2036 2008-11-04  Mark Probst  <mark.probst@gmail.com>
2037
2038         * mini-x86.c: Fixed commit.
2039
2040 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2041
2042         * aot-compiler.c (emit_plt): Align the plt section only on x86.
2043
2044 2008-11-04  Mark Probst  <mark.probst@gmail.com>
2045
2046         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
2047         and MONITOR_EXIT, for the ASM fastpaths.
2048
2049         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
2050         available.
2051
2052         * mini.c, patch-info.h: Signature and patch infos for
2053         Monitor.Enter/Exit trampolines.
2054
2055         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
2056
2057         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
2058         Monitor.Enter/Exit ASM fastpath for Linux.
2059
2060 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2061
2062         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
2063
2064         * objects.cs: Add a new test.
2065         
2066         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
2067
2068         * aot-runtime.c (load_method): Run class initialization in the PLT case even
2069         if MONO_LOG_LEVEL is set.
2070
2071         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
2072
2073         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
2074
2075         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
2076         
2077         * aot-compiler.c: Change the relocation code to use virtual addresses instead
2078         of file offsets. Align the sections belonging to the data segment to 
2079         PAGESIZE.
2080
2081 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
2082
2083         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
2084         elf.h. Port it to amd64.
2085
2086 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2087
2088         * driver.c: Enable SIMD by default.
2089
2090 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2091
2092         * cpu-x86.md: Add prefetch op.
2093
2094         * mini-ops.h: Same.
2095
2096         * mini-x86.c: Same.
2097
2098         * mini.h: Add an enum for simd prefetch modes.
2099
2100         * simd-methods.h: Add prefetch function names.
2101
2102         * simd-intrinsics.c: Add prefetch ops for all vector types.
2103
2104 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
2105
2106         * aot-compiler.c (emit_bytes): Speed this up a little.
2107
2108 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
2109
2110         * aot-compiler.c: Add JIT time etc. statistics.
2111         
2112         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
2113
2114         * mini.h (MonoCompile): Add 'got_offset' field.
2115
2116         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
2117         method_got_offsets array.
2118
2119         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
2120         wrappers.
2121
2122         * aot-compiler.c (compile_method): Add generic method instances referenced
2123         by the method to the list of methods to be compiled, this is required so if
2124         A<T> references B<T>, and another assembly references A<int>, then it will
2125         also get a copy of B<int>.
2126
2127         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
2128         when checking for monitor enter/exit.
2129
2130 2008-10-30  Mark Probst  <mark.probst@gmail.com>
2131
2132         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
2133         for Monitor.Enter and Monitor.Exit if enabled.
2134
2135         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
2136         Solaris.
2137
2138 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
2139
2140         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
2141         of an OP_MOVE. Fixes #440046.
2142
2143         * basic-long.cs: Add a new test.
2144
2145 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
2146
2147         * mini.h: Add synchronization note for the managed counter-part.
2148
2149         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
2150         returns the simd caps of the current cpu.
2151
2152 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
2153
2154         * basic-simd.cs: Remove Console.WriteLine.
2155
2156 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2157
2158         * basic-simd.cs: New tests for Vector2ul.
2159
2160 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2161
2162         * simd-intrinsics.c: Add new vector type Vector2ul.
2163
2164 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2165
2166         * basic-simd.cs: New tests for Vector2l.
2167
2168 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2169
2170         * cpu-x86.md: Add long version of most packed int ops.
2171
2172         * mini-ops.h: Same.
2173
2174         * mini-x86.h: Same.
2175
2176         * simd-intrinsics.c: Add new vector type Vector2l.
2177
2178 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2179
2180         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
2181
2182         * simd-methods.h: Remove SN_op_BitwiseXor.
2183
2184 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
2185
2186         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
2187         alignment.
2188
2189 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2190
2191         * basic-simd.cs: Test for Vector2d.
2192
2193         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
2194         value.
2195
2196 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2197
2198         * cpu-x86.md: Add double version of all packed float ops.
2199
2200         * mini-ops.h: Same.
2201
2202         * mini-x86.h: Same.
2203
2204         * simd-intrinsics.c: Add new vector type Vector2d.
2205
2206         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
2207
2208         * simd-methods.h: Add Duplicate.
2209
2210 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2211
2212         * basic-simd.cs: Test for packing with signed saturation.
2213
2214 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
2215
2216         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
2217         found in the TYPESPEC table.
2218
2219 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
2220
2221         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
2222         too.
2223
2224         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2225
2226         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
2227         instead of the RVA, since the RVA can be changed by tools like the cil 
2228         stripper.
2229
2230         * method-to-ir.c (mono_method_to_ir2): Ditto.
2231
2232         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
2233         (deserialize_variable): Ditto.
2234
2235 2008-10-25  Martin Baulig  <martin@ximian.com>
2236
2237         * debug-mini.c (write_variable): Use
2238         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
2239
2240 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2241
2242         * cpu-x86.md: Add unsigned variants of packd and packw.
2243
2244         * mini-ops.h: Same.
2245
2246         * mini-x86.h: Emit the right instruction for packd and packw.
2247         Add unsigned variants of packd and packw.
2248
2249         * simd-intrinsics.c: Packd and packw were used in place of their
2250         unsigned variants. Change that.
2251         Add intrinsics for (Signed)PackWithSignedSaturation.
2252
2253         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
2254
2255 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2256
2257         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
2258
2259 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2260
2261         * mini-ops.h: Remove dword packed add/sub with saturation ops.
2262
2263         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
2264
2265         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
2266         sse instructions.
2267
2268         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
2269
2270 2008-10-24  Mark Probst  <mark.probst@gmail.com>
2271
2272         * method-to-ir.c, mini.c: Special casing for the synchronized
2273         wrapper for the ldtoken+GetTypeFromHandle case.
2274
2275 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
2276
2277         * mini.c (mono_replace_ins): Move this to branch-opts.c.
2278
2279         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
2280         created/split bblocks.
2281
2282 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2283
2284         * mini-ops.h: Add packed signed mul high.
2285         
2286         * cpu-x86.md: Same.
2287
2288         * mini-x86.c (mono_arch_output_basic_block): Same.
2289
2290         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
2291
2292         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
2293
2294 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2295
2296         * basic-simd.cs: Tests for Vector16sb.
2297
2298 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
2299
2300         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
2301
2302 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
2303
2304         * mini-ops.h: Add packed signed min, max and compare greater.
2305         
2306         * cpu-x86.md: Same.
2307
2308         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
2309         saturation.
2310
2311         * simd-methods.h: Add CompareGreaterThan.
2312
2313         * simd-methods.h: Remove CompareEquals.
2314
2315         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
2316
2317         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
2318
2319         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
2320         CompareEqual.
2321
2322 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
2323
2324         * basic-simd.cs: Fix tests due to change in the API.
2325
2326 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2327
2328         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
2329
2330 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2331
2332         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
2333
2334         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
2335         inst_offset as this has invalid values for LDADDR.
2336
2337 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2338
2339         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2340
2341         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
2342
2343 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2344
2345         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
2346         for accessing field->data.
2347
2348 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2349
2350         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2351
2352 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2353
2354         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
2355
2356         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
2357
2358 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2359
2360         * dominators.c (mono_compute_natural_loops): Allocate GList enties
2361         from the cfg mempool.
2362
2363 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
2364
2365         * basic-simd.cs: Tests for new methods in Vector8us.
2366
2367 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
2368
2369         * mini-ops.h: Add multiply and store high.
2370         
2371         * cpu-x86.md: Same.
2372
2373         * mini-x86.c (mono_arch_output_basic_block): Same.
2374
2375         * simd-methods.h: Same.
2376
2377         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
2378         and CompareEqual.
2379
2380 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
2381
2382         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
2383         mono_class_setup_vtable ().
2384
2385         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
2386         mono_class_get_vtable_entry () for accessing klass->vtable.
2387
2388         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
2389
2390         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
2391         found.
2392
2393         * method-to-ir.c (mono_save_token_info): Don't save references made from
2394         wrappers.
2395
2396         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
2397         of generic instances.
2398
2399         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
2400
2401 2008-10-19  Mark Probst  <mark.probst@gmail.com>
2402
2403         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
2404         OP_JMP depends on the method signature.  Calculate it properly.
2405
2406 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
2407         
2408         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
2409         called directly.
2410
2411         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
2412         instances.
2413         (emit_extra_methods): Add another table mapping method indexes to 
2414         offsets in the extra_method_info table.
2415
2416         * mini.h: Bump AOT file format version.
2417         
2418         * aot-runtime.c: Merge most of the code from mono_aot_get_method
2419         and mono_aot_get_method_from_token () into one function.
2420
2421 2008-10-19  Mark Probst  <mark.probst@gmail.com>
2422
2423         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
2424         separate counter.
2425
2426 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
2427
2428         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
2429         methods.
2430
2431         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
2432         disable_aot.
2433
2434         * mini.c (mono_patch_info_equal): Compare the generic context as well.
2435
2436         * mini.h: Bump aot file format version.
2437
2438         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
2439         AOT file can contain native code for methods which are not in the METHOD
2440         table. Generate code for non-sharable generic instances of generic methods
2441         found in the METHODSPEC table.
2442         
2443         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
2444         encoding generic type handles.
2445
2446         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
2447         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
2448
2449         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
2450         macros + MONO_ADD_INS.
2451
2452         * mini.c (mono_jump_info_token_new2): New function which takes a generic
2453         context as well.
2454
2455         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
2456
2457         * mini.h: Bump aot file format version.
2458
2459         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
2460
2461 2008-10-17  Mark Probst  <mark.probst@gmail.com>
2462
2463         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
2464         platforms, with definable stack alignment value.  Set to 16 now
2465         for all platforms.
2466
2467         * mini.c, mini.h, driver.c: Command line option for disabling
2468         stack alignment.
2469
2470 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
2471
2472         * basic-simd.cs: Tests for new methods in Vector4ui.
2473
2474 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
2475
2476         * mini-ops.h: Add packed int shuffle.
2477         
2478         * cpu-x86.md: Same.
2479
2480         * mini-x86.c (mono_arch_output_basic_block): Same.
2481
2482         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
2483         extract mask, max, min, shuffle.
2484
2485         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
2486
2487 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
2488
2489         * basic-simd.cs: Tests for new methods in Vector8us.
2490
2491 2008-10-17  Mark Probst  <mark.probst@gmail.com>
2492
2493         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
2494         RuntimeTypeHandle, not a TypedReference.
2495
2496 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
2497
2498         * simd-intrinsics.c: remove relocations.
2499
2500 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
2501
2502         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
2503         optimizations from the x86 backend.
2504
2505 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
2506
2507         * simd-methods.h, simd-intrinsics.c: debloat method names and
2508         prepare for no relocations.
2509
2510 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2511
2512         * mini-ops.h: Add packed min/equal and sum of absolute differences.
2513         
2514         * cpu-x86.md: Same.
2515
2516         * mini-x86.c (mono_arch_output_basic_block): Same.
2517
2518         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
2519         extract mask, max, min and sum of absolute differences.
2520
2521         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
2522         method name.
2523
2524 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2525
2526         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
2527         Renamed one test for consistency.
2528
2529 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2530
2531         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
2532         fix to the code that deal with other blocks.
2533
2534 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2535
2536         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
2537
2538 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2539
2540         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
2541         that deals with vreg interference. Explicitly check for OP_LDADDR to be
2542         able to process the source reg.
2543
2544 2008-10-16  Martin Baulig  <martin@ximian.com>
2545
2546         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
2547
2548         * inssel.brg: Add `OP_HARD_NOP'.
2549
2550         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
2551
2552         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
2553         `OP_HARD_NOP' instruction when running inside the debugger.
2554
2555         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
2556         `OP_HARD_NOP' instruction when running inside the debugger.
2557
2558 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2559
2560         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
2561         now works. The issue with the regalloc tripping up no longer
2562         happens.
2563
2564         * simd-intrinsics.c (load_simd_vreg): Same.
2565
2566 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2567         
2568         * basic-simd.cs: Tests for new Vector8ui methods.
2569
2570 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2571
2572         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
2573         only for type. This fixes crashes where MonoInst::klass is checked
2574         for ops of type != VTYPE or OBJ.
2575
2576         * simd-intrinsics.c (load_simd_vreg): Same.
2577
2578 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2579
2580         * mini-ops.h: Add ops for packed shuffle/max/avg and
2581         extract mask.
2582         
2583         * cpu-x86.md: Same.
2584
2585         * mini-x86.c (mono_arch_output_basic_block): Same.
2586
2587         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
2588         extract mask.
2589
2590         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
2591         to emit extract mask op.
2592
2593         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
2594         to emit word shuffles.
2595
2596 2008-10-15  Mark Probst  <mark.probst@gmail.com>
2597
2598         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
2599         the largest alignment needed by a variable, but at least
2600         sizeof(gpointer).
2601
2602 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2603
2604         * basic-simd.cs: Tests for the fixes in the last commit.
2605
2606 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2607
2608         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
2609         no longer handles STACK_PTR input.
2610
2611         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
2612
2613         * simd-intrinsics.c (load_simd_vreg): New function that works like 
2614         get_simd_vreg   but handles STACK_PTR input.
2615
2616         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
2617         as the input can be an arbitrary pointer.
2618
2619         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
2620         LDADDR local optimization directly otherwise use a store op.
2621
2622 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2623
2624         * basic-simd.cs: Tests for dup low and dup high.
2625
2626 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2627
2628         * mini-ops.h: Add dup low and dup high ops.
2629         
2630         * cpu-x86.md: Same.
2631
2632         * mini-x86.c (mono_arch_output_basic_block): Same.
2633
2634         * simd-intrinsics.c (vector4f_intrinsics): Same.
2635
2636 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
2637
2638         * basic-simd.cs: Tests for recently added functionality.
2639
2640 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
2641
2642         * mini-ops.h: Add remaining sse1 fp ops.
2643         
2644         * cpu-x86.md: Add remaining sse1 fp ops.
2645
2646         * mini-x86.c (mono_arch_output_basic_block): Same.
2647
2648         * mini.h: Add enum for simd FP compare conditions.
2649
2650         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
2651
2652         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
2653         so the backed can generate the appropriate op.
2654
2655 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
2656         This patch squeese one more byte from the SimdIntrinsc struct.
2657
2658         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
2659         a a shift amount intead of simply or'ing it.
2660
2661         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
2662
2663         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
2664         byte so we can have an aditional flags field without increasing struct size.
2665
2666         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
2667         against the simd_supported_versions bitmask.
2668
2669         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
2670
2671 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
2672
2673         * mini.c: remove rawbuffer code (the only use here is unsafe because
2674         it takes locks during signal handling and the kernel now provides much
2675         better info in proc/pid/smaps these days).
2676
2677 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
2678
2679         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
2680         OP_X86_PUSH_OBJ. Fixes #434620.
2681
2682         * objects.cs: Add a test.
2683         
2684 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
2685
2686         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
2687         that the packuswb/packusdw don't work with unsigned numbers for what
2688         would be negative numbers in signed format.
2689
2690         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
2691         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
2692
2693         * mini-ops.h: Add doubleword forms of many ops and packing ones.
2694
2695         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
2696
2697         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
2698
2699         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
2700
2701         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
2702         add more ops.
2703
2704         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
2705         version as the enum in mini.h.
2706
2707         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
2708         for sse3 ops, check the simd_version field if present. This way the code
2709         works with all versions of sse.
2710
2711 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2712
2713         * simd-intrinsics.c: Fixed intrinsic name typo.
2714
2715         * mini.h: Added missing simd exported function.
2716
2717         * basic-simd.cs: Added tests for Vector4ui.
2718         Fixed broken test for Vector16b.
2719
2720 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
2721
2722         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
2723         the max length to 64.
2724
2725 2008-10-10  Mark Probst  <mark.probst@gmail.com>
2726
2727         * method-to-ir.c: Only do the fast virtual generic method call for
2728         non-wrapper methods.
2729
2730         * mini.h, mini-trampolines.c: The new generic virtual remoting
2731         trampoline handles virtual method calls via the vtable (as done by
2732         the fast virtual generic method calls) to remoting proxies.
2733
2734         * mini.c (mono_jit_create_remoting_trampoline): For generic
2735         methods reate a generic virtual remoting trampoline.
2736
2737         * mini-amd64.h: Enable fast virtual generic method calls again.
2738
2739 2008-10-10  Mark Probst  <mark.probst@gmail.com>
2740
2741         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
2742         restore registers when doing tail calls.
2743
2744 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2745
2746         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
2747         Vector4ui.
2748
2749 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2750
2751         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
2752
2753 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2754
2755         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
2756
2757 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2758
2759         * basic-simd.cs: Retrofit for API changes.
2760
2761 2008-10-10  Mark Probst  <mark.probst@gmail.com>
2762
2763         * mini-ppc.c: Handle integer stack arguments for tail calls.
2764
2765 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2766
2767         * optflags-def.h: Removed sse3 optimization.
2768
2769         * driver.c: Same.
2770
2771         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
2772         sse3.
2773
2774         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
2775
2776         * mini.h: Added enumeration with simd versions.
2777
2778         * simd-intrinsics.c (emit_intrinsics): Use the new static var
2779         for detecting SSE3.
2780
2781         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
2782
2783         * mini.c (mini_init): Call mono_simd_intrinsics_init.
2784
2785 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
2786
2787         * basic-simd.cs: Added tests for Vector8u and Vector16u.
2788
2789         * basic-simd.cs: Fixed test naming.
2790
2791 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
2792
2793         * mini-ops.h: Added ops for packed and saturated math, shifts
2794         and packing/unpacking.
2795
2796         * cpu-x86.md: Added descriptors for the above ops.
2797
2798         * mini-x86.c: Added code to emmit the above ops.
2799
2800         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
2801
2802 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
2803
2804         * aot-compiler.c (compile_method): Enable AOT for generic code.
2805
2806         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
2807
2808 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
2809
2810         * mini.c: add a workaround for a common screwup that ends up blamed
2811         to mono (other processes blocking signal delivery).
2812
2813 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
2814
2815         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
2816         in the LDFLD/STFLD opcodes. Fixes #432673.
2817
2818         * iltests.il.in: Add a new test.
2819
2820 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
2821
2822         * mini-arm.c: attach the thread in unmanaged->managed transitions
2823         using delegates (bug #433148).
2824
2825 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
2826
2827        * basic-simd.cs: Use new ShuffleSel constants.
2828
2829 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
2830
2831         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
2832
2833         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
2834         only disable simd intrinsics if no sse2 is detected.
2835
2836         * optflags-def.h: Added sse3.
2837
2838         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
2839         is disabled.
2840
2841 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
2842
2843         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
2844         when adding delegate-invoke wrappers.
2845
2846 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
2847
2848         * Makefile.am: Reenable the simd tests.
2849
2850 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
2851
2852         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
2853           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
2854           other vreg is allocated to that hreg.
2855
2856         Contributed under MIT/X11 license.
2857
2858 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
2859
2860         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
2861         yet checked in.
2862
2863 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
2864
2865         * basic-simd.cs: New test suite for SIMD intrinsics.
2866
2867         * Makefile.am: Added new tests.
2868
2869 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
2870
2871         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
2872
2873         * mini-ops.h: Same.
2874
2875         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
2876
2877         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
2878         using SSE2 aware opcodes.
2879
2880         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
2881         is enabled, this code path is only reachable if conversion ops are emmited after
2882         mono_method_to_ir.
2883
2884         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
2885
2886         This optimization saves 6 bytes per conversion against the old version.
2887
2888 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
2889
2890         * aot-compiler.c (compile_method): Don't skip methods referencing 
2891         generic methods without a corresponding entry in token_info_hash, since
2892         encode_method_ref () can handle all generic methods now.
2893
2894         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
2895         generic context is set.
2896         
2897         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
2898         generic sharing of LDTOKEN.
2899
2900 2008-10-06  Mark Probst  <mark.probst@gmail.com>
2901
2902         * mini-amd64.h: Temporarily disabled fast virtual generic method
2903         calls because it breaks the System.Runtime.Remoting tests.
2904
2905 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
2906
2907         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
2908
2909         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
2910         so inlining actually works.
2911         (check_inline_caller_method_name_limit): Ditto.
2912
2913 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
2914
2915         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
2916         64 bit safety (from Olaf Hering and Andreas Färber).
2917
2918 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
2919         
2920         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
2921         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
2922         unused virtual call support code.
2923
2924         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
2925         
2926         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
2927         which can't use aot trampolines.
2928         (decode_patch): Don't create aot trampolines for methods which can't use
2929         them.
2930
2931         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
2932         use aot trampolines.
2933
2934         * mini.h: Bump AOT image format version.
2935         
2936 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
2937
2938         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
2939         to save_token_info () since cmethod is inflated for constrained calls.
2940
2941         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
2942
2943 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
2944
2945         * Makefile.am: Add build rules for ppc64.
2946         This avoids the build failing at pedump with unresolved symbols
2947         due to lack of arch_sources. Instead it will now fail earlier
2948         due to lack of cpu-ppc64.md.
2949
2950         Contributed under MIT/X11 license.
2951
2952 2008-10-04  Mark Probst  <mark.probst@gmail.com>
2953
2954         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
2955         tail calls.
2956
2957         * iltests.il.in: Add test case for tail call with many arguments.
2958
2959 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
2960
2961         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
2962         to the fast virtual generic method code until the aot case is fixed.
2963
2964 2008-10-03  Mark Probst  <mark.probst@gmail.com>
2965
2966         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
2967
2968 2008-10-03  Mark Probst  <mark.probst@gmail.com>
2969
2970         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
2971         thunks.
2972
2973 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
2974         
2975         * simd-intrinsics.c: Forgot to add this one.
2976
2977         * mini-codegen.c: Fix macro in case SIMD is not supported.
2978
2979 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
2980         
2981         This patch land initial JIT support for simd intrinsics.
2982
2983         * mini-x86.h: Added new define to make --enable_minimal work on x86.
2984
2985         * Makefile.am: Added simd-intrinsics.c
2986
2987         * simd-intrinsics.c: New file with simd instrinsic related
2988         code.
2989
2990         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
2991
2992         * cpu-x86.md: Add simd related instructions.
2993
2994         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
2995
2996         * driver.c: Added two new --regression variants.
2997
2998         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
2999
3000         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
3001
3002         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
3003         extract some complicated logic to helper functions.
3004
3005         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
3006
3007         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
3008
3009         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
3010         the specialized simplification pass.
3011
3012         * method-to-ir.c (mono_spill_global_vars): Use new macro.
3013
3014         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
3015
3016         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
3017         table.
3018
3019         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
3020         if MONO_ARCH_NEED_SIMD_BANK is defined.
3021
3022         * mini-ops.h: Added the new simd ops.
3023
3024         * mini-x86.c: Added mono_arch_xregname.
3025
3026         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
3027
3028         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
3029
3030         * mini-x86.h: Define simd related MONO_ARCH macros.
3031
3032         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
3033
3034         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
3035
3036         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
3037         MONO_CLASS_IS_SIMD to deal with simd related IR.
3038
3039         * mini.h (MonoInst): Added spill_var to the backend union.
3040
3041         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
3042
3043         * mini.h: Added forward declarations of the new simd fuctions.
3044
3045         * optflags-def.h: Added new optimization names SIMD.
3046
3047         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
3048
3049         * regalloc.h: Added support for working with 3 register banks.
3050
3051         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
3052
3053         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
3054
3055 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
3056
3057         * mini-exceptions.c: remove 64 bit related ifdef clutter.
3058
3059 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
3060
3061         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
3062         instead of one on 64 bit systems.
3063
3064         * method-to-ir.c: Remove unused includes.
3065
3066 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
3067
3068         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
3069         cfg->used_int_regs, since the two are different on arm.
3070
3071 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3072
3073         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
3074         mono_method_get_vtable_index() to get the vtable index.
3075
3076 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3077
3078         * method-to-ir.c (mono_method_to_ir2): Don't create native
3079         wrappers for array methods, because they're never called (and if
3080         they were called they wouldn't work).
3081
3082 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3083
3084         * method-to-ir.c (mono_method_to_ir2): Array methods are
3085         special-cased and must not be invoked indirectly via the (M)RGCTX
3086         when generic sharing is turned on.  Fixes #431413.
3087
3088 2008-10-01  Mark Probst  <mark.probst@gmail.com>
3089
3090         * method-to-ir.c: When generic sharing is active, call
3091         non-interface virtual generic methods via the standard trampoline.
3092
3093         * mini-trampolines.c: Handle virtual generic shared methods.
3094
3095         * mini.h, mini-x86.c, mini-x86.h: New argument for
3096         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
3097         method thunks and which is the trampoline to call if the lookup
3098         fails.  Enable the virtual generic method thunk for x86.
3099
3100         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
3101         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
3102         argument but assert that it's NULL, because these archs don't yet
3103         implement the virtual generic method thunk.  Changes in the IMT
3104         thunk data structures.
3105
3106 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
3107
3108         * aot-compiler.c (emit_globals): Avoid invalid characters in
3109         the static linking symbol.
3110
3111         * objects.cs: Add a test for the range check optimization. Fix warnings.
3112
3113         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
3114         optimization from the current JIT.
3115
3116         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
3117         later in decompose_array_access_opts () to allow more optimizations.
3118
3119         * method-to-ir.c (mono_handle_soft_float): Rename this to 
3120         mono_decompose_soft_float () for consistency.
3121
3122         * mini-ops.h: Fix arguments of OP_STRLEN.
3123
3124         * method-to-ir.c (save_cast_details): Extract the cast details saving code
3125         into a separate function.
3126         (reset_cast_details): Ditto.
3127         (handle_unbox): Save cast details. Fixes #431254.
3128
3129         * method-to-ir.c: Remove some obsolete FIXMEs.
3130
3131 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3132
3133         * ir-emit.h (alloc_dreg): Write a warning before crashing.
3134
3135 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3136
3137         * mini-codegen.c: More work on macros to make them
3138         ready for multiple regbanks.
3139
3140 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3141
3142         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
3143
3144         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
3145
3146 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3147
3148         * mini-codegen.c (mono_spillvar_offset): Proper support for
3149         multiple regbanks.
3150
3151 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
3152
3153         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
3154         the stack overflow changes.
3155
3156 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3157
3158         * mini-codegen.c: Make all bank macros depend on reg_bank.
3159
3160         * mini-codegen.c (mono_local_regalloc): Make free mask
3161         initialization regbank aware.
3162
3163 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3164
3165         * mini-codegen.c (mono_local_regalloc): Extract callee
3166         mask selection to a function and make it regbank aware.
3167
3168 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3169
3170         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
3171         code to deal with many regbanks.
3172
3173 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
3174
3175         * mini-codegen.c: More fp->regbank changes.
3176
3177 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
3178
3179         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
3180         of a hardcoded constant.
3181
3182 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
3183
3184         * method-to-ir.c (type_from_stack_type): Fix typo.
3185
3186 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
3187
3188         * mini-ia64.c (emit_move_return_value): Convert float return values to
3189         double.
3190
3191         * objects.cs: Add a new test.
3192         
3193         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
3194         VARARG methods to fix an assert later.
3195
3196         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
3197         end so it at least compiles.
3198
3199 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
3200
3201         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
3202
3203 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
3204
3205         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
3206         optimization to a new function (emit_optimized_ldloca_ir) and enable
3207         it for both ldloca and ldloca_s.
3208
3209 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
3210
3211         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
3212         gshared CASTCLASS code.
3213
3214         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
3215         amd64, where the libc stack unwinder encounters stack frames referring to
3216         native code in unmapped memory.
3217
3218         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
3219         sharing.
3220
3221         * generics.cs: Add new test.
3222
3223 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
3224
3225         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
3226         add a check that one of the ARM_FPU_ constants is defined.
3227
3228         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
3229         
3230         * mini-exceptions.c: Fix build on non-altstack platforms.
3231
3232         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
3233         sharing of vtypes.
3234
3235         * ir-emit.h: Add a comment to NEW_PCONST.
3236
3237         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
3238
3239         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
3240
3241         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
3242         after the changes to MonoJitDomainInfo.
3243
3244 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3245
3246         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
3247
3248 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3249
3250         * mini-ppc.c: Compiler warning fixes.
3251
3252 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3253
3254         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
3255         for pinvokes.
3256
3257 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3258
3259         * exceptions-ppc.c, mini-ppc.h: Compile
3260         mono_arch_handle_altstack_exception() on Darwin, too.
3261
3262 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3263
3264         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
3265         work on archs which don't have generic sharing implemented, only
3266         without the vtable_arg.
3267
3268 2008-09-26  Mark Probst  <mark.probst@gmail.com>
3269
3270         * mini.c: Added comment explaining why delegate ctor icall
3271         wrappers are compiled.
3272
3273 2008-09-26  Mark Probst  <mark.probst@gmail.com>
3274
3275         * mini.c: Don't produce trampolines to delegate ctor icall
3276         wrappers but compile them upfront.
3277
3278 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
3279
3280         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
3281         runtime-set function when going back to managed code. Currently this
3282         is used to set back the protection on the soft ovf pages and/or to
3283         throw the stack overflow exception that happened in unmanaged code.
3284
3285 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
3286
3287         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
3288         runtime-set function when going back to managed code. Currently this
3289         is used to set back the protection on the soft ovf pages and/or to
3290         throw the stack overflow exception that happened in unmanaged code.
3291
3292 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
3293
3294         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
3295         the support code for restoring stack protection after stack overflows
3296         that happen in unmanaged code. Don't set the exec permission on the
3297         soft overflow area.
3298
3299 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
3300
3301         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
3302         delegate->method_ptr is set. Fixes #428054.
3303
3304 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
3305
3306         * tests.cs: Rename to ratests.cs.
3307
3308         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
3309         emit_get_rgctx_... functions.
3310
3311 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3312
3313         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
3314
3315 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3316
3317         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
3318         before asserting that method is sharable.
3319
3320 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3321
3322         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
3323         whether method needs a static RGCTX wrapper used instead of
3324         complex conditions.
3325
3326         * generic-sharing.c, mini.h: A few functions moved to
3327         metadata/generic-sharing.c.
3328
3329 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3330
3331         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
3332         Generic code sharing for value types, which essentially means
3333         treating value type methods like static methods.  The RGCTX is
3334         passed in the same way.
3335
3336 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
3337
3338         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
3339         opcode when creating multi-dimensional arrays of open types.
3340
3341         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
3342         open generic types.
3343
3344         * generics.cs: Add a test.
3345
3346         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
3347
3348 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
3349
3350         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
3351
3352         * mini.c (mini_method_compile): Set it when running under the debugger. 
3353
3354         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
3355         vreg optimization if the flag is set.
3356
3357         * driver.c (mono_main): Add --attach= option to pass options to
3358         the attach agent.
3359
3360         * mini.c (sigquit_signal_handler): Start the attach agent.
3361
3362         * ssapre.c: Disable this to save space since it is not yet ported to
3363         linear IR.
3364
3365         * regalloc2.c: Disable this to save space.
3366
3367         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
3368
3369 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
3370
3371         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
3372         the -v option useful again.
3373
3374 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
3375
3376         * mini-amd64.c (mono_arch_output_basic_block): Add support for
3377         --break-at-bb.
3378
3379         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
3380         arrays of arrays. Fixes #428406.
3381
3382         * method-to-ir.c (mini_emit_castclass): Ditto.
3383
3384         * objects.cs: Add new test.
3385         
3386 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
3387
3388         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
3389         was wrong at it choked against target_type_is_incompatible for byref types.
3390
3391 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
3392
3393         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
3394         places.
3395
3396 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
3397
3398         * mini-exceptions.c: update a few more exceptions-related counters.
3399
3400 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
3401
3402         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
3403         new functions to allocate from persistent mempools.
3404
3405 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
3406
3407         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
3408         multiple register banks in the future.
3409
3410         * mini-codegen.c (mono_local_regalloc): Fix a warning.
3411
3412 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
3413
3414         * mini.c (type_to_eval_stack_type): Remove duplicated function.
3415
3416         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
3417
3418         * mini.h: Export type_to_eval_stack_type.
3419
3420         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
3421         is only ins->klass of byref types.
3422
3423 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
3424
3425         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
3426         (mini_emit_memcpy2): Ditto.
3427
3428         * mini-amd64.c: Fix a warning.
3429
3430 2008-09-21  Mark Probst  <mark.probst@gmail.com>
3431
3432         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
3433         linking.
3434
3435 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
3436
3437         * method-to-ir.c: Extract stloc micro-optimization to a
3438         function and apply it to all cases.
3439
3440 2008-09-19  Mark Probst  <mark.probst@gmail.com>
3441
3442         * method-to-ir.c: Don't fail generic code sharing in cases we
3443         already support.
3444
3445 2008-09-18  Mark Probst  <mark.probst@gmail.com>
3446
3447         * mini-ppc.c: Handle structs in tailcalls on Darwin.
3448
3449 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
3450
3451         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
3452         implementation.
3453
3454 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
3455
3456         * trace.c: make tracing more useful and correct, with per-thread
3457         id and indent info.
3458
3459 2008-09-15  Mark Probst  <mark.probst@gmail.com>
3460
3461         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
3462         doing a method call and the argument is an R4.
3463
3464 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
3465
3466         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
3467         generic methods.
3468
3469 2008-09-13  Mark Probst  <mark.probst@gmail.com>
3470
3471         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
3472
3473 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
3474
3475         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
3476         (MONO_JUMP_TABLE_FROM_INS): Ditto.
3477
3478 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
3479
3480         * driver.c: Add a --agent argument (not supported yet) to load managed
3481         agent assemblies before loading the main assembly, similarly to how the
3482         Java VM handles agents.
3483
3484 2008-09-11  Mark Probst  <mark.probst@gmail.com>
3485
3486         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
3487         function to do stack layout of local variables.
3488
3489 2008-09-11  Mark Probst  <mark.probst@gmail.com>
3490
3491         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
3492         calculation.
3493
3494 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
3495
3496         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
3497         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
3498         JIT if DISABLE_JIT is defined.
3499
3500         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
3501         defined.
3502
3503 2008-09-10  Mark Probst  <mark.probst@gmail.com>
3504
3505         * iltests.il.in: Disable the fconv test on PPC (the result is
3506         undefined according to ECMA).
3507
3508 2008-09-10  Mark Probst  <mark.probst@gmail.com>
3509
3510         * iltests.il.in: Enable tail call tests for PPC.
3511
3512         * mini.h: Add variable for storing incoming valuetype argument
3513         addresses for tail calls.
3514
3515         * mini-ppc.c: Implement valuetype arguments and return values for
3516         tailcalls on Linux.
3517
3518 2008-09-09  Mark Probst  <mark.probst@gmail.com>
3519
3520         * mini-ppc.c: Partially implement tail calls (struct arguments and
3521         return values not supported).
3522
3523         * method-to-ir.c: Enable tail calls on PPC.
3524
3525 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
3526
3527         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
3528         runtime-invoke wrappers to work around the problem of them getting
3529         assigned to a random class.
3530
3531         * aot-runtime.c (mono_aot_get_method): Ditto.
3532         
3533 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
3534
3535         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
3536         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
3537
3538 2008-09-07  Mark Probst  <mark.probst@gmail.com>
3539
3540         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
3541         until they're implemented properly.
3542
3543         * exceptions-ppc.c: Use arch-independent exception-handling code
3544         instead of custom one.
3545
3546         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
3547         for Linear IR.
3548
3549         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
3550
3551         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
3552         applies when __powerpc__ is defined.
3553
3554 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
3555
3556         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
3557         methods to their code to avoid computing the full name of wrappers and
3558         doing a lookup in a string hash table.
3559
3560 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
3561
3562         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
3563         we identify bblocks before method_to_ir () is ran.
3564
3565         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
3566         Also avoid optimizing branches pointing to themselves.
3567
3568         * mini.c (mini_method_compile): Ditto. Fixes #422947.
3569
3570 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
3571
3572         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
3573
3574 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
3575
3576         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
3577         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
3578         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
3579         'buf'.
3580
3581         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
3582         jumped to the same entry in plt_jump_table.
3583
3584 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
3585
3586         * method-to-ir.c (initialize_array_data): Handle field with RVA from
3587         dynamic images.
3588
3589 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
3590
3591         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
3592         other assignment can be if converted. Saves 1.5% on corlib size and fixes
3593         #421807.
3594
3595 2008-08-29  Geoff Norton  <gnorton@novell.com>
3596
3597         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
3598         segment, and doesn't properly handle .space as .text.  Fixes
3599         AOT Mach/ARM
3600
3601 2008-08-29  Geoff Norton  <gnorton@novell.com>
3602
3603         * mini.c: Disable the mach exception handler when running on 
3604         ARM
3605
3606 2008-08-29  Geoff Norton  <gnorton@novell.com>
3607
3608         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
3609         globals on Darwin/ARM
3610
3611 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
3612
3613         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
3614         since too many things depend on it. Instead, call 
3615         mono_runtime_set_no_exec ().
3616         
3617         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
3618         the new JIT.
3619
3620         * aot-compiler.c: Add an 'asm-only' AOT option.
3621
3622         * mini.c: Avoid initializing the runtime when doing AOT compilation.
3623                 
3624         * aot-compiler.c (compile_method): Disable gshared support for now as it
3625         doesn't yet work.
3626
3627 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
3628
3629         * mini-amd64.h : Fix a compiler warning.
3630
3631         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
3632           Changed to use a callback function to retrieve the unwind info.
3633           This avoids problems observed when code blocks were removed by
3634           unloading an app domain.
3635
3636         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
3637           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
3638           to work properly.
3639
3640         Contributed under MIT/X11 license.
3641
3642 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
3643
3644         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
3645           case to keep the stack aligned to 8.
3646
3647         Contributed under MIT/X11 license.
3648
3649 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
3650
3651         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
3652         avoid repeated linear searches.
3653
3654 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
3655
3656         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
3657         methods it can't handle.
3658         
3659         * aot-compiler.c (add_method): Avoid adding a method twice.
3660         (add_wrappers): Add runtime invoke wrappers for all methods.
3661
3662         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
3663         function to create an aot-compatible version of this trampoline.
3664
3665         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
3666
3667 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
3668
3669         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
3670
3671         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
3672         with a generic sharing failure.
3673
3674         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
3675
3676         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
3677         CEE_RETHROW. Fixes #419634.
3678
3679         * mini.c (mono_method_to_ir): Ditto.
3680
3681         * exceptions.cs: Add a new test.
3682         
3683         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
3684         to mono_type_stack_size_internal () since some callers might not pass in
3685         an rgctx.
3686
3687         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
3688         instrument_prolog. Fixes #419878.
3689
3690         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
3691         doubles in soft float mode volatile.
3692
3693 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
3694
3695         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
3696
3697         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
3698         to handle soft float correctly.
3699
3700         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
3701         the fast path.
3702
3703         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
3704
3705         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
3706         to sp, since the generics catch code requires it.
3707
3708         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
3709         copying.
3710
3711         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
3712         mono_arch_emit_imt_argument ().
3713
3714         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
3715
3716         * mini-arm.c tramp-arm.c: Generic sharing updates.
3717
3718 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
3719
3720         * mini-arm.c: Fix the arm build.
3721
3722         * generic-sharing.c (mini_type_get_underlying_type): New helper function
3723         handling enums, generic instances and generic sharing.
3724         (mini_type_stack_size_full): Ditto.
3725
3726         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
3727         
3728         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
3729
3730         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
3731
3732         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
3733         trampolines.
3734
3735         * mini-arm.c: Various small generic sharing changes.
3736
3737         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
3738         this for x86.
3739         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
3740         custom code.
3741
3742         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
3743         helper function to return a generic class init trampoline.
3744
3745         * method-to-ir.c mini.c: Use it.
3746         
3747         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
3748         arch-specfic function to return a generic class init trampoline.
3749
3750         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
3751         the GENERIC_CLASS_INIT custom code.
3752
3753         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
3754         a fatal error, not a sharing failure.
3755
3756         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
3757         needed.
3758
3759         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
3760         trampoline argument from MONO_ARCH_VTABLE_REG.
3761
3762         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3763         order of the arguments to the C trampoline: pass 'slot' as the trampoline
3764         argument, and pass the vtable in VTABLE_REG.
3765
3766         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3767         order of the arguments to the C trampoline: pass 'slot' as the trampoline
3768         argument, and pass the vtable in VTABLE_REG.
3769         (mono_arch_create_trampoline_code_full): Remove some special casing for
3770         the rgctx fetch trampoline.
3771
3772         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
3773         Fixes #419273.
3774
3775         * iltests.il: Add a test for it.
3776
3777 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
3778
3779         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
3780
3781         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
3782         no longer needed.
3783
3784         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
3785         use mono_jit_info_table_find () to avoid recursion.
3786         (mono_delegate_trampoline): Add a sync wrapper here.
3787
3788         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
3789         here.
3790
3791         * mini.c (mono_method_to_ir): Ditto.
3792         
3793         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
3794         add_sync_wrapper argument. Don't add a sync wrapper here.
3795         (mono_create_jump_trampoline): Don't add a sync wrapper here.
3796
3797         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
3798         
3799 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
3800
3801         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
3802           of nonvolatile registers back from MonoContext to CONTEXT.
3803
3804         Contributed under MIT/X11 license.
3805
3806 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
3807
3808         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
3809           arguments on Winx64 there are only 4 argument registers.  For this
3810           logic to work the last argument must be pulled from the stack.  
3811
3812         Contributed under MIT/X11 license.
3813
3814 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
3815
3816         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3817
3818         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
3819         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
3820         encode/decode_method_ref ().
3821
3822         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
3823
3824         * aot-runtime.c (decode_patch): Ditto.  
3825
3826         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
3827         MONO_PATCH_INFO_METHOD.
3828
3829         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
3830         MonoGenericJitInfo.
3831
3832         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
3833         MonoGenericJitInfo.
3834
3835         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
3836
3837         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
3838         one from the caller.
3839
3840         * aot-runtime.c (decode_generic_inst): New function to decode and
3841         return a interned generic inst.
3842         (decode_klass_ref): Use it.
3843         (decode_method_ref): Ditto.
3844
3845         * aot-compiler.c (emit_exception_debug_info): Save 
3846         jinfo->has_generic_jit_info too.
3847
3848 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
3849
3850         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
3851
3852         * iltests.il.in: Add a test for fconv_to_i.
3853
3854         * liveness.c: Disable the liveness2 pass for now to save space.
3855
3856         * regalloc2.c: Include mempool-internals.h to fix warnings.
3857
3858         * aot-compiler.c (encode_method_ref): Encode the context of generic
3859         instance methods.
3860
3861         * aot-runtime.c (decode_method_ref): Inflate generic methods using
3862         the context saved in the aot file.
3863
3864         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3865
3866         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
3867
3868         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
3869         volatile so they won't be optimized away.
3870
3871 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
3872
3873         * ssa.c:
3874         * ssa2.c:
3875         * mini.c:
3876         * regalloc2.c:
3877         * dominators.c: Remove duplicated functions that now are in
3878         mempool-internals.h.
3879
3880 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
3881
3882         * aot-compiler.c: Fix warnings.
3883
3884         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
3885
3886         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
3887
3888         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
3889         as the patch type.
3890
3891         * mini.c (mono_resolve_patch_target): Ditto.
3892         
3893         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
3894         (encode_klass_ref): Add support for encoding VARs/MVARs.
3895
3896         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
3897
3898         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
3899         the handling of the got entries into a separate 'decode_got_entry' function.
3900         Add support for RGCTX_FETCH.
3901
3902         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
3903         clobbered by the trampoline code.
3904
3905         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
3906         not clobbered by the indirect calling code.
3907
3908 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
3909
3910         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
3911         to fix the build.
3912
3913 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
3914
3915         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
3916         signature using the compilation mempool otherwise we would leak it.
3917
3918 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
3919
3920         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
3921         mono_emit_abs_call ().
3922
3923         * patch-info.h: Add GENERIC_CLASS_INIT.
3924
3925         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
3926
3927         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
3928         as their target as a near call.
3929
3930         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
3931         ABS handling code.
3932         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
3933
3934         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
3935         call to a runtime function described by a patch.
3936
3937         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
3938         mono_emit_abs_call, this has the advantage that the ABS handling code in
3939         mono_codegen () can handle them both, and can handle other stuff in the
3940         future without additional code.
3941
3942         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
3943         entry.
3944         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
3945         abs addresses.
3946
3947         * mini.h: Add missing bblock related prototypes.
3948
3949         * mini.h (MonoCompile): Remove unused reverse_inst_list and
3950         reverse_inst_list_len fields.
3951
3952         * mini.c: Refactor this file a bit by moving branch optimizations to 
3953         branch-opts.c.
3954
3955         * method-to-ir.c: Merge generic sharing changes missed earlier.
3956
3957         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
3958
3959         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
3960         shared patches. Process METHODCONST as a shared patch.
3961
3962         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
3963         as it crashes on the 2.0 mscorlib.
3964
3965         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
3966         to cause crashes.
3967         
3968         * aot-compiler.c: Use is_plt_patch () in a few additional places.
3969         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
3970         by IMT.
3971
3972         * aot-compiler.c: Reorganize the got handling code to be a bit more
3973         understandable.
3974
3975 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
3976
3977         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
3978         mono_patch_info_equals/hash, and use it to massively simplify
3979         get_plt_index ().
3980
3981         * mini.c (mono_patch_info_hash): Simplify this and add support for
3982         more patch types.
3983
3984         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
3985
3986         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
3987         handling code, since an offset is not enough to identify a trampoline.
3988
3989         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
3990
3991 2008-08-17  Mark Probst  <mark.probst@gmail.com>
3992
3993         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
3994
3995         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
3996
3997         * mini-ops.h: Argument and result types for OVF_CARRY ops.
3998
3999         * decompose.c: PPC decompositions for various ops.
4000
4001         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
4002
4003 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
4004
4005         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
4006         call the generic trampoline code using a call, instead of a jump, to
4007         remove some special casing from the generic trampoline code.
4008
4009         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
4010         (mono_codegen): Ditto.
4011
4012         * aot-compiler.c aot-runtime.c: Ditto.
4013
4014         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
4015
4016         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
4017         helper function to find the offset corresponding to a lazy fetch trampoline.
4018
4019         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
4020         when doing generic sharing.
4021
4022         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
4023         places.
4024         
4025         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
4026         mini-trampolines.c to be with the other trampoline creation functions.
4027
4028         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
4029         as it is equal to method->signature in most cases, add a 
4030         mono_emit_method_call_full variant which takes a signature and an imt
4031         argument as well.
4032
4033 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
4034
4035         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
4036         to this function, since it could be computed easily from the method 
4037         argument.
4038         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
4039         more.
4040
4041         * method-to-ir.c mini.c: Remove references to 
4042         compile_generic_method_wo_context.
4043
4044         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
4045         generic method calls.
4046         
4047         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
4048         dimensional non-szarrays.
4049
4050         * mini.c (mini_init): Register mono_array_new_1.
4051
4052         * jit-icalls.c (mono_array_new_1): New jit icall.
4053
4054         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
4055         pointing to the method.
4056
4057         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
4058         method addresses belonging to METHOD_JUMP patches in the 
4059         jump_target_got_slot_hash.
4060         (mono_aot_load_method): Ditto.
4061
4062         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
4063         METHOD_JUMP patches.
4064
4065         * mini.c (mini_create_jit_domain_info): New helper function which 
4066         initializes/frees domain->runtime_info.
4067         (mini_free_jit_domain_info): Ditto.
4068         (mini_init): Install the domain hook functions with the runtime.
4069
4070         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
4071         information maintained by the JIT.
4072
4073         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
4074         insertion into jump_table_hash into mono_codegen (), also implement proper
4075         locking.
4076
4077         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
4078         tail calls, it is already done by the aot code.
4079         
4080         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
4081         mechanism on amd64.
4082
4083         * iltests.il.in: Make the jmp test a bit more complex.
4084
4085         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
4086         generic instances which doesn't have a token.
4087
4088         * aot-runtime.c (decode_method_ref): Ditto.
4089         
4090         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
4091         can handle this case now.
4092         (handle_box): Ditto.
4093
4094 2008-08-15  Geoff Norton  <gnorton@novell.com>
4095
4096         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
4097         debugging check.
4098
4099 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
4100
4101         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
4102         calling generic methods.
4103
4104         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
4105
4106         * aot-runtime.c (decode_patch_info): Ditto.
4107
4108         * mini.c (mono_resolve_patch_target): Ditto.
4109         
4110         * patch-info.h: Add METHOD_RGCTX.
4111
4112         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
4113
4114 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
4115
4116         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
4117         arguments in registers.
4118
4119         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
4120         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
4121
4122         * mini.c (mini_method_compile): Abort aot compilation for generic
4123         methods if generic sharing is disabled.
4124         
4125         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
4126         an mrgctx.
4127
4128         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
4129         requiring an mrgctx.
4130
4131         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
4132         store instructions when converting a vcall to a normal call.
4133
4134         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
4135         mono_arch_find_jit_info.
4136
4137 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
4138
4139         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
4140         avoid calling mono_method_full_name () for every method even if the
4141         env var is not set.
4142         (check_inline_caller_method_name_limit): Ditto.
4143
4144 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
4145
4146         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
4147         assemblies in one run.
4148
4149         * aot-compiler.c (mono_compile_assembly): Only print out a count of
4150         skipped methods if it is not 0.
4151
4152         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
4153
4154 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
4155
4156         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
4157           MONO_ARCH_HAVE_UNWIND_TABLE.
4158
4159         Contributed under MIT/X11 license.
4160
4161 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
4162
4163         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
4164           from default optimizaton list on Winx64.
4165
4166         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
4167
4168         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
4169           the LMF from the MonoJitTlsData structure.
4170
4171         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
4172
4173         Contributed under MIT/X11 license.
4174
4175 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
4176
4177         * mini.c (sigsegv_signal_handler): Fix the build.
4178
4179         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
4180         assembly->aot_module.
4181
4182         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
4183         hash table. This simplifies and speeds up a lot of code, and fixes support
4184         for .netmodules.
4185
4186         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
4187         with the runtime.
4188
4189         * mini-exceptions.c: Ditto.
4190         
4191         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
4192         'native_offset' argument, since these are computed in the 
4193         mono_find_jit_info () function.
4194
4195         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
4196         is used by exceptions-ppc.c.
4197
4198         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
4199         mono_arch_find_jit_info ().
4200         
4201         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
4202         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
4203         generic code in mini-exceptions.c.
4204
4205 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
4206
4207         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
4208
4209         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
4210         
4211         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
4212         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
4213         called while holding the loader lock. Fixes #415608.
4214         (mono_aot_get_method_from_token_inner): Ditto.
4215
4216 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
4217
4218         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
4219         to reduce differences between this and the generic implementation in
4220         mini-exceptions.c.
4221         (ves_icall_get_frame_info): Ditto.
4222
4223         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
4224
4225         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
4226         longer neccesarry.
4227
4228         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
4229         mono_arch_get_call_filter () and make it non-static, for consistency with the
4230         other architectures.
4231
4232 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
4233
4234         * mini.c:
4235         * local-propagation.c:
4236         * mini-x86.c: Correct the name of arch defines.
4237
4238 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
4239
4240         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
4241         NO_EMULATE_LONG_SHIFT_OPS define.
4242
4243 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
4244
4245         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
4246         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
4247
4248         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
4249         MACH fixes. Merged from the 2.0 branch.
4250
4251         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
4252
4253         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
4254         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
4255
4256         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
4257
4258         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
4259         mono_marshal_get_native_wrapper () signature changes.
4260
4261 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
4262
4263         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
4264         conversion bug under arm.
4265
4266 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
4267
4268         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
4269
4270         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
4271         with overflow checking.
4272
4273 2008-08-05  Marek Habersack  <mhabersack@novell.com>
4274
4275         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
4276         to the genmdesc.pl file
4277
4278 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
4279
4280         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
4281         arg_array in the soft-float versions of the LOAD/STORE macros.
4282
4283         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
4284         implementation.
4285
4286         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
4287
4288 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
4289
4290         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
4291         a float HFA. Fixes #413621.
4292
4293 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
4294
4295         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
4296         frame_size to args_size. Fixes build.
4297
4298 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
4299
4300         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
4301         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
4302
4303         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
4304         the stack are not unaligned. Fixes #413247.
4305         
4306 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
4307
4308         * mini.c: update jitted methods performance counters.
4309
4310 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
4311
4312         * mini-exceptions.c: increase the exceptions thrown performance
4313         counter in mono_handle_exception ().
4314
4315 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
4316
4317         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
4318         can work with netmodules.
4319
4320 2008-07-28  Geoff Norton  <gnorton@novell.com>
4321
4322         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
4323         regression tests.
4324
4325 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
4326
4327         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
4328         correct place.
4329
4330 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
4331
4332         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4333           The float param registers and other param registers must be the 
4334           same index on Windows x64.
4335
4336         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
4337           ArgValuetypeAddrInIReg argument case.  Setting the argument
4338           op to OP_VTARG_ADDR (OP_REGOFFSET)).
4339
4340         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
4341           variable computed above as the copy length for arguments of storage
4342           type ArgValuetypeAddrInIReg.
4343
4344         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
4345           ArgValuetypeAddrInIReg argument case.  This case will rely on
4346           mono_arch_emit_outarg_vt to emit the correct code later in the process.
4347
4348         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
4349           a 32 byte stack allocation for all calls.  We will omit the adjustment for
4350           jump and tail call instructoins as they do not follow the typical call behavior.
4351
4352         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
4353           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
4354           local variable and pass the local variable by reference to the called method.
4355
4356         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
4357           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
4358           of a struct is passed in a register it must be saved with the other
4359           volatile argument on the stack.
4360
4361         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
4362           frame pointer the stack adjustment value must be saved to the unwind 
4363           info structure.
4364
4365         Contributed under MIT/X11 license.
4366
4367 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
4368
4369         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
4370         which got lost in the merge.
4371
4372 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
4373
4374         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
4375         build.
4376
4377         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
4378         
4379         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
4380         icalls, since they won't be patched.
4381
4382         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
4383         different code sequence when running under valgrind to prevent some valgrind
4384         errors.
4385
4386         * iltests.il.in: Add new regression test.
4387
4388         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
4389         end with a throw.
4390
4391         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
4392         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
4393
4394         * iltests.il.in: Add new test.
4395
4396         * aot-compiler.c: Fix some warnings.
4397
4398         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
4399         Fixes #412494.
4400
4401 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
4402
4403         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
4404         (mini_usage_jitdeveloper): Add a missing --wapi option.
4405
4406 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
4407
4408         * mini-codegen.c: Simplify the is_fp macros.
4409         (free_up_ireg): Remove, use free_up_reg instead.
4410         (free_up_reg): Fix the fp case.
4411
4412 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
4413
4414         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
4415         lowered earlier.
4416
4417         * exceptions-x86.c: Merge some changes which seemed to have got lost
4418         in the linear-ir merge.
4419
4420         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
4421
4422         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
4423         long vreg volatile even if the variable was already created.
4424
4425         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
4426         volatile variables.
4427
4428 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
4429
4430         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
4431
4432         * mini.c (mono_jit_compile_method_inner): Add support for 
4433         MONO_EXCEPTION_BAD_IMAGE.
4434
4435         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
4436         mini_method_get_context () returns NULL. Fixes #356531.
4437
4438         * mini.c (mono_method_to_ir): Ditto.
4439         
4440         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
4441         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
4442
4443 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
4444
4445         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
4446         in the LDFTN implementation.
4447
4448 2008-07-25  Mark Probst  <mark.probst@gmail.com>
4449
4450         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
4451         code, patch calls to icalls, too, even if they're not in the
4452         shared generic code hash.  Fixes #411962.
4453
4454 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
4455
4456         * cpu-x86.md: Increase the length of the fcall opcodes.
4457
4458         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
4459         calls returning floats.
4460
4461         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
4462         on NEWARR.
4463         
4464         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
4465         missed earlier.
4466
4467         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
4468         into the domain->method_code_hash.
4469
4470         * aot-compiler.c: Fix win32 build.
4471
4472         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
4473         
4474         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
4475         gshared NEWARR implementation.
4476
4477         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
4478
4479         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
4480         can be used outside of method_to_ir.
4481
4482         * mini.h (MonoCompile): Add arg_types field.
4483
4484         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
4485         
4486         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
4487         the values of the local arg_array and param_types array.
4488
4489 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
4490
4491         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
4492         got accesses might only get generated later when NEWOBJ is decomposed.
4493         
4494         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
4495         looking up the native code of the target method when a delegate is called
4496         for the first time.
4497
4498         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
4499         optimization.
4500
4501         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
4502
4503         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
4504         AOT work on platforms without a working dlsym implementation.
4505
4506         * mini.h: Bump AOT image format version.
4507         
4508 2008-07-24  Mark Probst  <mark.probst@gmail.com>
4509
4510         * mini-exceptions.c: Free a MonoType with
4511         mono_metadata_free_type() instead of g_free().
4512
4513         * aot-runtime.c: Free a MonoType.
4514
4515 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
4516
4517         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
4518         optimization.
4519
4520         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
4521         fp stack on x86.
4522
4523 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
4524         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
4525         profiler hook.
4526
4527 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
4528
4529         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
4530         NEWOBJ calls on valuetypes.
4531
4532         * iltests.il.in: Add new test.
4533
4534         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
4535
4536 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
4537
4538         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
4539         is no longer needed.
4540
4541         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
4542         non register sized integer arguments.
4543         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
4544         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
4545         emit_memcpy2 ().
4546
4547         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
4548         CEE_MONO_RETOBJ.
4549         
4550         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
4551         two a binop with different sized arguments is emitted.
4552
4553         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
4554         instruction in the ins==NULL case.
4555
4556 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
4557
4558         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
4559
4560         * mini-x86.c: Fix osx build.
4561
4562         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
4563         opcodes as well.
4564
4565         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
4566         instruction for non int sized variables.
4567
4568         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
4569         implementation.
4570
4571 2008-07-23  Robert Jordan  <robertj@gmx.net>
4572
4573         * method-to-ir.c: Fix MSVC build.
4574
4575 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
4576
4577         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
4578         a non int sized type, widen it to an int since newer versions of gcc seem to
4579         generate code which needs this.
4580
4581         * ssa2.c abcremoval2.c: Fix warnings.
4582
4583         * *: Merge the Linear IR branch.
4584
4585         The original branch is at trunk/branches/vargaz/mini-linear-il, and
4586         the ChangeLog file there describes all the changes done over the years. 
4587         Further documentation can be found at www.mono-project.com/Linear_IL.
4588
4589 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
4590
4591         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4592           The float param registers and other param registers must be the 
4593           same index on Windows x64.
4594
4595         Contributed under MIT/X11 license.
4596
4597 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
4598
4599         * mini.c: Make the previous fix GC safe.
4600
4601 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
4602
4603         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
4604
4605 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
4606
4607         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
4608           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
4609           ArgValuetypeAddrInIReg instead.
4610
4611         Contributed under MIT/X11 license.
4612
4613 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
4614
4615         * mini-codegen.c (get_register_spilling): Fix a warning.
4616
4617 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
4618
4619         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
4620         for types which the initialization fails. Raises the provided exception
4621         at the right stop after cleanup.
4622
4623 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
4624
4625         * aot-compiler.c: Free most of the memory allocated during compilation.
4626
4627         * mini.c (mini_parse_debug_options): Fix a leak.
4628         
4629         * mini.c (mini_method_compile): Don't add the method to the jit info tables
4630         during aot compilation.
4631
4632 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
4633
4634         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
4635         it has too much register pressure.
4636
4637 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
4638
4639         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
4640
4641 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
4642
4643         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4644         on x86.
4645
4646         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4647         on amd64 similar to the way it is done on arm.
4648
4649         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4650
4651         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
4652         consistency, normalize error messages, avoid loading aot-only modules in
4653         normal mode.
4654
4655         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
4656         for consistency.
4657
4658         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
4659
4660 2008-07-11  Martin Baulig  <martin@ximian.com>
4661
4662         * debug-debugger.h
4663         (MonoDebuggerInfo): Add `interruption_request'.
4664
4665 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
4666
4667         * aot-compiler.c (emit_plt): Remove some dead code.
4668
4669         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
4670
4671         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
4672         return the plt info offset belonging to a given plt entry.
4673
4674         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
4675         mono_aot_get_plt_info_offset.
4676         
4677         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
4678         similar to the amd64 code by makeing jumps through a separate jump table 
4679         instead of embedding the jump addresses into the code.
4680
4681 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
4682
4683         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
4684         method.
4685
4686 2008-07-10  Martin Baulig  <martin@ximian.com>
4687
4688         * mini.c (mini_method_compile): Disable generics sharing when
4689         running in the debugger.
4690
4691 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
4692
4693         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
4694
4695         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
4696         the local register allocator from running out of registers on x86 when 
4697         using aot.
4698
4699 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
4700
4701         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
4702         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
4703         C4146.
4704
4705         Contributed under MIT/X11 license.
4706
4707 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
4708
4709         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
4710         speed up the assembler.
4711
4712 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
4713
4714         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
4715         support.
4716
4717         * mini.c: Move the soft float handling macros a bit earlier, add 
4718         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
4719         place.
4720
4721         * mini.h: Add prototype for mono_arch_fixup_jinfo.
4722
4723         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
4724         read-only to help catch code allocation requests.
4725         
4726         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
4727         and turn it off when using --aot-only or when compiling with --aot=full.
4728
4729         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
4730         jump table for switches from the normal domain mempool, not the code
4731         manager.
4732
4733         * mini-trampolines.c (get_unbox_trampoline): New function to return an
4734         unbox trampoline which handles aot-only mode too.
4735
4736         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
4737         an AOTed unbox trampoline.
4738
4739         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
4740
4741 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
4742
4743         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
4744         ""
4745
4746         Contributed under MIT/X11 license.
4747
4748 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
4749
4750         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
4751           the unwind information for the method at the end of the allocated block.
4752           
4753         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
4754           MonoCompileArch to hold the unwind info for SEH on Winx64
4755         
4756         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
4757           frame pointer info for the method being compiled.
4758           
4759         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
4760           the call to mono_exception_from_token.
4761           
4762         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
4763           storing the method prolog information in a format that the Winx64 SEH can understand.  This
4764           information is stored a the end of the method block because it is all 32-bit offset based.
4765
4766         Contributed under MIT/X11 license.
4767
4768 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
4769
4770         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
4771
4772         * wapihandles.c: Fix warnings.
4773
4774         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
4775         mode.
4776
4777         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
4778         mono_jit_compile_method in aot-only mode since that calls the type 
4779         initializer.
4780         
4781         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
4782         get_delegate_invoke_impl in aot-only mode.
4783
4784         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
4785
4786 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
4787
4788         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
4789
4790         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
4791         is on by default.
4792
4793         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
4794
4795         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
4796         init trampoline from the AOT file as well.
4797
4798         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
4799         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
4800         code.
4801
4802         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
4803         mono_init.
4804
4805         * exceptions-amd64.c: Add _full variants for the remaining exception code
4806         creation functions as well, allow emission of relocatable code, remove
4807         caching since that is now done by the caller.
4808
4809         * mini-exceptions.c: Add _full variants for the remaining exception code
4810         creation functions as well, add aot-only support.
4811
4812         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
4813         if we can determine a proper token for them.
4814         (add_wrappers): Add a few more wrappers.
4815         (emit_method_code): Remove some dead code.
4816         (emit_trampolines): Emit exception code too.
4817
4818         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
4819
4820         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
4821         mono_array_new_va which avoids varargs.
4822
4823         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
4824
4825         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
4826         mono_arch_create_specific_trampoline () in all places.
4827
4828         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
4829         a bit so it can be used for other things as well.
4830         
4831         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
4832         on demand as well.
4833
4834         * exceptions-amd64.c: Rename the caching from the exception code creation
4835         functions, it is done by the caller instead.
4836         
4837         * exceptions-amd64.c: Change the signature of the exception code creation 
4838         functions to allow the creation of relocatable code later.
4839
4840         * mini-exceptions.c: Add a set of functions to query the various 
4841         runtime-generated exception functions.
4842
4843         * mini.c mini-exceptions.c: Use the newly added functions instead of the
4844         mono_arch_.. () functions.
4845         
4846 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
4847
4848         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
4849
4850         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
4851
4852         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
4853         (mini_get_vtable_trampoline): Ditto.
4854
4855         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
4856         code in the AOT case by returning the code size and a list of relocations to
4857         the caller.
4858
4859         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
4860
4861 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
4862
4863         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
4864           clean the stack.
4865
4866         Contributed under MIT/X11 license.
4867
4868 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
4869
4870         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
4871         so the buffer size can be computed correctly. Fixes #404735.
4872
4873         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
4874         normally as cfg->debug_info is already freed.
4875
4876 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
4877
4878         * mini-amd64.c: For calls returning vtypes in registers, don't store
4879         the return address on the stack, instead allocate a separate local for
4880         it. Fixes #404729.
4881
4882 2008-07-05  Mark Probst  <mark.probst@gmail.com>
4883
4884         * mini-trampolines.c, mini.h: Add an argument to
4885         mono_create_jit_trampoline_in_domain() for turning off the adding
4886         of the sync wrapper.
4887
4888         * mini.c: Use the JIT trampoline without sync instead of
4889         ldftn_nosync in static RGCTX invoke wrappers so that the call can
4890         be patched.
4891
4892 2008-07-04  Mark Probst  <mark.probst@gmail.com>
4893
4894         * driver.c: Turn on GSHARED optimization by default.
4895
4896 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
4897
4898         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
4899         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
4900
4901         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
4902         create a variant of the generic trampoline code callable from AOTed trampolines.
4903
4904         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
4905         trampoline code callable from AOTed trampolines.
4906
4907         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
4908
4909 2008-07-04  Mark Probst  <mark.probst@gmail.com>
4910
4911         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
4912         pass-through manner.
4913
4914         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
4915         and don't fail sharing for them anymore.
4916
4917         * mini-exceptions.c: Handle exceptions in shared generic methods.
4918
4919         * generic-sharing.c: When checking the context of a generic
4920         method, also check its class's context.  Don't treat wrappers as
4921         sharable.
4922
4923         * mini-trampolines.c: Some code factored out to
4924         metadata/generic-sharing.c.  Handle the MRGCTX case.
4925
4926         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
4927         we must deal with the method being of another instantiation of the
4928         class.  Add static rgctx invoke wrappers to generic methods.
4929
4930 2008-07-04  Mark Probst  <mark.probst@gmail.com>
4931
4932         * mini.c: Provide all jit infos of generic shared methods with a
4933         generic jit info.
4934
4935         * mini-exceptions.c: Handle the new situation that a generic info
4936         might be available, but not info about the this/vtable/mrgctx
4937         variable.
4938
4939 2008-07-03  Mark Probst  <mark.probst@gmail.com>
4940
4941         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
4942         generic methods.
4943
4944 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
4945
4946         * dominators.c (check_dominance_frontier): Fix a warning.
4947
4948         * mini.h: Add some missing prototypes.
4949
4950         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
4951
4952         * driver.c (mono_jit_init_version): Correct the comments since the first
4953         argument should be the name of the root domain, not a filename.
4954
4955         * aot-runtime.c (make_writable): Error out if this is called while running
4956         with --aot-only.
4957         (load_aot_module): Ditto.
4958
4959         * aot-compiler.c: Really fix the computation of method indexes.
4960
4961         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
4962         optimizations as this is no longer called frequently.
4963
4964         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
4965         method and the invoke impl code and pass it to the delegate trampoline instead of
4966         just the delegate class.
4967
4968 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
4969
4970         * aot-compiler.c: Fixup the computation of method indexes.
4971         (add_wrappers): Create the base methods of the runtime invoke wrappers using
4972         the method builder infrastructure.
4973
4974         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
4975         has no header.
4976
4977         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
4978         mode, load the method right away instead of creating a trampoline.
4979
4980         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
4981
4982         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
4983         some checks a bit.
4984
4985 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
4986
4987         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
4988         (mono_aot_load_method): Use method_index instead of method->token.
4989
4990         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
4991         can handle icalls etc. properly.
4992
4993         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4994
4995         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
4996
4997         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
4998         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
4999         JIT_ICALL_ADDR patch type.
5000
5001         * patch-info.h: Add JIT_ICALL_ADDR patch type.
5002
5003         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
5004         request flag.
5005         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
5006
5007         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
5008
5009 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
5010
5011         * mini.c: Use domain->jit_code_hash_lock for controlling access to
5012         domain->jit_code_hash.
5013
5014 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
5015
5016         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
5017
5018 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
5019
5020         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
5021         get_this_arg_from_call, let it compute it when needed.
5022
5023         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
5024         gsctx from code only when needed.
5025
5026         * mini-trampolines.c (get_generic_context): Rename this to 
5027         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
5028         it can be called by the arch backends.
5029
5030         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
5031
5032 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
5033
5034         * driver.c (mono_main): Add experimental --aot-only command line option.
5035
5036         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
5037         set.
5038
5039 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
5040
5041         * driver.c (DllMain): Remove mono_module_handle.
5042
5043         Contributed under MIT/X11 license.
5044
5045 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
5046
5047         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
5048         for emitting methods which are not in the source assembly. Detect and report
5049         failure of assembling+linking.
5050         
5051         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
5052
5053         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
5054
5055 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
5056
5057         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
5058
5059 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
5060
5061         * mini.h: Remove some obsolete prototypes.
5062
5063         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
5064
5065 2008-06-24  Mark Probst  <mark.probst@gmail.com>
5066
5067         * mini.c (get_object_generic_inst): Variable-sized arrays are not
5068         supported by Visual Studio, so use alloca().
5069
5070 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
5071
5072         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
5073         Fixes #402585.
5074
5075 2008-06-23  Mark Probst  <mark.probst@gmail.com>
5076
5077         * mini.c: Fail sharing of a generic method if it contains an open
5078         catch clause (because we don't pass MRGCTXs yet).
5079
5080 2008-06-23  Mark Probst  <mark.probst@gmail.com>
5081
5082         * mini.c: When compiling a method with generic sharing, insert the
5083         method instantiated with an all-Object generic context into the
5084         jit info table, instead of the context of the first instantiation
5085         of the method we happen to compile.
5086
5087 2008-06-18  Martin Baulig  <martin@ximian.com>
5088
5089         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
5090         `major_version' and `minor_version'.
5091
5092 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5093
5094         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
5095         mono_method_is_generic_sharable_impl() takes an additional
5096         argument specifying whether to treat type variables as reference
5097         types.
5098
5099 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5100
5101         * mini.h: Removed obsolete prototypes.
5102
5103 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5104
5105         * mini.c: Don't fail generic sharing for initobj and sizeof - we
5106         already handle them.
5107
5108 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5109
5110         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
5111         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
5112         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
5113         tramp-x86.c: Added a MonoGenericContext* argument to
5114         mono_arch_get_unbox_trampoline() so that it can call other
5115         functions which require it.
5116
5117 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5118
5119         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
5120         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
5121         mono_arch_get_this_arg_from_call() takes a
5122         MonoGenericSharingContext* as well.
5123
5124 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5125
5126         * mini.c: Factor out code for emitting unbox into emit_unbox() and
5127         implement generic sharing of unbox.
5128
5129 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5130
5131         * mini.c: Don't compute the vtable to determine whether a field is
5132         special static, because it might not work for open types.
5133
5134 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5135
5136         * mini.c: Removed the unused token_type and token_source arguments
5137         from get_runtime_generic_context_ptr().
5138
5139 2008-06-17  Marek Habersack  <mhabersack@novell.com>
5140
5141         * mini.c (ADD_BINOP): fix the build
5142
5143 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
5144
5145         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
5146         a widening op.
5147
5148 2008-06-16  Mark Probst  <mark.probst@gmail.com>
5149
5150         * mini.h: Removed class relations enum that's not used anymore.
5151
5152 2008-06-16  Mark Probst  <mark.probst@gmail.com>
5153
5154         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
5155
5156         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
5157         the lazy fetch trampoline access code.
5158
5159 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
5160
5161         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
5162
5163 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
5164
5165         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
5166
5167         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
5168
5169         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
5170
5171 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5172
5173         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
5174         intrinsics.
5175
5176         * mini-ops.h: Add MIN/MAX_UN opcodes.
5177
5178         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
5179         intrinsics.
5180
5181         * basic-math.cs: Add more min/max tests.
5182
5183         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5184
5185 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5186
5187         * mini.c: Small fix in the prologue of emit_castclass.
5188
5189 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5190
5191         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5192
5193         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
5194         do not work even for unsigned types. Fixes #400014.
5195
5196         * basic-math.cs: Add regression tests for unsigned Min/Max.
5197
5198 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5199
5200         * mini.c: Added additional context_used argument to several
5201         functions, which will be needed for sharing generic methods.  Use
5202         GET_RGCTX macro wherever appropriate.  Declare only one
5203         context_used in mono_method_to_ir().
5204
5205 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5206
5207         * mini.c, generic-sharing.c: Removed generic class relations.
5208
5209         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
5210         functions due to MRGCTX changes.
5211
5212 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5213
5214         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
5215         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
5216         with calculated IMT.
5217
5218         * mini.c: Generic sharing of calls via generic interfaces.
5219
5220         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
5221         generic method with non-constant MonoGenericContext*.  Instead,
5222         the context is taken out of the method itself.
5223
5224 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5225
5226         * mini.c: Generic sharing of ldvirtftn.
5227
5228 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5229
5230         * mini.c: Generic sharing of ldftn.
5231
5232 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5233
5234         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
5235
5236 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5237
5238         * mini.c: Generic sharing of the special case of ldtoken followed
5239         by a call to GetTypeFromHandle.
5240
5241 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5242
5243         * mini.c: Generic sharing of box for nullable types.
5244
5245 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5246
5247         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
5248         are passed on the stack. Fixes #324807.
5249
5250 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
5251
5252         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
5253         for the ArgValuetypeAddrInIReg case.
5254
5255         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
5256         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
5257
5258         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
5259         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
5260         local variable and pass the local variable by reference to the called method.
5261           
5262         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
5263         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
5264
5265         Contributed under MIT/X11 license.
5266
5267 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
5268
5269         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
5270
5271         * debug-mini.c (mono_debug_print_vars): Release memory after printing
5272         everything.
5273
5274 2008-06-10  Martin Baulig  <martin@ximian.com>
5275
5276         * debug-mini.c
5277         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
5278
5279 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
5280
5281         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
5282         possible error when no arguments are passed.
5283
5284         Contributed under MIT/X11 license.
5285
5286 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
5287
5288         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
5289         where the file name is NULL.
5290
5291 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
5292
5293         * mini.c: Fix s390 build.
5294
5295 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
5296
5297         * trace.c (mono_trace_parse_options): Fix warnings.
5298
5299         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
5300
5301 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
5302
5303         * mini.c (remove_block_if_useless): Avoid printing the method name.
5304         
5305         * mini.c: Remove needless setting of ins->cil_code which is now done by 
5306         MONO_INST_NEW.
5307
5308         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
5309         LMF. Not yet used.
5310
5311         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
5312         translated code after it has been patched.
5313
5314 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
5315
5316         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
5317         avoid problems during code patching on SMP systems.
5318         (emit_call): Avoid adding a patch info which is already added by 
5319         emit_call_body.
5320         (mono_arch_emit_exceptions): Ditto.
5321
5322 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
5323
5324         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
5325         MONO_TYPE_ISSTRUCT already checks for it.
5326
5327 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
5328
5329         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
5330           structs with floats on Winx64 the float registers are not used.  
5331           The integer registers are always used..
5332         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
5333           only one register will be used and only if the size of the struct 
5334           is 1,2,4, or 8 bytes.
5335
5336         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
5337           to work for Winx64.
5338
5339         Contributed under MIT/X11 license.
5340
5341 2008-06-05  Martin Baulig  <martin@ximian.com>
5342
5343         * debug-debugger.c (debugger_lookup_class): Also call
5344         mono_class_setup_methods() here; we're only called from RTI.
5345
5346 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
5347
5348         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
5349         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
5350         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
5351         Post-process object files and add dtrace-generated object, if necessary.
5352
5353         Contributed under MIT/X11 license.
5354
5355 2008-06-04  Mark Probst  <mark.probst@gmail.com>
5356
5357         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
5358         element class.
5359
5360         * mini.c: Generic sharing for unbox.any and castclass.
5361
5362 2008-06-04  Mark Probst  <mark.probst@gmail.com>
5363
5364         * mini.c: Ignore tailcall prefix in shared generic code and when
5365         doing calls which require a vtable/rgctx argument.
5366
5367 2008-06-04  Mark Probst  <mark.probst@gmail.com>
5368
5369         * mini.c: Don't free the JIT info.
5370
5371         * driver.c: Changes in the JIT info table testing code.
5372
5373 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
5374
5375         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
5376         interruption. Fix some warnings.
5377
5378         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
5379         interruption_checkpoint.
5380
5381 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
5382
5383         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
5384         from embedding applications.
5385
5386 2008-06-02  William Holmes  <billholmes54@gmail.com>
5387
5388         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
5389           reserving 32 bytes on the stack when making calls. 
5390
5391         Contributed under MIT/X11 license.
5392
5393 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
5394
5395         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
5396         the linear IL branch.
5397
5398         * driver.c: Print out more information for --version on arm.
5399
5400 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
5401
5402         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
5403         bb_exit instead, since out of line bblocks might not actually be emitted
5404         out-of-line.
5405         
5406         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
5407         maximum epilog size for out of line bblocks if tracing is enabled.
5408
5409         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
5410
5411 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
5412
5413         * arrays.cs: Regression tests for allocating arrays with negative sizes.
5414
5415 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
5416
5417         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
5418         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
5419         opcodes.
5420
5421 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
5422
5423         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
5424         the 'value' to store is a constant.
5425
5426         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
5427
5428         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
5429         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
5430
5431 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
5432
5433         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
5434         for accessing method->generic_container.
5435
5436 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
5437
5438         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
5439         
5440         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
5441
5442         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
5443
5444         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
5445         fails.
5446
5447 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
5448
5449         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
5450
5451         * mini.c: Handle the case when mono_class_vtable () fails.
5452
5453 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
5454         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
5455         the stat profiler.
5456
5457 2008-05-22  Mark Probst  <mark.probst@gmail.com>
5458
5459         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
5460         together with domain sharing.
5461
5462 2008-05-22  Mark Probst  <mark.probst@gmail.com>
5463
5464         * mini.c: Treat callvirts to final methods like non-virtual calls
5465         when doing generic sharing, i.e. look them up in the runtime
5466         generic context.
5467
5468 2008-05-22  Mark Probst  <mark.probst@gmail.com>
5469
5470         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
5471         with computed types (for generic sharing).
5472
5473         * mini.c: Generic sharing for mkrefany and refanyval.
5474
5475 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
5476
5477         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
5478         possible.
5479
5480         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
5481         the generic sharing code.
5482         
5483         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
5484         when needed.
5485
5486 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
5487
5488         * mini.h: Remove the declaration of mono_aot_init_vtable ().
5489
5490 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
5491
5492         * driver.c: updated copyright date
5493
5494 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
5495
5496         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
5497         needed.
5498
5499 2008-05-19  Martin Baulig  <martin@ximian.com>
5500
5501         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
5502         pointing to the new `_mono_debug_using_mono_debugger' variable.
5503
5504         * driver.c
5505         (mono_main): Check mono_debug_using_mono_debugger() rather than
5506         the `MONO_INSIDE_MDB' environment variable to check whether we're
5507         inside the debugger.
5508
5509 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
5510
5511         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
5512         argument.
5513
5514 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
5515
5516         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
5517
5518         * mini.c: Added mini_assembly_can_skip_verification. This
5519         function checks if the assembly requested to skip verification. 
5520         Fixes part of #387274.
5521
5522 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
5523
5524         * mini.c (mini_get_method): Disable the check for open generic classes when
5525         using generic sharing.
5526
5527         * generics.cs: Add a test for #387034.
5528
5529         * mini.c (mini_get_method): Check whenever the method class is an open generic
5530         type, and return NULL in that case, causing a verification error. Fixes
5531         #384123.
5532
5533 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
5534
5535         * driver.c (mono_main): Revert r102623. The right
5536         thing to do is to enable the verifier under verifiable
5537         unless a --security flag was passed.
5538
5539         We need this non-trivial behavior for --verify-all otherwise
5540         mcs-compileall won't be able to use it. As it needs everything to
5541         be verified under validil.
5542
5543 2008-05-06  Martin Baulig  <martin@ximian.com>
5544
5545         Fix #383749.
5546
5547         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
5548         (mono_debugger_thread_cleanup): Likewise.
5549         (mono_debugger_extended_notification): Likewise.
5550
5551 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
5552
5553         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
5554         against both inflated and non-inflated methods. We need to check against the
5555         generic definition for cases where the instantiated method is not visible.
5556         We need to check against the inflated types for cases where the instantiation
5557         changes any super type. This fixes #382986.
5558
5559         Note that this doesn't need to be applied to other parts of mono_method_to_ir
5560         that check for visibiliy as generic params only appears as the type subject
5561         of tokens on call opcodes. Field manipulation and ldftn must always
5562         target an exact type.
5563
5564 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
5565
5566         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
5567         if no related --security flag is passed.
5568
5569 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
5570
5571         * mini-arch.h: Prepare support for ppc64.
5572
5573         Contributed under MIT/X11 license.
5574
5575 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
5576
5577         * aot-runtime.c: Prepare support for ppc64.
5578
5579         Contributed under MIT/X11 license.
5580
5581 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
5582
5583         * mini-ops.h: Prepare support for ppc64.
5584
5585         Contributed under MIT/X11 license.
5586
5587 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
5588
5589         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
5590
5591         Contributed under MIT/X11 license.
5592
5593 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
5594
5595         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
5596         assemblies, since aot_name is not a full path, causing us to load MS.NET 
5597         assemblies on windows.
5598
5599 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
5600
5601         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
5602         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
5603         * main.c: Use UTF-8 encoded command line instead of Windows default code
5604         page on Windows to support Unicode.
5605         * driver.c (DllMain): New function for mixed-mode assembly support.
5606         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
5607         export __stdcall functions without decoration.
5608
5609         Contributed under MIT/X11 license.
5610
5611 2008-04-28  Mark Probst  <mark.probst@gmail.com>
5612
5613         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
5614         saving it very early.
5615
5616 2008-04-28  Mark Probst  <mark.probst@gmail.com>
5617
5618         * mini.h, mini.c: Lots of code for accessing the old RGCTX
5619         deleted.  The only way to access the new RGCTX is via the
5620         trampline.
5621
5622         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
5623         vtable instead of the RGCTX to static methods.
5624
5625         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
5626         accessing the new RGCTX.
5627
5628         * generic-sharing.c: There is no separation between self, type
5629         arguments and other types in the RGCTX anymore.
5630
5631 2008-04-25  Jonathan Chambers <joncham@gmail.com>
5632
5633         * mini-amd64.c (add_general): Remove previous stack adjustment.
5634         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
5635         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
5636         for 32 bytes of stack space reserved for all calls.
5637         
5638         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
5639         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
5640         adjustment.
5641         
5642         Code contributed under MIT/X11 license.
5643
5644 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
5645
5646         * mini.c (mini_method_verify): Only verify non-inflated methods, check
5647         against the root definition, peeling out method and type instantiations.
5648         Cache verify success results, code that fails verification is still
5649         checked multiple times.
5650
5651 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
5652
5653         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
5654
5655 2008-04-23  Jonathan Chambers <joncham@gmail.com>
5656
5657         * mini-amd64.c (add_general): Always increment stack on Win64.
5658         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
5659         on Win64.
5660         
5661         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
5662         stack based argument handling on Win64.
5663         
5664         Code contributed under MIT/X11 license.
5665
5666 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
5667
5668         * Makefile.am (version.h): Add support for git-svn.
5669
5670 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
5671
5672         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
5673         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
5674         avoiding allocations and libc functions which might deadlock.
5675         
5676         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
5677         'no-gdb-backtrace' option is set.
5678
5679         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
5680
5681         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
5682
5683 2008-04-21  Martin Baulig  <martin@ximian.com>
5684
5685         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
5686         and `get_lmf_addr'; `notification_address' is no longer a pointer.
5687
5688 2008-04-21  Martin Baulig  <martin@ximian.com>
5689
5690         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
5691         `thread_vtable', `event_handler_ptr' and `event_handler'.
5692
5693 2008-04-21  Martin Baulig  <martin@ximian.com>
5694
5695         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
5696         allows delayed initialization of the `executable_code_buffer' when
5697         attaching.
5698
5699 2008-04-21  Martin Baulig  <martin@ximian.com>
5700
5701         * mini.h (mono_debugger_create_notification_function): Removed.
5702         * tramp-*.c (mono_debugger_create_notification_function): Removed.
5703
5704         * mdb-debug-info64.s
5705         (MONO_DEBUGGER__notification_function): Added this in the .text section.
5706
5707         * mdb-debug-info32.s
5708         (MONO_DEBUGGER__notification_function): Added this in the .text section.
5709
5710         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
5711         currently only works on x86 and x86_64, so don't create it on ppc.
5712
5713 2008-04-21  Martin Baulig  <martin@ximian.com>
5714
5715         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
5716
5717         * mini.c
5718         (mini_method_compile): In the fp elimination check, check
5719         `debug_options.mdb_optimizations' in addition to
5720         mono_debug_using_mono_debugger().       
5721
5722         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
5723         disable some JIT optimizations which are only disabled when
5724         running inside the debugger.
5725         Added `--help-debug' option to describe the debugging options.
5726         (parse_debug_options): New static function to parse the `--debug'
5727         options, so we can easily add more stuff in future.
5728
5729 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
5730
5731         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
5732         the method has no body.
5733
5734 2008-04-19  Jonathan Chambers <joncham@gmail.com>
5735
5736         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
5737         assembly is not allowed in MSVC 64-bit compiler. 
5738         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
5739         as we get floating point exceptions everywhere.
5740         
5741         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
5742         correctly align arguments for call to throw_exception.
5743         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
5744         
5745         Code contributed under MIT/X11 license.
5746
5747 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
5748
5749         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
5750
5751 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
5752
5753         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
5754
5755         * mini-amd64.c (NEW_INS): Set cil_code.
5756
5757         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
5758         from mini-amd64.c so all debugger related logic is in one place.
5759
5760         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
5761         later won't have a random ip assigned to them.
5762
5763 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
5764
5765         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
5766         the arch specific function initializes code_size.
5767         (mono_create_delegate_trampoline): Ditto.
5768
5769         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
5770         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
5771         platforms.
5772
5773         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
5774         running under the debugger.
5775
5776         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
5777         debugger.
5778
5779         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
5780         debugger. Also move the disabling of optimizations here from driver.c.
5781         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
5782         debugger.
5783
5784         * mini.h (MonoCompile): Add a few new flags.
5785
5786 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
5787
5788         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
5789         so the cil_code field of created MonoInst's is properly set.
5790         (mini_select_instructions): Ditto.
5791
5792         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
5793         (MONO_INST_NEW_CALL): Ditto.
5794
5795         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
5796         in many places so the ins->cil_code field is properly initialized.
5797
5798         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
5799         place.
5800
5801 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
5802
5803         * mini.c (mini_method_compile): Print a different message when compiling a 
5804         shared method.
5805         
5806         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
5807         > 1.
5808
5809 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
5810
5811         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
5812         SSE2 instructions.
5813
5814         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
5815         
5816 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
5817
5818         * mini.c (handle_stack_args): Make this return void since its return value was
5819         never used. Also set cfg->unverifiable for invalid IL instead of calling
5820         G_BREAKPOINT ().
5821
5822 2008-04-10  Mark Probst  <mark.probst@gmail.com>
5823
5824         * mini.c: Make sure "this" is live in catch clauses with type
5825         variables in shared generic code.
5826
5827 2008-04-08  Mark Probst  <mark.probst@gmail.com>
5828
5829         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
5830         generic_class_is_reference_type() to ensure the proper behaviour
5831         when sharing generic code and the type in question is a type
5832         argument.
5833
5834 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
5835
5836         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
5837         race conditions when printing thread dumps. Fixes #377738.
5838
5839 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
5840         
5841         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
5842         shows up when both MonoInst arguments can cause aliasig.
5843         There is likely no way in the current JIT to trigger this problem, but
5844         it showed up in the development of generics sharing, when in a new
5845         opcode both args of an OP_GROUP can be aliases (addresses of a local).
5846         When the generics sharing code will be committed, its tests will be
5847         valid also for this bug.
5848
5849 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
5850
5851         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
5852         PATCH_INFO_METHOD.
5853
5854         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
5855         NULL.
5856
5857 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
5858
5859         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
5860         use a more detailed exception message for InvalidCastException.
5861
5862         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
5863
5864         * driver.c (mono_main): Add --debug=casts option to turn on better 
5865         InvalidCastException message details.
5866
5867         * mini.c (mini_get_debug_options): New helper function to return the address of
5868         the debug_options variable.
5869
5870         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
5871         the jit_tls TLS variable.
5872
5873         * mini.c (mono_jit_tls): New TLS variable.
5874
5875         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
5876         option is used.
5877
5878 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
5879
5880         * mini.h: Removed verifer related stuff. This code was moved to verify.c
5881
5882         * mini.c: Removed verifer related stuff, code moved to verify.c.
5883
5884         * driver.c: Using code from verify.c instead of mini.c.
5885
5886 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
5887
5888         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
5889         longer valid.
5890
5891 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
5892
5893         * mini.c (check_for_method_verify): Enabling verification of
5894         corlib if mono_verify_all is set. Bugs in the verifier preventing that
5895         have been fixed.
5896
5897 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
5898
5899         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
5900         caller saved registers as well.
5901         
5902         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
5903         saved registers as well.
5904
5905 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
5906
5907         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
5908
5909         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
5910         code.
5911
5912 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
5913
5914         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
5915         to get_call_info.
5916         (get_call_info): Take a gsctx argument instead of 'cfg'.
5917
5918 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
5919
5920         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
5921         mono_verify_all is set.
5922
5923         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
5924
5925         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
5926
5927 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
5928
5929         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
5930         an exception.
5931
5932         * driver.c mini.c mini.h: Add a --verify-all development option to test the
5933         verifier and the code generated by the compiler.
5934
5935 2008-03-25  Mark Probst  <mark.probst@gmail.com>
5936
5937         * mini.c: Generic sharing of the non-nullable case of the box
5938         instruction.
5939
5940 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
5941
5942         * inssel.brg: Fix the build.
5943
5944         * iltests.il.in: Add a test for lconv.ovf.u8.un.
5945
5946 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
5947
5948         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
5949         Array:Address. Fixes #372410.
5950
5951         * iltests.il.in: New tests for readonly prefix.
5952
5953 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
5954
5955         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
5956         mini-trampolines.c.
5957
5958         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
5959         mini-exceptions.c.
5960
5961         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
5962         
5963         * mini.c (mono_decompose_op_imm): New helper function.
5964
5965         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
5966         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
5967         return value.
5968
5969         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
5970         mono_arch_output_basic_block. Fix warnings.
5971
5972         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
5973         for now.
5974
5975 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
5976
5977         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
5978         since the extra frame is now detected automatically inside the loop.
5979
5980         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
5981         opts which are now in mono_peephole_ins ().
5982         
5983         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
5984
5985         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
5986         frames and skip duplicate managed-to-native frames. Fixes #367665.
5987
5988         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
5989         opts which are now in mono_peephole_ins ().
5990         (mono_arch_peephole_pass_2): Ditto.
5991
5992         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
5993
5994         * mini-codegen.c (mono_peephole_ins): New helper function containing the
5995         arch independent peephole optimizations.
5996
5997         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
5998         opts which are now in mono_peephole_ins ().
5999
6000         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
6001         
6002         * mini-s390.c (mono_arch_output_basic_block): Fix build.
6003
6004         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
6005         pattern.
6006
6007         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
6008         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
6009         opcode. 
6010
6011 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
6012
6013         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
6014         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
6015         return value.
6016
6017         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
6018         mono_arch_output_basic_block. Fix warnings.
6019
6020 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
6021
6022         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6023         conv.ovf.u.un.
6024
6025 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
6026
6027         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6028         conv.ovf.u.un.
6029
6030         * iltests.il: Add new tests.
6031
6032 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
6033
6034         * mini.c: Removed Windows version macros.
6035
6036 2008-03-20  Mark Probst  <mark.probst@gmail.com>
6037
6038         * generic-sharing.c: Put reflection types in the extensible part
6039         of the runtime generic context.
6040
6041         * mini.c: Generic sharing of the GetTypeHandle special case of the
6042         ldtoken instruction.
6043
6044 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
6045
6046         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
6047
6048         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
6049         
6050         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
6051         consistency with the other version on the linear IR branch.
6052
6053         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
6054
6055         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
6056
6057         * iltests.il.in: Add new tests.
6058
6059 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
6060
6061         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
6062
6063         * iltests.il.in: Add new tests.
6064
6065 2008-03-19  Mark Probst  <mark.probst@gmail.com>
6066
6067         * mini.c: Two variables with the same name were declared in
6068         nesting contexts and one wasn't initialized.  Fixed.
6069
6070 2008-03-19  Mark Probst  <mark.probst@gmail.com>
6071
6072         * mini.c: Generic sharing of the initobj instruction.
6073
6074 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
6075
6076         * mini.c: make the test to optimize ldtoken from typeof() more
6077         precise.
6078
6079 2008-03-18  Mark Probst  <mark.probst@gmail.com>
6080
6081         * mini.c: Generic sharing of the initobj instruction for reference
6082         types.
6083
6084 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
6085
6086         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
6087         the mono_breakpoint_clean_code() code to perform bound checks.
6088
6089 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
6090
6091         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
6092         mono_arch_patch_callsite() to include the start of the managed method
6093         to be able to perform bound checks.
6094
6095 2008-03-17  Mark Probst  <mark.probst@gmail.com>
6096
6097         * mini.c: Generic sharing for the isinst instruction.
6098
6099 2008-03-17  Mark Probst  <mark.probst@gmail.com>
6100
6101         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6102         inssel-long32-mips.brg: Added opcodes for doing indirect calls
6103         with the runtime generic context argument.
6104
6105         * mini.c: Share calls to several types of unsharable methods by
6106         putting the address of the method code in the runtime generic
6107         context and doing an indirect call.
6108
6109         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6110         to switches.
6111
6112 2008-03-16  Mark Probst  <mark.probst@gmail.com>
6113
6114         * generic-sharing.c: Change due to a change in the runtime genric
6115         context API.
6116
6117 2008-03-15  Martin Baulig  <martin@ximian.com>
6118
6119         * tramp-x86.c
6120         (mono_arch_nullify_class_init_trampoline): Add call to
6121         mono_breakpoint_clean_code() to make things work when running
6122         inside the debugger.
6123
6124         * tramp-amd64.c
6125         (mono_arch_nullify_class_init_trampoline): Add call to
6126         mono_breakpoint_clean_code() to make things work when running
6127         inside the debugger.
6128
6129 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
6130
6131         * inssel-long.brg (reg): Fix 64 bit build.
6132
6133 2008-03-14  Mark Probst  <mark.probst@gmail.com>
6134
6135         * mini.c, mini.h: Share static generic code by passing it an
6136         implicit argument pointing to the runtime generic context.
6137
6138         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6139         inssel-long32-mips.brg: New opcodes for calling shared static,
6140         which need to be passed the runtime generic context.
6141
6142         * mini-amd64.c, mini-x86.c: Save the runtime generic context
6143         argument on the stack in the prologue if needed.  New function for
6144         finding the runtime generic context argument from the registers
6145         saved by the trampoline.
6146
6147         * mini-amd64.h, mini-x86.h: Specify which register to use for the
6148         runtime generic context argument.
6149
6150         * tramp-amd64.c: Also restore the register used for the runtime
6151         generic context argument.
6152
6153         * mini-trampoline.c: Resolve shared static calls by consulting the
6154         runtime generic context via the new argument.
6155
6156         * generic-sharing.c: Add an argument to sharability-checking
6157         functions that specifies whether type variables should be treated
6158         as sharable type arguments.
6159
6160         * inssel-x86.brg: Removed a superfluous, buggy rule.
6161
6162         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6163         to switches.
6164
6165 2008-03-14  Martin Baulig  <martin@ximian.com>
6166
6167         * debug-debugger.c (main_thread_handler): Call
6168         mono_runtime_run_main() without sending any notifications.
6169
6170         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
6171
6172 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
6173
6174         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
6175
6176 2008-03-14  Mark Probst  <mark.probst@gmail.com>
6177
6178         * tramp-x86.c: Fixed register restore offsets in the trampoline
6179         code for ECX and EDX.
6180
6181 2008-03-12  Geoff Norton  <gnorton@novell.com>
6182
6183         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
6184         different ucontext_t implementations.
6185         * exceptions-arm.c: Use the above defines to get exceptions working on 
6186         iPhone (based on a patch by Luke Howard lukeh@padl.com)
6187         * mini-arm.c: Implement iPhone icache support (based on a patch by
6188         Luke Howard lukeh@padl.com)
6189
6190 2008-03-12  Mark Probst  <mark.probst@gmail.com>
6191
6192         * mini.c: Enable generic sharing of calls to non-static
6193         non-interface non-generic non-value-type methods.
6194
6195         * mini-trampolines.c: Resolve calls from shared generic code.
6196
6197 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
6198
6199         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
6200
6201         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
6202
6203 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
6204
6205         * mini.c: some fixes for the AOT compiler.
6206
6207 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
6208
6209         * cpu-amd64.md: Add clob:1 to some float opcodes.
6210
6211 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
6212
6213         * mini.h: Added MiniVerifierMode enumeration.
6214
6215         * mini.c: Added mini_verifier_set_mode to control
6216         the usage of the new verifier.
6217
6218         * mini.c (mono_method): Integrated the new verifier.
6219
6220         * driver.c: Extended --security option with validil and
6221         verifiable options to activate the new verifier.
6222
6223 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
6224
6225         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
6226         optimization to ctors taking 0 or 2 arguments too.
6227
6228         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
6229         a bit.
6230
6231         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
6232
6233         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
6234
6235 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
6236
6237         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
6238         non-aot case as well.
6239
6240         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
6241
6242         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
6243         changes.
6244
6245         * aot-compiler.c (encode_patch): Ditto.
6246
6247         * mini.h (G_MININT32): Fix the definition of this.
6248
6249 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
6250
6251         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
6252
6253         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
6254
6255 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
6256
6257         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
6258         methods returning vtypes in registers.
6259         (mono_arch_allocate_vars): Ditto.
6260
6261         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
6262
6263         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
6264
6265         * generics.cs: Add a test from the linear IR branch.
6266
6267         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
6268
6269         * mini.c (inline_method): Cache failed inline attempts.
6270
6271 2008-03-04  Mark Probst  <mark.probst@gmail.com>
6272
6273         * mini.c: For shared methods of generic classes put the location
6274         of "this" into the MonoGenericJitInfo.
6275
6276         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
6277         register out of a MonoContext by register number.  Add the generic
6278         sharing context as an argument to mono_arch_find_this_argument().
6279
6280         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
6281         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
6282         for new arch function.
6283
6284         * mini-exception.c: Handle open exception clauses in shared
6285         generic code.
6286
6287         * mini-trampolines.c: Supply additional argument to
6288         mono_arch_find_this_argument().
6289
6290 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
6291
6292         * Makefile.am (regtests): Run the bench.exe tests last.
6293
6294 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
6295
6296         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
6297         a bit.
6298
6299 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
6300
6301         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
6302         with MS.
6303
6304         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
6305         
6306         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
6307
6308         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
6309         whose class has no cctor.
6310
6311         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
6312
6313 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
6314
6315         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
6316         unverified.
6317
6318 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
6319
6320         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
6321         to be in sync with the code on the linear IR branch.
6322
6323         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
6324
6325         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
6326
6327 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
6328
6329         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
6330
6331         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
6332
6333         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
6334
6335         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
6336
6337         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
6338         
6339         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
6340         body.
6341
6342 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
6343
6344         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
6345         OP_LOADR4_MEMBASE emission.
6346
6347         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
6348         (mono_spillvar_offset_float): Ditto.
6349
6350         * mini-mips.c (mono_arch_emit_prolog): Ditto.
6351
6352         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
6353         emission.
6354
6355         * basic-long.cs: Add regression tests for them.
6356
6357         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
6358         use.
6359         (mono_arch_allocate_vars): Fix representation of single-precision float
6360         argument.
6361         (mono_arch_output_basic_block): Ditto.
6362
6363         * inssel-mips.brg: Ditto, remove duplicate items.
6364
6365         * mini-mips.c (emit_load_volatile_arguments): New function to handle
6366         arguments of tail calls as on other platforms.
6367         (mono_arch_output_basic_block): Handle tail calls.
6368
6369         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
6370         register.
6371
6372         * objects.cs (test_5_pass_static_struct): Add test for it.
6373
6374         Contributed under MIT/X11 license.
6375
6376 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
6377
6378         * Makefile.am: Use gmcs for compiling the regression tests.
6379
6380         * *.2.cs *.2.il: Rename to *.cs and *.il.
6381
6382 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
6383
6384         * regalloc.h: Make the vassign array smaller.
6385
6386         * mini.c (mini_method_compile): Remove an unused field in cfg.
6387
6388         * mini-codegen.c: Add a bunch of micro optimizations.
6389
6390 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
6391
6392         * regalloc.h: Remove some unused fields.
6393
6394 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
6395
6396         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
6397
6398         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
6399
6400 2008-02-22  Mark Probst  <mark.probst@gmail.com>
6401
6402         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
6403
6404         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
6405         trampoline: Fetch an entry from the runtime generic context.  If
6406         it's NULL, jump to the actual trampoline to fill the runtime
6407         generic context.  Otherwise, return it.
6408
6409         * mini.c: Call the lazy fetch trampoline to get entries out of the
6410         runtime generic context.
6411
6412         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
6413         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
6414         tramp-sparc.c: Stubs for the lazy fetch trampoline.
6415
6416 2008-02-21  Mark Probst  <mark.probst@gmail.com>
6417
6418         * mini.c: Fetch data out of the extensible part of the runtime
6419         generic context instead of calling a helper function.
6420
6421         * generic-sharing.c: Some functions moved into
6422         metadata/generic-sharing.c.  Helper function for fetching other
6423         types now checks and asserts against extensible rgctx (just for
6424         debugging purposes - the helper function isn't called anymore
6425         unless for debugging).
6426
6427 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
6428
6429         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
6430         for tail calls up to the point that the tests in iltests.exe run. Also add a
6431         dummy CKFINITE implementation.
6432         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
6433         needed for trampoline LMF frames.
6434
6435         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
6436         trampoline LMF frames.
6437
6438 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
6439
6440         * mini.c (inline_method): clean any pending loader error when inlining fail.
6441         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
6442
6443 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
6444
6445         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
6446
6447         * aot-runtime.c (decode_patch_info): Ditto.
6448
6449         * mini.c (mono_resolve_patch_target): Ditto.
6450         
6451         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
6452         icall wrappers.
6453
6454         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
6455         
6456         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
6457         if it references an icall address.
6458
6459 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
6460
6461         * cpu-s390x.md: Remove some more unused opcodes.
6462         
6463         * cpu-s390x.md: Remove some unused opcodes.
6464
6465         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
6466         mono_op_imm_to_op ().
6467
6468         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
6469         instead of a switch statement.
6470         
6471         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
6472         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
6473
6474         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
6475         
6476         * mini-codegen.c: Remove unused mono_regstate2_... functions.
6477
6478         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
6479         -1.
6480
6481 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
6482
6483         * driver.c (mono_main): Improve error reporting when an assembly cannot be
6484         opened. Fixes #362607.
6485
6486         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
6487
6488         * iltests.il.in: Add a test for static methods in interfaces.
6489
6490 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
6491
6492         * genmdesc.c (build_table): Fix a crash on older glib versions.
6493
6494         * cpu-sparc.md: Remove some unused opcodes.
6495         
6496         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
6497         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
6498
6499         * cpu-amd64.md: Remove some unused opcodes.
6500
6501         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
6502         like the other opcodes.
6503
6504 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
6505
6506         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
6507
6508         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
6509
6510         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
6511         variables 'cfg' instead of 'm' for consistency.
6512
6513         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
6514
6515         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
6516         argument holding the vtype return address, to avoid the ambigious use of
6517         cfg->ret for this purpose.
6518
6519         * mini.c (NEW_RETLOADA): Use vret_addr if set.
6520
6521         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
6522         
6523         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
6524         new mono_print_ins () function which only takes one argument.
6525
6526 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
6527
6528         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
6529         macro arguments.
6530
6531 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
6532
6533         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
6534
6535         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
6536
6537         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
6538         opcodes and other small changes.
6539
6540         * mini-ops.h: Add some new opcodes from the linear IR branch.
6541
6542         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
6543
6544         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
6545         opcodes, use the REG_MEMBASE opcodes instead.
6546         
6547         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
6548         opcodes, use the REG_MEMBASE opcodes instead.
6549         
6550         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
6551         linear IR branch.
6552
6553         * mini.c (mono_op_imm_to_op): New helper function.
6554
6555         * mini-ops.h: Add some opcodes from linear IR branch.
6556
6557 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
6558
6559         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
6560         <tsv@solvo.ru>.
6561
6562 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
6563
6564         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
6565         OP_ICONV_TO_R4/R8.
6566
6567         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
6568
6569 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
6570
6571         * aot-compiler.c (emit_method_code): Add an assert.
6572
6573         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
6574         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
6575         methods.
6576
6577 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
6578
6579         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
6580         some load/store opcodes so they are consistent. 
6581         (mono_arch_emit_prolog): Simplify some code.
6582
6583         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
6584
6585         * objects.cs: Add tests for large argument offsets on ARM.
6586
6587         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
6588         stack offsets. Fixes #359651.
6589
6590         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
6591
6592         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
6593
6594         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
6595
6596         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
6597
6598         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
6599
6600         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
6601         rid of CEE_CONV_R_UN.
6602
6603         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
6604
6605 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
6606
6607         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
6608
6609         * mini.c (mono_normalize_opcodes): Add some more opcodes.
6610
6611         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
6612
6613         * cpu-amd64.md: Remove some unused opcodes.
6614
6615         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
6616
6617         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
6618
6619         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
6620         arch specific functions for its parts. Call the peephole pass after local
6621         regalloc so the prolog can compute a more accurate max_offset.
6622         
6623         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
6624         the corresponding OP_I/OP_L opcodes.
6625
6626         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
6627
6628         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
6629
6630 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
6631
6632         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
6633         as they are handled in mini.c.
6634
6635         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
6636         
6637         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
6638         case since it is handled in mini.c.
6639
6640         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
6641
6642         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
6643
6644         * *.c: Use the new opcodes in the IR and back end code.
6645
6646         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
6647
6648         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
6649
6650 2008-02-06  Mark Probst  <mark.probst@gmail.com>
6651
6652         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
6653         an assert because it has a race condition.
6654
6655 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
6656
6657         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
6658
6659         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
6660
6661         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
6662
6663         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
6664         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
6665
6666 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
6667
6668         * cpu-amd64.md (move): Correct the maximum size of move.
6669
6670 2008-02-05  Mark Probst  <mark.probst@gmail.com>
6671
6672         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
6673         the generic class init trampoline to return quickly if the class
6674         is already inited.
6675
6676 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
6677
6678         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
6679         issues where an 32 bit callsite cannot be patched by a 64 bit address.
6680
6681 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
6682
6683         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
6684         branch.
6685
6686 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
6687
6688         * objects.cs: Add some soft-float tests.
6689
6690         * mini.c: Fix a couple more soft-float issues.
6691
6692         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
6693
6694         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
6695         avoid a REX prefix.
6696
6697 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
6698
6699         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
6700         exception happens while compiling a virtual method.
6701
6702 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
6703
6704         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
6705         
6706         * mini-sparc.c: Fix build.
6707
6708         * mini-sparc.c (get_call_info): Add support for generic sharing.
6709
6710         * mini-exceptions.c: Add a FIXME.
6711
6712 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
6713
6714         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
6715         altstack handling code.
6716
6717         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
6718         
6719         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
6720
6721         * mini-s390.c: Add support for generic sharing.
6722
6723         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
6724         Fix CAS on s390.
6725         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6726
6727         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
6728
6729         * mini-s390x.c: Add support for generic sharing.
6730         
6731         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
6732         Fix CAS on ia64.
6733         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6734
6735         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
6736         can be used since it takes a 16 bit signed immediate.
6737
6738         * inssel-s390x.brg: Fix OP_SETRET.
6739
6740         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
6741
6742         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
6743
6744         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
6745
6746         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
6747
6748         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
6749         in one place.
6750
6751         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
6752         stuff.
6753
6754         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
6755         of the unused mono_arch_patch_delegate_trampoline stuff.
6756
6757 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
6758
6759         * basic-long.cs: Move the fp related tests to basic-float.cs.
6760
6761         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
6762
6763         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
6764
6765         * basic-calls.cs: Add a test for proper float argument passing.
6766
6767         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
6768         if the context corresponds to an exception received through a signal.
6769
6770         * exceptions.cs: Add a test for nullref handling at the start of a try
6771         clause.
6772
6773         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
6774
6775         * jit-icalls.c (mono_break): New JIT icall.
6776
6777         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
6778
6779         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
6780
6781 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
6782
6783         * cpu-*.md: Get rid of unused opcodes.
6784
6785         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
6786
6787         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
6788         by all platforms.
6789
6790         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
6791         define.
6792
6793         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
6794         the arch independent trampoline code in mini-trampolines.c.
6795
6796         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
6797
6798         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
6799
6800         * mini-s390.h: Remove an unused define.
6801         
6802         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
6803         the arch independent trampoline code in mini-trampolines.c.
6804
6805         * mini-arm.c (mono_arch_emit_prolog): Fix build.
6806
6807 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
6808
6809         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
6810
6811         * mini-s390.c (mono_arch_emit_prolog): Fix build.
6812
6813         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
6814
6815         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
6816
6817         * cpu-amd64.md: Use smaller sizes for int opcodes.
6818
6819         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
6820
6821         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
6822         objects.cs.
6823
6824         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
6825         debugging.
6826
6827         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
6828         instead of though a pointer to save an indirection when accessing elements of
6829         the array.
6830
6831         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
6832         some typos.
6833         (NOT_IMPLEMENTED): New helper macro.
6834         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
6835         of a bb.
6836
6837         * *.c: Use the new helper macro.
6838
6839 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
6840
6841         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
6842
6843 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
6844
6845         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
6846         stack slots.
6847
6848 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
6849
6850         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
6851         profiling is enabled.
6852         
6853         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
6854         the end.
6855         (mono_arch_emit_prolog): Add more first bblock optimizations.
6856
6857         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
6858         in order if possible.
6859         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
6860         bblock, since the arguments are still in their original registers.
6861
6862         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
6863
6864 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
6865
6866         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
6867         as well.
6868
6869         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
6870         offset 0.
6871
6872         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
6873
6874         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
6875         process async exceptions received while in unmanaged code.
6876
6877         * mini.c (mini_init): Install a callback with the runtime which will be called
6878         when a thread receives an async exception while in unmanaged code.
6879
6880         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
6881
6882         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
6883
6884 2008-01-16  Wade Berrier  <wberrier@novell.com>
6885
6886         * cpu-g4.md:
6887         * cpu-arm.md:
6888         * cpu-s390x.md:
6889         fix build
6890
6891 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
6892
6893         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
6894         compilation with sun cc.
6895
6896         * cpu-*.md: Fix the build.
6897
6898         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
6899
6900         * mini-amd64.h: Add some comments to the MonoLMF structure.
6901
6902         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
6903         
6904         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
6905         in the LMF structure if possible. This saves two instructions in the
6906         managed->native wrappers.
6907
6908         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
6909
6910 2008-01-16  Mark Probst  <mark.probst@gmail.com>
6911
6912         * generic-sharing.c: New type argument lookup code which uses the
6913         runtime generic context template.
6914
6915 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
6916
6917         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
6918
6919         * mini-arm.c (add_general): Fix arm eabi parameter passing.
6920         (mono_arch_output_basic_block): Fix localloc implementation.
6921
6922         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
6923
6924         * mini-ia64.c (peephole_pass): Fix ia64 build.
6925
6926         * mini-amd64.c (peephole_pass): Fix a warning.
6927         
6928         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
6929         at a constant offset from sp/fp.
6930
6931         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
6932         instead of obtaining it from *lmf in the managed method case.
6933
6934 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
6935
6936         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
6937
6938 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
6939
6940         * mini.h (MonoInstList): New type.
6941         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
6942         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
6943         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
6944         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
6945         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
6946         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
6947         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
6948         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
6949         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
6950         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
6951         MONO_INST_LIST_FOR_EACH_ENTRY,
6952         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
6953         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
6954         mono_inst_list_first, mono_inst_list_last,
6955         mono_inst_list_next, mono_inst_list_prev): New instruction
6956         list handling interfaces.
6957         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
6958         list head 'ins_list'.
6959         (MonoInst): Replace next pointer with list head 'node'.
6960         (MonoCallInst): Make 'out_args' a MonoInstList.
6961         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
6962         (MonoCompile): Delete reverse_inst_list and
6963         reverse_inst_list_len.
6964         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
6965         mono_arch_lowering_pass, mono_arch_local_regalloc,
6966         mono_arch_output_basic_block, mono_arch_emit_prolog):
6967         Convert to new instruction lists.
6968         (insert_after_ins): Delete.
6969         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
6970         instruction lists.
6971         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
6972         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
6973         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
6974         mono_emulate_opcode, mono_emit_load_got_addr,
6975         inline_method, mono_method_to_ir, mono_print_bb_code,
6976         print_dfn, decompose_pass, nullify_basic_block,
6977         replace_out_block_in_code, remove_block_if_useless,
6978         merge_basic_blocks, move_basic_block_to_end,
6979         try_unsigned_compare, optimize_branches, mono_print_code,
6980         mini_select_instructions, remove_critical_edges): Likewise.
6981         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
6982         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
6983         mono_arch_output_basic_block, mono_arch_emit_prolog):
6984         Likewise.
6985         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
6986         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
6987         mono_arch_output_basic_block): Likewise.
6988         (inst_list_prepend, insert_after_ins): Delete.
6989         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
6990         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
6991         instruction lists.
6992         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
6993         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
6994         mono_arch_emit_prolog): Likewise.
6995         * cfold.c (mono_constant_fold): Likewise.
6996         * liveness.c (visit_bb, mono_analyze_liveness,
6997         optimize_initlocals): Likewise.
6998         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
6999         * graph.c (mono_draw_code_cfg): Likewise.
7000         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
7001         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
7002         mono_ssa_cprop): Likewise.
7003         * abcremoval (get_relations_from_previous_bb, process_block):
7004         Likewise.
7005         * local-propagation (mono_cprop_invalidate_values,
7006         mono_local_cprop_bb): Likewise.
7007         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
7008         peephole_pass, mono_arch_output_basic_block,
7009         mono_arch_emit_prolog): Likewise.
7010         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
7011         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7012         mono_arch_emit_prolog): Likewise.
7013         (insert_after_ins): Delete.
7014         * aliasing.c (print_code_with_aliasing_information,
7015         mono_build_aliasing_information, mono_aliasing_deadce):
7016         Convert to new instruction lists.
7017         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
7018         peephole_pass, NEW_INS, mono_arch_lowering_pass,
7019         mono_arch_local_regalloc, mono_arch_output_basic_block):
7020         Likewise.
7021         (insert_after_ins): Delete.
7022         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
7023         peephole_pass, mono_arch_output_basic_block): Convert to
7024         new instruction lists.
7025         * mini-codegen (InstList, inst_list_prepend,
7026         insert_after_ins): Delete.
7027         (insert_before_ins, get_register_force_spilling,
7028         get_register_spilling, free_up_ireg, free_up_reg,
7029         create_copy_ins, create_spilled_store, alloc_int_reg,
7030         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
7031         to new instruction lists.
7032         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
7033         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7034         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
7035         (insert_after_ins): Delete.
7036         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
7037         mono_arch_local_regalloc, mono_arch_output_basic_block,
7038         mono_arch_call_opcode): Convert to new instruction lists.
7039         (insert_after_ins): Delete.
7040         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
7041         peephole_pass, mono_arch_output_basic_block,
7042         mono_arch_emit_prolog): Convert to new instruction lists.
7043
7044 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
7045
7046         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
7047
7048         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
7049         Fixes #353182.
7050
7051         * Makefile.am (version.h): Make this work with non-bash shells.
7052
7053 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
7054
7055         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
7056
7057 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
7058
7059         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
7060         the InitializeArray optimization.
7061
7062 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
7063
7064         * mini.c driver.c: Don't include os/gc_wrapper.h.
7065
7066 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
7067
7068         * mini.c (print_jit_stats): Print GC statistics if available.
7069
7070 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
7071
7072         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
7073
7074 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
7075
7076         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
7077
7078 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
7079
7080         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
7081         
7082         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
7083
7084         * driver.c (mono_main): Ditto.
7085
7086 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
7087
7088         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
7089
7090         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
7091         in the vtable can't be encoded.
7092         (compile_method): Ditto.
7093
7094 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
7095
7096         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
7097         defined.
7098
7099         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
7100         lmf->rbp.
7101
7102         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
7103         the top LMF entry belongs to the current method.
7104
7105         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
7106
7107 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
7108
7109         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
7110         
7111         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
7112
7113         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
7114
7115         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
7116
7117         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
7118
7119         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
7120         implementation.
7121
7122         * basic-float.cs: Add an ulong->double cast test.
7123
7124 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
7125
7126         * mini.c (mono_method_to_ir): Fix a warning.
7127
7128 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
7129
7130         * mini-ops.h: Add OP_SWITCH.
7131
7132         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
7133         CEE_SWITCH in back-end code, use OP_SWITCH instead.
7134
7135 2007-12-11  Geoff Norton  <gnorton@novell.com>
7136
7137         * mini-s390x.c: Minor change to the MAX() define to allow
7138         it to compile with other gcc versions.
7139
7140 2007-12-11  Geoff Norton  <gnorton@novell.com>
7141
7142         * cpu-s390x.md:
7143         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
7144
7145 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
7146
7147         exceptions-arm.c (mono_arch_get_restore_context): Restore
7148         the frame pointer.
7149
7150         exceptions-arm.c (throw_exception): Save the frame pointer.
7151         This is a partial fix for #323747. Only the client side is
7152         fixed.
7153
7154 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
7155
7156         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
7157         was using an unrelated variable to log the class which
7158         needed the cctor to be called. This was crashing on arm.
7159
7160 2007-12-09  Robert Jordan  <robertj@gmx.net>
7161
7162         * mini-x86.c (mono_arch_emit_epilog):
7163         Consider all kinds of 64-bit types. Fixes #323114.
7164
7165 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
7166
7167         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
7168
7169 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7170
7171         * mini-amd64.c (peephole_pass): Add a missing instruction check.
7172
7173 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7174
7175         * mini.c: run type ctor before allocating an object, not only
7176         when running it's constructor method (fixes at least part of bug #342507).
7177
7178 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7179         
7180         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
7181         
7182         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
7183         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
7184         function.
7185
7186         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
7187         mono_generic_class_init_trampoline () the same as it is done with the other
7188         trampolines.
7189
7190         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
7191         aot-runtime.c aot-compiler.c: Implement AOT support.    
7192
7193 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7194
7195         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
7196         build for archs which don't have the vtable trampoline defined
7197         yet.
7198
7199 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7200
7201         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
7202
7203         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
7204
7205         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
7206
7207         * tramp-<ARCH>.c: Use the new helper function.
7208
7209 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7210
7211         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
7212         trampoline call, which takes a vtable argument.
7213
7214         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
7215         OP_TRAMPCALL_VTABLEs like other calls.
7216
7217         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
7218         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
7219         call.  Implemented a support function which fetches the vtable
7220         from a register set.
7221
7222         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
7223         Implemented a generic class init trampoline, using the
7224         OP_TRAMPCALL_VTABLE opcode.
7225
7226         * mini.c: Implemented static field access when sharing generic
7227         code.  This implies initing the class using the new
7228         OP_TRAMPCALL_VTABLE call.
7229
7230 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7231
7232         * mini.c: Don't compile methods with sharing enabled if their
7233         classes are disabled for sharing.
7234
7235 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
7236
7237         * inssel.brg: Add a missing sign extension to the GETCHR and array access
7238         opcodes. Fixes #346563.
7239
7240         * objects.cs: Add a new test.
7241
7242         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
7243
7244         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
7245         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
7246
7247 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
7248
7249         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
7250
7251 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
7252
7253         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
7254         code stream.
7255
7256 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
7257
7258         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
7259
7260         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
7261         optimization in the AOT case.
7262         
7263 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
7264
7265         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
7266         
7267         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
7268
7269         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
7270
7271         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
7272
7273         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
7274         is created by the inlined delegate ctor.
7275
7276         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
7277
7278         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
7279
7280 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
7281
7282         * cpu-x86.md: Fix the length of ckfinite.
7283
7284 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
7285
7286         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
7287         
7288         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
7289         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
7290
7291         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
7292
7293         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
7294         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
7295
7296 2007-11-28  Martin Baulig  <martin@ximian.com>
7297
7298         * mini-x86.c
7299         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
7300         after creating the trampoline.
7301
7302 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
7303
7304         * aot-runtime.c (load_aot_module): Check runtime version if needed.
7305
7306         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
7307         the same version.
7308
7309         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
7310         instead of the calling method to help AOT.
7311
7312         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
7313
7314 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
7315
7316         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
7317         is defined.
7318
7319 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
7320
7321         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
7322         
7323         * aot-compiler.c (compile_method): Correct check for generic method definitions.
7324         (encode_method_ref): No need to handle generic method definitions specially.
7325
7326         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
7327
7328         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
7329         decode_klass_info.
7330
7331         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
7332         encode_klass_info.
7333         (compile_method): Enable generic sharing.
7334
7335 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
7336
7337         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
7338         (mini_method_compile): Add preliminary support for AOTing shared generic code.
7339
7340         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
7341         generic code.
7342
7343         * mini-trampolines.c: Fix a warning.
7344
7345         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
7346         NEW_PCONST.
7347         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
7348         (generic_class_is_reference_type): Remove unused function.
7349
7350         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
7351         in the generic vtable trampoline case.
7352
7353         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
7354         
7355         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
7356         return an AOT method based on a vtable slot.
7357
7358         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
7359
7360         * mini.c (mini_get_vtable_trampoline): Export this.
7361
7362 2007-11-22  Martin Baulig  <martin@ximian.com>
7363
7364         * debug-debugger.h
7365         (MonoDebuggerInfo): Move `debugger_version' up.
7366
7367 2007-11-22  Martin Baulig  <martin@ximian.com>
7368
7369         * mini-amd64.c
7370         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
7371
7372         * mini-trampolines.c
7373         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
7374         after compiling the method.
7375
7376 2007-11-20  Martin Baulig  <martin@ximian.com>
7377
7378         * debug-mini.c
7379         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
7380         (mono_debugger_remove_breakpoint): Likewise.
7381         (mono_debugger_check_breakpoints): Likewise.
7382
7383         * debug-debugger.c: Implement the new breakpoint interface here.
7384
7385 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
7386
7387         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
7388         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
7389
7390         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
7391
7392 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
7393
7394         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
7395
7396         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
7397         mini.c.
7398
7399         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
7400         mini.c.
7401
7402         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
7403         returning a vtype in a register.
7404
7405         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
7406         here from the arch specific code.
7407
7408         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
7409         mini.c.
7410
7411         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
7412         (mono_arch_emit_prolog): Increment maximum prolog size.
7413
7414         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
7415         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
7416
7417         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
7418         MonoGenericSharingContext.
7419
7420         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
7421         MonoGenericSharingContext. Allocate memory from the cfg mempool.
7422
7423 2007-11-15  Mark Probst  <mark.probst@gmail.com>
7424
7425         * mini.c, mini.h, generic-sharing.c: Functions for producing code
7426         which extract fields out of the runtime generic context.  Full
7427         sharing of the NEWARR opcode.
7428
7429 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
7430
7431         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
7432         --enable-minimal=ssa.
7433
7434 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
7435
7436         * mini-trampolines.c (mono_delegate_trampoline): Update after 
7437         mono_marshal_get_delegate_invoke () signature change.
7438
7439 2007-11-13  Mark Probst  <mark.probst@gmail.com>
7440
7441         * mini.c: Removed the shared context in favor of the generic
7442         sharing context.  Allocate the MonoJitInfo structure with room for
7443         the generic sharing context if it's needed.
7444
7445         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
7446         domain-internals.h now.
7447
7448         * mini-x86.c: Pass the generic sharing context to get_call_info ().
7449
7450         * generic-sharing.c: Several changes for working without a shared
7451         context and instead operating on open types instead.
7452
7453 2007-11-12  David S. Miller  <davem@davemloft.net>
7454
7455        * inssel-sparc.brg: Fix double instruction emit.
7456
7457 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
7458
7459         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
7460         Get/Set/Address methods.
7461         
7462         * mini.c debug-debugger.c mini-trampolines.c: Update after 
7463         mono_marshal_get_delegate_invoke signature change.
7464
7465 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
7466
7467         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
7468         This can happens with dynamic methods. Fixes the other bug in #322722.
7469
7470 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
7471
7472         * tramp-arm.c (mono_arch_patch_callsite): Support patching
7473         BX call sequence.
7474
7475         * mini-arm.c (arm_patch): Implement patching of BX call
7476         sequence. Fixes one of the bugs in #322722.
7477
7478 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
7479
7480        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
7481        under Linux.  We only need to flush every 32-byte cache line.    
7482
7483 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
7484
7485         * mini.c:
7486         move_basic_block_to_end: Add branches when needed, eventually creating
7487         a new BB.
7488         optimize_branches: added a parameter that tells if it's ok to create
7489         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
7490         and avoid calling move_basic_block_to_end when it's not ok.
7491         Fixes bug 318677.
7492
7493 2007-11-07  Mark Probst  <mark.probst@gmail.com>
7494
7495         * mini.c: Abort inlining call to InitializeArray if something
7496         looks wrong.  Let the icall handle it, which now has proper safety
7497         checks.
7498
7499 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
7500
7501         * mini.c (mono_spill_call): add support for soft-float.
7502
7503         * mini.c (mono_method_to_ir): add support for soft-float
7504         to inlined functions that return float.
7505
7506         * mini.c (mono_method_to_ir): add support for soft-float
7507         to cee_stsfld opcode on float fields.
7508
7509 2007-11-05  Geoff Norton  <gnorton@novell.com>
7510
7511         * mini-x86.h: Fix the structure access for X86 Leopard.
7512
7513
7514 2007-11-05  Martin Baulig  <martin@ximian.com>
7515
7516         * mini-trampolines.c
7517         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
7518         after compiling the method to notify the debugger.
7519
7520 2007-11-05  Martin Baulig  <martin@ximian.com>
7521
7522         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
7523
7524 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
7525
7526         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
7527         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
7528
7529 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
7530
7531         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
7532         native-to-managed wrappers.
7533         
7534 2007-11-01  Geoff Norton  <gnorton@novell.com>
7535
7536         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
7537         members.
7538
7539 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7540
7541         * mini.c, mini-x86.c: when getting back from unmanaged code
7542         to managed via a marshaled delegate we also need to set the
7543         right domain.
7544
7545 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7546
7547         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
7548         for amd64.
7549
7550 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
7551
7552         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
7553         let the debugger or other external agents to tell the JIT when
7554         a sw breakpoint has been inserted in the code that the JIT needs
7555         to be able to inspect.
7556
7557 2007-10-31  Martin Baulig  <martin@ximian.com>
7558
7559         * debug-debugger.h
7560         (MonoDebuggerInfo): Remove `runtime_class_init'.
7561
7562 2007-10-30  Martin Baulig  <martin@ximian.com>
7563
7564         * debug-mini.h
7565         (mono_debugger_thread_created): Added `MonoThread *' argument.
7566         (mono_debugger_extended_notification): New public method.
7567         (mono_debugger_trampoline_compiled): New public method.
7568
7569         * debug-mini.c
7570         (MonoDebuggerThreadInfo): Added `thread' and
7571         `extended_notifications' fields.
7572
7573         * debug-debugger.c
7574         (debugger_executable_code_buffer): New static variable.
7575
7576         * debug-debugger.h
7577         (MonoDebuggerInfo): Added `executable_code_buffer',
7578         `executable_code_buffer_size', `breakpoint_info_area',
7579         `breakpoint_table' and `breakpoint_table_size'.
7580
7581 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
7582
7583         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
7584         that IP  either is an unused value or the vtable pointer. IMT 
7585         calls use vtable + offset now. Reduced by almost half the size
7586         of IMT entries.
7587
7588 2007-10-26  Jonathan Chambers <joncham@gmail.com>
7589
7590         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
7591         defines to access param registers. Replace long usage with
7592         gsize as sizeof(long) != sizeof(void*) on Win64.
7593
7594         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
7595         on Win64. Fix intrinsic, use _AddressOfReturnAddress
7596         instead of non-existant _GetAddressOfReturnAddress.
7597
7598         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
7599         param registers. Save/restore %rdi and %rsi in MonoLMF.
7600
7601         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
7602         param registers. Modify (throw_exception) signature to take 
7603         %rdi and %rsi on Win64. 
7604
7605         Code is contributed under MIT/X11 license.
7606
7607 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7608
7609         * helpers.c: unlink debugging output files.
7610
7611 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
7612
7613         * mini.c: Move mono_create_ftnptr () to object.c.
7614
7615 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
7616
7617         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
7618         optional. This function can now be used to disassemble code generated
7619         outside the JIT such as trampolines and IMT thunks.
7620
7621         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
7622
7623         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
7624         vtable pointer from a ldr instruction.
7625
7626         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
7627         new IMT call sequence.
7628
7629         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
7630         call sequence for interface invocations.
7631
7632         * mini-arm.c (mono_arch_emit_imt_argument): added, required
7633         for imt support. This function is empty since IMT on ARM requires no
7634         special handling on the IR side.
7635
7636         * mini-arm.c (mono_arch_find_imt_method): added, required for
7637         imt support.
7638
7639         * mini-arm.c (mono_arch_find_this_argument): added, required
7640         for imt support.
7641
7642         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
7643         a ldr instruction to load a value stored in the code stream.
7644
7645         * mini-arm.c (mono_arch_build_imt_thunk):added, required
7646         for imt support.
7647
7648
7649 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
7650
7651         * mini.c (mini_init): Install the jump trampoline callback.
7652
7653 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7654
7655         * mini-trampolines.c: handle synchronized methods with the common
7656         vtable trampoline (bug #335601).
7657
7658 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
7659
7660         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
7661
7662         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
7663         64 bit platforms.
7664
7665         * mini-ia64.h mini-ia64.c: Add support for IMT.
7666
7667         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
7668         prolog. Fixes #331958.
7669
7670 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
7671
7672         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
7673
7674 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7675
7676         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
7677         trampoline.
7678
7679 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7680
7681         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
7682         trampoline.
7683
7684 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
7685
7686         * mini-x86.c, mini-x86.h: x86 support for the common vtable
7687         trampoline.
7688
7689 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
7690
7691         * mini-trampolines.c: changed the magic rampoline to understand
7692         the common vtable trampoline method: the method to invoke is
7693         determined by the vtable displacement of the call.
7694
7695 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7696
7697         * mini.c, mini.h: register the common vtable trampoline if the
7698         architecture supports it.
7699
7700 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7701
7702         * cpu-amd64.md: use the correct max length for tls_get.
7703
7704 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
7705
7706         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
7707         CEE_STELEM_ANY. Fixes #333696.
7708
7709 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
7710
7711         * exceptions-x86.c: provide more graceful handling of the case where
7712         we followed a bogus function pointer from managed code (bug #332866).
7713
7714 2007-10-11  Mark Probst  <mark.probst@gmail.com>
7715
7716         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
7717         replaces the generic_shared flag and will carry more information
7718         in the future.
7719
7720         * generic-sharing.c: Added mini_type_stack_size() which allows
7721         allows open types if given a generic sharing context.
7722         mini_get_basic_type_from_generic() takes a
7723         MonoGenericSharingContext* instead of a MonoCompile* now.
7724
7725         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
7726         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
7727         mini-sparc.c, mini-x86.c: Trivial changes required by the two
7728         changes above.  Just passing arguments through to the right
7729         places.
7730
7731 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7732
7733         * mini-arm.c: unify the call emission to emit_code_seq().
7734
7735 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
7736
7737         * tramp-arm.c: reduced the trampoline size.
7738
7739 2007-10-10  Mark Probst  <mark.probst@gmail.com>
7740
7741         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
7742         variable handling out of arch-specific code.
7743
7744 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7745
7746         * mini-arm.c: implemented fast delegate dispatch.
7747
7748 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
7749
7750         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
7751         that fp elimination is turned off if the space required by locals is too
7752         big. Fixes #331958.
7753
7754 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7755
7756         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
7757         ARM to the new style trampoline.
7758
7759 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
7760
7761         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
7762
7763         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
7764
7765 2007-10-09  Martin Baulig  <martin@ximian.com>
7766
7767         * debug-debugger.h
7768         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
7769         `field_info_offset_offset'.     
7770
7771 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
7772
7773         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
7774         removed more internal usage of the r11 register and made it available
7775         to the register allocator.
7776
7777 2007-10-08  Mark Probst  <mark.probst@gmail.com>
7778
7779         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
7780         when sharing generics and treat type variables as references.
7781
7782 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7783
7784         * mini-ppc.c: started removing the internal uses of register r11
7785         to eventually allow the register allocator to manage it as an
7786         additional available register.
7787
7788 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
7789
7790         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
7791
7792 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
7793
7794         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
7795         specific trampolines as they are not performance critical as a jump
7796         target (maybe align as before only for AOT code?). This saves about
7797         200 KB of native code on x86 for monodevelop startup.
7798
7799 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
7800
7801         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
7802         monodevelop startup.
7803
7804 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
7805
7806         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
7807
7808         * mini-sparc.h mini-sparc.c: Implement IMT support.
7809
7810         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
7811         its smaller and doesn't clobber sparc_g1.
7812
7813         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
7814
7815 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7816
7817         * mini-ppc.c: optimized the size of the IMT thunks a bit.
7818
7819 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
7820
7821         * mini-ppc.c: implemented fast delegate invocation.
7822
7823 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
7824
7825         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
7826
7827 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7828
7829         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
7830         code to the new style trampoline in preparation for IMT support.
7831
7832 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
7833
7834         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
7835         systems already. This also reduces the specific trampiline sizes and
7836         prepares for the use of r12 as the IMT identifier register.
7837
7838 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7839
7840         * mini-mips.h: endianess fix (simplified from a patch by
7841         Thomas Kunze <thommy@tabao.de>, bug #323737).
7842
7843 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7844
7845         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
7846         to access ucontext fields and enable netbsd support
7847         (partially from Magnus Henoch <mange@freemail.hu>).
7848
7849 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7850
7851         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
7852         use the preprocessor from the CPP env var if it is set.
7853
7854 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7855
7856         * mini-trampolines.c: fixed an assertion and moved it earlier in the
7857         code, before interface_offset gets used.
7858
7859 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
7860
7861         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
7862         mono_class_setup_vtable () before accessing klass->vtable.
7863
7864 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
7865
7866         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
7867         hackish.
7868
7869 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7870
7871         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
7872         IMT slots (this saves hundreds of KB of memory in programs like
7873         IronPython and Monodevelop).
7874
7875 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
7876
7877         * mini.c: print the delegate counter.
7878
7879 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
7880
7881         * mini-x86.c: make it easier to enable the debugging code for IMT
7882         slots.
7883
7884 2007-09-28  Martin Baulig  <martin@ximian.com>
7885
7886         * debug-debugger.h
7887         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
7888         `mono_method_klass_offset' and `mono_method_token_offset'.
7889
7890 2007-09-20  Mark Probst  <mark.probst@gmail.com>
7891
7892         * mini.c: First generics sharing implementation.  Can only share
7893         in very simple cases.  If sharing doesn't work it falls back to
7894         dedicated compilation.
7895
7896         * mini.h: Flag in MonoCompile to specify whether generic
7897         compilation is shared.  Flags enum for marking which generic inst
7898         of a context is used.  Prototypes for helper functions.
7899
7900         * generic-sharing.c: Helper functions for generic method sharing.
7901
7902         * optflags-def.h: Optimization flag (gshared) for enabling generic
7903         method sharing added.
7904
7905         * Makefile.am: generic-sharing.c added.
7906
7907 2007-09-19 Daniel Nauck <dna@mono-project.de>
7908
7909         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
7910
7911 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
7912         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
7913         fixes bug 325507.
7914
7915 2007-09-19  Martin Baulig  <martin@ximian.com>
7916
7917         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
7918         mono_debug_cleanup() is now part of mono_cleanup().
7919
7920 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
7921
7922         * driver.c (mono_main): Fix a warning.
7923
7924 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
7925
7926         * aot-compiler.c: Optimize various parts when processing large assemblies.
7927         Fixes ##325568.
7928
7929         * mini.c (mono_patch_info_hash): Improve hash function.
7930
7931 2007-09-14  Jonathan Chambers <joncham@gmail.com>
7932
7933         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
7934         
7935         Code is contributed under MIT/X11 license.
7936
7937 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
7938
7939         * mini.c (mini_init): Fix a leak.
7940
7941         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
7942
7943 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
7944
7945         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
7946
7947 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
7948
7949         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
7950
7951 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
7952
7953         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
7954         variance tests.
7955
7956         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
7957
7958         * mini.c (handle_alloc): Enable managed allocators in AOT code.
7959
7960         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
7961
7962         * aot-runtime.c (decode_patch_info): Ditto.
7963
7964 2007-09-12  Jonathan Chambers <joncham@gmail.com>
7965
7966         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
7967         static case. Cache delegates in architecture specific code, 
7968         based on number of parameters.
7969         
7970         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
7971         in architecture specific code, based on number of parameters.
7972         
7973         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
7974         caching happen in architecture specific code now.
7975         
7976         Code is contributed under MIT/X11 license.
7977
7978 2007-09-12  Jonathan Chambers <joncham@gmail.com>
7979
7980         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
7981         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
7982         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
7983
7984         Code is contributed under MIT/X11 license.
7985
7986 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
7987         * mini.c: (mono_thread_abort) Fixed bug #82416.
7988
7989 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
7990
7991         * mini.: hook the new managed GC allocation feature into the JIT.
7992
7993 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
7994
7995         * mini.c: implementation for the new runtime tls opcode.
7996
7997 2007-09-11  Martin Baulig  <martin@ximian.com>
7998
7999         * debug-debugger.h
8000         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
8001         `mono_method_inflated_offset'.
8002
8003 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
8004
8005         * driver.c mini.h mini.c: Add a new devel command line option for injecting
8006         async exceptions into a method.
8007
8008         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
8009         purpose of testing whenever the unwinder works at every instruction.
8010
8011 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
8012
8013         * mini.c: check accessibility of method used in ldftn (fixes
8014         bug #82635).
8015
8016 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
8017
8018         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
8019
8020         * inssel.brg: Fix a warning.
8021
8022 2007-09-03  Martin Baulig  <martin@ximian.com>
8023
8024         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
8025         now takes the `main_method' as argument.
8026
8027 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
8028
8029         * cpu-sparc.md (endfilter): Add missing src1:i argument.
8030
8031 2007-08-30  Jonathan Chambers <joncham@gmail.com>
8032
8033         * driver.c: include the cil-coff.h header on Windows.
8034         
8035         Code is contributed under MIT/X11 license.
8036
8037 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8038
8039         * mini.c, driver.c: don't include the cil-coff.h header.
8040
8041 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
8042
8043         * mini.c: flag places that needs fixes fo soft-float support.
8044
8045 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
8046
8047         * mini.h, inssel-float.brg: fix soft-float constant loads on big
8048         endian systems (partially from Dean Jenkins, bug #81924).
8049
8050 2007-08-28  Mark Probst  <mark.probst@gmail.com>
8051
8052         * mini.c (check_linkdemand): Remove embedded reference object in
8053         call to LinkDemandSecurityException.
8054         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
8055         with an IntPtr instead of a reference object.
8056
8057 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
8058
8059         * mini.c (handle_initobj): Handle alignment properly.
8060
8061         * inssel.brg (mini_emit_memset): Ditto. 
8062
8063         * inssel.brg (mini_emit_memcpy): Ditto. 
8064
8065         * inssel-sparc.brg: Ditto.              
8066
8067         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
8068
8069 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
8070
8071         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
8072         exceptions raised in unmanaged code. Fixes part of #82594.
8073
8074 2007-08-24  Mark Probst  <mark.probst@gmail.com>
8075
8076         * mini.c (mono_method_to_ir), declsec.c
8077         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
8078
8079 2007-08-22  Martin Baulig  <martin@ximian.com>
8080
8081         * debug-mini.h
8082         (MonoDebuggerThreadInfo): New typedef.
8083         (mono_debugger_thread_table): New global variable.
8084         (mono_debugger_thread_created): New public function.
8085         (mono_debugger_thread_cleanup): New public function.
8086
8087         * debug-debugger.h
8088         (MonoDebuggerInfo):
8089         - removed `get_current_thread' and `lookup_assembly'.
8090         - removed `data_table'.
8091         - added `thread_table'.
8092
8093         * mini.c
8094         (mono_thread_start_cb): Call mono_debugger_thread_created().
8095         (mono_thread_attach_cb): Likewise.
8096         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
8097         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
8098         initial domain.
8099
8100         * driver.c (mono_main): Move mono_debug_init() up, before calling
8101         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
8102
8103 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8104
8105         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
8106         together when passing several arguments of type double (gives a small
8107         speedup and saves a few bytes of generated code).
8108
8109 2007-08-20  Jb Evain  <jbevain@novell.com>
8110
8111         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
8112
8113 2007-08-20  Jb Evain  <jbevain@novell.com>
8114
8115         * mini.c (mono_method_to_ir): throw MethodAccessException
8116         and FieldAccessException instead of InvalidProgramException.
8117
8118 2007-08-20  Mark Probst  <mark.probst@gmail.com>
8119
8120         * mini.c: CoreCLR security checks.
8121
8122         * mini.h: Removed MonoSecurityMode (moved to
8123         metadata/security-manager.h) and mono_security_mode global var
8124         (replaced by set/get functions in security-manager.h).
8125
8126         * driver.c: Added "core-clr-test" security mode for testing.  Used
8127         set-function for setting security mode.
8128
8129 2007-08-17  Mark Probst  <mark.probst@gmail.com>
8130
8131         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
8132         the new jit_info_table.
8133
8134         * driver.c: Test code for the new jit_info_table (enabled by the
8135         define MONO_JIT_INFO_TABLE_TEST).
8136
8137 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
8138
8139         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
8140         detection of call <REG> instruction sequence. Fixes build on freebsd.
8141
8142 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
8143
8144         * mini-exceptions.c: Fix a warning.
8145
8146 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
8147
8148         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
8149         stack overflow handling code on amd64 too.
8150
8151         * mini-exceptions.c (mono_setup_altstack): Make this use 
8152         mono_thread_get_stack_bounds ().
8153
8154         * mini-x86.h: Disable sigaltstack on solaris x86.
8155
8156 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
8157
8158         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
8159
8160 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
8161
8162         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
8163
8164 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
8165
8166         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
8167
8168         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
8169
8170 2007-08-03  Neale Ferguson <neale@sinenomine.net>
8171
8172         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
8173         due to alignment.
8174
8175 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8176
8177         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
8178         to be emitted (bug #82281).
8179
8180 2007-08-01  Martin Baulig  <martin@ximian.com>
8181
8182         Merged the `debugger-dublin' branch.
8183
8184         * debug-debugger.h (MonoDebuggerInfo):
8185         Removed the `old_*' compatibility entries.
8186         Added `debugger_version' and `data_table'.
8187         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
8188         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
8189
8190         * debug-mini.c
8191         (MiniDebugMethodBreakpointInfo): Add `address_list'.
8192         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
8193         instead of a `gconstpointer'.
8194         (mono_debugger_insert_method_breakpoint): Return a
8195         `MonoDebugMethodAddressList *'.
8196
8197 2007-06-28  Martin Baulig  <martin@ximian.com>
8198
8199         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8200
8201 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
8202
8203         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
8204         __builtin_frame_address () since it is broken on older gcc versions.
8205
8206 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
8207
8208         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
8209         on the stack overflow handling and made the managed stack overflows
8210         catchable in most cases using soft guard pages.
8211         * exceptions-x86.c: added code to restore the protection in the soft
8212         guard pages at the end of exception handling.
8213
8214 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
8215
8216         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
8217
8218 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8219
8220         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
8221         exception handling.
8222
8223 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8224
8225         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
8226         signal handling support until it has been ported to the new mechanism.
8227         * mini.c: fixed stack overflow detection and use the new
8228         architecture code  to handle signals on the altstack.
8229
8230 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
8231
8232         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
8233         stack overflows on the alt stack.
8234
8235 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
8236
8237         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
8238         stack overflows on the alt stack.
8239
8240 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
8241
8242         * exceptions-ppc.c: cleanup preparing for altstack support.
8243
8244 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8245
8246         * exceptions-arm.c: cleanup preparing for altstack support.
8247
8248 2007-07-27  Mark Probst  <mark.probst@gmail.com>
8249
8250         * mini.c (print_jit_stats): Output hazard pointer stats.
8251
8252 2007-07-26  Mark Probst  <mark.probst@gmail.com>
8253
8254         * driver.c, mini.c: Replaced security mode flags with a single
8255         enum variable.
8256
8257 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8258
8259         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
8260
8261 2007-07-25  Mark Probst  <mark.probst@gmail.com>
8262
8263         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
8264         (which doesn't do anything yet) for activating Core CLR
8265         (Silverlight) security.
8266
8267 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
8268
8269         * mini-codegen.c: work around a possible gcc bug on arm.
8270
8271 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
8272
8273         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
8274         message for platforms that don't support AOT compilation.
8275
8276 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
8277
8278         * mini.h, mini.c, driver.c: temporary smcs hack.
8279
8280 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
8281
8282         * mini-arm.h, mini-arm.c: arm EABI fixes.
8283
8284 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
8285
8286         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
8287         case.
8288
8289         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
8290         trampolines taking a method argument.
8291
8292         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
8293
8294         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
8295         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
8296
8297         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
8298         JIT compilation throws an exception. Fixes #82050.
8299
8300 2007-07-19  Mark Probst  <mark.probst@gmail.com>
8301
8302         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
8303         with the MONO_EXCEPTION_ defines.
8304
8305 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
8306
8307         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
8308         #82117.
8309         
8310         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
8311         the cause of an assertion.
8312
8313 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
8314
8315         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
8316         removed.
8317
8318 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
8319
8320         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
8321         assert. Should fix #82103.
8322
8323 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
8324
8325         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
8326         here too. Fixes #82095.
8327
8328         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
8329         addresses.
8330
8331         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
8332
8333         * mini-amd64.h: Enable IMT for amd64.
8334         
8335         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
8336
8337 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
8338
8339         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
8340
8341 2007-07-12  Mark Probst  <mark.probst@gmail.com>
8342
8343         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
8344         as soon as check_linkdemand sets an exception_type.
8345
8346 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8347
8348         * mini-x86.c: fixed offsets for IMT call sequence.
8349         * mini-x86.h: enable IMT again.
8350
8351 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
8352
8353         * trace.c (mono_trace_enter_method): Decode MonoType too.
8354
8355         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
8356
8357         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
8358
8359         * mini-amd64.c: Add preliminary IMT implementation.
8360         
8361 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
8362
8363         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
8364         understand the new IMT-base interface invocation (thanks to
8365         Daniel Nauck for the report and the remote debugging session).
8366
8367 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
8368
8369         * mini-x86.c: size and speed optimizations for the IMT bsearch.
8370
8371 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
8372
8373         * Makefile.am (aotcheck): Make this actually use the AOTed code.
8374
8375 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
8376
8377         * mini-trampolines.c: implement AOT IMT support.
8378         * mini-x86.h: enable IMT support for wider testing.
8379
8380 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
8381
8382         * inssel.brg (emit_imt_argument): Add aot support here.
8383
8384         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
8385
8386 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
8387
8388         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
8389         of the IMT implementation, partially from massi, with my
8390         implementation of the bsearch sequence. Disabled by default until
8391         the AOT code is implemented.
8392
8393 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
8394
8395         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
8396
8397         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
8398
8399 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8400
8401         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
8402         arch-independent IMT JIT code from Massimiliano
8403         Mantione (massi@ximian.com) with small cleanups from me.
8404
8405 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8406
8407         * Makefile.am: fix svn invocation to get the svn revision to be
8408         independent of the local language (build fix).
8409
8410 2007-07-09  Mark Probst  <mark.probst@gmail.com>
8411
8412         * mini.c (inline_method): Reset cfg->exception_type if the
8413         inlining is aborted.  Fixes: 82049.
8414
8415 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
8416
8417         * mini.c: remove assert from exception handling code when exception_ptr
8418         is not set.
8419
8420 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
8421
8422         * mini.c (mono_codegen): Add an assert.
8423
8424         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
8425         enter and leave code.
8426         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
8427
8428 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8429
8430         * mini-ppc.c: fixed memory corruption for localloc(0)
8431         (bug #81852).
8432
8433 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
8434         
8435         * mini.c: Fix warnings.
8436
8437 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
8438
8439         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
8440         to emit better double->int conversions.
8441
8442 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8443
8444         * mini.c: the provided Min/Max optimizations are valid for unisgned
8445         ints.
8446
8447 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
8448
8449         * 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
8450
8451 2007-06-28  Miguel de Icaza  <miguel@novell.com>
8452
8453         * mini.c (mono_running_on_valgrind): Add support for reporting the
8454         method and  its boundaries to valgrind.
8455
8456 2007-06-28  Martin Baulig  <martin@ximian.com>
8457
8458         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8459
8460 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
8461
8462         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
8463
8464         * generic.2.cs: Add new test case.
8465
8466 2007-06-25  Martin Baulig  <martin@ximian.com>
8467
8468         Merged the `debugger-dublin' branch.
8469
8470         * debug-mini.c
8471         (mono_debugger_insert_method_breakpoint): New public method.
8472         (mono_debugger_remove_method_breakpoint): Likewise.
8473         (mono_debugger_check_breakpoints): New static method.
8474         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
8475
8476         * debug-debugger.h (MonoDebuggerInfo):
8477         Renamed (to keep backward compatibility in the vtable):
8478         `insert_breakpoint' -> `old_insert_breakpoint'.
8479         `remove_breakpoint' -> `old_remove_breakpoint'.
8480         `create_string' -> `old_create_string'.
8481         `lookup_class' -> `old_lookup_class'.
8482         `lookup_type' -> removed; changed into a dummy field.
8483         `lookup_assembly' -> `old_lookup_assembly'.
8484         Added (same functionality, but different signature):
8485         `create_string', `lookup_class', `lookup_assembly'
8486         Added new:
8487         `get_method_addr_or_bpt', `remove_method_breakpoint',
8488         `runtime_class_init'.
8489
8490         * debug-debugger.c: Merged the `debugger-dublin' branch.
8491
8492 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
8493
8494         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
8495         well.
8496         (peephole_pass): Likewise.
8497
8498 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
8499
8500         * driver.c: hopefully make setaffinity work also for ancient
8501         versions of linux.
8502
8503 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
8504
8505         * driver.c : win32 build fix.
8506
8507 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
8508
8509         * driver.c: check for the MONO_NO_SMP env var and bind to a single
8510         processor if it is set.
8511
8512 2007-06-21  Martin Baulig  <martin@ximian.com>
8513
8514         * debug-mini.h: New file.
8515
8516         * debug-mini.c
8517         (mono_debugger_insert_breakpoint_full): Moved here from
8518         ../metadata/mono-debug-debugger.c.
8519         (mono_debugger_remove_breakpoint): Likewise.
8520         (mono_debugger_breakpoint_callback): Likewise.
8521
8522 2007-06-15  Raja R Harinath  <rharinath@novell.com>
8523
8524         * jit-icalls.c (mono_helper_compile_generic_method): Update to
8525         changes in MonoGenericClass.
8526
8527 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
8528
8529         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
8530
8531 2007-06-14  Raja R Harinath  <rharinath@novell.com>
8532
8533         * jit-icalls.c (mono_helper_compile_generic_method): Update to
8534         removal of MonoGenericMethod.
8535
8536 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8537
8538         * mini-exceptions.c: hooks for the exception events profiling API.
8539
8540 2007-06-14  Randolph Chung  <tausq@debian.org>
8541
8542         * Makefile.ma: Add hppa target.
8543         * mini-arch.h: Include mini-hppa.h
8544         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
8545         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
8546         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8547
8548 2007-06-14  Randolph Chung  <tausq@debian.org>
8549
8550         * inssel.brg: Add rules for "chained" compare-branch operations so that
8551         a single compare op can affect multiple branches.  Adjust cost for
8552         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
8553         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
8554         cost for some rules so that they can more easily be overridden by
8555         per-arch rules (with fixes from lupus).
8556         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8557
8558 2007-06-13  Randolph Chung  <tausq@debian.org>
8559
8560         * mini-ops.h: Reorder branch ops so that they match the order of the
8561         corresponding CEE_* ops.  The code expects them this way.
8562         Add new ops for HPPA target.
8563         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8564
8565 2007-06-13  Randolph Chung  <tausq@debian.org>
8566
8567         * mini-exceptions.c: Handle cases where the stack grows towards
8568         larger addresses.
8569         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8570
8571 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8572
8573         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
8574         counter.
8575         * driver.c: explain where a non-matching corlib is found.
8576
8577 2007-06-13  Mark Probst  <mark.probst@gmail.com>
8578
8579         * mini.c (print_jit_stats): Output dynamic code allocation stats.
8580
8581 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
8582
8583         * mini-exceptions.c: Generate a method profile leave event during
8584         an exception to ensure that the profiler gets notified.
8585
8586 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
8587
8588         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
8589         branch.
8590
8591         * cpu-amd64.md: Add long_and/or/xor opcodes.
8592
8593 2007-06-06  Wade Berrier  <wberrier@novell.com>
8594
8595         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
8596         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
8597         length of instruction shr_imm (expected 8, got 10)
8598
8599 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
8600
8601         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
8602
8603 2007-06-06  Mark Probst  <mark.probst@gmail.com>
8604
8605         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8606         MonoInternalHashTable again (fixed bug in the internal hash table
8607         code).
8608
8609 2007-06-06  Mark Probst  <mark.probst@gmail.com>
8610
8611         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
8612         Have to figure out what makes it crash the SWF regression.
8613
8614 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
8615
8616         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
8617
8618 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8619
8620         * mini.c: optimize out the type check when storing null in a
8621         reference array.
8622
8623 2007-06-04  Mark Probst  <mark.probst@gmail.com>
8624
8625         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8626         MonoInternalHashTable.
8627
8628 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
8629
8630         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
8631         signed integer methods.
8632
8633 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
8634
8635         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
8636         permanently since the current approach doesn't work.
8637
8638 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
8639
8640         * inssel.brg (stmt): Only call delegate->invoke_impl if 
8641         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
8642
8643 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
8644
8645         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
8646         the sreg2==rdx case.
8647         
8648         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
8649         account if it contains a rex prefix.
8650         (peephole_pass): Handle OP_FMOVE as well.
8651
8652 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
8653
8654         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
8655         as it causes regressions.
8656
8657 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
8658
8659         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
8660         static case as well.
8661
8662         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
8663
8664         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8665         (mono_arch_get_this_arg_from_call): Ditto.
8666
8667         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
8668
8669         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
8670         invoke_impl field.
8671
8672         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8673         (mono_arch_get_this_arg_from_call): Ditto.
8674
8675         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
8676         
8677         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
8678         try to create optimized invoke code and use that for further invocations. 
8679         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
8680
8681         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
8682
8683 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
8684
8685         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
8686         sealed classes or methods.
8687         *devirtualization.cs: tests for the new optimization
8688
8689 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
8690
8691         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
8692         by the update_volatile () function.
8693
8694 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
8695
8696         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
8697         require it.
8698
8699         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
8700
8701 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
8702
8703         * mini.c: Add configure checks for header files.
8704         * mini-x86.c: Add configure checks for header files.
8705         * trace.c: Add configure checks for header files.
8706         * aot-runtime.c: Add configure checks for header files.
8707         * aot-compiler.c: Add configure checks for header files.
8708         * driver.c: Add configure checks for header files.
8709         * mini-codegen.c: Add configure checks for header files.
8710         
8711         Code is contributed under MIT/X11 license.
8712
8713 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
8714
8715         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
8716         icompare_imm -128 + op_iclt. Fixes #81703.
8717
8718 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
8719
8720         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
8721
8722 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
8723
8724         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
8725         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
8726         so that all isinst checks now use "interface_bitmap".
8727
8728 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
8729
8730         * cpu-amd64.md (jmp): Fix a warning.
8731
8732         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
8733
8734         * basic.cs: Add new regression test.
8735
8736         * basic.cs: Remove test which is now in basic-long.cs.
8737
8738         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
8739
8740         * basic-long.cs: Add new test.
8741         
8742 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
8743
8744         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
8745
8746 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
8747
8748         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
8749
8750         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
8751         places.
8752         
8753         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
8754         throwing code a bit.
8755
8756         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
8757         the exception throwing code a bit.
8758
8759         * mini-x86.c (get_call_info): Allocate result from a mempool.
8760
8761 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
8762
8763         * aot-compiler.c (find_typespec_for_class): Fix the assert.
8764
8765         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
8766
8767         * mini.h (MonoCompile): Add 'token_info_hash' field.
8768
8769         * mini.c: Save token->method associations during compilation so the AOT 
8770         compiler can use it.
8771         
8772         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
8773         which reference generic classes and methods.
8774
8775 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
8776
8777         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
8778
8779         * aot-compiler.c (compile_method): Fix a typo in a comment.
8780
8781         * aot-runtime.c (decode_cached_class_info): Skip generic types.
8782
8783         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
8784         everything generic.
8785
8786         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
8787
8788 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
8789
8790         * mini.h (MonoCompile): Add 'args' field.
8791
8792         * mini.c (mono_compile_create_vars): Store variables representing the arguments
8793         into cfg->args.
8794
8795         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
8796
8797 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
8798
8799         * mini.c (mono_compile_get_interface_var): Remove this unused function.
8800
8801         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
8802
8803         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
8804         opcodes for some opcodes.
8805
8806         * mini.h *.brg *.c: Use the new opcodes.
8807
8808 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
8809
8810         * mini.h: Bumped aot revision.
8811
8812         * inssel.brg: modified code generation of type checks for interfaces
8813         to use the new "MonoClass.interface_bitmap" instead of the old
8814         "MonoClass.interface_offsets".
8815
8816 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
8817
8818         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
8819
8820 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
8821
8822         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
8823         64 bit platforms.
8824
8825 2007-04-27  Neale Ferguson <neale@sinenomine.net>
8826
8827         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
8828
8829 2007-04-27  Wade Berrier  <wberrier@novell.com>
8830
8831         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
8832         mini.h) to fix build.
8833
8834 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
8835
8836         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
8837         
8838         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
8839         causes the corlib unit tests to fail.
8840
8841 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
8842
8843         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
8844
8845         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
8846
8847         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
8848         opcodes to the comparison relations.
8849
8850         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
8851         opcodes to their types.
8852         
8853         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
8854
8855         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
8856         it in cfg->arch.cinfo.
8857
8858         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
8859
8860         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
8861         cfg->cil_offset_to_bb.
8862
8863 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
8864
8865         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
8866         created becase of initlocals.
8867
8868 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
8869
8870         * mini-alpha.c cpu-alpha.md: More alpha port work from 
8871         Sergey Tikhonov <tsv@solvo.ru>.
8872
8873 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
8874
8875         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
8876
8877 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
8878
8879         * cpu-s390.md (break): Correct the length of break instruction.
8880
8881 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8882
8883         * mini.c: fix a couple of soft-float issues and comments.
8884
8885 2007-04-15  Miguel de Icaza  <miguel@novell.com>
8886
8887         * trace.c (is_filenamechar): - is also a filename char.
8888
8889 2007-04-15  Neale Ferguson <neale@sinenomine.net>
8890
8891         * mini-s390.c: Correct checking for enum type in return value processing.
8892
8893 2007-04-14  Raja R Harinath  <rharinath@novell.com>
8894
8895         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
8896         (version.h): Makefile is in the build directory.
8897
8898 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
8899
8900         * mini-amd64.h: fix for assertion failure on Solaris/amd64
8901
8902 2007-04-11  Martin Baulig  <martin@ximian.com>
8903
8904         * mini.c (can_access_member): Fix handling of generic classes;
8905         fixes #81259.
8906
8907 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
8908
8909         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
8910
8911 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
8912
8913         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
8914
8915 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
8916
8917         * mini-codegen.c: make sure the right spill amount is
8918         used for fp or integer registers (fixes the float_sub_spill() on ppc).
8919
8920 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
8921
8922         * mini-ppc.c: fixes for the fp_branch_nan test.
8923
8924 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
8925
8926         * basic.cs: Comment out new test which still fails on ia64.
8927
8928 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
8929
8930         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
8931
8932 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
8933
8934         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
8935
8936 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
8937
8938         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
8939         on 64 bit machines. Fixes part of #80738.
8940
8941         * basic.cs: Add regression test.
8942
8943 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
8944
8945         * inssel.brg basic.cs: Revert previous change to fix build.
8946
8947         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
8948         platforms.
8949         
8950         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
8951
8952         * basic.cs: Add new regression test.
8953
8954 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
8955
8956         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
8957         many arguments.
8958
8959 2007-03-16  Neale Ferguson <neale@sinenomine.net>
8960
8961         * cpu-s390x.md: Correct length of break instruction.
8962
8963 2007-03-16  Neale Ferguson <neale@sinenomine.net>
8964
8965         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
8966         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
8967
8968 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
8969
8970         * *.c: Begin WIN64 port.
8971         * mini.c:  Use correct register in profiler.
8972         * mini-amd64.c: No inline assembly on Win64.
8973         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
8974         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
8975         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
8976         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
8977         mono_arch_ip_from_context for Win64.
8978         
8979         Contributed under MIT/X11 license.
8980
8981 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
8982
8983         * exceptions-amd64.c (seh_handler): Ditto.
8984
8985         * exceptions-x86.c (seh_handler): Fix a memory leak.
8986
8987 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
8988
8989         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
8990         mini-s390x.c: fixed peephole optimizations to deal
8991         correctly with 1 and 2 byte reload avoidance.
8992
8993 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
8994
8995         * cpu-s390.md, cpu-s390x.md: update localloc length.
8996
8997 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
8998
8999         * cpu-g4.md: added missing descriptions.
9000
9001 2007-03-14  Miguel de Icaza  <miguel@novell.com>
9002
9003         *  Makefile.am: Add support so the tail tests are not executed on
9004         PowerPC as that is a known limitation of the PowerPC port.
9005
9006 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
9007
9008         * runmdesc.bat:  Move to msvc directory.
9009         
9010 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
9011
9012         * runmdesc.bat:  Run executable that was produced by the current
9013         target and sent via an argument.
9014         
9015 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
9016
9017         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
9018         #81102.
9019
9020         * generics.2.cs: Add regression test.
9021
9022 2007-03-09  Wade berrier  <wberrier@novell.com>
9023
9024         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
9025
9026 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
9027
9028         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
9029         AOT code depends on this.
9030
9031 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9032
9033         * mini.c: more precise tracking of types in the eval stack
9034         (part of fix for bug #81044).
9035
9036 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
9037
9038         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
9039
9040         * aot-compiler.c (encode_patch): Remove an obsolete comment.
9041
9042 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
9043
9044         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
9045
9046         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
9047
9048 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
9049
9050         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
9051         a pointer on 64 bit systems. Fixes #80190.
9052
9053         * iltests.il: Add new regression test.
9054
9055 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9056
9057         * mini.c: inline a constant for Environment.IsRunningOnWindows.
9058
9059 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
9060
9061         * trace.c: Remove an erroneous alignemnt check when tracing.
9062           Fixes --trace on OSX86.
9063
9064 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9065
9066         * mini-$(arch).h: initialize SP in context for all the archs.
9067
9068 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
9069
9070         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
9071         regressions in the thread tests.
9072
9073 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
9074
9075         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
9076         - fixed implementation of LOCALLOC opcode
9077         - implemented non-un compare for floats
9078         - code cleanup
9079         - implementation of FDIV and CKFINITE opcodes
9080         - fixes for latest mono updates
9081         - additional arch opcodes
9082
9083 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9084
9085         * Makefile.am: simplify and merge rules for cross-compilation.
9086
9087 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
9088
9089         * local-propagation.c: Actually *apply* the fix for bug 80591...
9090
9091 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9092
9093         * mini-exceptions.c: backuot part of the last change
9094         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
9095
9096 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
9097         * inssel.brg: Fix bug 59286.
9098
9099
9100 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
9101
9102         * mini-exceptions.c: patch from Zoltan to correctly check for
9103         stack boundaries (using the stack register, not the frame register),
9104         fixes bugs #80724, #79717.
9105
9106 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
9107
9108         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
9109         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
9110
9111         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
9112         presence of frame pointer elimination.
9113
9114 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
9115         
9116         * mini-x86.h: NetBSD UCONTEX_REG defines.
9117
9118 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
9119
9120         * inssel-amd64.brg: Fix amd64 build.
9121
9122 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
9123
9124         * mini.h: remove extern to workaround what looks likes gcc bug 26905
9125         on amd64.
9126
9127 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
9128
9129         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
9130         ends.
9131
9132         * mini-<ARCH>.c: Use mono_is_regsize_var ().
9133
9134 2007-01-30 Mark Mason <mason@broadcom.com>
9135
9136            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
9137            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
9138            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
9139            beginning support for CEE_JMP [not quite working yet]
9140            * tramp-mips.c: LMF handling now works
9141         
9142 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
9143
9144         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
9145
9146         * mini.h (NULLIFY_INS): New macro.
9147
9148 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9149
9150         * mini.c: statistical profiler fix for windows, patch
9151         from Tor Lillqvist (tml@novell.com).
9152
9153 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
9154         * local-propagation.c: Fix bug 80591.
9155
9156 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9157
9158         * Makefile.am: put back the --export-dynamic option as with
9159         the previous gmodule flags (thanks to Robert Jordan).
9160
9161 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
9162
9163         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
9164
9165         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
9166         simplify and speed up the local register allocator. Also rename some fields
9167         like iassign->vassign.
9168         
9169         * regalloc.c: Remove some functions which are no longer used since their
9170         inlined version is in mini-codegen.c.
9171         
9172         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
9173
9174         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
9175
9176 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
9177
9178         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
9179         narrowing. Fixes #80622.
9180
9181         * iltests.il: Add new regresssion test. 
9182
9183 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9184
9185         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
9186         debug-debugger.c, debug-debugger.h: warning fixes.
9187         * driver.c: updated copyright year and made it fit in one line.
9188
9189 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
9190
9191         * aot-runtime.c: updated to use mono-dl instead of gmodule.
9192
9193 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
9194
9195         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
9196
9197         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
9198
9199         * iltests.il: Add new test for bug #80507.
9200
9201 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9202
9203         * mini-arm.h: use soft-float also on vfp for now.
9204
9205 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9206
9207         * mini.c: fix some more soft-float issues.
9208
9209 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
9210
9211         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
9212
9213 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
9214         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
9215         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
9216         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
9217
9218 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
9219
9220         * mini-arm.c: typo fix.
9221
9222 2007-01-23  Neale Ferguson <neale@sinenomine.net>
9223
9224         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
9225
9226 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
9227
9228         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
9229         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
9230
9231         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
9232
9233         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
9234
9235         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
9236         
9237         * inssel.brg: Fix a warning.
9238
9239         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
9240
9241         * abcremoval.c ssa.c ssapre.c: Update after this change.
9242         
9243         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
9244
9245         * dominators.c (df_set): Use mono_bitset_union_fast.    
9246
9247 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9248
9249         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
9250         mini-codegen.c: reduce relocations and memory usage for the cpu
9251         description.
9252
9253 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
9254
9255         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
9256
9257         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
9258         to reduce their size.
9259
9260 2007-01-19 Mark Mason <mason@broadcom.com>
9261
9262         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
9263         * mini-mips.c: more configuration macros, support long conditional branches, additional
9264         asserts, fix epilog instrumentation.
9265         * mini-mips.h: use standard stack walk
9266         * cpu-mips.md: increase size of div, rem and conditional branches
9267         
9268 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
9269
9270         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
9271         to cpu spec data.
9272
9273 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
9274
9275         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
9276         (compile_method): Ditto.
9277
9278         * aot-runtime.c (decode_klass_info): Ditto.
9279
9280         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
9281         needed by the code generated by inssel.brg. Also fix a warning.
9282
9283 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
9284
9285         * mini.c: deal with enums that become genericinsts by
9286         being nested in a generic class (bug #79956).
9287
9288 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9289
9290         * mini.c: match the generic definition to check for
9291         private access with generic types (bug #78431).
9292
9293 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9294
9295         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
9296         to make life easier for people cross-compiling that insist on not
9297         using scratchbox.
9298
9299 2007-01-17 Mark Mason <mason@broadcom.com>
9300
9301         * inssel-long.brg: patch to deal with mips missing flags
9302         * inssel-long32-mips.brg: implement overflow checks
9303         * insset-mips.brg: implement overflow checks
9304         * mini-mips.h: implement conditional exception handling
9305         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
9306           Remove unused code, minor cleanups.
9307         * exceptions-mips.c: minor cleanups
9308         * mini-ops.h: add mips conditional exception ops
9309         * cpu-mips.md: add mips conditional exception ops
9310
9311         
9312 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9313
9314         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
9315         to deal with mips missing of flags.
9316
9317 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9318
9319         * exceptions-ppc.c: execute fault handlers.
9320
9321 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
9322
9323         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
9324
9325 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9326
9327         * mini.c: handle also floating point values in initialize_array.
9328
9329 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9330
9331         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
9332         array initialization and make it conditional on the intrins option.
9333
9334 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9335
9336         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
9337         relocations and put the patch info names close to the enum definition.
9338
9339 2007-01-15 Mark Mason <mason@broadcom.com>
9340
9341         * basic.cs, exceptions.cs: break up large tests to increase debugability.
9342
9343 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
9344
9345         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
9346
9347 2007-01-12  Raja R Harinath  <rharinath@novell.com>
9348
9349         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
9350
9351 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
9352
9353         * Makefile.am: distribute the mips sources.
9354
9355 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9356
9357         * mini-codegen.h: handle bug #80489 here, by excluding ecx
9358         directly.
9359
9360 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
9361
9362         * cpu-x86.md: back out for now as this triggers other regressions.
9363
9364 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9365
9366         * cpu-x86.md: force src1 and dest regpair for long shift instructions
9367         to eax:edx, so ecx can't get allocated to them (bug #80489).
9368
9369 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
9370
9371         * mini.c, mini-exceptions.c: enabled running fault handlers
9372         (bug #80469).
9373
9374 2007-01-03  Miguel de Icaza  <miguel@novell.com>
9375
9376         * driver.c: If nothing fail, do not use the string "failed",
9377         because it makes it very annoying to view test result logs on the
9378         web. 
9379
9380 2006-12-30  Miguel de Icaza  <miguel@novell.com>
9381
9382         * debug-debugger.c (mono_debugger_main): Rename "main" to
9383         "main_method" to prevent a warning.
9384
9385         Remove a warning for unused field.
9386
9387 2006-12-28  Martin Baulig  <martin@ximian.com>
9388
9389         * debug-debugger.c
9390         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
9391
9392 2006-12-22  Martin Baulig  <martin@ximian.com>
9393
9394         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
9395         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
9396         seperate `.mdb_debug_info' section, so we can access it from the
9397         debugger even if the binary is stripped.
9398
9399         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
9400         from the `.mdb_debug_info' here to prevent the linker from
9401         removing that section.
9402
9403         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
9404         mdb-debug-info64.s.
9405
9406 2006-12-19  Robert Jordan  <robertj@gmx.net>
9407
9408         * mini-x86: enable the code to return small structures in
9409         registers for FreeBSD as well. Fixes bug #80278.
9410         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
9411
9412 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9413
9414         * mini-x86.c: align the stack when calling the profiler
9415         function instrumenting the prolog (on OSX).
9416
9417 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
9418
9419         * mini.c: emit a break opcode where Debugger.Break () is called.
9420
9421 2006-12-13  Miguel de Icaza  <miguel@novell.com>
9422
9423         * mini.c (mono_method_to_ir): Provide useful information on this
9424         assert, to prevent others from debugging like I did.
9425
9426 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9427
9428         * mini.c: enable code which was incorrectly commented
9429         (bug #80235).
9430
9431 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9432
9433         * mini-x86.c: enable on OSX, too, the code to return small
9434         structures in registers.
9435
9436 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9437
9438         * mini-x86.c: remove the use of the dynamic code manager here, too.
9439
9440 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9441
9442         * mini.h, debug-debugger.c, tramp-*.c: fixed 
9443         mono_debugger_create_notification_function() to use
9444         mono_global_codeman_reserve () instead of a dynamic code manager.
9445
9446 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
9447
9448         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
9449         ves_array_element_address() jit icall and use a generated
9450         managed method instead (which is about 4 times faster for a rank 3
9451         array access).
9452
9453 2006-11-29  Mark Mason  <mason@broadcom.com>
9454
9455         * basic-calls.cs: additional tests for passing
9456         structures as function arguments.
9457
9458 2006-11-29  Mark Mason  <mason@broadcom.com>
9459
9460         * mini-mips.h: disable custom exception handling
9461         * mini-mips.c: throw/rethrow should use jalr to call
9462         exception stubs.  Fixed bug with passing structures
9463         by value. More support for tracing floating point
9464         functions.
9465
9466 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9467
9468         * mini.c: fixed typo in the soft-float ldind.r4 handling
9469         (bug #80086).
9470
9471 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9472
9473         * mini.c, mini.h, driver.c: added --runtime command line
9474         option to select a different runtime than the autodetected one.
9475         * jit.h: added API for embedders to initialize with a specific
9476         runtime version.
9477
9478 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9479
9480         * mini.c: handle also boxing of r4 values (bug #80024).
9481
9482 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9483
9484         * mini-ppc.c: force indirect calls until we reserve
9485         enough address space for all the generated code.
9486
9487 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
9488
9489         * exceptions-arm.c: workaround bugs in the libc definition
9490         of struct ucontext.
9491
9492 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9493
9494         * inssel.brg: fixes from me and Mark Mason.
9495
9496 2006-11-23  Dick Porter  <dick@ximian.com>
9497
9498         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
9499         semaphore display now we've fixed the initial value
9500
9501 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9502
9503         * inssel.brg: partially revert the last change to fix the build.
9504
9505 2006-11-21  Mark Mason  <mason@broadcom.com>
9506
9507         * inssel.brg: Add and use compare-and-branch macros to support
9508         architectures that do not have condition code registers (ie. MIPS).
9509         * *-mips.{c,brg,md}: Fix copyright statements
9510
9511 2006-11-20  Mark Mason  <mason@broadcom.com>
9512
9513         * Makefile.am: remove mini-codegen.c from list of MIPS sources
9514         * mini.c: Allow GET_CONTEXT to be specified by the arch port
9515         * mini.h: Added declaration for mono_print_ins()
9516         * mini-codegen.c: added ins_spec initializer for MIPS
9517         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
9518         vreg to be virtual and hreg to be non-virtual.
9519         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
9520         is not yet working/implemented correctly.
9521         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
9522         non-static, fixup calls to print_ins() from other parts in the file.
9523
9524 2006-11-20  Mark Mason  <mason@broadcom.com>
9525
9526         * basic-calls.cs: added tests for passing structures as arguments
9527         to calls.
9528
9529 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9530
9531         * inssel-long32.brg: optimize signed division by power of two.
9532
9533 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
9534
9535         * mini-arm.c: added support for interworking with thumb code
9536         (mono must be still be built using the ARM instruction encoding).
9537
9538 2006-11-19  Miguel de Icaza  <miguel@novell.com>
9539
9540         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
9541         verifier has different rules for it.   Fixes a few verifier issues
9542         in the test suite.
9543
9544         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
9545         at the end, so people know what happened.
9546
9547 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9548
9549         * brach-opts.c: in optimize_exception_target() make sure we
9550         are in a catch clause (fixes bug #79871).
9551
9552 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9553
9554         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
9555         more soft-float support fixes.
9556
9557 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
9558
9559         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
9560         that are passed half on the stack and half in registers.
9561
9562 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
9563
9564         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
9565         more mips integration work from Mark E Mason 
9566         <mark.e.mason@broadcom.com>.
9567
9568 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9569
9570         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
9571         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
9572         tramp-mips.c: added sources for the mips port, not
9573         integrated in the build yet. Contributed by
9574         Mark E Mason <mark.e.mason@broadcom.com>.
9575
9576 2006-11-14  Neale Ferguson <neale@sinenomine.net>
9577
9578         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
9579
9580 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9581
9582         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
9583         put the soft-float rules in its own file since it seems to
9584         break s390 compilation.
9585
9586 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9587
9588         * mini-arm.c: fixed wrnings.
9589
9590 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
9591
9592         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
9593         inssel-arm.brg: ARM support for soft-float.
9594
9595 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9596
9597         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
9598         loads and stores of 32 bit fp values.
9599
9600 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
9601
9602         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
9603
9604         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
9605         works. Fixes #79852 and #79463.
9606
9607 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9608
9609         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
9610         more soft-float support WIP and fixes.
9611
9612 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
9613
9614         * mini-arm.c: some VFP updates.
9615
9616 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9617
9618         * mini-exceptions.c: 0 is a valid local var offset in some
9619         architectures, don't assert (bug #78508).
9620
9621 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
9622
9623         * exceptions-arm.c: fixed off by one error in stack walk code.
9624
9625 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
9626
9627         * mini.h, mini.c: more precise tracking of type load exceptions.
9628
9629 2006-11-03  Robert Jordan  <robertj@gmx.net>
9630
9631         * Makefile.am: [WIN32] Add monow.exe target.
9632         * driver.c: [WIN32] Don't detach the console when debugging.
9633         Fixes bug #79797.
9634         
9635 2006-10-30  Miguel de Icaza  <miguel@novell.com>
9636
9637         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
9638
9639 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
9640
9641         * aot-compiler.c (emit_method_info): Add a case missed earlier.
9642
9643         * driver.c (mini_regression): Fix --regression with AOT.
9644
9645         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
9646
9647 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
9648
9649         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
9650
9651         * mini-sparc.h: Don't use sigaction on sparc/linux.
9652
9653         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
9654
9655         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
9656
9657         * mini-exceptions.c: Add proper include files for getpid ().
9658
9659 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
9660
9661         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
9662         address instead of a MonoJitInfo* to avoid decoding the exception info for the
9663         method.
9664
9665         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
9666         name cache to reduce its size.
9667
9668         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
9669
9670 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
9671
9672         * mini-x86.c: Save/restore the current LMF structure more efficiently using
9673         the mono_lmf TLS variable.
9674
9675         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
9676         trampoline lmf frames.  
9677
9678         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
9679
9680 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
9681
9682         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
9683         the mono_lmf TLS variable.
9684
9685         * mini-exceptions.c: Access the LMF structure through accessors.
9686
9687         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
9688         variable instead of in jit_tls->lmf.
9689
9690         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
9691         
9692         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
9693         trampoline lmf frames.
9694
9695         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
9696
9697 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
9698
9699        * mini.c trace.c mini-x86.c: Revert these too.
9700         
9701        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
9702        signature change.
9703
9704 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
9705
9706         * genmdesc.c: removed now dead code.
9707
9708 2006-10-09  Robert Jordan <robertj@gmx.net>
9709
9710         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
9711
9712 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
9713
9714         * mini.h: do not leave gaps in the opcode values.
9715
9716 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
9717
9718         * jit-icalls.h: flag functions as internal here, too.
9719
9720 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
9721
9722         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
9723         functions with the internal attribute.
9724
9725 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
9726
9727         * aot-compiler.c: fclose the file descriptor in the profile read loop.
9728
9729 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
9730
9731         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
9732         for soft-float.
9733
9734 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
9735
9736         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
9737         tail calls as on other platforms.
9738
9739         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
9740
9741         * iltests.il: Add a few tailcall tests.
9742
9743 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9744
9745         * driver.c: fix loop for old compilers (bug #79521).
9746
9747 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
9748
9749         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
9750
9751         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
9752
9753         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
9754         metadata without any code.
9755
9756         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
9757         more precise debugging information using gdb.
9758
9759 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
9760
9761         * inssel-ia64.brg: Make the helper methods static.
9762
9763 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9764
9765         * inssel-x86.brg: make the helper methods static.
9766
9767 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
9768
9769         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
9770
9771 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9772
9773         * mini.c: updates for monoburg changes.
9774         * inssel.brg: make a few helper functions static as they should.
9775
9776 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
9777
9778         * Makefile.am: Move mini-codegen.c to common_sources.
9779
9780 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9781
9782         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
9783         instructions.
9784         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
9785         mini-ppc.h: port to use the common local register allocator.
9786
9787 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
9788
9789         * mini.h: Remove the comment too then.
9790
9791 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
9792
9793         * mini.h: put back backend.data which is to be used shortly and
9794         doesn't increase the size of MonoInst. If any 64 bit arch aligned
9795         pointers on 4 byte boundaries it'd have much bigger issues running
9796         and you can ifdef it out anyway.
9797
9798 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
9799
9800         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
9801         MonoInst size by 4 bytes on 64 bit machines.
9802
9803 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
9804
9805         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
9806         replacement with more meaningful field names. Arch maintainers, please
9807         check the assigned names are good enough for your arch.
9808
9809 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
9810
9811         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
9812         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
9813
9814 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
9815
9816         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
9817         relocations and memory requirements, put the optimization flags
9818         definitions in their own file.
9819
9820 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
9821
9822         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
9823
9824         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
9825
9826 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
9827
9828         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
9829
9830 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
9831
9832         * inssel.brg: use the correct function to get the size of an item
9833         in an array, given an element class.
9834         * aot-compiler.c: do not access class->class_size directly.
9835
9836 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
9837
9838         * mini.h, debug-mini.c: added a debugging function to print
9839         info about local variables and arguments in a jitted method.
9840
9841 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
9842
9843         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
9844
9845         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
9846
9847 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
9848
9849         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
9850         inner and outer loops when passing vtypes.
9851
9852 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
9853
9854         * mini-ppc.c: take into account the cpu errata for cache flushing
9855         which caused some random errors (bug #79381).
9856
9857 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
9858
9859         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
9860         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
9861
9862 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
9863
9864         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
9865         loaded.
9866
9867         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
9868         freebsd ports tree.
9869
9870         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
9871         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
9872
9873         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
9874         displacement.
9875
9876 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
9877
9878         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
9879
9880 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
9881
9882         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
9883         macro does not have to be changed during debugging.
9884
9885         * 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>.
9886
9887         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
9888
9889         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
9890         
9891         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
9892         MONO_ARCH_NO_EMULATE_MUL is defined.
9893
9894         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
9895
9896         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
9897
9898         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
9899
9900         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
9901         
9902 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
9903
9904         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
9905         stuff to mini-exceptions.c where it is used.
9906
9907         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
9908         setup code, the real one is in mini-exceptions.c.
9909
9910         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
9911         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
9912         some changes from the freebsd ports tree.
9913
9914         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
9915         constants.
9916         
9917         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
9918
9919 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
9920
9921         * mini.c: on Linux, check for /proc to be mounted
9922         (bug# 79351, novell bug#201204).
9923
9924 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
9925
9926         * mini.c: handle cases where pthread_attr_getstack() behaves
9927         incorrectly (bug #78096).
9928
9929 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
9930
9931         * mini-arm.c: support larger stack frames (bug #79272).
9932
9933 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
9934
9935         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
9936
9937         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
9938         tokens.
9939
9940         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
9941         mono_class_from_name () to find a class from its name.
9942
9943         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
9944
9945 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
9946
9947         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
9948
9949 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
9950
9951         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
9952
9953 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
9954
9955         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
9956         callinfo->trampoline.
9957
9958         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
9959         fixes #79271.
9960         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
9961         future.
9962
9963 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
9964
9965         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
9966
9967 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
9968
9969         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
9970         stats.method_trampolines, it is already done by the generic trampoline code.
9971
9972         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
9973         
9974 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
9975
9976         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
9977
9978         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
9979
9980         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
9981
9982         * mini.c (print_jit_stats): Print mscorlib mempool size too.
9983         
9984         * mini.c (print_jit_stats): Print new stats.
9985
9986         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
9987
9988 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
9989
9990         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
9991         Address on two dimensional arrays. Fixes #78729.
9992
9993         * mini.h (MonoCompile): Add a 'skip_visibility' field.
9994
9995         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
9996         a method.
9997
9998         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
9999
10000         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
10001         #79130.
10002         
10003         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
10004         a race condition.
10005         (mini_get_ldelema_ins): Ditto.
10006
10007 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
10008
10009         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
10010         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
10011         Fixes #79213.
10012
10013 2006-08-29 Neale Ferguson <neale@sinenomine.net>
10014
10015         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
10016         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
10017
10018         * exceptions-s390x.c: Cosmetic change.
10019
10020         * tramp-s390.c: Fix warning.
10021
10022         * cpu-s390.md: Correct length of mul_imm.
10023
10024 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
10025
10026         * aot-compiler.c: added binary writer with ELF backend
10027         implementation (only on Linux/x86 for now).
10028
10029 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
10030
10031         * Makefile.am: Don't run net 2.0 AOT tests.
10032
10033         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
10034         (mono_compile_assembly): Skip net 2.0 assemblies as well.
10035
10036         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
10037
10038 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10039
10040         * aot-compiler.c: simplified and refactored the asm-writing code
10041         to allow different backends.
10042
10043 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
10044
10045         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
10046
10047         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
10048         little. Share patches of type TYPE_FROM_HANDLE as well.
10049
10050         * mini.c (mono_patch_info_equal): New helper function.
10051         (mono_patch_info_hash): Ditto.
10052
10053         * aot-compiler.c (emit_method_code): Fix s390 build.
10054
10055         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
10056         is not handled because it is stored as a flag and not as a type ctor. Fixes
10057         #79016.
10058
10059 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
10060
10061         * aot-compiler.c: Fix computation of GOT slot statistics.
10062         
10063         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
10064         Also remove support for not PIC AOT.
10065
10066         * mini.h: Bump AOT file format version.
10067
10068         * objects.cs: Add a test for #78990.
10069
10070         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
10071         (peter.dettman@iinet.net.au). Fixes #79087.
10072
10073         * basic-long.cs: Add a test for the above.
10074
10075 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
10076
10077         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
10078         
10079         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
10080         code somewhat.
10081
10082 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
10083
10084         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
10085         exceptions.
10086
10087 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
10088
10089         * mini.c: Don't verify COM proxy invoke calls
10090         
10091
10092 2006-08-10  Dick Porter  <dick@ximian.com>
10093
10094         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
10095         which process is holding semaphores locked.
10096
10097 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
10098
10099         * mini-ia64.c mini-amd64.c: Fix #79027.
10100
10101         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
10102
10103         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
10104
10105         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
10106         implicit arguments in a vararg call. Fixes #79027.
10107
10108 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
10109
10110         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
10111         (mono_get_array_new_va_signature): Ditto.
10112
10113 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
10114
10115         * aot-runtime.c: Call init_plt lazily.
10116
10117         * inssel-long.brg: Fix unsigned long->int conversion.
10118
10119         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
10120
10121         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
10122         that most data is now in the .rss/.data section.
10123
10124 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
10125
10126         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
10127
10128         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
10129
10130         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
10131
10132         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
10133
10134         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
10135         virtual call. Fixes #79010.
10136
10137         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
10138         and use the result as the this argument in the real call.
10139
10140         * generics.2.cs: Add a new test for #79010.
10141         
10142 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
10143
10144         * mini-x86.c: Fix a warning.
10145
10146         * aot-compiler.c: Add a bunch of statistics.
10147
10148         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
10149
10150 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
10151
10152         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
10153
10154 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
10155
10156         * 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>.
10157
10158 2006-07-13  Miguel de Icaza  <miguel@novell.com>
10159
10160         * mini.c (mono_method_to_ir): Obtain the original method in the
10161         CIL stream and use this to perform validation.
10162
10163         Fixed: #78816
10164
10165 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
10166
10167         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
10168         (mono_arch_call_opcode): Ditto.
10169
10170         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
10171         #78826.
10172
10173         * mini.c (mono_patch_info_dup_mp): New helper function.
10174         
10175         * aot-compiler.c (compile_method): Fix some of the memory allocated during
10176         compilation. Fixes #78827.
10177
10178 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
10179
10180         * declsec.c: Use original security informations for
10181           MONO_WRAPPER_MANAGED_TO_MANAGED.
10182
10183 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
10184
10185         * mini.c: Allow Com Interop methods/classes and
10186         don't verify COM wrapper calls
10187         
10188
10189 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
10190
10191         * inssel-long32.brg: Fix long->i4 checked conversion.
10192
10193         * exceptions.cs: Add a test for the above.
10194
10195 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
10196
10197         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
10198
10199         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
10200         leaks.
10201
10202         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
10203         #78775.
10204
10205 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
10206
10207         * mini.c: Fix solaris/x86 exception handling.
10208
10209         * Makefile.am: Get rid of $(ICU_LIBS).
10210
10211 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
10212
10213         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
10214         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
10215         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
10216
10217         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
10218
10219         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
10220         this function causes a SIGSEGV.
10221
10222 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
10223
10224         * mini.c: Remove unused solaris/x86 includes.
10225
10226 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
10227
10228         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
10229
10230 2006-06-20  Jb Evain  <jbevain@gmail.com>
10231
10232         * cpu-g4.md: fix max length of start_handler instruction.
10233
10234 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
10235         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
10236
10237 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
10238         * ssa.c: Fixed bug 78653 for SSA based deadce.
10239         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
10240         MonoInst.flags, used in SSA based deadce.
10241         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
10242         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
10243
10244 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
10245
10246         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
10247         it can end up using non executable memory on ppc64 systems
10248         running ppc32 userspace (fix from Johannes Berg).
10249
10250 2006-06-14  Dick Porter  <dick@ximian.com>
10251
10252         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
10253         4.1.1
10254
10255 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
10256         * mini.c: Made so that inline is locally disabled if it would
10257         trigger a .cctor, because too many apps depend on this behavior
10258         (which seems to be also the one of the MS CLR).
10259
10260 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
10261
10262         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
10263         No idea why this worked before.
10264
10265         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
10266         which branch to outer exception clauses since they could skip the
10267         inner finally clauses. Fixes #78633.
10268
10269         * exceptions.cs: Add a test for the above.
10270
10271         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
10272         Fixes #78629.
10273
10274         * iltests.il: Add a test for the above.
10275
10276 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
10277
10278         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
10279         after the end of a try bblock, to prevent asserts in mini_method_compile ().
10280
10281         * iltests.il: Add a test for the above.
10282
10283 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
10284
10285         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
10286         
10287         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
10288         methods as instrinsics.
10289
10290 2006-06-09  Wade Berrier <wberrier@novell.com>
10291
10292         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
10293         (simple-cee-ops.h ssapre-mini-ops.h)
10294
10295 2006-06-09  Neale Ferguson <neale@sinenomine.net>
10296
10297         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
10298         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
10299         instruction).
10300         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
10301         * cpu-s390x.md: Fix max. length values for a couple of instructions.
10302
10303 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
10304
10305         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
10306
10307 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
10308
10309         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
10310         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
10311         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
10312         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
10313         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
10314         of opcodes, so that bug 78549 should not happen again.
10315         * ssapre.c: Updated to use the renamed files.
10316
10317 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
10318
10319         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
10320         in OP_ATOMIC_EXCHANGE_I4.
10321
10322 2006-06-07  Wade Berrier <wberrier@novell.com>
10323
10324         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
10325         in mono_debugger_create_notification_function)
10326
10327 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
10328
10329         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
10330         
10331         * mini.c (type_from_stack_type): Disable some changes which do not
10332         seem to work.
10333
10334         * driver.c: Reenable opts.
10335
10336         * mini.h (MonoStackSlot): New structure to keep track of the verification state
10337         of the evaluation stack.
10338         
10339         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
10340         evaluation stack trace at entry to the bblock.
10341
10342         * mini.c (merge_stacks): New function to perform verification of stack merges.
10343         Turned off by default.
10344
10345         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
10346         STACK_MP.
10347         
10348 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
10349
10350         * local-propagation.c: Fixed bug 78549.
10351
10352 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
10353
10354         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
10355
10356 2006-06-02  Miguel de Icaza  <miguel@novell.com>
10357
10358         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
10359         tramp-arm.c, tramp-ia64.c
10360         (mono_debugger_create_notification_function): Update signature to
10361         new signature and use new protocol for creating the notification
10362         function.  
10363
10364         Should fix the build.
10365
10366 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
10367
10368         * exceptions-ppc.c (mono_jit_walk_stack)
10369         (ves_icall_get_frame_info): Fix the build
10370
10371 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
10372
10373         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
10374
10375 2006-05-31  Raja R Harinath  <rharinath@novell.com>
10376
10377         * il2tests.2.il: New file for generics CIL tests.  Add test for
10378         #78019.
10379         * Makefile.am: Update.
10380
10381         Fix #78019
10382         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
10383         to nullable types.
10384
10385 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
10386
10387         * aliasing.c: Fixed bug 78311.
10388
10389 2006-05-29  Martin Baulig  <martin@ximian.com>
10390
10391         * mini-exceptions.c (mono_find_jit_info): When computing the
10392         native offset, check whether we're actually inside the method's
10393         code; call mono_debug_print_stack_frame() to format the frame.
10394         (ves_icall_System_Exception_get_trace): Call
10395         mono_debug_print_stack_frame() to format the stack frame.
10396         (ves_icall_get_trace): Update to the new debugging API.
10397         (mono_jit_walk_stack_from_ctx): Likewise.
10398         (ves_icall_get_frame_info): Likewise.
10399
10400         * mini.c (get_method_from_ip): Use the new debugging API.
10401         (mono_print_method_from_ip): Likewise.
10402
10403         * exceptions-ppc.c
10404         (mono_jit_walk_stack): Use the new debugging API.
10405         (ves_icall_get_frame_info): Likewise.   
10406
10407 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
10408
10409         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
10410
10411 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
10412
10413         * mini.c: Added "limitator" to inline for debugging.
10414
10415 2006-05-24  Martin Baulig  <martin@ximian.com>
10416
10417         * debug-debugger.c (mono_debugger_init): Create a private,
10418         malloc()-based code manager for the notification function and
10419         intentionally leak it on exit.  This fixes the crash-on-exit race
10420         condition.
10421
10422         * tramp-amd64.c
10423         (mono_debugger_create_notification_function): Added
10424         `MonoCodeManager *' argument.
10425
10426         * tramp-x86.c
10427         (mono_debugger_create_notification_function): Added
10428         `MonoCodeManager *' argument.
10429
10430 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
10431
10432         * aliasing.c: Fixed 64 bit issue.
10433         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10434         default since all known bugs are fixed (one more time!).
10435
10436 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10437
10438         * mini.c: write barrier support.
10439
10440 2006-05-23  Martin Baulig  <martin@ximian.com>
10441
10442         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
10443         check at the top of the file.
10444
10445 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
10446
10447         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
10448         reverting changes without reason and without changelog entries.
10449
10450 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
10451
10452         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
10453         to a few opcodes. Fixes #78439.
10454
10455         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
10456         consistency with other archs.
10457
10458         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
10459
10460 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10461
10462         * debug-debugger.c: fix the build.
10463
10464 2006-05-17  Martin Baulig  <martin@ximian.com>
10465
10466         * debug-debugger.c
10467         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
10468         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
10469         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
10470         (debugger_attach): Call GC_mono_debugger_add_all_threads().
10471
10472 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
10473
10474         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
10475
10476 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
10477
10478         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
10479         MONO_TYPE_GENERICINST.
10480         
10481         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
10482         MONO_TYPE_GENERICINST.
10483
10484 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
10485
10486         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
10487         #78325.
10488
10489 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
10490
10491         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
10492         mempool.
10493         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
10494
10495 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
10496
10497         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
10498         mono_trace_cleanup ().
10499
10500         * iltests.il: Fix problem with the newly added test.
10501
10502         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
10503         due to register constraints, free up the previous hreg. Fixes #78314.
10504
10505         * iltests.il: Add new test for #78314.  
10506
10507         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
10508         Interlocked.Add. Fixes #78312.
10509
10510         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
10511         
10512 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
10513
10514         * inssel.brg (mini_emit_virtual_call): Fix a warning.
10515
10516 2006-05-05  Martin Baulig  <martin@ximian.com>
10517
10518         * debug-mini.c (mono_debug_open_block): New method.
10519
10520         * mini-amd64.c
10521         (mono_arch_output_basic_block): Call mono_debug_open_block() at
10522         the beginning of each basic block.
10523
10524         * mini-x86.c
10525         (mono_arch_output_basic_block): Call mono_debug_open_block() at
10526         the beginning of each basic block.
10527
10528 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
10529
10530         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10531         default until I understand why they break the build on amd64.
10532
10533 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
10534
10535         * mini.c (mini_cleanup): Call mono_cleanup ().
10536
10537         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
10538         errors.
10539
10540 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
10541
10542         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
10543         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10544         default since all known bugs are fixed, and I cannot reproduce bug
10545         77944... I'm asking Matt Hargett to test again after this commit.
10546
10547 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
10548
10549         * mini-codegen.c: Fixed typo that thrashed inline.
10550
10551 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
10552
10553         * dominators.c (compute_dominators): Avoid using a worklist since
10554         it is not correct in some cases. Instead, iterate over all bblocks as
10555         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
10556
10557 2006-04-28  Miguel de Icaza  <miguel@novell.com>
10558
10559         * mini.c (mono_jit_compile_method_inner): Use
10560         mono_prepare_exception_from_error that resets the value
10561         internally.
10562
10563 2006-04-27  Miguel de Icaza  <miguel@novell.com>
10564
10565         * mini.c: Move the mini_loader_error_to_exception to metadata. 
10566         
10567 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
10568
10569         * aliasing.c: Fixed bug 78210.
10570
10571 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
10572
10573         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10574         default until all their problems (or the ones they trigger) are fixed.
10575
10576 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
10577
10578         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
10579         
10580         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
10581         as loaded only after resolving patches since that could invoke the same method.
10582
10583         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
10584
10585         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
10586         functions.
10587
10588         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
10589         AOT loader.
10590
10591         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
10592         stack.
10593
10594         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
10595         made from AOT code through the PLT table.
10596
10597         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
10598         holding the plt offset when a call is made to the aot plt trampoline.
10599         
10600 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
10601
10602         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
10603         amd64 AOT support.
10604
10605         * Makefile.am (common_sources): Fix build breakage.
10606
10607         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
10608         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
10609         intra-assembly calls if possible.
10610         
10611         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
10612
10613         * mini-trampolines.c: Handle PLT entries.
10614
10615         * mini.c: Avoid creating a GOT var for calls.
10616
10617         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
10618         from mscorlib code.
10619
10620         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
10621         from mscorlib code.
10622
10623         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
10624         AOT code.       
10625
10626         * mini.h: Bump AOT file format version.
10627         
10628         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
10629         covers more cases.
10630
10631 2006-04-25  Martin Baulig  <martin@ximian.com>
10632
10633         * driver.c: Disable copyprop, consprop and inline when running
10634         inside the debugger.
10635
10636 2006-04-25  Martin Baulig  <martin@ximian.com>
10637
10638         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
10639         with `get_current_thread' and added `detach'.
10640         (MonoDebuggerMetadataInfo): Added `thread_size',
10641         `thread_tid_offset', `thread_stack_ptr_offset' and
10642         `thread_end_stack_offset'.
10643
10644 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
10645
10646         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
10647         aot-runtime.c.
10648
10649         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
10650         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
10651
10652         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
10653
10654         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
10655
10656         * aot.c: Add support for ADJUSTED_IID.  
10657
10658 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
10659
10660         * aot.c (emit_method_order): Don't align method_order_end.
10661
10662         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
10663         the interface ID changes.
10664
10665 2006-04-21  Dick Porter  <dick@ximian.com>
10666
10667         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
10668         cleaning up a thread.  Fixes the new part of bug 77470.
10669
10670 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
10671
10672         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
10673         to managed wrapper.
10674                      
10675 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
10676
10677         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
10678         
10679         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
10680         SIGSEGV. Fixes #78072.
10681
10682         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
10683         unregister our SIGABRT handler.
10684
10685 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
10686
10687         * mini.c: Disabled inline where it can alter the call stack in a
10688         way visible from managed code.
10689         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
10690         default.
10691
10692 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
10693
10694         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
10695         on other platforms. Fixes #78089.
10696
10697 2006-04-13  Martin Baulig  <martin@ximian.com>
10698
10699         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
10700         determine whether we're inside the debugger.
10701
10702         * debug-debugger.h
10703         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
10704
10705 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
10706
10707         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
10708         handler clauses. Fixes #78024.
10709
10710         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
10711         in the CALL_MEMBASE opcodes. Fixes #78088.
10712         (mono_arch_get_vcall_slot_addr): Ditto.
10713
10714 2006-04-10  Martin Baulig  <martin@ximian.com>
10715
10716         * debug-debugger.c: The thread handling code has now been moved
10717         into ../metadata/threads.c.
10718
10719 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
10720
10721         * driver.c (mono_main): Fix --with-gc=none build.
10722
10723         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
10724         (mono_spillvar_offset_float): Ditto.
10725         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
10726         hreg, not when its !global, since on ia64, there is a third category: stacked
10727         registers.      
10728
10729 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
10730
10731         * mini.c: set MonoInst->klass for load field address and a few other
10732         places.
10733
10734 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
10735
10736         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
10737
10738 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
10739
10740         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
10741         the branch opt changes.
10742
10743 2006-04-06  Dick Porter  <dick@ximian.com>
10744
10745         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
10746         
10747         * wapihandles.c (mini_wapi_seminfo): 
10748         * driver.c (mono_main): Add semaphore info option
10749
10750 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
10751
10752         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
10753         branch optimization changes. Fixes #78009.
10754
10755 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10756
10757         * mini.c: ignore accessibility of methods in managed->native wrappers.
10758
10759 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
10760
10761         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
10762         
10763         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
10764
10765 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
10766
10767         * mini.c: Modify the branch optimizations to preserve the invariant that
10768         the entries inside the in_bb and out_bb arrays are unique.
10769         (mono_unlink_bblock): Avoid creation of new arrays.
10770
10771 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
10772
10773         * mini.c (mono_unlink_bblock): Fix regression caused by previous
10774         change (#77992).
10775
10776 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
10777
10778         * mini.c (optimize_branches): Remove the "optimizations" in
10779         the cbranch1/cbranch2 -> branch cases which were causing several
10780         problems in the past. Fixes #77986.
10781
10782 2006-03-31  Chris Toshok  <toshok@ximian.com>
10783
10784         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
10785         default optimizations :(
10786
10787 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
10788
10789         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
10790         branch.
10791
10792 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
10793
10794         * local-propagation.c: Added comments to structs and removed
10795         "Mono" prefixes from local tree mover types.
10796
10797 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
10798
10799         * Makefile.am (arch_sources): Define this for each architecture so 
10800         libmono_la_SOURCES is defined in one place.
10801
10802 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
10803
10804         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
10805         from handles/.
10806
10807 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
10808
10809         * driver.c: print the GC name supplied by configure.
10810
10811 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
10812
10813         * local-propagation.c: Added tree mover, and moved here all the
10814         local propagation code from mini.c
10815         * mini.c: Added support for treeprop, and moved all the local
10816         propagation code to local-propagation.c
10817         * mini.h: Added support for treeprop
10818         * driver.c: Added support for treeprop, enabled consprop, copyprop,
10819         treeprop, inline and deadce by default
10820         * Makefile.am: Added local-propagation.c
10821
10822 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
10823
10824         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
10825
10826 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
10827
10828         * debug-debugger.c: make it compile without the Boehm GC.
10829
10830 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
10831
10832         * mini.c: fixed issue with mismatch when an icall is registered
10833         with multiple names but same address.
10834
10835 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
10836
10837         * declsec.c, mini-exceptions.c: use write barrier to set reference
10838         fields of managed objects.
10839
10840 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
10841
10842         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
10843         (can_access_internals): Fix a warning.
10844
10845         * mini.c (print_method_from_ip): Rename this to 
10846         mono_print_method_from_ip so it gets exported.
10847
10848         * trace.c: Deal with strings inside StringBuilder's containing garbage
10849         and fix memory leaks. Fixes #77848.
10850
10851 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
10852
10853         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
10854         fixes #77787.
10855
10856 2006-03-16 Neale Ferguson <neale@sinenomine.net>
10857         
10858         * mini-s390.c: Remove OP_X86_TEST_NULL.
10859
10860 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
10861
10862         * mini.c: use the correct GetHashCode() for the moving collector.
10863
10864 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
10865
10866         * liveness.c: Regalloc spill cost tuning.
10867
10868 2006-03-15 Neale Ferguson <neale@sinenomine.net>
10869         
10870         * mini-s390x.h: Correct S390_LONG macro.
10871
10872         * mini-s390x.c: Cleanup unused code.
10873
10874 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
10875
10876         * jit-icalls.h: New file.
10877
10878         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
10879         icalls and include that instead of including jit-icalls.c.
10880
10881         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
10882         OP_X86 opcodes.
10883
10884 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
10885
10886         * mini.c: when checking for member accessibility, also check for
10887         friend assemblies and for explicit interface implementations.
10888
10889 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
10890
10891         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
10892
10893         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
10894
10895         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
10896         common cases are done first.    
10897
10898         * mini-ops.h: Only define platform specific opcodes on the given platform.
10899
10900         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
10901         branch.
10902         
10903 2006-03-14  Martin Baulig  <martin@ximian.com>
10904
10905         Revert Paolo's change from r57348:
10906
10907         * mini.h: don't use gboolean for bitfields.
10908         * mini.c: verifier changes for fields and methods accessibility.
10909
10910 2006-03-13  Neale Ferguson <neale@sinenomine.net>
10911
10912         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
10913
10914         * mini-s390x.c: Fix conv_r_un.
10915
10916         * cpu-s390, cpu-s390x.md: Fix lengths.
10917
10918 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
10919
10920         * mini.c: nested types have access to all the nesting
10921         levels, not just the enclosing types.
10922
10923 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
10924
10925         * mini.c: added a few more verification checks.
10926
10927 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
10928
10929         * liveness.c: Merge optimizations from the linear-il branch.
10930
10931 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
10932
10933         * mini-ia64.c (emit_call): Add a comment.
10934
10935         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
10936
10937         * tramp-ia64.c: Fix some warnings.
10938
10939 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
10940
10941         * mini.h: don't use gboolean for bitfields.
10942         * mini.c: verifier changes for fields and methods accessibility.
10943
10944 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
10945
10946         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
10947         lazy icall wrapper changes.
10948
10949         * dominators.c: Replace all the dominator algorithms with faster
10950         ones from the linear-il branch.
10951
10952         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
10953         the mempool.
10954
10955         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
10956         common cases are done first.
10957
10958         * mini-amd64.c: Fix some warnings.
10959
10960         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
10961         from the mempool.
10962
10963         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
10964         added code.
10965
10966         * mini.h: Add a missing prototype.
10967
10968 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
10969
10970         * mini.c: Compile icall wrappers lazily.
10971
10972         * mini-codegen.c: Use printf instead of g_print since its much faster.
10973
10974         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
10975         function.
10976
10977         * mini.c (optimize_branches): Cache the negative result from 
10978         remove_block_if_useless ().
10979
10980         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
10981         Also fix some bblock linking issues.
10982
10983         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
10984         assembly files.
10985
10986         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
10987
10988         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
10989         accessed fields first, for better cache behavior.
10990         
10991 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
10992
10993         * mini.c: speedup IList<T> array accesses.
10994
10995 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
10996
10997         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
10998         inline_costs counter. Fixes #77190.
10999
11000 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
11001
11002         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
11003         trace messages. Fixes #77706.
11004
11005 2006-03-04  Martin Baulig  <martin@ximian.com>
11006
11007         * tramp-amd64.c, tramp-x86.c
11008         (mono_debugger_create_notification_function): Use
11009         mono_global_codeman_reserve() to allocate a buffer at runtime and
11010         return it.
11011
11012         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
11013
11014         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
11015         notification function at runtime and then call `initialize' in the
11016         `MONO_DEBUGGER__debugger_info' vtable.
11017
11018 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
11019
11020         * iltests.il: Fix a visibility problem.
11021
11022 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11023
11024         * driver.c, mini.c: add hooks for the counters API.
11025
11026 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
11027
11028         * driver.c: show disabled options.
11029
11030 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
11031
11032         * linear-scan.c: always use cost-driven selection.
11033
11034 2006-02-28  Raja R Harinath  <rharinath@novell.com>
11035
11036         * jit-icalls.c (helper_compile_generic_method): Revert change from
11037         2006-02-24.
11038
11039 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
11040
11041         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
11042
11043 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
11044
11045         * inssel.brg: style fixes, mostly to force the updated monoburg
11046         to run for people using svn.
11047
11048 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
11049
11050         * mini.c: match monoburg changes.
11051
11052 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
11053
11054         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
11055         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
11056         declaration in the header file.
11057
11058 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
11059
11060         * helpers.c: reduce relocations and mem usage.
11061
11062 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
11063
11064         * mini.h, mini-codegen.c: disable logging features if
11065         requested by configure.
11066
11067 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
11068
11069         * mini.c: tiny verifier changes.
11070
11071 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11072
11073         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
11074         cpu-pentium.md: stack alignment changes for osx/x86,
11075         partially from Geoff Norton <gnorton@customerdna.com>.
11076
11077 2006-02-24  Raja R Harinath  <harinath@gmail.com>
11078
11079         * jit-icalls.c (helper_compile_generic_method): Update to changes
11080         in metadata/class.c.
11081
11082 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
11083         
11084         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
11085         
11086         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
11087         interface calls with large offsets.
11088
11089 2006-02-23  Raja R Harinath  <rharinath@novell.com>
11090
11091         * jit-icalls.c (helper_compile_generic_method): Document the
11092         special-case we depend on so that we can inflate the method twice
11093         with the same context with no bad side-effects.
11094
11095 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
11096
11097         * mini-x86.c, mini-amd64.c: fix for case when xen support
11098         is disabled.
11099
11100 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
11101
11102         * mini-x86.c, mini-amd64.c: generate code to access tls items
11103         in a faster way for Xen systems.
11104
11105 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11106
11107         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
11108         updates and compilation fixes for the OSX/x86 port, mostly from
11109         Geoff Norton <gnorton@customerdna.com>.
11110
11111 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
11112
11113         * inssel.brg: faster interface call implementation
11114         to sync with the interface_offsets MonoVTable changes.
11115
11116 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
11117
11118         * mini.c: more verification checks.
11119
11120 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
11121
11122         * mini.c: added a few more verification checks.
11123
11124 2006-02-17      Neale Ferguson <neale@sinenomine.net>
11125
11126         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
11127         facility on the processor and use it if available.
11128
11129 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11130
11131         * driver.c, aot.c, mini.c: throw exception if the IL code is
11132         invalid or unverifiable.
11133
11134 2006-02-17  Raja R Harinath  <rharinath@novell.com>
11135
11136         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
11137         m.StructField.
11138
11139 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
11140
11141         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
11142
11143 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11144
11145         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
11146         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
11147         handling of instantiated generic valuetypes.
11148
11149 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
11150
11151         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
11152         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
11153         instead.
11154
11155         * generics.2.cs: Revert the nullable reftypes tests.
11156
11157 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
11158
11159         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
11160         using __builtin_frame_address (1) as it doesn't work in the presence
11161         of optimizations. Hopefully fixes #77273.
11162
11163         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
11164         -> generics.cs change as it doesn't work with some automake versions.
11165
11166 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
11167
11168         * mini.c: handle systems that sue a different way to
11169         retrieve the stack address of the current thread.
11170
11171 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
11172
11173         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
11174         it specially in the makefile.
11175
11176         * generics.2.cs: Add tests for nullable reference types.
11177
11178 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11179
11180         * mini.c: always handle the case when mono_jit_init()
11181         is called in a thread different from the main thread,
11182         confusing libgc (bug #77309).
11183
11184 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
11185
11186         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
11187
11188 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
11189
11190         * mini.c: change optimize_branches () to use a single loop
11191         and introduce a new optimization to simplify some range checks.
11192
11193 2006-02-03  Martin Baulig  <martin@ximian.com>
11194
11195         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
11196         and merged with debugger_thread_manager_add_thread().
11197         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
11198         inform the debugger about the main thread.
11199
11200 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
11201
11202         * basic.cs: Add test for div.un/rem.un constant folding.
11203
11204 2006-02-03  Neale Ferguson <neale@sinenomine.net>
11205
11206         * cpu-s390x.md: correct int_xor_imm length
11207
11208 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
11209
11210         * generics.2.cs: New test for #77442.
11211
11212         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
11213         #77442.
11214
11215 2006-02-02  Martin Baulig  <martin@ximian.com>
11216
11217         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
11218         <mono/metadata/mono-debug-debugger.h>   
11219
11220         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
11221
11222 2006-02-02  Martin Baulig  <martin@ximian.com>
11223
11224         * debug-debugger.h: New header file for debug-debugger.c.
11225
11226         * debug-debugger.c: Big API cleanup; don't run the managed Main()
11227         function is a separate thread anymore; add support for attaching.
11228
11229 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
11230
11231         * tramp-x86.c: Fix a warning.
11232
11233 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
11234
11235         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
11236         on very large methods.
11237
11238         * aot.c (load_patch_info): Fix a warning.
11239
11240 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
11241
11242         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
11243         mini-ops.h: alu membase optimizations.
11244
11245 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
11246
11247         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
11248         to speedup StringBuilder.
11249
11250 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
11251
11252         * dominators.c (mono_compute_natural_loops): Fix detection of
11253         loop body start blocks.
11254
11255         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
11256
11257 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
11258
11259         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
11260         #75145.
11261
11262 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
11263
11264         * aliasing.c: Fixed aliasing issue on 64 bit archs.
11265
11266 2006-01-25  Martin Baulig  <martin@ximian.com>
11267
11268         * debug-debugger.c: Moved the `MonoDebuggerManager' and
11269         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
11270         started to cleanup this file a little bit.
11271
11272 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
11273
11274         * mini.c: optimize a codepath frequently happening in generics code.
11275
11276 2006-01-23  Martin Baulig  <martin@ximian.com>
11277
11278         * Makefile.am: Only compile debug-debugger.c on supported platforms.
11279
11280         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
11281         functions directly.
11282
11283         * driver.c: debug-debugger.c is only available if
11284         `MONO_DEBUGGER_SUPPORTED' is defined.   
11285
11286 2006-01-23  Martin Baulig  <martin@ximian.com>
11287
11288         * debug-debugger.c: Only enable this on platforms where the Mono
11289         Debugger is working (x86 and x86_64).
11290
11291 2006-01-21  Martin Baulig  <martin@ximian.com>
11292
11293         The Mono Debugger is now using the normal `mono' instead of the
11294         `mono-debugger-mini-wrapper' when executing managed code.
11295
11296         * debug-debugger.c: New file; previously known as
11297         debugger/wrapper/wrapper.c.
11298
11299         * debug-mini.c (mono_init_debugger): Removed.
11300
11301         * driver.c (mono_main): Added new `--inside-mdb' command line
11302         argument which is used when running inside the debugger.
11303
11304 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
11305
11306         * liveness.c (mono_analyze_liveness): Remove some unused data
11307         structures.
11308
11309 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
11310
11311         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
11312
11313 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
11314
11315         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
11316         depends on implementation details of monobitset.
11317
11318         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
11319         Fixes #77271.
11320
11321 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
11322
11323         * liveness.c: Update after monobitset changes.
11324
11325 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
11326
11327         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
11328
11329 2006-01-11 Neale Ferguson <neale@sinenomine.net>
11330
11331         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
11332
11333         * mini-s390x.c: Remove warning messages.
11334
11335 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
11336
11337         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
11338
11339 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
11340
11341         * generics.2.cs: Add ldelem/stelem_any test.
11342
11343 2006-01-10 Neale Ferguson <neale@sinenomine.net>
11344
11345         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
11346
11347 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
11348
11349         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
11350         
11351 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
11352
11353         * generics.2.cs: Reenable vtype tests.
11354
11355         * inssel-x86.brg: Remove an icorrect valuetype rule.
11356
11357 2006-01-06 Neale Ferguson <neale@sinenomine.net>
11358
11359         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
11360         initial support for OP_ABS.
11361
11362 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11363
11364         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
11365
11366 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11367
11368         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
11369         conversion and implement LADD/LSUB.
11370
11371         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
11372         architectures.
11373
11374 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11375
11376         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
11377
11378         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
11379         architectures.
11380
11381 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11382
11383         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
11384         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
11385         (stack walk problem).
11386
11387 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
11388
11389         * aot.c (mono_aot_load_method): Fix a warning.
11390
11391 2006-01-03  Neale Ferguson <neale@sinenomine.net>
11392
11393         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
11394
11395 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
11396
11397         * iltests.il: Add test for #77148.
11398
11399         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
11400         #77148.
11401
11402 2006-01-03  Neale Ferguson <neale@sinenomine.net>
11403
11404         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
11405
11406 2006-01-03  Neale Ferguson <neale@sinenomine.net>
11407
11408         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
11409         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
11410
11411         * basic-long.cs: Add lconv-to-r4/r8 tests.
11412
11413 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
11414
11415         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
11416
11417         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
11418         here as on other archs.
11419
11420 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11421
11422         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
11423
11424 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11425
11426         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
11427         
11428         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
11429
11430         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
11431         instrument_prolog; Add memory_barrier instruction.
11432
11433 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
11434
11435         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
11436
11437 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
11438
11439         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
11440
11441         * aliasing.c inssel.brg: Fix warnings.
11442
11443         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
11444         could skip initialization of some parts of memory.
11445
11446         * mini.c mini-ia64.c: Fix warnings.
11447
11448         * inssel-sparc.brg: Add an implementation of lneg which actually works.
11449
11450 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
11451
11452         * aliasing.c (mono_build_aliasing_information): Add a workaround for
11453         a crash seen on sparc.
11454
11455         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
11456         
11457         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
11458
11459 2005-12-21 Neale Ferguson <neale@sinenomine.net>
11460
11461         * mini-ops.h: Add s390_backchain instruction
11462
11463         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
11464
11465         * cpu-s390.md: Add s390_backchain instruction
11466
11467         * mini-s390.c: Significant ABI changes
11468
11469         * mini-s390.h: Cater for zero length structures
11470
11471 2005-12-20 Neale Ferguson <neale@sinenomine.net>
11472
11473         * mini-s390.c: ABI fixes
11474
11475         * inssel-s390.brg: Remove debug statements
11476
11477         * cpu-s390.md: Fix length of ATOMIC_xx operations
11478
11479 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
11480
11481         * basic-float.cs: Add float<->long conversion tests.
11482
11483 2005-12-16 Neale Ferguson <neale@sinenomine.net>
11484
11485         * mini-s390.c: Fix LOCALLOC processing.
11486
11487         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
11488
11489 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
11490
11491         * iltests.il: Add tests for some opcodes not covered by the other
11492         tests.
11493
11494 2005-12-15 Neale Ferguson <neale@sinenomine.net>
11495
11496         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
11497         register loading for Tail processing; Correct trace output.
11498
11499         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
11500
11501         * cpu-s390.md: Correct size of jmp instruction. 
11502
11503 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11504
11505         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
11506
11507 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11508
11509         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
11510           Bring s390 up to current level.
11511
11512 2005-12-12  Zltan Varga  <vargaz@gmail.com>
11513
11514         * generics.2.cs: Disable the newly added tests as they do not work yet.
11515         
11516         * generics.2.cs: Add valuetype tests.
11517
11518 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
11519
11520         * basic-long.cs: Add i4->u8 test.
11521
11522         * objects.cs: Add tests for JIT intrinsic.
11523
11524         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
11525         optimizations lost by a mistake.
11526
11527 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
11528
11529         * basic-long.cs: Remove a test moved to objects.cs.
11530
11531         * arrays.cs: Add more array tests.
11532
11533 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
11534
11535         * arrays.cs: Add new tests for multi-dimensional arrays.
11536
11537 2005-12-06  Raja R Harinath  <rharinath@novell.com>
11538
11539         * Makefile.am (test_sources2): Add generics.2.cs.
11540         (EXTRA_DIST): Add test_sources2.
11541
11542 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
11543
11544         Support for boxing and unboxing nullable types as well as the
11545         isinst operation on nullables, per the CLI ammendment.
11546
11547         * inssel.brg (CEE_ISINST): Special case for nullable
11548
11549         * mini.c (handle_unbox_nullable): new method
11550         (handle_box): Special case for nullable types
11551         (mono_method_to_ir): Call handle_unbox_nullable in correct
11552         places.
11553
11554         * generics.2.cs: New test suite
11555
11556         * Makefile.am: Support for regression tests with generics.
11557
11558 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
11559
11560         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
11561         allocated to registers. Fixes #76800.
11562
11563 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
11564
11565         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
11566
11567 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
11568
11569         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
11570         of platforms.
11571
11572 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
11573
11574         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
11575         objects.cs.
11576
11577         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
11578         
11579         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
11580 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
11581
11582         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
11583         single precision before storing to a single precision location.
11584
11585 2005-11-28  Raja R Harinath  <rharinath@novell.com>
11586
11587         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
11588
11589 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
11590
11591         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
11592         correct files.
11593
11594         * basic.cs: Remove test_0_byte_compares test which was moved to
11595         objects.cs a long time ago.
11596
11597 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
11598
11599         * aliasing.c: Fixed aliasing issue on 64 bit archs.
11600
11601 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
11602
11603         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
11604         handlers are called.
11605
11606         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
11607         throwing code.
11608
11609          * mini-ia64.c: Add support for the throw->branch exception 
11610         optimization.   
11611
11612         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
11613
11614 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
11615
11616         * mini.c: Enabled "fastpath" deadce :-)
11617         
11618 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
11619
11620         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
11621         alias analysis pass to support it.
11622         * mini.h: Likewise.
11623         * ssa.c: Likewise.
11624         * liveness.c: Likewise (liveness computation can use aliasing
11625         information to be more accurate).
11626         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
11627         moreover made so that "--compile-all" uses the given optimization
11628         flags and not the default ones.
11629         * aliasing.c: Alias analysis (new file).
11630         * aliasing.h: Likewise.
11631         * Makefile.am: added "aliasing.c" and "aliasing.h".
11632         
11633 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
11634
11635         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
11636         OP_L opcodes.
11637
11638 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
11639
11640         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
11641         fp >= end_of_stack exit condition, as it is not needed, and it might
11642         become true for fp eliminated frames.
11643
11644 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
11645
11646         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
11647         coded offsets.
11648
11649 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
11650
11651         * mini-arm.c: fixed alignment of doubles/longs to match
11652         the C ABI (bug #76635).
11653
11654 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
11655
11656         * aot.c: fix compilation with --enable-minimal=aot.
11657
11658 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
11659
11660         * mini-arm.c: fixed compatibility with the new
11661         floating point emulator package for compares.
11662
11663 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
11664
11665         * mini.c : reverted sig->pinvoke changes (r51396-51397).
11666
11667 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
11668
11669         * mini-exceptions.c (print_stack_frame): Output to stderr.
11670         (mono_handle_native_sigsegv): Ditto.
11671
11672 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
11673
11674         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
11675         OP_LCONV_TO_OVF_I implementation.
11676
11677         * mini-amd64.c: Add support for the throw->branch exception 
11678         optimization.
11679
11680         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
11681         when the catch clause catches a more general exception, i.e. Object.
11682
11683 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
11684
11685         * cpu-ia64.md: Remove unused opcodes.
11686
11687         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
11688         specific defines for architectures defining USE_SIGACTION.
11689
11690         * mini-ia64.c: Fix some warnings.
11691
11692         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
11693         version seemed to skip a frame.
11694
11695 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
11696
11697         * mini.c: Clean up the usage of sig->pinvoke flag. Now
11698         only calls which are made to native code use this flag.
11699
11700 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
11701
11702         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
11703         varargs methods as well.
11704         
11705         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
11706         which have save_lmf set. Reorganize methods prologs a bit.
11707
11708         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
11709         debugger to the proper place.
11710
11711 2005-10-29  Martin Baulig  <martin@ximian.com>
11712
11713         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
11714         when running inside the debugger until the debugger has support
11715         for it.
11716
11717 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
11718
11719         * mini.h: Fix a warning.
11720
11721 2005-10-24  Miguel de Icaza  <miguel@novell.com>
11722
11723         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
11724         we expose publicly, this returns the string.
11725
11726 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
11727
11728         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
11729         with fp elimination.
11730
11731 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
11732
11733         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
11734         native stacktrace using the glibc 'backtrace' function if available.
11735
11736 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
11737
11738         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
11739
11740         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
11741         handle SIGSEGVs received while in native code.
11742
11743         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
11744         code, call mono_handle_native_sigsegv which will abort the runtime
11745         after printing some diagnostics, instead of converting it into a
11746         confusing NullReferenceException.
11747
11748 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
11749
11750         * cpu-pentium.md: Remove unused opcodes.
11751
11752 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
11753
11754         * mini-amd64.h (MonoLMF): Add rsp field.
11755
11756         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
11757         the lmf too.
11758
11759 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
11760
11761         * mini-codegen.c (get_register_spilling): Fix some warnings.
11762
11763 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
11764
11765         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
11766         elimination during exception handling. Enable fp elimination by
11767         default.
11768
11769         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
11770         elimination.
11771
11772 2005-10-16  Martin Baulig  <martin@ximian.com>
11773
11774         * mini-exceptions.c
11775         (mono_debugger_run_finally): New public method for the debugger.
11776
11777 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
11778
11779         * debug-mini.c (mono_debug_init_method): Fix warning.
11780
11781         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
11782         the 'exname' parameter const to fix some warnings.
11783
11784 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
11785
11786         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
11787         introduced by the previous patch.
11788
11789 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
11790
11791         * basic-float.cs: Add test for precision of float arithmetic.
11792
11793         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
11794         when loading/storing single values from/to memory.
11795
11796         * mini.c (mono_jit_compile_method_with_opt): Create the function
11797         pointers in the correct domain.
11798
11799 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
11800
11801         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
11802         introduced by previous patch.
11803         
11804         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
11805         when out_filter_idx is NULL.
11806
11807         * mini-exceptions.c: Don't run filter clauses twice during exception
11808         handling. Fixes #75755.
11809
11810 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
11811
11812         * aot.c: Add support for ldflda wrappers.
11813
11814         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
11815         #75902.
11816
11817 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
11818
11819         * mini.c, mini.h: do not consider exception handlers blocks when
11820         setting up interface variables.
11821
11822 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
11823
11824         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
11825
11826 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
11827
11828         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
11829         causes a regression.
11830
11831         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
11832
11833 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
11834
11835         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
11836         of the OP_P definitions.
11837
11838         * TODO: Add a proposal for dealing with the CEE/OP mess.
11839
11840         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
11841         optimizations from the x86 port.
11842
11843         * cpu-amd64.md: Ditto.
11844
11845         * basic.cs basic-long.cs: Add tests.
11846
11847 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
11848
11849         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
11850         Patrik Torstensson's implementation of my exception-handling
11851         optimization idea, when the exception object is not used
11852         (bug #62150).
11853
11854 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
11855
11856         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
11857         of the mul_imm optimizations from the old jit.
11858
11859 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
11860
11861         * mini.c, liveness.c: patch by Patrik Torstensson and
11862         Zoltan Varga to improve performance in methods with
11863         exception clauses.
11864
11865 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
11866
11867         * driver.c: Remove 'Globalization' entry from --version.
11868
11869 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
11870
11871         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
11872         there is a profiler interested in JIT events.
11873
11874         * aot.c: Load profile files produced by the AOT profiling module, and
11875         reorder methods based on the profiling info. Add a 'method_order' table
11876         to the AOT file to make mono_aot_find_jit_info work with the reordered
11877         methods.
11878
11879         * mini.h: Bump AOT file version info.
11880
11881 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
11882
11883         * mini-arm.h: work around what looks like a gcc bug when optimizations
11884         are enabled.
11885
11886 2005-09-28  Raja R Harinath  <rharinath@novell.com>
11887
11888         * Makefile.am (AM_CFLAGS): Don't use += to append inside
11889         conditionals.  Use ...
11890         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
11891
11892 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
11893
11894         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
11895         to determine the amount of memory to copy when passing valuetypes.
11896
11897         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
11898         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
11899
11900 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
11901
11902         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
11903         information about aot.
11904
11905 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
11906
11907         * *.c: Replace the use of {Enter,Leave}CriticalSection with
11908         macros. This will allow a deadlock debugger to easily be plugged
11909         in.
11910
11911 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
11912
11913         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
11914
11915 2005-09-27  Raja R Harinath  <rharinath@novell.com>
11916
11917         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
11918         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
11919         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
11920         ($(arch_built)) [CROSS_COMPILING]: Error out.
11921
11922 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
11923
11924         * aot.c: Add support for the no_special_static flag for classes.
11925
11926 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
11927
11928         * Reapply reverted patches.
11929
11930         * *: Revert r50174 as well.
11931
11932         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
11933
11934 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
11935
11936         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
11937
11938 2005-09-23  Miguel de Icaza  <miguel@novell.com>
11939
11940         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
11941         part of the SIG_HANDLER_SIGNATURE.  
11942
11943 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
11944
11945         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
11946         statistics.
11947
11948         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
11949         introduced by previous patch.
11950
11951 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
11952
11953         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
11954         saved registers too.
11955
11956         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
11957         upon the information returned by get_call_info ().
11958         
11959         * mini-x86.c (add_float): Fix stack size calculation.
11960         (mono_arch_call_opcode): Rewrite this so it works based up the
11961         information returned by get_call_info ().
11962         (mono_arch_get_this_vret_args): Ditto.
11963
11964 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
11965
11966         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
11967         in cinfo to determine the registers which need to be used.
11968
11969 2005-09-20  Miguel de Icaza  <miguel@novell.com>
11970
11971         * driver.c (mono_main): Add --server and --desktop flags. 
11972
11973 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
11974
11975         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
11976         registers as global registers.
11977
11978         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
11979         longer needed with the new register allocator.
11980
11981         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
11982
11983         * cpu-ia64.md: Remove unused opcodes.
11984         
11985         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
11986         
11987 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
11988
11989         * cpu-amd64.md: Remove unused opcodes.
11990
11991         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
11992         needed with the new register allocator.
11993
11994         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
11995         reg-reg moves.
11996
11997 2005-09-16  Raja R Harinath  <rharinath@novell.com>
11998
11999         * Makefile.am (check-local): Don't invoke semdel-wrapper.
12000
12001 2005-09-16  Martin Baulig  <martin@ximian.com>
12002
12003         * exceptions-amd64.c
12004         (throw_exception): Don't call mono_debugger_throw_exception() if
12005         we're a rethrow - see the FIXME in the code.
12006
12007 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
12008
12009         * mini.c (mono_init_exceptions): This only works on some architectures.
12010         
12011 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
12012
12013         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
12014         on ia64.
12015
12016         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
12017
12018         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
12019         now in mini-exceptions.c.
12020
12021 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
12022
12023         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
12024         now in mini-exceptions.c.
12025
12026 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
12027
12028         * exceptions-x86.c: Applied patch from Patrik Torstensson 
12029         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
12030
12031         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
12032         code into mini-exceptions.c. Add some assertions to it.
12033
12034 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
12035
12036         * aot.c (emit_section_change): Applied patch from "The Software Team" 
12037         (<software@solmersa.com>). Fix as errors on windows.
12038
12039 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
12040
12041         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
12042         method info into the LMF.
12043
12044 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
12045         
12046         * mini-ia64.c: Add proper unwind info for method epilogs.
12047
12048         * exceptions-ia64.c: Add some code to help debugging.
12049         
12050         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
12051
12052         * mini-exceptions.c: Fix warning.
12053
12054 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
12055
12056         * mini.c: Really fix build.
12057
12058         * mini-x86.c mini-amd64.c: Fix build.
12059
12060 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
12061
12062         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
12063
12064         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
12065         some Interlocked methods as intrinsics.
12066
12067         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
12068         for Thread methods as well.
12069
12070         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
12071
12072         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
12073
12074         * mini-ia64.c mini-x86.c mini-amd64.c 
12075         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
12076         OP_MEMORY_BARRIER.
12077         
12078         * mini.c (mono_init_exceptions): Fix build breakage.
12079
12080 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
12081
12082         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
12083         of instructions. Use the new ia64_unw_op macros for emitting unwind
12084         info.
12085
12086         * mini.c (mono_init_exceptions): Initialize exception handling
12087         related trampolines at startup.
12088
12089 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
12090
12091         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
12092
12093 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
12094
12095         * mini.c: Handle type loading errors gracefully during compilation and
12096         throw the appropriate exception.
12097
12098 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
12099
12100         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
12101         for the mono binary.
12102
12103 2005-09-09  Martin Baulig  <martin@ximian.com>
12104
12105         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
12106         the release.
12107
12108 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12109
12110         * mini-arm.h: use emulation for conv.r.un for the release.
12111
12112 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12113
12114         * mini-arm.c, objects.cs: more fixes and tests for them.
12115
12116 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12117
12118         * mini-arm.c: align structures to at least 4 bytes to be able
12119         to keep our current optimized memcpy.
12120
12121 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
12122
12123         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
12124
12125 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12126
12127         * mini.c: ignore SIGPIPE.
12128
12129 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
12130
12131         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
12132
12133         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
12134
12135 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
12136
12137         * mini.h: Add prototype for mono_allocate_stack_slots_full.
12138
12139 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12140
12141         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
12142         exception handling support.
12143         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
12144         patch by Brian Koropoff <briank@marakicorp.com>).
12145
12146 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
12147
12148         * mini.c: revert another 'optimization' which breaks when
12149         items on the eval stack need to be saved at a basic block end
12150         (bug #75940).
12151
12152 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12153
12154         * jit-icalls.c: for arrays, ensure we always provide
12155         lower bounds.
12156
12157 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
12158
12159         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
12160         
12161         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
12162
12163 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
12164
12165         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
12166         arguments in their original register.
12167
12168 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
12169
12170         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
12171         memset/memcpy.
12172
12173         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
12174         when ssapre is enabled.
12175
12176         * inssel-long.brg: Fix bug in previous patch.
12177
12178         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
12179         multiplication by a constant.
12180
12181 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
12182
12183         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
12184         icc.
12185
12186         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
12187         saving registers.
12188
12189 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
12190
12191         * inssel-arm.brg: apply changes tested by Brian Koropoff
12192         <briank@marakicorp.com>.
12193
12194 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
12195
12196         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
12197         
12198 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
12199
12200         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
12201         to the same register if dreg is just a base register.
12202         (print_ins): Improve printing of membase opcodes.
12203
12204         * inssel-x86.brg: Add optimized ldind(reg) rules.
12205
12206         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
12207
12208 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
12209
12210         * mini.c: when running under valgrind, set the stack bottom for
12211         the GC at the actual approximate stack for the app (fixes running
12212         mono with valgrind).
12213
12214 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
12215
12216         * mini.c: do no break at the first valuetype to init found
12217         (fixes bug #75791).
12218
12219 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
12220
12221         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
12222
12223 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
12224
12225         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
12226
12227 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
12228
12229         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
12230
12231 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12232
12233         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
12234
12235         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
12236         code.
12237
12238         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
12239         code.
12240
12241         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
12242         methods.
12243
12244 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
12245
12246         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
12247
12248 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12249
12250         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
12251         in the tail recursion optimization.
12252
12253         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
12254         debug info into the assembly file.
12255
12256         * iltests.il: Add test for filter regions.
12257
12258         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
12259         initial stack of filter regions. Fixes #75755.
12260
12261 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
12262
12263         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
12264         stack requirements.
12265
12266 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12267
12268         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
12269         the check for an already compiled method on non-ia64 platforms.
12270         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
12271         proper domain.
12272
12273         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
12274
12275         * inssel-x86.brg: Add some optimized call rules.
12276
12277 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
12278
12279         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
12280         method here.
12281
12282         * mini.h mini-trampolines.c: Pass the trampoline argument to 
12283         mono_arch_patch_delegate_trampoline.
12284
12285         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
12286
12287         * mini-trampolines.c: Fix build.
12288
12289         * mini-amd64.h: Add delegate trampolines.
12290
12291         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
12292
12293         * inssel-amd64.brg: Add optimized call rules.
12294         
12295         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
12296
12297         * inssel-ia64.brg: Add optimized ldind(reg) rules.
12298
12299 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
12300
12301         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
12302         change.
12303
12304         * mini-ia64.c: Remove LMF fixmes.
12305
12306         * mini-ia64.h: Remove most fields from LMF.
12307
12308         * inssel-ia64.brg (stmt): Fix unaligned access errors.
12309
12310         * mini-trampolines.c: Add support for IA64 function descriptors.
12311
12312         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
12313         for IA64 function descriptors.
12314
12315 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
12316
12317         * tramp-arm.c: patch the vtable for virtual calls. Added
12318         support code to register/unregister the LMF.
12319         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
12320         more LMF work.
12321
12322 2005-08-19  Dick Porter  <dick@ximian.com>
12323
12324         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
12325         bit value if needed.
12326
12327 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
12328
12329         * mini.c (mini_get_method): Move handling of wrapper data here.
12330
12331         * mini.c (mono_method_to_ir): Add support for dynamic methods.
12332
12333         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
12334         virtual.
12335
12336         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
12337         bblock->code does not remain empty.
12338
12339 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
12340
12341         * arrays.cs: Add regression test for #75832.
12342
12343         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
12344         rules. Fixes #75832.
12345
12346         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
12347         instruction scheduling.
12348
12349 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
12350
12351         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
12352
12353 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
12354
12355         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
12356
12357         * mini-codegen.c: Fix VC build.
12358
12359         * cpu-pentium.md: Increase length of atomic_exhange_i4.
12360
12361 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12362
12363         * mini.h: fix signature for mono_register_opcode_emulation.
12364
12365 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
12366
12367         * mini.c: Get rid of most of the helper_sig_... constants using
12368         mono_create_icall_signature ().
12369
12370 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
12371
12372         * jit-icalls.c (helper_ldstr): New helper function.
12373
12374         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
12375
12376         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
12377         throw, load the string using a helper call instead of creating a string object.
12378
12379         * aot.c: Update after LDSTR changes.
12380
12381         * mini.h: Bump AOT file version.
12382         
12383         * aot.c: Save class size info into the AOT file. Print more statistics during
12384         compilation.
12385
12386         * mini.h: Bump AOT file version.
12387
12388         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
12389         ordering of disasm cases. Fixes #74957.
12390
12391 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
12392
12393         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
12394         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
12395         the generic code needed for the ARM port.
12396
12397 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
12398
12399         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
12400         inssel-arm.brg: more ARM features and fixes.
12401
12402 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
12403
12404         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
12405         ARM port work in progress.
12406
12407 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
12408
12409         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
12410
12411         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
12412
12413         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
12414
12415         * inssel.brg (mini_emit_memset): Add support for unaligned access.
12416
12417         * *-ia64.*: Ongoing IA64 work.
12418         
12419         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
12420
12421 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
12422
12423         * TODO: Remove out-of-data todo stuff.
12424
12425         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
12426         dead code.
12427
12428         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
12429
12430         * mini.h: Bump corlib version.
12431
12432 2005-07-27  Martin Baulig  <martin@ximian.com>
12433
12434         * mini-codegen.c
12435         (create_copy_ins): Added `const unsigned char *ip' argument; set
12436         `copy->cil_code' from it.
12437
12438 2005-07-27  Martin Baulig  <martin@ximian.com>
12439
12440         * mini-exceptions.c (mono_handle_exception): Don't call
12441         mono_debugger_handle_exception() for filters.
12442
12443 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
12444
12445         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
12446         as well.
12447
12448 2005-07-26  Martin Baulig  <martin@ximian.com>
12449
12450         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
12451
12452         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
12453         helper_compile_generic_method() if the method is actually virtual
12454         and non-final.
12455
12456 2005-07-26  Martin Baulig  <martin@ximian.com>
12457
12458         * mini.c
12459         (trampoline_code): Renamed to `mono_trampoline_code' and made it
12460         public; this is now accessed directly by the debugger.
12461         (mono_generic_trampoline_code): Removed.
12462
12463         * debug-mini.c
12464         (mono_debug_init_method): Also add interncalls and wrappers.
12465
12466 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
12467
12468         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
12469
12470 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
12471
12472         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
12473
12474 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
12475
12476         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
12477
12478 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
12479
12480         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
12481         getting TLS offsets on AMD64 too.
12482
12483 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
12484
12485         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
12486
12487 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
12488
12489         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
12490         inssel-arm.brg, mini-arm.h: ARM port work in progress.
12491
12492 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
12493
12494         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
12495
12496         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
12497         to mini.c.
12498
12499         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
12500         mono_sparc_is_virtual_call ().
12501         
12502         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
12503
12504         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
12505         trampoline parameters.
12506
12507         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
12508         
12509         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
12510         to mono_arch_get_vcall_slot_addr.
12511
12512         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
12513         trampoline code.
12514
12515         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
12516
12517 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
12518
12519         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
12520
12521 2005-07-19  Martin Baulig  <martin@ximian.com>
12522
12523         * exceptions-amd64.c (throw_exception): Call
12524         mono_debugger_throw_exception() here like we're doing it on i386.
12525
12526 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
12527
12528         * mini-ia64.c: Add optimized TLS access support.
12529
12530 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
12531
12532         * mini-exceptions.c: Ongoing IA64 work.
12533
12534         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
12535
12536         * mini.c: Use the default optimization set when embedding. Fixes
12537         #75194.
12538
12539 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
12540
12541         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
12542         of trampolines to a separate file.
12543
12544         * mini-trampolines.c: New file.
12545
12546         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
12547         separate file.
12548         
12549         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
12550         amd64/ia64 code.
12551
12552         * mini-codegen.c: Fix cygwin build.
12553
12554 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
12555
12556         * mini.c: Add some minor changes needed by the IA64 port.
12557
12558         * *-ia64.*: Ongoing IA64 work.
12559
12560 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
12561
12562         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
12563         trampolines into arch-independent and arch-dependent parts.
12564
12565         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
12566
12567 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
12568
12569         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
12570
12571         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
12572         the xp-regalloc-branch for amd64.
12573
12574         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
12575         xp-regalloc-branch for x86.
12576
12577 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
12578
12579         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
12580
12581 2005-07-06  Martin Baulig  <martin@ximian.com>
12582
12583         * mini.c
12584         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
12585         (mono_jit_runtime_invoke): Likewise.
12586
12587 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
12588
12589         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
12590         on x86 too.
12591         
12592         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
12593         without loading their metadata. Reorganize the file format so exception handling+
12594         debug info is kept separate from normal method info. Create MonoJitInfo 
12595         structures for methods lazily.
12596
12597         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
12598         loading metadata.
12599         (x86_class_init_trampoline): Patch AOT class init trampolines too.
12600
12601         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
12602
12603         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
12604         in AOT code.
12605
12606         * mini.h: Bump AOT file version.
12607
12608 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
12609
12610         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12611
12612 2005-07-01  Raja R Harinath  <rharinath@novell.com>
12613
12614         * Makefile.am (check-local): Call semdel-wrapper.
12615
12616 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
12617
12618         * mini-x86.c: Revert the last change as it seems to break the build..
12619
12620 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
12621
12622         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12623         
12624         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
12625
12626 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
12627
12628         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
12629         outside of the macro, so strange stuff doesn't happen with gcc4
12630         (NEW_AOTCONST_TOKEN): Likewise.
12631
12632 2005-06-28  Martin Baulig  <martin@ximian.com>
12633
12634         * mini.c (mini_class_is_system_array): New static method; use this
12635         instead of `klass->parent == mono_defaults.array_class' everywhere
12636         since this also works for the new generic array class.
12637
12638 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
12639
12640         * inssel.brg: Remove warnings.
12641
12642 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
12643
12644         * mini-ia64.c: Ongoing IA64 work.
12645
12646         * basic-float.cs: Add float->i1 conversion test.
12647
12648         * iltests.il: Add conv.u4 test.
12649
12650 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
12651
12652         * inssel-long.brg: Fix bug caused by last change.
12653
12654 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
12655
12656         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
12657         BSDs.  Allows the x86 JIT to work on OSX86
12658
12659 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
12660
12661         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
12662         u4->i8 conversion.
12663
12664         * mini-ia64.c: Ongoing IA64 work.
12665
12666 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
12667
12668         * mini-ia64.c: Ongoing IA64 work.
12669
12670         * driver.c: Clean up jit_code_hash as well when using --regression.
12671
12672         * inssel-long.brg: Fix long->i4/u4 conversion rules.
12673
12674         * basic-long.cs: Add tests for long->u4 conversion.
12675
12676 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
12677
12678         * mini.c: Take mono_get_domainvar out of macros. This makes sure
12679         that we do not depend on undefined C behavior: the order stuff
12680         gets evaluated within an expression. Fixes mono when compiled on
12681         GCC 4.
12682
12683 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
12684
12685         * *-ia64.*: Ongoing IA64 work.
12686
12687         * aot.c: Lower memory usage while loading AOT methods.
12688
12689         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
12690
12691         * mini.h: Bump AOT file format version.
12692
12693 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
12694
12695         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
12696
12697 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
12698
12699         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
12700         not on callee assembly). Fixed some comments.
12701
12702 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
12703
12704         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
12705         it gets proper disassembly.
12706         (emit_method_info): Remove some dead code.
12707
12708         * mini.c (mini_method_compile): Allways allocate the GOT var in
12709         mono_method_to_ir for emulating opcodes.
12710
12711 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
12712
12713         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
12714         before freeing the code memory. Fixes #74990.
12715
12716         * objects.cs: Add regression test for #74992.
12717
12718         * liveness.c: Extend live ranges of arguments to the beginning of the
12719         method. Fixes #74992.
12720
12721         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
12722         so it points into the faulting instruction.
12723
12724 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
12725
12726         * jit-icalls.c (mono_imul_ovf): Add exception handling.
12727
12728         * *-ia64.*: Ongoing IA64 work.
12729
12730         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
12731
12732 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
12733
12734         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
12735
12736         * *-ia64.*: Ongoing IA64 work.
12737
12738 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
12739
12740         * basic-long.cs: Add tests for add/sub.ovf.
12741
12742         * basic.cs: Add tests for sub.ovf.
12743
12744         * *-ia64.*: Ongoing IA64 work.
12745
12746 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
12747
12748         * *-ia64.*: Ongoing IA64 work.
12749
12750         * basic.cs: Add conv.ovf.i4.un test.
12751
12752 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
12753
12754         * mini.c: (remove_block_if_useless) Fixed bug 75061.
12755         
12756 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12757
12758         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
12759
12760 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
12761
12762         * *-ia64.*: Ongoing IA64 work.
12763
12764 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12765
12766         * trace.[ch]:
12767         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
12768
12769 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
12770
12771         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
12772
12773 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
12774
12775         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
12776
12777         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
12778         of a call is callable by a near call.
12779
12780 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
12781
12782         * mini-ia64.c: Ongoing IA64 work.
12783
12784 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
12785
12786         * genmdesc.c: Make the generated array non-static.
12787
12788         * inssel-long.brg: Fix LSHR_IMM rule.
12789
12790         * *-ia64.*: Ongoing IA64 work.
12791
12792         * *-ia64.*: Ongoing IA64 work.
12793
12794 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
12795
12796         * *-ia64.*: Ongoing IA64 work.
12797
12798         * *-ia64.*: Ongoing IA64 work.
12799         
12800         * mini-ia64.c: Ongoing IA64 work.
12801
12802         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
12803
12804 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
12805
12806         * objects.cs basic-calls.cs: Move some tests to objects.cs.
12807         
12808         * objects.cs basic-long.cs: Move some tests to objects.cs.
12809
12810 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
12811
12812         * *-ia64.*: Ongoing IA64 work.
12813
12814         * iltests.il: Add a new test.
12815
12816         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
12817         newobj. Fixes #75042.
12818
12819 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
12820
12821         * *-ia64.*: Ongoing IA64 work.
12822         
12823         * *-ia64.*: Ongoing IA64 work.
12824         
12825         * *-ia64.*: Ongoing IA64 work.
12826
12827         * basic.cs objects.cs: Move tests accessing static variables as well.
12828
12829         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
12830
12831 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
12832
12833         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
12834
12835         * driver.c: Always print failed tests.
12836
12837         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
12838         frame pointer.
12839
12840         * *ia64*: Ongoing IA64 work.
12841
12842 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
12843
12844         * basic.cs: Add tests for add.ovf. Fix warnings.
12845
12846 2005-05-18  Miguel de Icaza  <miguel@novell.com>
12847
12848         * driver.c (mono_main): Avoid crash if no argument is passed to
12849         --break;  Do not use g_error, but f_printf.   And fix all other
12850         ocurrences of the same crash.
12851
12852 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
12853
12854         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
12855         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
12856         Fixes #74742.
12857
12858 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
12859
12860         * *-ia64.*: Add beginnings of IA64 backend.
12861
12862         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
12863
12864 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
12865
12866         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
12867         Fixes #74925.
12868
12869         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
12870
12871         * mini-amd64.c: Fix a warning.
12872
12873 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
12874
12875         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
12876         in float_neg. Fixes #74897.
12877
12878         * mini-amd64.c (emit_call): Fix another near call bug.
12879
12880 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
12881
12882         * declsec.c: Keep the appdomain information in the structure. Added a 
12883         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
12884         value gets overwritten).
12885         * declsec.h: Set the default MonoArray for the the stack to 6. Added
12886         an MonoAppDomain member to MonoSecurityFrame.
12887         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
12888         used in the stack walk. Now use a MonoArray which grow (double) when
12889         it gets full.
12890
12891 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
12892
12893         * mini.c: Re-enabled runtime cleanup, since running threads should
12894         now properly stop when exiting.
12895
12896 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
12897
12898         * mini-codegen.c: New file contaning the arch-independent local
12899         register allocator. Not used by any architectures yet.
12900
12901         * mini.h linear-scan.c: Merge some changes from the 
12902         mini-xp-local-regalloc branch.
12903
12904 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
12905
12906         * mini-amd64.c (emit_call): Fix calls to native functions when the
12907         runtime is compiled as a shared library. Fixes #74756.
12908
12909         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
12910         on a literal field. Fixes #74751.
12911
12912 2005-04-25  Raja R Harinath  <rharinath@novell.com>
12913
12914         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
12915
12916 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
12917
12918         * objects.cs: Add missing null casting test.
12919
12920 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
12921
12922         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
12923         in wrapper methods. Also rename 'address' variable to 'offset'.
12924
12925 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
12926
12927         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
12928         warnings.
12929         
12930         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
12931
12932         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
12933         work on windows.
12934
12935 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12936
12937         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
12938
12939 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
12940
12941         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
12942         just the last bytes.
12943
12944 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
12945
12946         * aot.c (mono_compile_assembly): Fix warning.
12947
12948         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
12949         by the _MSC_VER stuff.
12950
12951 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
12952
12953         * inssel-long.brg: Fix #74588.
12954
12955         * cpu-amd64.md: Fix #74591.
12956
12957         * iltests.il: Add new regression tests.
12958
12959 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
12960
12961         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
12962         valuetype.
12963
12964 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
12965
12966         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
12967
12968         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
12969         from Bill Middleton <flashdict@gmail.com>.
12970
12971 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
12972
12973         * arrays.cs: Add new regression test. Fix warnings.
12974
12975 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
12976
12977         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
12978         and leakage in CKFINITE.
12979
12980         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
12981         this to a null op since it is called on amd64 too.
12982
12983         * exceptions-amd64.c (get_throw_trampoline): Align stack.
12984
12985         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
12986         body since this is not used on amd64.
12987         
12988         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
12989
12990         * mini-amd64.c: Remove obsolete fixmes.
12991
12992         * mini.c (print_method_from_ip): Fix debugging support.
12993
12994 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
12995
12996         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
12997         so that expressions that don't give much gain are not reduced.
12998         * ssapre.h: Likewise.
12999
13000 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
13001
13002         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
13003
13004         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
13005
13006         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
13007
13008 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
13009
13010         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
13011
13012         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
13013
13014 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
13015
13016         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
13017         stack touching.
13018
13019         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
13020
13021         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
13022
13023         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
13024
13025         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
13026         MONO_ARCH_USE_SIGACTION. Fixes #74252.
13027
13028         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
13029
13030         * mini-x86.c: Fix up stack overflow handling.   
13031
13032         * exceptions.cs: Add new regression test.
13033
13034 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
13035
13036         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
13037         mono_jit_thread_attach.
13038
13039         * mini.c (mono_method_to_ir): Verify called method is not abstract.
13040
13041 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
13042
13043         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
13044         avoid calling constructors using callvirt.
13045
13046         * inssel.brg: Fix #74073.
13047
13048 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
13049
13050         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
13051         compilation with non-GCC compilers.
13052         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
13053         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
13054
13055 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
13056
13057         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
13058         klass->interface_offsets (will likely fix bug#74073).
13059
13060 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
13061
13062         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
13063
13064 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
13065
13066         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
13067         to amd64_div_reg_size ().
13068         
13069         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
13070
13071 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
13072
13073         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
13074
13075 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
13076
13077         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
13078
13079 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
13080
13081         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
13082         
13083         * mini.c (mono_precompile_assembly): Load and precompile referenced
13084         assemblies as well. Fixes #74015.
13085
13086 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
13087
13088         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
13089
13090 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
13091
13092         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
13093         a lot of checks and (anyway) permissions cannot work until corlib is 
13094         loaded.
13095
13096 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
13097
13098         * mini-ppc.c: fixed ABI issue on sysv/ppc.
13099
13100 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
13101
13102         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
13103         calls (fixes bug#72824).
13104
13105 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13106
13107         * mini.c: fix tail recursion elimination (see test in bug#73936).
13108
13109 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
13110
13111         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
13112         some fp functions in sse2 mode.
13113
13114 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
13115
13116         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
13117
13118 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
13119
13120         * mini.h mini.c: Add mono_get_jit_tls_key ().
13121
13122         * mini-x86.c: Enable fast TLS support on windows.
13123
13124 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
13125
13126         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
13127         * mini.c: Check for p/invoke method when generating code. If a
13128         p/invoke method, or it's class, isn't decorated with [Suppress
13129         UnmanagedCodeSecurity] then generate code to call System.Security.
13130         UnmanagedDemand (only if the security manager is active).
13131
13132 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
13133
13134         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
13135         last change as it seems to cause strange crashes.
13136         
13137 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13138
13139         * *.c: handle unsafe function pointers where needed.
13140
13141 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
13142
13143         * mini.c (mono_jit_free_method): Remove the fixme too.
13144
13145 2005-03-15  Miguel de Icaza  <miguel@novell.com>
13146
13147         * mini.c: As discussed, make the code actually free the delegate
13148         thunk now, to enable the debugging of delegate problems, use
13149         MONO_DEBUG=1 when running Mono. 
13150
13151         This takes also care of parts of the leaks as seen by Joe.
13152
13153 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
13154
13155         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
13156         thread_tls_offset calculation.
13157
13158 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
13159
13160         * declsec.c: Reworked linkdemand checks for icall. The previous code
13161         was using the declaration code (untrusted) and didn't work as expected
13162         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
13163         specific case.
13164
13165 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
13166
13167         * iltests.il: Add new localloc test.
13168
13169         * mini-amd64.c: Handle large stack allocations the same way as on
13170         windows if stack overflow handling is working.
13171         
13172         * mini-amd64.c: Allocate the signal stack using mmap.
13173
13174         * mini.c (sigsegv_signal_handler): Fix reading of context.
13175
13176         * mini-exceptions.c: Fix up stack overflow handling.
13177
13178         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
13179
13180         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
13181
13182         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
13183
13184         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
13185
13186         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
13187         tramp_init functions as they are no longer needed.
13188
13189 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
13190
13191         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
13192         
13193         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
13194
13195         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
13196         
13197         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
13198         support that now.
13199
13200         * mini-ops.h: Add OP_LMUL_IMM.
13201
13202         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
13203         long mul/div opcodes as intrinsic.
13204
13205         * mini-amd64.c (emit_call): Handle the case when the callee might be
13206         an AOT method.
13207
13208 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
13209
13210         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
13211         extra safe.
13212         
13213         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
13214
13215         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
13216
13217 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
13218
13219         * mini.c (mono_codegen): Don't leak here, to help people running
13220         monogrind.
13221
13222 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
13223
13224         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
13225         conversions in sse2 mode.
13226
13227         * basic-float.cs: Add regression test.
13228         
13229         * mini-amd64.c: Reenable sse2.
13230
13231 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
13232
13233         * mini-amd64.c: Disable sse2 until some regressions are fixed.
13234
13235 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
13236
13237         * driver.c: Copyright text should include 2005.
13238         
13239 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
13240
13241         * cpu-amd64.md (load_membase): Fix more max lengths.
13242
13243 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
13244
13245         * cpu-amd64.md (load_membase): Fix max length.
13246
13247         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
13248
13249         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
13250
13251         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
13252         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
13253
13254         * basic-float.cs: Add rounding regression test.
13255
13256         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
13257
13258 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
13259
13260         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
13261         structures in registers for pinvoke wrappers.
13262
13263 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
13264
13265         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
13266
13267 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
13268
13269         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
13270         wrapper to mono_jit_thread_attach.
13271
13272         * mini.c (mini_jit_thread_attach): New jit icall.
13273
13274         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
13275         native->managed wrappers.
13276
13277         * exceptions.cs: Add new regression test.
13278
13279         * mini.c (optimize_branches): Check regions in the cbranch to throw
13280         block case as well. Fixes #73242.
13281
13282 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
13283
13284         * mini.c: thread safety fixes.
13285
13286 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
13287
13288         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
13289         patching stuff, since delegates use jump trampolines so there is
13290         no caller.
13291
13292         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
13293         jump trampolines.
13294         
13295         * tramp-amd64.c: Fix build.
13296
13297         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
13298         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
13299
13300         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
13301         Rename this to mono_arch....
13302         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
13303
13304         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
13305
13306         * mini-amd64.c (emit_call): If both the caller and the callee is
13307         guaranteed to have 32 bit addresses, emit a normal call.
13308
13309         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
13310
13311         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
13312         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
13313         method_ptr inside delegates.
13314
13315 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
13316
13317         * mini.c (mono_jit_free_method): Free the method info even if the native code is
13318         invalidated. Fixes #73001.
13319
13320         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
13321
13322         * mini-x86.c: Only use stdcall for pinvokes on windows.
13323
13324 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
13325
13326         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
13327         * mini-x86.c: remove unreliable __thread var offset detection,
13328         use the correct accessors and enable by default.
13329
13330 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
13331
13332         * mini.c (mono_jit_free_method): Fix memory leak.
13333
13334 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
13335
13336         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
13337
13338 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
13339
13340         * cpu-amd64.md: Fix lengths of atomic opcodes.
13341
13342 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
13343
13344         * driver.c: try to not imply using ICU is any good.
13345
13346 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
13347
13348         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
13349         functions as inline ops.
13350
13351         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
13352         some Interlocked functions as inline ops.
13353
13354         * mini.c (move_basic_block_to_end): Fix bug in last patch.
13355
13356         * mini.h (MonoBasicBlock): Reorganize fields a bit.
13357
13358         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
13359
13360         * mini.c: Add support for OP_NOT_TAKEN.
13361
13362         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
13363         structures in registers for pinvoke wrappers.
13364
13365         * mini-amd64.c: Fix warnings.
13366
13367 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
13368
13369         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
13370
13371         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
13372
13373         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
13374         address instead of loading the address from it.
13375
13376         * mini-x86.c: Add support for returning small structs in registers
13377         on Win32. Fixes part of #70864.
13378         
13379 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
13380
13381         * trace.c (get_token): Improve error checking.
13382
13383 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
13384
13385         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
13386
13387 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
13388  
13389         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
13390         it can be reused for MonoClass.
13391         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
13392         _LINKDEMAND.
13393
13394 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
13395
13396         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
13397         instead of a MonoReflectionMethod. The method information wasn't used
13398         when displaying SecurityException details (but will be now).
13399
13400 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
13401
13402         * Makefile.am : windows build fix.
13403
13404 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
13405
13406         * iltests.il: Add new regression test.
13407
13408         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
13409         #72522.
13410
13411 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
13412  
13413         * mini.c: Moved linkdemand check into helper function check_linkdemand
13414         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
13415         LDFTN, LDVIRTFTN).
13416
13417 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
13418
13419         * declsec.c: Added statistics counter for different kinds of 
13420         LinkDemands.
13421         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
13422         (and commented) declaration.
13423         * mini.c: Added statistics counter for security Demand code 
13424         generation. Added display of security statistics.
13425
13426 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
13427
13428         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
13429         Fix compilation errors under gcc-2.95.
13430
13431 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
13432
13433         * mini.c, driver.c: Use the new jit trampoline hashtable
13434
13435 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13436
13437         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
13438
13439 2005-02-11  Martin Baulig  <martin@ximian.com>
13440
13441         * debug-mini.c (mono_debug_close_method): Free the line number array.
13442
13443 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
13444
13445         * aot.c: Break up large methods into smaller ones. Share GOT slots for
13446         icalls.
13447
13448         * mini.h: Bump AOT file format version. 
13449
13450 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
13451
13452         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
13453         APTC and P/Invoke.
13454         * declsec.h: Added macros to get/set lazyly initialized security 
13455         informations about assemblies. Added new enum for different type of
13456         possible LinkDemand violation. Added function to check LinkDemands.
13457         * mini.h: Added a field to MonoCompile to hold any security violation
13458         detected when JITting a method (so it can be thrown later).
13459         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
13460         and CEE_CALLVIRT. Added code to throw exception at the end of
13461         mini_method_compile (note: the exception is unhandled right now).
13462
13463 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
13464
13465         * mini.c, jit-icalls.c: use the managed implementation of
13466         memset for initobj and memset, to avoid managed <-> unmanaged
13467         transitions.
13468
13469 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
13470
13471         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
13472         optimization if it would need a GOT var.
13473
13474         * basic.cs: Add tests for constant propagation and switch statements.
13475
13476         * ssa.c: Fix out-of-range constant propagation and switch statements.
13477
13478 2005-02-09    <vargaz@freemail.hu>
13479
13480         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
13481
13482 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
13483
13484         * cpu-amd64.md (load_membase): Fix max length of load_membase.
13485
13486 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13487
13488         * mini.c: update to new signature of mono_class_get_allocation_ftn().
13489
13490 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
13491
13492         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
13493         arithmetic operations.
13494
13495 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
13496
13497         * mini-ppc.c: add a workaround for broken user code that
13498         DllImports vararg functions with non-vararg signatures.
13499
13500 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
13501
13502         * mini.c (mono_jit_compile_method_inner): Add detection and a 
13503         meaningfull error message for assemblies written in Managed C++.
13504
13505         * tramp-amd64.c mini-amd64.h: Add support for 
13506         create_trampoline_from_token ().
13507
13508         * aot.c mini-x86.c abcremoval.c: Applied patch from
13509         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
13510
13511 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
13512
13513         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
13514         which takes a MonoImage/token as parameter instead of a MonoMethod.
13515
13516         * aot.c: Use the new trampoline for initializing vtables.
13517
13518         * aot.c: Add support for ldfld/stfld_remote wrappers.
13519
13520         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
13521         rules for compare <MEM>, IMM.
13522
13523         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
13524
13525         * aot.c: Handle inherited finalizers correctly.
13526
13527 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
13528
13529         * inssel.brg (stmt): Add a missing _setup_... ().
13530
13531         * aot.c: Save some parts of the class state to the AOT file and use it
13532         to recompute that state when a class is initialized.
13533
13534         * mini.c: Install AOT hooks into the runtime.
13535
13536         * mini.h: Bump AOT file format version.
13537         
13538         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
13539         Fixes #72148.
13540
13541         * iltests.il: Add new test.
13542
13543 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
13544
13545         * mini.c: fix typo.
13546
13547 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
13548
13549         * mini.c: setup the statistical profiler in the thread attach
13550         callback to cope with the new single thread code.
13551
13552 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
13553
13554         * mini-ppc.c: ensure we have enough room for the profiler
13555         calls (fixed bug#72084).
13556
13557 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
13558
13559         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
13560         it.
13561
13562 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13563
13564         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
13565
13566 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13567
13568         * ssapre.c: Fixed an issue with down safety (this allows IronPython
13569         to succesfully execute parrotbench).
13570         * ssapre.h: Likewise.
13571
13572 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13573
13574         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
13575         variable for stores to method arguments (fixes a SSAPRE issue).
13576
13577 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13578
13579         * mini.c: handle value types in dup, fixes gen-112.cs.
13580
13581 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
13582
13583         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
13584         sequence for calls in dynamic methods to avoid thunks.
13585
13586 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
13587
13588         * mini.c: correctly remove dynamic methods from the hashtable.
13589
13590 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13591
13592         * driver.c: Disabled SSAPRE until fix the bug that appears
13593         in IronPython's parrotbench.
13594
13595 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
13596
13597         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
13598
13599         * mini.c (mono_method_to_ir): Revert the previous change.
13600         
13601         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
13602         when AOT compiling.
13603
13604         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
13605         mono_jit_info_table_find () etc. when running under valgrind.
13606
13607         * inssel.brg: Fix warnings.
13608
13609         * mini-exceptions.c: Fix warnings.
13610
13611 2005-01-31  Martin Baulig  <martin@ximian.com>
13612
13613         * driver.c (compile_all_methods_thread_main): Don't try to compile
13614         generic methods or anything which has type parameters.
13615
13616 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
13617
13618         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
13619
13620         * TestDriver.cs: Add --verbose flags.
13621
13622         * graph.c ssa.c: Fix 64 bit warnings.
13623         
13624         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
13625         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
13626         Fix 64 bit warnings.
13627
13628         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
13629         variable not spotted by gcc.
13630         
13631         * mini-amd64.c inssel-amd64.brg: Applied patch from  
13632         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
13633         X86_COMPARE_MEMBASE opcodes.
13634
13635         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
13636
13637 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
13638
13639         * *: MonoMethod->signature might be NULL now. You *MUST* use
13640         mono_method_signature.
13641
13642 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
13643
13644         * driver.c (compile_all_methods_thread_main): Compile the methods
13645         without invoking cctors.
13646
13647 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13648
13649         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
13650         * basic-calls.cs: test for the above.
13651
13652 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
13653
13654         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
13655         MonoJitInfo changes.
13656
13657 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
13658
13659         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
13660         eagerly if it contains dynamic methods.
13661         
13662         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
13663
13664         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
13665         trace, it is now computed by an icall from trace_ips.
13666         
13667         * mini-exceptions.c: Fix a warning.
13668
13669 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
13670
13671         * mini-exceptions.c: don't bother getting stack trace info if
13672         it's not going to be used.
13673
13674 2005-01-27  Raja R Harinath  <rharinath@novell.com>
13675
13676         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
13677         ssapre-mini-ops.h.
13678
13679 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
13680
13681         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
13682
13683         * aot.c: Avoid calling mono_method_get_header () if not needed.
13684
13685         * mini.h: Bump AOT file format version.
13686         
13687         * mini.c (mono_emit_native_call): Allocate a GOT var here.
13688
13689         * mini.c (mono_print_tree): Print more info for calls.
13690
13691 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
13692
13693         * declsec.h: Remove warning by adding missing include for marshal.h
13694
13695 2005-01-26  Martin Baulig  <martin@ximian.com>
13696
13697         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
13698         `ip' twice.
13699
13700 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
13701
13702         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
13703         flags.
13704
13705         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
13706
13707         * aot.c (mono_compile_assembly): Fix a warning.
13708
13709 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
13710
13711         * declsec.c: Look for security attributes on the original MonoMethod 
13712         (and not the wrapped one). This fix permissions on icalls.
13713
13714 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
13715
13716         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13717
13718         * mini.c (mono_allocate_stack_slots): Add a fixme.
13719
13720         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13721
13722 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13723
13724         * inssel.brg: optimize casts of sealed types (more
13725         optimizations waiting for fixes in remoting).
13726
13727 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
13728
13729         * inssel.brg (stmt): Add another dummy rule.
13730
13731         * driver.c: Fix warnings.
13732
13733         * driver.c (mono_main): If running under valgrind, instruct glib to use
13734         the system allocation functions so valgrind can track the memory
13735         allocated by the g_... functions.
13736
13737         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
13738
13739         * mini-ops.h: Add OP_DUMMY_STORE opcode.
13740
13741         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
13742
13743         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
13744         variables in try regions.
13745
13746         * mini.c (mini_method_compile): Don't disable optimizations on large
13747         methods when AOT compiling.
13748
13749         * mini.c (mono_allocate_stack_slots): New arch independent method to 
13750         allocate stack slots. Not yet used.
13751
13752 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
13753
13754         * debug-mini.c (mono_debug_close_method): Plug some leaks.
13755
13756 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
13757
13758         * mini-ppc.c: make the branch info relative as the code
13759         buffer can be reallocated.
13760
13761 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
13762
13763         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
13764         * driver.c: Removed the AOT/security restriction. Now initialize the
13765         security manager (in metadata) if --security is used.
13766         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
13767         rather than the pointer to declarative security, when AOT is used.
13768
13769 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
13770
13771         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
13772         basic blocks, reduced intrinsic exception throwing code size.
13773
13774 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
13775
13776         * driver.c (mini_usage): Reorder the usage screen.
13777
13778 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
13779
13780         * mini.c (mono_resolve_patch_target): Fix warning.
13781
13782 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
13783
13784         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
13785         previous patch.
13786
13787         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
13788
13789         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
13790         breaks the amd64 build.
13791
13792         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
13793         register allocation. Fixes #71454.
13794
13795         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
13796
13797         * arrays.cs: Add new regression test.   
13798
13799 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13800
13801         * ssapre.c: Turned usage of snprintf to GString.
13802         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
13803         (I left it on by mistake in my previous commit).
13804
13805 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
13806
13807         * mini.c, cfold.c, basic-calls.cs: preserve side effects
13808         on cond branch optimization (fixes bug# 71515).
13809
13810 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13811
13812         * abcremoval.c: Fixed bug 71062.
13813         * abcremoval.h: Likewise.
13814
13815 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13816
13817         * mini.c: Added a new functionality to optimize_branches, the removal
13818         of useless basic blocks, and fixed some problem in the removal of
13819         critical edges; some utility functions added for both purposes.
13820         * ssapre.c: Added complex expression support, and fixed bug 70637.
13821         * ssapre.h: Likewise.
13822         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
13823         enabled in SSAPRE.
13824         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
13825         * driver.c: Re-enabled SSAPRE.
13826
13827 2005-01-19  Martin Baulig  <martin@ximian.com>
13828
13829         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
13830         the result of mono_get_method_constrained().
13831
13832 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
13833
13834         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
13835         manager.
13836
13837 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
13838
13839         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
13840         be detected.  Fixes #59296.
13841
13842 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
13843
13844         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
13845         which can happen. Fixes #71361.
13846
13847 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
13848
13849         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
13850         manager.
13851
13852 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
13853
13854         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
13855         appdomain-unload.exe to fail.
13856         
13857         * mini.c: Fix some memory leaks.
13858
13859 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
13860
13861         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
13862         Fixed bug and sped up some codepaths.
13863
13864 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
13865
13866         * mini.c: Fix some memory leaks.
13867
13868         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
13869         conversion.
13870
13871         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
13872
13873         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
13874         #71320.
13875
13876         * iltests.il: Add regression test for #71320.
13877
13878 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
13879
13880         * mini.c (mono_codegen): Fix installation of profiler hooks.
13881
13882         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
13883
13884 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
13885
13886         * mini.h, mini.c, cfold.c: optimize access to enum
13887         readonly fields, too. Eval conditional branches if possible
13888         to perform unreachable code removal in more cases.
13889
13890 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
13891
13892         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
13893
13894         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
13895         code manager.
13896
13897         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
13898         WinXP DEP. Fixes #71244.
13899
13900 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
13901
13902         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
13903
13904 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
13905
13906         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
13907
13908 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
13909
13910         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
13911         changes.
13912
13913         * mini.h: Bump AOT version.
13914
13915         * mini.h (MonoCompile): Change exvar to a hash table.
13916
13917         * mini.c: Allocate a separate exvar for each handler block.
13918
13919         * mini.c: Get rid of the computation of filter_lengths, its not needed.
13920
13921         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
13922         ex var with the pending exception and only throw if the two are equal.
13923         Fixes #68552.
13924         
13925         * exceptions.cs: Add tests for rethrow and nested catch clauses.
13926
13927         * mini-x86.c: Fix warnings.
13928
13929         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
13930         used by all the ports now.
13931
13932         * aot.c: Add write-symbols and save-temps options.
13933
13934 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
13935
13936         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
13937
13938 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
13939
13940         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
13941         operations.
13942
13943         * tramp-s390.c: Check vtable slot belongs to the domain.
13944
13945         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
13946         as per other platforms.
13947
13948         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
13949
13950 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
13951
13952         * driver.c: we don't run the Main() code in a subthread anymore.
13953
13954 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
13955
13956         * mini.c: added experimental rtc support in the statistical
13957         profiler: if the user has the permission, more accurate statistics
13958         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
13959         The MONO_RTC value must be restricted to what the linux rtc allows:
13960         power of two from 64 to 8192 Hz.
13961
13962 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
13963
13964         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
13965
13966 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
13967
13968         * mini-ppc.c: better icache flush for smp.
13969
13970 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
13971
13972         * mini-amd64.c (emit_move_return_value): Fix memory leak.
13973
13974         * mini-x86.c (get_call_info): Add the get_call_info () code from the
13975         amd64 port, not yet used.
13976
13977 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
13978
13979         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
13980         a struct type.
13981
13982 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
13983
13984         * driver.c: Added --security option to activate the security manager.
13985         Right now this will allow code generation for declarative demands and
13986         is disabled when AOT is specified.
13987         * mini.c: Add code generation for declarative security demands.
13988         * mini.h: Add mono_use_security_manager as an extern gboolean.
13989
13990 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
13991
13992         * aot.c (mono_compile_assembly): Speed up compilation a bit by
13993         emitting more dense assembly code.
13994
13995         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
13996         exception throwing stuff.
13997
13998 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
13999
14000         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
14001         dead code.
14002
14003         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
14004         left in by mistake.
14005
14006         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
14007         fixed.
14008
14009         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
14010
14011         * tramp-*.c: Only patch vtable slots if the object is in the current
14012         domain. Fixes appdomain-unload.exe.
14013
14014         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
14015         
14016         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
14017         x86 branch.
14018
14019 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
14020
14021         * mini.c (reverse_branch_op): New helper function.
14022
14023         * mini.c (optimize_branches): Run the new optimization only on 
14024         platforms which support it. Also reverse all kinds of branches.
14025
14026         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
14027
14028         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
14029         a throw statement.
14030
14031         * mini.c (optimize_branches): Reverse not-equals branches if the false
14032         bblock is a throw. This happens a lot of time with argument checking in
14033         corlib.
14034
14035         * mini.c (mono_codegen): Add support for placing basic blocks after
14036         the function epilogue.
14037
14038         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
14039         function epilogue.
14040         
14041 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
14042
14043         * mini.c (setup_stat_profiler): Only set this up if the platform
14044         supports ITIMER_PROF.
14045
14046 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
14047
14048         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
14049         previous patch.
14050
14051         * inssel.brg: Fix a warning.
14052
14053 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
14054
14055         * mini.c: added support for statistical profiler 
14056         (run with: --profile=default:stat).
14057
14058 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
14059
14060         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
14061
14062         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
14063
14064         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
14065         related to global registers from the amd64 port.
14066
14067 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
14068
14069         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
14070
14071         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
14072         with global registers.
14073         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
14074
14075         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
14076
14077 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
14078
14079         * debug-mini.c (encode_value): Fix off-by-one.
14080
14081         * aot.c (encode_value): Likewise.
14082
14083         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
14084
14085 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
14086
14087         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
14088         AOT.
14089
14090         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
14091         
14092         * aot.c (emit_method_info): Increase size of temp buffer.
14093
14094         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
14095         the AOT case.
14096
14097 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
14098
14099         * aot.c (emit_method_info): Fix build.
14100         
14101         * aot.c: Further rework of the AOT file format to reduce the size of
14102         the method info data.
14103
14104         * mini.h: Bump AOT file format version.
14105
14106 2004-12-27  Martin Baulig  <martin@ximian.com>
14107
14108         * mini.c (mini_get_method): New static method; call
14109         mono_get_method_full() and mono_get_inflated_method().
14110         (mono_method_to_ir): Use mini_get_method() instead of
14111         mono_get_method_full(). 
14112
14113 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
14114
14115         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
14116
14117 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
14118
14119         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
14120
14121         * inssel-amd64.brg: Add some optimization rules.
14122
14123 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
14124
14125         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
14126         standard not GC'd stuff is fine.
14127
14128 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
14129
14130         * aot.c: Rework the AOT file format to get rid of most of the global
14131         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
14132
14133         * mini.h: Bump AOT file format version.
14134         
14135 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
14136
14137         * mini.h: Bump AOT file format version.
14138
14139         * aot.c (mono_aot_is_got_entry): New function to determine if an 
14140         address is inside a GOT.
14141
14142         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
14143
14144         * cpu-pentium.md: Increase the maximum size of some instructions which
14145         might involve a got access.
14146         
14147         * mini.c (get_method_from_ip): Another debug helper function.
14148
14149         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
14150         when got var accesses are created during the decompose phase.
14151
14152         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
14153
14154         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
14155         argument mini_compile_method and to MonoCompile, and use this to
14156         determine whenever a given method is compiled for AOT. This allows the
14157         other methods compiled during AOT compilation to be free of AOT stuff,
14158         so the backends does not need to add special support for them by
14159         creating a fake GOT etc.
14160
14161         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
14162         longer needed.
14163
14164 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
14165
14166         * mini.c (mono_method_to_ir): It turns out that some of the
14167         x-appdomain wrappers are lax with types, so just ignore this for
14168         all wrappers.
14169
14170         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
14171         at the vtable->klass. If it is non-shared code we can just use the
14172         vtable.
14173
14174 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
14175
14176         * mini-ppc.c: access MonoDomain from tls, too.
14177
14178 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
14179
14180         * declsec.c: Removed unused variable (and related warning ;-)
14181
14182 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
14183
14184         * iltests.il: New test for LDELEMA on an array of ref types.
14185
14186         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
14187         all ldelema's on reftypes.
14188         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
14189         it was the wrong place to put it.
14190
14191         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
14192         register to pop to make this cleaner, at the request of Paolo.
14193
14194 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
14195
14196         * mini-ops.h (OP_GETHASHCODE): New op.
14197
14198         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
14199
14200         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
14201         operation.
14202
14203         For a microbenchmark, this reduces the cost of Hashtable.get_Item
14204         by 25%.
14205         
14206         * mini-x86.c (mono_arch_output_basic_block): Rather than
14207
14208         add ebp, 4
14209
14210         Emit
14211
14212         pop edx
14213
14214         The first is 3 bytes while the second is 1. This saves 36 kb on
14215         mscorlib, quite a big saving. When bootstraping mcs, I was able to
14216         see a small boost because of icache locality.
14217
14218         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
14219
14220 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
14221
14222         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
14223         started code sharing with the generic code.
14224
14225 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
14226
14227         * mini-ppc.c, cpu-g4.md: added code for direct access to
14228         tls data slots.
14229
14230 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
14231
14232         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
14233          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
14234         to OP_TLS_GET.
14235
14236 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
14237
14238         * declsec.c|h: Added functions to cache the declarative stack modifiers
14239         in MonoJitInfo and to create a security frame from a MonoJitInfo 
14240         structure.
14241         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
14242         created. Register internal calls for System.Security.SecurityFrame::
14243         _GetSecurityFrame and _GetSecurityStack.
14244         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
14245         the definitions for the new stack walk/callback mechanism.
14246         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
14247         first security frame for LinkDemands and InheritanceDemands) and
14248         GetSecurityStack for Demands. Both use the new mono_walk_stack code
14249         from lupus.
14250         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
14251         walk initialization (lupus).
14252
14253 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
14254
14255         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
14256         idiom.
14257         (handle_loaded_temps): Do not create a temporary variable for
14258         things that we know are temps. They will never be modified.
14259         (mono_spill_call): Set MONO_INST_IS_TEMP
14260         (mono_emulate_opcode): ditto
14261         (emit_tree): ditto
14262         (mono_method_to_ir.CEE_DUP): ditto
14263
14264 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
14265
14266         * mini.c (type_to_eval_stack_type): Make this handle the void type
14267         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
14268         (emit_tree): use ip_in_bb to special case some common idioms
14269         Update all callers to pass in the IP.
14270         (mono_method_to_ir): Make CEE_CALL* do the above as well.
14271
14272         This gives us a nice 2% speedup in mcs bootstrap.
14273
14274         * mini-x86.c (peephole_pass): Peephole pass to make
14275         mov  [foo], eax
14276         push [foo]
14277
14278         into
14279
14280         mov [foo], eax
14281         push eax
14282
14283         * mini.c (ip_in_bb): new method.
14284         (mono_method_to_ir): use this method rather than doing the hash
14285         lookup ourselves.
14286
14287         * linear-scan.c (mono_linear_scan): When expiring actives, you
14288         don't need to keep around variables that expire on this
14289         instruction. This makes it so that:
14290              a = b + 1
14291         will turn into:
14292              store (ebx add (ebx, 1))
14293         which will become
14294              add ebx, 1
14295
14296 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
14297
14298         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
14299         combination to avoid doing two copies. Fix up problems with previous
14300         patch.
14301
14302         * mini.c: Fix 64 bit warnings.
14303
14304         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
14305
14306 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
14307
14308         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
14309         changes from the x86 code.
14310
14311         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
14312
14313 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
14314
14315         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
14316         throwing code to reduce its size, unify the AOT and non-aot code and 
14317         get rid of relocations in the AOT case.
14318
14319         * mini-x86.h mini.c exceptions-x86.c 
14320         (mono_arch_get_throw_corlib_exception): New arch specific function to 
14321         raise corlib exceptions which doesn't require relocations in the 
14322         caller.
14323
14324         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
14325
14326 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
14327
14328         * mini.c (mono_emit_method_call): Only allocate the got var when it is
14329         needed.
14330
14331         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
14332         in the AOT case.
14333
14334 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14335
14336         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
14337         with add function when used from Inc/dec atomic 
14338         functions. Re-enabled optimization on x86.
14339         * mini-ops.h: renamed atomic_add functions to
14340         allow _add to match the Interlocked::Add and
14341         _add_next to match Interlocked::Inc/Dec.
14342
14343 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
14344
14345         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
14346         linking of BBs to the end BB, and enabled SSAPRE also with
14347         consprop and copyprop (which was prevented by that bug).
14348
14349 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14350
14351         * mini-x86.c: disabling the Interlocked optimizing code. 
14352
14353 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
14354
14355         * aot.c (load_aot_module): Move reading of got_addr after the AOT
14356         file version check.
14357         
14358 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14359
14360         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
14361         interlocked optimization due lack of support on x86, rewrote 
14362         exchange to take into account that base may be in eax.
14363         
14364         xsp works again; activated Interlocked optimizing code.
14365         
14366 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
14367
14368         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
14369
14370 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
14371
14372         * mini-ops.h: Add new opcodes.
14373
14374         * mini.h: Add new patch types. Add got_var to MonoCompile.
14375
14376         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
14377         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
14378         make it work with all kinds of patchable code.
14379
14380         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
14381         address of the GOT, and referencing entries in the GOT.
14382
14383         * mini.c: Add code to load the GOT address if needed by an opcode.
14384
14385         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
14386         independent AOT code on the x86 using an elf-style Global Offset Table.
14387
14388 2004-12-14  Raja R Harinath  <rharinath@novell.com>
14389
14390         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
14391
14392 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14393
14394         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
14395         when running xsp.
14396
14397 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
14398
14399         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
14400         of Interlocked:Increment/Decrement/Add as inline ops.
14401         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
14402
14403 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
14404
14405         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
14406         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
14407
14408 2004-12-12  Duncan Mak  <duncan@ximian.com>
14409
14410         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
14411         again. `patch_info->table_size' is no longer valid after Zoltan's
14412         commit #37636.
14413
14414 2004-12-12  Martin Baulig  <martin@ximian.com>
14415
14416         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
14417         if we are the "real" method, ie. not an inlined method inside it.
14418
14419 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
14420
14421         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
14422         before we look in the special fields table. This fixes
14423         ../tests/thread-static-init.cs.
14424
14425 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14426
14427         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
14428         for Array get_Rank and get_Length. Fixes bug #70465.
14429
14430 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
14431
14432         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
14433         separate structure to reduce the size of MonoJumpInfo.
14434
14435 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
14436
14437         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
14438
14439 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
14440
14441         * mini.c (mini_get_inst_for_method): Changed to allow ports
14442         to return a MonoInst instead of opcode 
14443         (renamed mini_get_opcode_for_method to better reflect the new functionality)
14444         
14445         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
14446         Allow ports to return a created MonoInst instead of op-code, will enable
14447         new optimizations.
14448         (renamed mini_get_opcode_for_method to better reflected the functionality)
14449
14450 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
14451
14452         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
14453
14454 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
14455
14456         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
14457         Fixes #69985.
14458
14459 2004-12-08  Martin Baulig  <martin@ximian.com>
14460
14461         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
14462         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
14463
14464 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
14465
14466         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
14467         correctly.
14468
14469         * exceptions.cs: Disable some tests which depend on properties of x86 fp
14470         arithmetic.
14471
14472 2004-12-08  Raja R Harinath  <rharinath@novell.com>
14473
14474         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
14475
14476 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
14477
14478         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
14479         bug introduced by the previous patch.
14480
14481 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14482
14483         * mini-ppc.c, objectc.cs: handle large structs passed by value
14484         (fixes bug #69972).
14485
14486 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
14487
14488         * mini-ppc.c: OP_ARGLIST implementation from
14489         Geoff Norton  <gnorton@customerdna.com>.
14490
14491 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14492
14493         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
14494         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
14495
14496 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14497
14498         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
14499
14500 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14501
14502         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
14503         support.
14504
14505 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
14506
14507         * mini-sparc.c: Zero out localled-ed memory.
14508
14509         * iltests.il: Add tests for zeroing out localloc-ed memory.
14510
14511 2004-12-04  Martin Baulig  <martin@ximian.com>
14512
14513         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
14514         mono_method_get_signature_full().       
14515
14516 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
14517
14518         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
14519         and some utility functions (always for SSAPRE), integrated SSAPRE.
14520         * mini.h: Likewise.
14521         * driver.c: Added ssapre option.
14522         * ssa.c: Small fix on OP_ARG handling.
14523         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
14524         * Makefile.am: Likewise.
14525
14526 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
14527
14528         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
14529         now in the xp code.
14530
14531         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
14532         icall.
14533
14534 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14535
14536         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
14537         
14538         * cpu-s390.md : Increase instruction length of oparglist.
14539
14540         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
14541
14542 2004-11-30  Martin Baulig  <martin@ximian.com>
14543
14544         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
14545         virtual generic methods.  We call a special helper_compile_generic_method()
14546         icall to retrieve the method from the vtable, inflate and compile
14547         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
14548
14549         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
14550
14551 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
14552
14553         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
14554
14555 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
14556
14557         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
14558         Fixes #69929.
14559
14560 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
14561
14562         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
14563         platforms with PIC aot.
14564
14565 2004-11-28  Martin Baulig  <martin@ximian.com>
14566
14567         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
14568         Fixes gen-112.cs.
14569
14570 2004-11-28  Martin Baulig  <martin@ximian.com>
14571
14572         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
14573         the result of mono_type_get_underlying_type() to check whether
14574         we're byref.
14575
14576 2004-11-26  Martin Baulig  <martin@ximian.com>
14577
14578         * mini.c
14579         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
14580         in the g_assert().
14581
14582 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
14583
14584         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
14585         the same way as the other arguments so they won't get clobbered.
14586
14587         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
14588         calls through R11 since it is clobbered by the trampoline code.
14589
14590 2004-11-26  Raja R Harinath  <rharinath@novell.com>
14591
14592         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
14593         pick up in-tree mscorlib.dll.
14594
14595 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
14596
14597         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
14598
14599         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
14600         runtime data/code are now stored in a table similar to the GOT in ELF. 
14601         This allows the code itself to be position independent.
14602
14603         * aot.c: Fix loading of referenced assemblies after the lazy assembly
14604         loading changes.
14605
14606         * aot.c: Attach ELF type (object/function) directives to all global
14607         symbols.
14608
14609         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
14610
14611         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
14612
14613         * mini-amd64.h: Turn on PIC AOT code.
14614
14615         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
14616         returning the offset within an OP_AOTCONST instruction where the GOT
14617         offset needs to be added.
14618
14619         * mini.h: Bump AOT file format version.
14620
14621 2004-11-25  Martin Baulig  <martin@ximian.com>
14622
14623         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
14624         uninflated generic methods.
14625
14626 2004-11-25  Martin Baulig  <martin@ximian.com>
14627
14628         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
14629
14630 2004-11-24  Martin Baulig  <martin@ximian.com>
14631
14632         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
14633         original klass (this only applies for generic instances).
14634
14635 2004-11-24  Martin Baulig  <martin@ximian.com>
14636
14637         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
14638         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
14639         that array).
14640
14641 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
14642
14643         * mini.c (mono_method_to_ir): Disable inlining for methods containing
14644         localloc. Fixes #69678.
14645
14646         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
14647         
14648 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
14649
14650         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
14651         used SSE registers on pinvoke calls. Fixes #69774.
14652
14653 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
14654
14655         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
14656         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
14657
14658 2004-11-23  Raja R Harinath  <rharinath@novell.com>
14659
14660         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
14661         Refer directly to the mcs/ tree.
14662
14663 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14664
14665         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
14666         Check if a trampoline for a synchronized method is required. 
14667
14668 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
14669
14670         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
14671         with localloc if needed. Throe arithmetric exception in
14672         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
14673         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
14674
14675 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
14676
14677         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
14678         types before switching on type.  Fixes #69622.
14679
14680 2004-11-19  Raja R Harinath  <rharinath@novell.com>
14681
14682         * Makefile.am (check-local): New.  Integrate into 'make check'.
14683         (MCS,RUNTIME): Define using in-tree mono and mcs.
14684         (ILASM): New.
14685         (%.exe): Use $(ILASM).
14686
14687 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
14688
14689         * mini-ppc.c: adjust initial prolog size (bug #69691).
14690
14691 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
14692
14693         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
14694         #69664.
14695
14696 2004-11-17  Raja R Harinath  <rharinath@novell.com>
14697
14698         * Makefile.am (clean-local): Rename from 'clean'.
14699
14700 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14701
14702         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
14703         to mono_arch_is_int_overflow. 
14704         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
14705         SIGFPE events.
14706
14707 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
14708
14709         * declsec.c|h: New files to support declarative security attributes.
14710         Added function to check if a method has (applicable) security.
14711         * mini.c|h: Add check for declarative security attributes in
14712         mono_method_check_inlining.
14713         * Makefile.am: Added declsec.c and declsec.h to the build.
14714
14715 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
14716
14717         * mini.c, mini.h: update to keep dynamic code info per-domain.
14718
14719 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
14720
14721         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
14722         (mini_init): Get rid of it from here too.
14723
14724 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
14725
14726         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
14727         implemented OP_RETHROW (patch by Geoff Norton
14728         <gnorton@customerdna.com>).
14729
14730 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
14731
14732         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
14733         between appdomains.  Fixes appdomain-unload on PPC.
14734
14735 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
14736
14737         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14738         mini-exceptions.c: handle the new wrapper types.
14739         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
14740         token value as a MonoClass* when compiling a wrapper.
14741         mono_jit_create_remoting_trampoline now takes an additional
14742         MonoRemotingTarget parameter.
14743         
14744 2004-11-10  Martin Baulig  <martin@localhost>
14745
14746         * mini.c (mono_method_to_ir): Use `generic_container->context'
14747         rather than creating a new one.
14748
14749 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14750
14751         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
14752
14753         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
14754
14755 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
14756
14757         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
14758         the experimental aot cache stuff.
14759
14760 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14761
14762         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14763         mini-exceptions.c: update to exception clause structure changes.
14764
14765 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
14766
14767         * exceptions-x86.c (throw_exception): Fix warnings.
14768
14769         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
14770         for OP_RETHROW.
14771
14772 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
14773
14774         * exceptions-sparc.c (get_throw_exception): Really fix this.
14775
14776 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
14777
14778         * tramp-*.c: we no longer support icalls without wrappers, so
14779         a bit of code can be removed here
14780
14781 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
14782
14783         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
14784         patch.
14785
14786         * cpu-sparc.md: Add op_rethrow.
14787
14788         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
14789
14790         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
14791
14792         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
14793         * mini-ops.h: Add OP_RETHROW.
14794
14795         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
14796
14797         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
14798
14799 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
14800         
14801         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
14802         Makes the output much easier to read
14803
14804 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
14805
14806         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
14807         prevents another huge leak when compiling with ssa. Secondly, the
14808         performance of doing this rather than freeing the lists is much
14809         better. GList does a lock every time you allocate a list link,
14810         so that it can use a memory pool. So, it is better to just use
14811         a memory pool of our own.
14812         
14813         * ssa.c, linear-scan.c: replace g_list_remove_link with
14814         g_list_delete.  The remove one does not free the GList, so we were
14815         leaking memory. On -O=all --compile-all with corlib, this cut down
14816         3 MB of allocations.
14817
14818 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
14819
14820         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
14821
14822         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
14823
14824         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
14825         into a new function mono_create_jit_trampoline ().
14826
14827 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
14828
14829         * trace.c (get_spec): Allow tracing of classes without a namespace.
14830
14831 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
14832
14833         * mini.c: Fix pointer overwrite in mini_method_compile.
14834
14835 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
14836
14837         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
14838         The darwin ABI needs some special handling for 1 and 2 byte structs
14839         Lets use lbz/lhz instead of lwz everywhere.
14840         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
14841         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
14842         Use stb/sth for the former, and put the latter always on stack instead of in
14843         argument registers.
14844
14845 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
14846
14847         * trace.c (is_filenamechar): Add '_'.
14848
14849 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
14850
14851         * mini-s390.c: Fix prolog length to allow for large trace requirements.
14852
14853         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
14854
14855 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
14856
14857         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
14858         depends on libmonogc. Fixes #68805.
14859
14860 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
14861
14862         * mini.c (mono_jit_free_method): Provide extra information for
14863         this error.  Currently this leaks, but will be turned into a
14864         developer option in the future.
14865
14866 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
14867
14868         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
14869
14870 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
14871
14872         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
14873         boundary. Fixes reading of PATCH_INFO_R4 and R8.
14874         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
14875
14876 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
14877
14878         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
14879         trampolines for AOT code.
14880
14881 2004-10-22    <vargaz@freemail.hu>
14882
14883         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
14884         constructed types. Fixes #68136.
14885
14886 2004-10-21  Martin Baulig  <martin@ximian.com>
14887
14888         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
14889         if it returns true, unwind the stack to the call instruction.
14890
14891 2004-10-21    <vargaz@freemail.hu>
14892
14893         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
14894
14895         * mini.h: Bump AOT version number.
14896
14897         * objects.cs: Add another test for unbox trampolines.
14898
14899         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
14900         valuetype methods.
14901
14902 2004-10-20    <vargaz@freemail.hu>
14903
14904         * driver.c: Add SHARED to the set of optimizations tested.
14905
14906         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
14907
14908         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
14909         used by CEE_NEWARR.
14910
14911         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
14912
14913 2004-10-20  Martin Baulig  <martin@ximian.com>
14914
14915         * mini-exceptions.c (mono_handle_exception): Call
14916         mono_debugger_handle_exception() to tell the debugger about
14917         catch/finally clauses.
14918
14919 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
14920
14921         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
14922
14923         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
14924         #68447.
14925
14926 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
14927
14928         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
14929         methods as their native size, fixed bug #57543, #57545.
14930         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
14931         This saves a temporary register and mullw call down into 1 (minor perf
14932         increase for cases like sum = sum * 5;  This use to translate into:
14933             li r11,5
14934             mullw r28,r28,r11
14935         It now translates to
14936             mulli r28,r28,5
14937
14938 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
14939
14940         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
14941         #68388.
14942
14943 2004-10-11  Martin Baulig  <martin@ximian.com>
14944
14945         * mini.c (mono_method_to_ir): If we're a generic method, get the
14946         MonoGenericContainer from our MonoMethodNormal and create a
14947         MonoGenericContext from it.
14948
14949 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
14950
14951         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
14952
14953         * basic-long.cs: Add test for checked i8->i2 cast.
14954
14955 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14956
14957         * inssel-ppc.brg: added a couple of speedup rules.
14958
14959 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
14960
14961         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
14962         to speed up rebuilds.
14963
14964 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14965
14966         * mini-s390.c: Minor fix to OP_OR_IMM.
14967
14968 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
14969
14970         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
14971         better. Fixes appdomain-unload.exe on sparc.
14972
14973 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
14974
14975         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
14976         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
14977         see bug 67324.
14978
14979 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
14980
14981         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
14982
14983 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
14984
14985         * mini.c: Always generate a field read/write wrapper for members
14986         of the class MarshalByRefObject since the actual instance could
14987         be a CBO.
14988
14989 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
14990
14991         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
14992
14993 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
14994
14995         * driver.c mini.h trace.c: Move the setting of the main assembly into
14996         a separate function called mono_trace_set_assembly () and call it after
14997         actually loading the main assembly. Fixes #66872.
14998
14999 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
15000
15001         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
15002         using the code manager.
15003
15004 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
15005
15006         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
15007
15008 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
15009
15010         * cpu-amd64.md: Fix bug in previous patch.
15011         
15012         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
15013         #66650.
15014
15015 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
15016
15017         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15018         mini-exceptions.c: updates for changed stack walk interface.
15019
15020 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15021
15022         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
15023
15024 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
15025
15026         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
15027
15028 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
15029
15030         * driver.c (mini_regression_list): Do not call mono_assembly_close 
15031         since assemblies can't be unloaded.
15032         
15033 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
15034
15035         * cpu-amd64.md: Fix more instruction lengths.
15036
15037         * cpu-amd64.md: Fix lengths of some instructions.
15038
15039 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
15040
15041         * inssel.brg: Make the array ldelema check aot friendly.
15042
15043 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
15044
15045         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
15046
15047         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
15048
15049 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
15050
15051         * mini-x86.c: Fix build.
15052
15053         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
15054         mono_type_get_underlying_type () helper function to simplify code.
15055         
15056 2004-09-09  Martin Baulig  <martin@ximian.com>
15057
15058         * mini-amd64.c: Don't access `type->data.klass' directly, call
15059         mono_class_from_mono_type() instead since the type may be a
15060         generic instance.
15061
15062 2004-09-09  Martin Baulig  <martin@ximian.com>
15063
15064         * mini-amd64.c (get_call_info): Fix support for generic instances.
15065         (add_valuetype): Use mono_class_from_mono_type() to get the class
15066         since we can be a generic instance.
15067
15068 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
15069
15070         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
15071
15072 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
15073
15074         * liveness.c: reset spill costs on each scan: bug 62107
15075
15076 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
15077
15078         * exceptions-sparc.c (mono_arch_find_jit_info): remove
15079         unnecessary line that doesn't compile
15080
15081 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
15082
15083         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
15084         trampolines, make them call an error function so people can fix their
15085         code.
15086
15087 2004-09-06  Martin Baulig  <martin@ximian.com>
15088
15089         * mini.c (mono_method_to_ir): When initializing locals, handle a
15090         generic instances like a valuetype if it's a valuetype and like a
15091         class if it's a class.
15092
15093 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
15094
15095         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
15096         stack. Fixes #64674.
15097
15098         * exceptions.cs: Add test for unwinding of call arguments.
15099
15100 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
15101
15102         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
15103         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
15104         set the carry/borrow flag). The sparc and s390 implementations
15105         can now use optimized versions (and simplify the code). ppc bugfixes.
15106
15107 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
15108
15109         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
15110
15111 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
15112
15113         * inssel-amd64.brg: Remove leftover 32 bit rule.
15114
15115         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
15116
15117 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
15118
15119         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
15120         mono_arch_find_jit_info functions into a new function. Fix a memory
15121         leak.
15122
15123         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
15124         refactored code.
15125         
15126 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
15127
15128         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
15129         as well.
15130         
15131         * exceptions.cs: Add array size tests.
15132
15133         * mini.c: Allocate a separate icall wrapper for each arity of 
15134         mono_array_new_va. Fixes #59509.
15135
15136         * exceptions.cs: Add testcase for 64578.
15137
15138         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
15139
15140         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
15141         
15142 2004-09-02  Martin Baulig  <martin@ximian.com>
15143
15144         * mini.c (mono_method_to_ir): When initializing the locals, call
15145         handle_initobj() on the generic instance itself, not its
15146         underlying type.
15147
15148 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
15149
15150         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
15151         MonoJitInfo for dynamic methods.
15152
15153         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
15154
15155         * mini.c: Add support for freeing JIT data for dynamic methods.
15156         
15157 2004-09-01  Martin Baulig  <martin@ximian.com>
15158
15159         * mini-x86.c (is_regsize_var): Added support for generic
15160         instances.
15161         (mono_arch_emit_prolog): Make this compile again, use
15162         `x86_push_imm_template (code)'.
15163
15164 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
15165
15166         * mini-x86.c: make all push_imm instructions that get
15167         patched always emit the long form
15168
15169 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
15170
15171         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
15172         in a per-domain hash.
15173
15174         * mini-amd64.c (merge_argument_class_from_type): Handle generic
15175         types.
15176
15177 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
15178
15179         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
15180         work.
15181         
15182         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
15183         work.
15184
15185         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
15186         Beginnings of SSE2 support.
15187
15188         * exceptions.cs: Add more tests for checked int<->uint casts.
15189
15190 2004-08-28  Martin Baulig  <martin@ximian.com>
15191
15192         * mini-x86.c (mono_arch_instrument_epilog): Added support for
15193         generic instances.
15194
15195         * mini.c
15196         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
15197         Handle generic instances recursively.
15198
15199 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15200
15201         * iltests.il: test for conv.u8 on a constant
15202
15203 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15204
15205         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
15206         LCONV_x4 (shrun_32 (membase)).
15207
15208 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15209
15210         * inssel-x86.brg: c&p rules for push/setret of long
15211
15212 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
15213
15214         * inssel-x86.brg: c&p rules for compare (base, regvar) and
15215         compare (regvar, base)
15216
15217         * inssel-x86.brg: more burg love
15218
15219         * inssel.brg: more cleanup
15220
15221         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
15222
15223 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
15224
15225         * basic-long.cs, basic-calls.cs: new tests for optimization.
15226
15227 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
15228
15229         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
15230         patch.
15231
15232 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
15233
15234         * mini-amd64.c (read_tls_offset_from_method): Add another case.
15235         
15236 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
15237
15238         * inssel.brg (mini_emit_memcpy): use 
15239         NO_UNALIGNED_ACCESS to disable memcpy optimization
15240
15241 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
15242
15243         * mini-amd64.c: Handle generic types in various places.
15244
15245         * mini.c (mono_method_to_ir): Handle generic types in init locals.
15246
15247 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
15248
15249         * mini.c (handle_box): Fix warning.
15250
15251         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
15252
15253         * mini-amd64.h: Enable the emit_state optimization.
15254
15255         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
15256
15257         * mini-amd64.c: Add some new 64 bit peephole opts.
15258
15259         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
15260
15261         * cpu-amd64.md: sreg1 of div instructions must be %rax.
15262
15263         * mini-amd64.c: Register allocator fixes.
15264
15265         * mini.c: Add an optimization to emit_state to avoid allocation of new
15266         registers on some platforms.
15267
15268 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
15269
15270         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
15271
15272         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
15273         allocation. Fixes #63085.
15274
15275         * basic-long.cs: Add new regression test.
15276
15277         * mini-amd64.c: Register allocator improvements.
15278
15279 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
15280
15281         * mini-amd64.c (read_tls_offset_from_method): Add another code
15282         sequence.
15283
15284         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
15285         instruction sequence for nullifying class init trampolines.
15286
15287         * objects.cs: Add new regalloc test.
15288
15289         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
15290
15291 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
15292
15293         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
15294         
15295         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
15296         arguments.
15297
15298         * driver.c: Fix profiling after TLS changes.
15299         
15300         * driver.c (mono_main): Set mono_stats.enabled if needed.
15301
15302         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
15303         CEE_BOX.
15304
15305 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
15306
15307         * mini-x86.c: use a 1 op rather than a 2 op tls access
15308         instruction -> faster.
15309
15310 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
15311
15312         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
15313         x86 backend.
15314
15315 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
15316
15317         * exceptions-sparc.c (throw_exception): fix typo
15318
15319 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
15320
15321         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
15322         set tree->dreg correctly with tls. Allow any
15323         register to be used.
15324
15325         * mini-x86.c (read_tls_offset_from_method): add new code
15326         generation pattern seen with GCC.
15327
15328
15329 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
15330
15331         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
15332         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15333         exceptions-sparc.c: fix some performance issues in exception
15334         handling and setting of the stack trace for exceptions that were
15335         already thrown.
15336
15337 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
15338
15339         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
15340         x86 backend.
15341         
15342         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
15343         registers.
15344
15345 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
15346
15347         This patch inlines tls access, when possible.
15348         
15349         * mini.h: new arch functions for TLS intrinsics.
15350         All platforms updated with a stub.
15351
15352         * mini.c: use the new intrinsics
15353
15354         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
15355         arch specific intrinsic for tls variables
15356
15357 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
15358
15359         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
15360         under windows.
15361
15362 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
15363
15364         * mini.c: thread local allocation
15365
15366 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
15367
15368         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
15369
15370         * Makefile.am: Link against the static version of libmonogc.
15371         
15372         * Makefile.am: Link the static versions of the convenience libraries
15373         into the mono executable.
15374
15375         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
15376
15377 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
15378
15379         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
15380         on integer overflow.
15381
15382         * mini-amd64.c: Reorganize function call code.
15383
15384         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
15385
15386 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
15387
15388         * inssel-x86.brg: use xor eax,eax.
15389         
15390         * basic.cs: new tests
15391
15392 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
15393
15394         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
15395         in exception throwing code.
15396         
15397 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
15398
15399         * inssel-x86.brg: use xor esi,esi.
15400
15401 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
15402
15403         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
15404         can trace methods compiled during mini_init () too.
15405
15406         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
15407         CEE_CONV_U4.
15408
15409 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
15410
15411         * Makefile.am: static link on x86 (r=zoltan)
15412
15413 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
15414
15415         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
15416         code since it causes some programs to fail.
15417
15418 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
15419
15420         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
15421
15422 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
15423
15424         * mini.c: ovfops_op_map - add STACK_OBJ case for
15425         CONV_I 
15426         * basic.cs: add test_0_pin_string as test
15427         case for above.
15428
15429 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
15430
15431         * Makefile.am: build C# if srcdir != builddir
15432
15433 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
15434
15435         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
15436         fall-through blocks.
15437
15438 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15439
15440         * driver.c: enable loop by default again and include abcrem in -O=all.
15441
15442 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
15443
15444         * iltests.il: Add some localloc tests.
15445
15446         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
15447
15448         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
15449         Fixes #62574.
15450
15451         * inssel-amd64.brg: Add some optimizations.
15452
15453         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
15454         for gcc-3.4.
15455
15456         * Makefile.am: Statically link mono against libmono on AMD64.
15457         
15458         * mini-amd64.c inssel-amd64.brg: Optimizations.
15459
15460 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
15461
15462         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
15463
15464         * tramp-amd64.c: Patch calling code in trampolines.
15465
15466 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
15467
15468         * mini-amd64.c: pinvoke struct passing fixes.
15469
15470 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
15471
15472         * mini-sparc.c: redo change, make mono_arch_cpu_init call
15473         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
15474
15475 2004-08-05  Duncan Mak  <duncan@ximian.com>
15476
15477         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
15478         CEE_LDELEM_ANY.
15479
15480 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
15481
15482         * mini-amd64.c (emit_move_return_value): Move return value for normal
15483         calls too.
15484
15485 2004-08-05  Martin Baulig  <martin@ximian.com>
15486
15487         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
15488         `type->type'; just modify `type' itself when dealing with enums
15489         and generic instances.
15490         (check_call_signature): Make `simple_type' a `MonoType *'.
15491
15492 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
15493
15494         * mini.c: Use OP_PADD to add offsets to addresses.
15495
15496         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
15497
15498 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
15499
15500         * mini-sparc.c (mono_arch_emit_epilog): fix check
15501         for folding last op into restore instruction
15502
15503 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
15504
15505         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
15506         helper methods using the code manager.
15507         
15508         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
15509
15510         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
15511
15512 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15513         
15514         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
15515           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
15516
15517         * mini-s390.c: fix tail processing
15518
15519 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
15520
15521         * mini-ppc.c: mul.ovf.un exception name fix.
15522
15523 2004-08-03  Martin Baulig  <martin@ximian.com>
15524
15525         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
15526         instances; before jumping to `handle_enum', also modify `ptype'.
15527
15528 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
15529
15530         * cpu-sparc.md: fcall maximal length too small.
15531
15532 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
15533
15534         * mini-amd64.c mini.h: Add initial support for passing/returning 
15535         structures to/from pinvoked methods.
15536
15537 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
15538
15539         * mini-ppc.c: reg allocator fix.
15540
15541 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
15542
15543         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
15544
15545         * inssel.brg: Optimize memset on 64 bit machines.
15546
15547         * mini-amd64.c: Fix some vararg cases.
15548
15549 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15550
15551         * mini-s390.c: Corrected macro in emit_float_to_int
15552
15553         * s390-abi.cs: Tests to exercise the s390 ABI
15554
15555 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
15556
15557         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
15558         caller saved regs.
15559
15560         * basic.cs: Add a test for add.ovf.un.
15561
15562 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
15563
15564         * mini-sparc.c: add case for OP_IDIV_UN
15565
15566 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
15567
15568         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
15569         
15570         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
15571
15572 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
15573
15574         * basic.cs: regression tests.
15575
15576         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
15577         regressions.
15578
15579 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
15580
15581         * basic.cs: Add a new test.
15582
15583         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
15584         and AOT. Various fixes and optimizations.
15585
15586         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
15587
15588 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
15589
15590         * mini-ppc.c: make sure temp regs are not used for global reg
15591         allocation.
15592
15593 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
15594
15595         * cpu-sparc.md: conv_i8 fix for 64bits
15596
15597         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
15598
15599 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
15600         
15601         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
15602         add opcode for cmp BYTE PTR [eax], imm.
15603
15604         * inssel.brg: Make memcpy and memset takes bases.
15605
15606 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
15607
15608         * *-amd64.*: More AMD64 work.
15609         
15610 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
15611
15612         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
15613         add a compare-not-equal opcode.
15614         
15615 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
15616
15617         * mini.c: Use mono_init_from_assembly instead of mono_init.
15618         
15619 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
15620
15621         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
15622
15623         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
15624
15625         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
15626
15627         * inssel.brg: 64 bit fixes.
15628
15629         * mini.h (MonoCallInst): Add some AMD64 specific data.
15630
15631         * mini.h: Add some OP_P opcodes.
15632
15633 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
15634
15635         * basic.cs: tests for 61797 and 61740
15636
15637 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
15638
15639         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
15640         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
15641
15642 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
15643
15644         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
15645
15646         * *-amd64*.*: Ongoing AMD64 work.
15647
15648 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
15649
15650         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
15651
15652         * *-amd64*: Ongoing AMD64 work.
15653
15654         * mini-arch.h: Add AMD64 support.
15655
15656         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
15657
15658         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
15659
15660         * mini-ops.h: Add new opcodes.
15661
15662         * Makefile.am: Add AMD64 support.
15663
15664         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
15665         rules into the inssel-long*.brg files.
15666
15667         * *-amd64.*: Add beginnings of AMD64 backend.
15668
15669 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
15670
15671         * mini.c (print_dfn): commenting out the code that prints
15672         the cil. With -O=deadce, this makes -v -v crash.
15673         
15674         * cpu-pentium.md: make checkthis have a length of 2
15675
15676 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
15677
15678         * mini-sparc.h: fix implementations of __builtin
15679         functions for Sun compiler for V9.
15680
15681 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
15682
15683         * mini.c: use the new stelem.ref wrapper
15684         * exceptions.cs, arrays.cs: new stelem.ref tests
15685
15686 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
15687
15688         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
15689         new XSP should work with these changes).
15690
15691 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
15692         
15693         * inssel-{long32,x86,}.brg: trivial optimizations.
15694         
15695 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
15696
15697         * mini.c: load value when emitting box operation in
15698         constrained calls.
15699
15700 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
15701
15702         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
15703         is one byte shorter than cmp DWORD PTR [eax], 0.
15704
15705 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
15706
15707         * inssel-ppc.brg: arguments on the stack are always
15708         relative to the stack pointer (spotted by Neale Ferguson).
15709
15710 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15711
15712         * exceptions-x86.c: delay appending the method name to the trace until
15713         after mono_jit_info_table_find is called, as this gets the real
15714         MonoMethod.
15715
15716 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
15717
15718         * aot.c: register roots
15719
15720 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
15721
15722         * aot.c : I could just use PLATFORM_WIN32 flag.
15723
15724 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
15725
15726         * aot.c : Reverting the previous fix. This time it broke linux build.
15727
15728 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
15729
15730         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
15731
15732 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
15733
15734         * mini.c (handle_stack_args): Remove some more debugging code.
15735         
15736         * mini.c (handle_stack_args): Remove debug output left in by mistake.
15737
15738         * driver.c mini.h aot.c: Allow additional options to be specified with
15739         --aot and pass them to mono_compile_assembly.
15740
15741         * aot.c: Add experimental code to AOT compile all loaded assemblies
15742         on demand and save the code into a cache in the filesystem.
15743
15744         * aot.c: Add support for more wrapper methods.
15745         
15746         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
15747         58863.
15748
15749         * cpu-*.md: Remove removed opcodes.
15750
15751         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
15752         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
15753         related icalls to marshal.c.
15754
15755 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
15756
15757         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
15758
15759         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
15760
15761         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
15762
15763 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
15764         * liveness.c: If liveness is recomputated we need to reset the information
15765         for each variable. This way, if the liveness range has been narrowed
15766         by optimizations that happened after the last computation, we can return
15767         a smaller range.
15768         
15769         For example, if you have
15770         
15771         {
15772                 int i = 0;
15773                 
15774                 // Tons of code that does not affect i
15775                 
15776                 i = foo ();
15777                 ...
15778         }
15779         
15780         i = 0 is dead code and will be removed by SSA. However, when
15781         linear scan gets to the code, i will still appear to be live
15782         throughout the entire block. This prevents good register allocation.
15783
15784 2004-07-06  Martin Baulig  <martin@ximian.com>
15785
15786         * debug-mini.c (mono_debug_init_method): Allow
15787         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
15788         (mono_debug_add_icall_wrapper): New method.
15789
15790         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
15791
15792 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
15793
15794         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
15795         optimization.
15796
15797 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
15798
15799         * aot.c (mono_aot_load_method): Fix loading of debug info.
15800
15801 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
15802
15803         * aot.c: Add logging support.
15804
15805 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
15806
15807         * mini.h: Add prototype for mono_print_method_from_ip.
15808
15809         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
15810
15811         * inssel.brg: 64 bit fixes.
15812
15813         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
15814         inssel-long32.brg.
15815
15816         * Makefile.am: Add SPARC64 support.
15817
15818 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
15819
15820         * aot.c: Fix alignment problems on 32 bit platforms.
15821
15822 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
15823
15824         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
15825         SPARC64.
15826
15827         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
15828         problems.
15829
15830         * mini.h: Bump AOT file version. Some 64 bit fixes.
15831
15832 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
15833
15834         * inssel-sparc.brg: Add new rule to avoid register moves.
15835
15836         * inssel.brg: Add ldind_to_load_membase helper function.
15837
15838 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
15839
15840         * mini.c: OffsetToStringData intrinsic.
15841         
15842 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
15843
15844         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
15845
15846         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
15847         regression tests.
15848
15849         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
15850 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
15851
15852         * mini.c: reinstated mono_compile_get_interface_var()
15853         on x86, too, since the change breaks the Gtk# build there as well.
15854
15855 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15856
15857         * driver.c: remove loop from the default optimizations: it seems to
15858         interact badly with some of the other options (see bug #60613).
15859
15860 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
15861
15862         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
15863         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
15864
15865 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
15866
15867         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
15868         vararg-using methods.
15869
15870 2004-06-21  Martin Baulig  <martin@ximian.com>
15871
15872         * mini/mini-exceptions.c
15873         (mono_handle_exception): Added `gpointer original_ip' argument.
15874         After calling mono_unhandled_exception(), call
15875         mono_debugger_unhandled_exception() and if that returns true,
15876         restore the context and return.
15877
15878 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
15879
15880         * mini-ppc.c: prefer the use of relative branches so
15881         they won't need to be patched in aot code (patch from Patrick Beard).
15882
15883 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
15884
15885         * aot.c: patch from Patrick Beard to make the output assembly
15886         more correct for the MacOSX assembler. Small tweak to
15887         generate sane images on Linux/PPC, too.
15888
15889 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15890
15891         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
15892         case until bug #59509 is fixed (shows up in #60332).
15893
15894 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15895
15896         * mini.c: make sure the needed wrappers are compiled, too, with
15897         precomp.
15898
15899 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
15900
15901         * driver.c: remove NPTL reference in --version output.
15902
15903 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15904
15905         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
15906         generate valid assembly for the Mach-O assembler.
15907
15908 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
15909
15910         * driver.c: don't include abcrem in the all optimization specifier
15911         since it slows down jit compilation too much for now.
15912
15913 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
15914
15915         * mini.c: use BIGMUL only if both operands have the same signage.
15916         * iltests.il: Test for bug 60056. (errors related to signage in
15917         BIGMUL).
15918
15919         r=lupus.
15920
15921 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
15922
15923         * mini.c, aot.c: memory leak fixes.
15924
15925 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
15926
15927         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
15928
15929 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
15930
15931         * Makefile.am: remove the -static hack completely, it links in
15932         statically glib as well.
15933
15934 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
15935
15936         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
15937         * exceptions.cs: make it compile with new mcs/csc.
15938
15939 2004-06-03 Massimiliano Mantione <massi@ximian.com>
15940         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
15941         and added relevant test case.
15942
15943 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
15944
15945         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
15946         regressions in gtk-sharp.
15947
15948 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
15949
15950         * exceptions.cs: New regression tests.
15951
15952         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
15953
15954 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
15955
15956         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
15957
15958 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
15959
15960         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
15961
15962         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
15963
15964 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
15965
15966         * mini.c (mono_jit_runtime_invoke): Init class in this
15967         method instead of trusting mono_jit_compile_method to
15968         do the work (because wrappers can be in object class)
15969
15970 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
15971
15972         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
15973
15974         * basic-long.cs: New regression test.
15975
15976 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
15977
15978         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
15979         and div/rem checks.
15980
15981 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
15982
15983         * Makefile.am: fix miguel's change to build mono statically against
15984         libmono (track build dependencies).
15985
15986 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
15987
15988         * cfold.c: Some glib versions do not have G_MININT32.
15989
15990 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
15991
15992         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
15993         with precision of tan, atan, sin and cos, and implemented related
15994         regressions tests (fixes bug 54467, but one new problem appeared and
15995         is not fixed yet).
15996
15997 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
15998
15999         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
16000
16001         * exceptions.cs: Add test for constant folding && division by zero.
16002
16003         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
16004         since driver.c is in libmono too, so the optimization was useless.
16005
16006         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
16007         variable to driver.c so the compiler can emit more efficient code to
16008         access them.
16009
16010 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16011
16012         * Makefile.am: don't distribute generated inssel.[ch] files.
16013
16014 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
16015
16016         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
16017         into the default appdomain. Fixes #58707.
16018
16019         * jit-icalls.c: Remove the broken approximation for truncl, doing
16020         no conversion is better.
16021
16022         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
16023         Fixes #58863.
16024
16025 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16026
16027         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
16028         of the mcrxr instruction which is not available on some processors
16029         even if it's documented to be. Implement add and sub overflow correctly
16030         (still not complete for long unsigned). Speed up icalls a bit.
16031
16032 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
16033
16034         * mini.c (mono_jit_compile_method_with_opt): Make sure that
16035         we run .cctor in the current domain instead of target_domain.
16036         
16037         Fixes bug #58558, .cctor not being called in -O=shared.
16038
16039 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16040
16041         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
16042
16043 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
16044
16045         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
16046         which can be done with an imm8, do it that way.
16047         (mono_arch_output_basic_block): ditto for a jmp
16048         (mono_arch_emit_prolog): Computate maximum offset of a label.
16049
16050 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
16051
16052         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
16053         now tries to allocate prefered physical reg's for virtual
16054         regs. This reduces the number of emited spills/loads with
16055         20-30% on our core assemblies.
16056
16057 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16058
16059         * jit-icalls.c: truncl() is not needed and trunc() is
16060         the correct thing to do anyway (bug #58287).
16061
16062 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
16063
16064         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
16065         if available.
16066
16067 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
16068
16069         * driver.c: enable loop optimizations by default.
16070
16071 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
16072
16073         * mini-x86.c: fix calc of max loop size when aligning loops start.
16074
16075 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
16076
16077         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
16078         the stack.
16079
16080 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
16081
16082         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
16083         should set carry.
16084
16085         * basic-long.cs: Add tests for add/subtract of immediates with carry.
16086
16087         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
16088         
16089         * mini.c (inline_method): Allways inline some wrappers even if the cost
16090         is too large. Fixes #58785.
16091
16092         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
16093         
16094 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
16095
16096         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
16097         (crichton@gimp.org). Beginning of support for sparc/linux.
16098
16099         * mini-sparc.c: Optimize retrieval of LMF address.
16100
16101 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
16102
16103         * exceptions-ppc.c:  handle alloca in methods with clauses.
16104
16105 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
16106
16107         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
16108
16109 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
16110
16111         * mini.c: Delegate most of the abort signal work to 
16112           mono_thread_request_interruption, which also handles Stop and Suspend
16113           states.
16114
16115 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
16116
16117         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
16118         supports the save/restore lmf opcodes.
16119
16120 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
16121
16122         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
16123         by gcc-3.4 as well.
16124
16125         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
16126
16127 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
16128
16129         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
16130         methods which contain array accesses.
16131
16132         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
16133         boundaries. Fixes #58537.
16134
16135         * iltests.il: Add regression test for #58537.
16136
16137 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
16138
16139         * mini-x86.c (mono_arch_local_regalloc): Last part of
16140         fix for bug #58633 (releasing register to early).
16141
16142 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
16143
16144         * basic-long.cs: Add new regression test.
16145
16146 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
16147
16148         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
16149         register too early on the chain.
16150
16151 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
16152
16153         * mini.c (create_helper_signature): Use a helper function to reduce
16154         the code which needs to be written. Also set the calling convention of
16155         icalls on windows. Fixes #57840.
16156
16157 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
16158
16159         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
16160         exceptions-ppc.c: added helper function to get the instruction address
16161         from a signal handler context.
16162
16163 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16164
16165         * helpers.c: use g_get_tmp_dir. Invokes happyness 
16166         from gonzalo.
16167
16168 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16169
16170         * helpers.c: Add new env variable to pass args to objdump.
16171         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
16172
16173 2004-05-17  Radek Doulik  <rodo@ximian.com>
16174
16175         * Makefile.am (common_sources): added abcremoval.h so it get
16176         disted and daily mono packages on go-mono.com will build again
16177
16178 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
16179
16180         * abcremoval.c: Fixed coding style, added copyright header.
16181
16182         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
16183
16184         * mini.h: Added prototype for abc removal main function.
16185
16186         * build_relations_propagation_table.pl: Added copyright header.
16187
16188 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
16189
16190         * basic-long.cs: reg test for complex ceq_long bug.
16191
16192 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
16193
16194         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
16195         reg in long and clob case (bug #58343). Fixed/added comments.
16196
16197 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
16198
16199         * mini.c (mono_jit_runtime_invoke): Follow new convention
16200         of calling the invoke method with an function pointer.
16201
16202 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
16203
16204         * ChangeLog: Fix author of memory leak patch.
16205
16206 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
16207
16208         * Makefile.am: fix make dist as well...
16209
16210
16211 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
16212
16213         * cfold.c: Made so that conversions from pointer to int4 are no-ops
16214         on archs where pointers are 4 bytes long.
16215
16216         * Makefile.am: Added abcremoval.c source file.
16217
16218         * abcremoval.c: Added abcremoval.c.
16219
16220         * abcremoval.h: Added abcremoval.h.
16221
16222         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
16223
16224         * inssel.brg: Enabled bounds check removal.
16225
16226         * mini.c: Added support for abcrem optimization.
16227
16228         * mini.h: Added abcrem optimization label.
16229
16230         * driver.c: Added support for abcrem optimization.
16231
16232         * propagated_relations_table.def: Added propagated_relations_table.def.
16233
16234 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
16235
16236         * mini.c, cfold.c: fix style.
16237
16238 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16239
16240         * mini.c: handle issue with the low-level implementation of
16241         some long opcodes (bug #54209).
16242
16243 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
16244
16245         * basic.cs: test for my new cmov stuff.
16246
16247 2004-05-13      Patrik Torstensson
16248
16249         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
16250         opt and added peephole documentation.
16251
16252 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
16253
16254         * tramp-ppc.c: rewrote the generic trampoline code.
16255
16256 2004-05-11      Patrik Torstensson
16257
16258         * mini-x86.c: optimize long shl/shr asm code (one less branch)
16259
16260 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
16261
16262         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
16263
16264         * mini.h mini.c dominators.c: Applied patch from Derek Woo
16265         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
16266
16267         * mini.c: Add new icalls for AsAny marshalling.
16268
16269 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
16270
16271         * tramp-ppc.c, mini-ppc.c: more cleanups.
16272
16273 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16274
16275         * mini.c: no warnings.
16276
16277 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16278
16279         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
16280
16281 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
16282
16283         * mini.c: In the thread abort signal handler, if the thread is in the
16284         process of being stoped, don't throw the Abort exception, just stop the
16285         thread.
16286
16287 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
16288
16289         * tramp-ppc.c: removed old code.
16290
16291 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16292
16293         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
16294         do some simple speed optimizations on ppc.
16295
16296 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
16297
16298         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
16299         and large offsets in load/store.
16300
16301 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
16302
16303         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
16304         it causes regressions.
16305
16306 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
16307
16308         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
16309         support.
16310
16311 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16312
16313         * jit-icalls.c: remove warnings.
16314         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
16315         speedups for unsafe code.
16316
16317 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
16318
16319         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
16320
16321 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
16322
16323         * basic-calls.cs: Add new regression test.
16324
16325         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
16326         more portable.
16327
16328         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
16329
16330         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
16331         is no longer used.
16332
16333 2004-05-06      Patrik Torstensson
16334
16335         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
16336         long reg allocation in any reg (not only eax:edx) and implemented 
16337         long shl/shr ops in asm instead of helpers.
16338
16339 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
16340
16341         * mini-sparc.h: Fix warnings.
16342
16343         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
16344         stack.
16345
16346         * mini-exceptions.c (mono_handle_exception): Call the filter in a
16347         separate statement for clarity.
16348
16349         * mini-sparc.c: Update status.
16350
16351 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
16352
16353         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
16354         here.
16355
16356 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16357
16358         * inssel-ppc.brg: another small pre-release workaround:
16359         we don't do overflow detection for long_sub_un.
16360
16361 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16362
16363         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
16364         (also works around a weird ppc bug: 57957).
16365
16366 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
16367
16368         * tramp-ppc.c: trampoline fixes.
16369
16370 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
16371
16372         * mini-ppc.c: fixed typos.
16373
16374 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
16375
16376         * mini-ppc.c, exceptions-ppc.c: more code saves registers
16377         at the top of the stack. Fixed typos. Use a frame registers
16378         for all the methods with exception clauses.
16379
16380 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16381
16382         * exceptions-ppc.c: restore fp registers.
16383
16384 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16385
16386         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
16387         order from the stack top (moved the stack room to save the
16388         return value for trace after the param area). Fixed corruption
16389         in restoring registers on unwind.
16390
16391 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
16392
16393         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
16394
16395 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16396
16397         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
16398         and prolog/epilog for methods that use it. Allow
16399         enough param area room for varargs methods. Fix miguel's
16400         breakage in exception handling.
16401
16402 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16403
16404         * Makefile.am: run genmdesc only on current arch.
16405
16406 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16407
16408         * exceptions-x86.c:
16409         * mini-x86.h: fix the build on windows.
16410
16411 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
16412
16413         * 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.
16414
16415         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
16416
16417         * mini-exceptions.c: New file.
16418         
16419         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
16420         Move some parts of the x86 exception handling code to an 
16421         arch-independent file so it can be shared with other ports.
16422
16423 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
16424
16425         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
16426
16427 2004-04-26  David Waite  <mass@akuma.org>
16428
16429         * driver.c: remove comma from end of enumeration declaration
16430
16431 2004-04-26  Jackson Harper  <jackson@ximian.com>
16432
16433         * driver.c: parse config file before loading first assembly. This
16434         allows the user gac to be enabled/disabled. 
16435         
16436 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
16437
16438         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
16439         simpler mechanism: we do not care what is encoded initially
16440         (branch absolute or relative), we care about the code and its
16441         target.  I kept the old code for reference for now.
16442
16443         The new code tries first to determine if the jump is anywhere in
16444         the -/+32 absolute meg range, if it succeeds, it encodes using the
16445         absolute branch;  If not, it tried to find something in the
16446         relative range, if not, it uses the handle_thunk code. 
16447
16448 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
16449
16450         * exceptions-ppc.c: use the correct ip register on macosx.
16451
16452 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
16453
16454         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
16455
16456 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
16457
16458         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
16459         Raise exception on integer divide by zero by hand since the hw
16460         doesn't support it. Handle NaNs in FP compares.
16461
16462 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
16463
16464         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
16465         code reducing duplication between the platforms and enabled
16466         signal exception handling (on linux for now).
16467
16468 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
16469
16470         * exceptions-ppc.c: more macosx support.
16471
16472 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16473
16474         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
16475
16476 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
16477
16478         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
16479
16480 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
16481
16482         * iltests.il: more tests.
16483
16484 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
16485
16486         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
16487         vars as well.
16488
16489 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
16490
16491         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
16492
16493 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
16494
16495         * liveness.c: Mark variables as volatile in all basic blocks reachable
16496         from exception clauses.
16497
16498 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
16499
16500         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
16501         inlining.
16502
16503 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
16504
16505         * iltests.il, basic.cs: more tests for regalloc.
16506
16507 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16508
16509         * iltests.il: Some tests for register allocation modifications
16510         I have locally.
16511
16512 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
16513
16514         * exceptions.cs: Add regression test for bug #56782.
16515
16516         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
16517         original stack trace if an exception is rethrown. Fixes #56782. Oh,
16518         the beauty of fixing the same thing in 5 different files...
16519
16520 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
16521
16522         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
16523         methods.
16524
16525 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
16526
16527         * mini.c: Add support for STRWLPARRAY marshalling convention.
16528
16529 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
16530
16531         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
16532         to init the context to setup the regs pointer).
16533
16534 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16535
16536         * exceptions-ppc.c: more exceptions work.
16537
16538 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16539
16540         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
16541         not allowed.
16542
16543 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
16544
16545         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
16546         can use the memory directly.
16547
16548         * cpu-pentium.md: Update documentation from a post from Zoltan. 
16549
16550         add x86_add_membase, x86_sub_membase, x86_mul_membase
16551
16552 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
16553
16554         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
16555         GENERAL_REGS they were also hardcoded for all PPC ports.
16556
16557         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
16558
16559         Remove hard-coded limit for floating point registers, use
16560         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
16561
16562         Notice that in MacOS X calling conventions you can fit a lot more
16563         floating point values in registers, so I should update the PInvoke
16564         test to excercise the passing of floating point values on the
16565         stack (currently broken).
16566         
16567 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
16568
16569         * tramp-ppc.c (create_trampoline_code): Added
16570         JUMP_TRAMPOLINE_SIZE. 
16571         (ppc_magic_trampoline): Follow the pattern from
16572         x86_magic_trampoline: if code is set to zero, return. 
16573         (create_trampoline_code): Always pass MonoMethod to the jump
16574         trampoline, before it was passing a null.
16575         (mono_arch_create_jump_trampoline): Implement the jump stub, could
16576         share the code with mono_arch_create_jit_trampoline. 
16577
16578         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
16579         implemented.
16580         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
16581         implemented.  
16582
16583         * cpu-g4.md: Added length for jmp instruction, the worst case
16584         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
16585         for save_lmf).
16586
16587 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
16588
16589         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
16590
16591 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
16592
16593         * mini.c: Only set bblock->real_offset when adding a new bblock, and
16594         before each IL instruction.
16595
16596         * mini.c (CEE_BOX): Fix warnings.
16597
16598 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16599
16600         * mini.c: removed a few unused vars and extra whitespace.
16601
16602 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
16603
16604         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
16605         checks.
16606         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
16607         index.
16608         (OP_GETCHR): use the above
16609         (CEE_LDELEMA): use the above.
16610
16611         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
16612         version of the generic impl.
16613         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
16614         (CEE_LDELEMA): use the above.
16615
16616 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
16617
16618         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
16619         Fixes #56317.
16620
16621         * iltests.il: Added new regression test for #56317.
16622
16623 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
16624
16625         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
16626         under NetBSD. Fixes #56450.
16627
16628         * liveness.c (update_gen_kill_set): Fix previous patch.
16629
16630 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16631
16632         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
16633
16634 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
16635
16636         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
16637         ldsfld and ldsflda.
16638
16639         * inssel-sparc.brg: Add more optimizations.
16640
16641         * mini-sparc.c: Replace multiply/divide with shifts if possible.
16642
16643 2004-04-01  Martin Baulig  <martin@ximian.com>
16644
16645         * mini.c (handle_box): New static function; moved the
16646         implementation of CEE_BOX here.
16647         (mono_method_to_ir): Added `constrained_call' variable.
16648         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
16649         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
16650         mono_method_get_constrained() to get the method.
16651
16652 2004-04-01  Martin Baulig  <martin@ximian.com>
16653
16654         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
16655         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
16656         (mono_method_to_ir): We don't need these macros anymore since
16657         mono_class_get_full() already takes care of it. 
16658
16659 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16660
16661         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
16662         use @function (as doesn't accept #function here) and check the return
16663         value of system and stop if fails.
16664
16665 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16666
16667         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
16668
16669 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
16670
16671         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
16672
16673         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
16674
16675         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
16676         #56223.
16677
16678         * basic-long.cs: Add test for negation of Int64.MinValue.
16679
16680 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
16681
16682         * mini-sparc.c: Update status.
16683
16684         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
16685
16686         * exceptions-sparc.c: Fix return value in filters.
16687
16688         * inssel-sparc.brg: Fix register allocation in some rules.
16689
16690 2004-03-28  Martin Baulig  <martin@ximian.com>
16691
16692         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
16693         if neccessary.  
16694
16695 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
16696
16697         * mini-x86.c (mono_arch_patch_code): Fix warnings.
16698         
16699         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
16700         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
16701         remove unused conv_u4 opcode.
16702
16703         * mini-x86.c: Remove valgrind workaround since it slows down things
16704         even when mono is not run under valgrind.
16705
16706 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
16707
16708         * mini-sparc.c: Update status.
16709
16710         * inssel-sparc.brg: Add some optimizations.
16711
16712         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
16713         future delay slot filling. Add support for varargs, tail calls and JMP.
16714
16715         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
16716         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
16717
16718         * inssel.brg: Fix register allocation in OP_ARGLIST.
16719
16720         * inssel.brg: Fix warnings.
16721
16722 2004-03-25  Martin Baulig  <martin@ximian.com>
16723
16724         * mini.c (inflate_generic_field): Removed.
16725         (mini_get_method): Removed, use mono_get_method_full(),
16726         (mini_get_class): Removed, use mono_class_get_full().
16727         (mono_method_to_ir): Pass our generic context to
16728         mono_field_from_token().        
16729
16730 2004-03-25  Martin Baulig  <martin@ximian.com>
16731
16732         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
16733         of a `MonoMethod *'.
16734         (mini_get_method): Take a `MonoGenericContext *' instead
16735         of a `MonoMethod *'.
16736         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
16737         a new local variable called `generic_context' which holds the
16738         current `MonoGenericContext *'; use it to lookup things.
16739
16740 2004-03-24  Martin Baulig  <martin@ximian.com>
16741
16742         * mini.c (mini_get_class): New static method; if we're inside a
16743         generic instance, inflate the class if neccessary.
16744         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
16745
16746 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
16747
16748         * iltests.il: New regression test for #55976.
16749
16750         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
16751         #55976.
16752
16753 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
16754
16755         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
16756         output.
16757
16758 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
16759
16760         * liveness.c: Consider SSA stores as well as loads when making vars
16761         volatile.
16762
16763         * exceptions.cs: New regression tests for register allocation.
16764         
16765 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
16766
16767         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
16768         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
16769           domain lock only to protect puntual access to data structures.
16770           Added access lock for sighash, jit_icall_hash_name, 
16771           jit_icall_hash_addr and domain->code_mp.
16772
16773 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
16774
16775         * driver.c: Print SIGSEGV handling method.
16776
16777         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
16778
16779         * mini.c (setup_jit_tls_data): Handle case when this is called
16780         multiple times for a thread.
16781
16782         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
16783         is different from fbxx_un. Fixes #54303. Also use constants instead of
16784         magic numbers in a lot of places.
16785
16786 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
16787
16788         * exceptions.cs: Fix cctor test when --regression is used.
16789
16790 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
16791
16792         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
16793         for Linux/ppc.
16794
16795 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
16796
16797         * inssel-ppc.brg: fixed register assignments for some rules.
16798
16799 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
16800
16801         * exceptions.cs: Add test for exceptions in static constructors.
16802
16803         * mini.c (mono_jit_compile_method_with_out): Move the calling of
16804         static constructors outside the domain lock. Fixes #55720.
16805
16806 2004-03-17  Martin Baulig  <martin@ximian.com>
16807
16808         * mini.c (get_generic_field_inst): Removed, this'll never happen.
16809         (inflate_generic_field): Take the `MonoMethod *' instead of the
16810         `MonoClass *' and added support for generic method.
16811         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
16812         have a `field->parent->gen_params', only inflate the field if it's
16813         an open constructed type.
16814
16815 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
16816
16817         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
16818         exception object instead of the preconstructed ones.
16819
16820 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16821
16822         * mini.c: reverted changed to sigsegv_signal_handler commited
16823         accidentally in the previous patch.
16824
16825 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16826
16827         * mini.c:
16828         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
16829         running --aot with an old assembly.
16830
16831 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
16832
16833         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
16834         point values.
16835
16836         * mini-sparc.c: Add support for v9 branches with prediction.
16837
16838 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
16839
16840         * mini.c (mini_init): #warning is GNUC only
16841
16842         * mini-sparc.h: implement __builtin_frame_address
16843         and __builtin_return_address for Sun C compiler
16844
16845 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
16846
16847         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
16848
16849 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
16850
16851         * basic-calls.cs: Add test for unaligned byref long argument passing.
16852
16853         * mini-ops.h: Add sparcv9 compare and branch instructions.
16854
16855         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
16856         v9 instructions if we have a v9 cpu.
16857
16858         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
16859         registers for global allocation.
16860
16861         * exceptions-sparc.c: Fixes.
16862         
16863 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
16864
16865         * liveness.c (mono_analyze_liveness): Optimized version.
16866
16867         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
16868
16869         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
16870         sparc work.
16871
16872         * basic-float.cs basic-calls.cs: New regression tests.
16873
16874 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
16875
16876         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
16877         sigaltstack implementation.
16878
16879         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
16880         
16881         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
16882         stuff if SIGSEGV_ON_ALTSTACK is not defined.
16883
16884 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
16885
16886         * mini.c: Fix warnings.
16887         
16888         * mini.c (mono_resolve_patch_target): New function which contains the
16889         arch independent part of the patching process.
16890
16891         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
16892         patching code to a separate function.
16893
16894 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
16895
16896         * mini.c (add_signal_handler): ifdef out on Windows
16897
16898 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
16899
16900         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
16901         cpu-sparc.md: Add exception handling support + other fixes.
16902
16903         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
16904         typed GC detection in --version.
16905
16906         * basic.cs exceptions.cs: New regression tests.
16907
16908         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
16909         the arch specific code can store data during a compilation.
16910
16911         * mini-ops.h: Add OP_SETFRET.
16912
16913         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
16914         function, register a separate icall for each arity, so the icalls can
16915         get a wrapper.
16916         
16917         * mini.c (mono_print_tree): Print negative offsets in a more readable
16918         form.
16919         
16920         * mini.c: Make signal handling work on sparc.
16921         
16922         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
16923
16924         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
16925
16926         * jit-icalls.c: Emulate truncl by aintl on solaris.
16927
16928         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
16929
16930 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
16931
16932         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
16933
16934 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
16935
16936         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
16937         a MarshalByRef type, inline a method that performs the check, taking into
16938         account that the object can be a proxy. Also implemented tow new opcodes:
16939         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
16940         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
16941         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
16942
16943 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
16944
16945         * mini-ppc.c: if a relative branch displacement is too big
16946         but it points to and area reachable with an absolute branch, 
16947         avoid the thunks.
16948
16949 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
16950
16951         * mini.c: optimize small copies in cpblk.
16952
16953 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
16954
16955         * basic-calls.cs basic-float.cs: New regression tests.
16956
16957         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
16958         negative offsets from %fp. Implement localloc. Fix local register 
16959         allocation. Fix the case when the this argument needs to be saved to
16960         the stack. Implement some missing opcodes.
16961
16962 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
16963
16964         * mini.c (mini_method_compile): Reenable global regalloc in methods
16965         with exception handlers.
16966
16967         * linear-scan.c (mono_varlist_sort): Fix warning.
16968
16969         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
16970
16971         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
16972         regalloc costs.
16973
16974         * liveness.c: Make all variables uses in exception clauses volatile, to
16975         prevent them from being allocated to registers. Fixes #42136.
16976
16977 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
16978
16979         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
16980         causes regressions.
16981
16982         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
16983         argument to mono_arch_regalloc_cost.
16984
16985         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
16986         precisely.
16987
16988 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
16989
16990         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
16991         Make the cost of allocating a variable to a register arch dependent.
16992
16993         * basic-calls.cs: Fix compilation of tests.
16994         
16995         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
16996         helper function to cut back on the number of #ifdefs needed.
16997
16998         * mini-ppc.c: Fix compilation.
16999
17000         * basic-calls.cs: New regression tests.
17001
17002         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
17003
17004         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
17005         of l0 since that is callee saved.
17006
17007         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
17008         to virtual calls.
17009
17010         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
17011         of delay instruction.
17012
17013         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
17014
17015         * mini.h (MonoCallInst): Add 'virtual' flag.
17016
17017         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
17018
17019 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
17020
17021         * *.cs: New regression tests.
17022
17023         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
17024         work.
17025
17026         * mini.c (mono_runtime_install_handlers): Fix build.
17027
17028         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
17029         'signal_stack_size' members.
17030
17031         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
17032         alternate signal stack.
17033
17034         * exceptions-x86.c: Add stack overflow handling.
17035
17036         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
17037         functions to arch independent code.
17038
17039         * mini.c (mono_print_tree): Print more detailed info for load_membase
17040         opcodes.
17041         
17042 2004-02-23  Martin Baulig  <martin@ximian.com>
17043
17044         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
17045
17046 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
17047
17048         * mini-x86.c: fixed reg allocation for div/rem.
17049
17050 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
17051
17052         * driver.c (mono_main): Report some configuratio options on --version.
17053
17054 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
17055
17056         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
17057         low in the address space. Correctly flush memory in thunks where we
17058         output native code.
17059
17060 2004-02-20  Martin Baulig  <martin@ximian.com>
17061
17062         * mini.c (mini_get_method): New static method; inflate all generic
17063         methods and methods in open generic instances.
17064         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
17065         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
17066
17067 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
17068
17069         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
17070
17071         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
17072
17073 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
17074
17075         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
17076
17077         * mini-sparc.c (flushi mono_arch_output_basic_block): make
17078         it compile using Sun's compiler.
17079
17080 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
17081
17082         * 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.
17083
17084         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
17085
17086 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
17087
17088         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
17089         code.
17090         * mini-ppc.c: handle calls outside of the allowed range with thunks
17091         allocated using the code manager.
17092         * tramp-ppc.c: use the code manager to hold generated native code.
17093         Fixed the magic trampoline to just patch vtable entries.
17094
17095 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
17096
17097         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
17098         independent file.
17099
17100 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
17101
17102         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
17103         PPC.
17104
17105         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
17106         if we have a working __thread implementation.
17107
17108         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
17109         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
17110
17111 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
17112
17113         * mini-x86.c: Fix compilation under gcc 2.
17114         
17115 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
17116
17117         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
17118         contains a call to the wrapped function.
17119
17120         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
17121         OP_<CALL>_IMM opcodes, and use them under X86.
17122         
17123         * mini.c (mono_jit_find_compiled_method): Fix warning.
17124
17125         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
17126
17127         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
17128
17129         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
17130         functionality to mini.c.
17131
17132         * mini.c (mono_create_jump_trampoline): New function to create a jump
17133         trampoline. Return a compiled method instead of a trampoline if it
17134         exists. Add a cache for jump trampolines.
17135
17136         * mini.c (mono_jit_find_compiled_method): New function to return a
17137         compiled method if it exists.
17138
17139         * mini-x86.c: Call mono_create_jump_trampoline instead of 
17140         mono_arch_create_jit_trampoline.
17141
17142         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
17143         a jump trampoline. Fixes #52092.
17144         
17145 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
17146
17147         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
17148         which is not up-to-date. Add check_corlib_version () instead.
17149
17150         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
17151         have to call it.
17152         
17153         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
17154         since newer valgrind versions do not need it.
17155
17156         * mini.c (mono_jit_compile_method_with_opt): New helper function to
17157         compile a method with a given set of optimizations.
17158
17159         * mini.c: Compile icall wrappers on-demand instead of at startup.
17160
17161         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
17162         wrapper for an icall.
17163
17164 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
17165
17166         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
17167         #54063.
17168
17169         * iltests.il: Add test for non-empty stack before switch instruction.
17170
17171 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
17172
17173         * mini.c: Add support for new stringbuilder marshalling conventions.
17174
17175         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
17176
17177 2004-02-01  Martin Baulig  <martin@ximian.com>
17178
17179         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
17180         in `ginst->mtype_argv'.
17181
17182 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
17183
17184         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
17185         facilitate grepping.
17186
17187 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
17188
17189         * mini.c: fixed buglet in initobj generic implementation for references.
17190
17191 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
17192
17193         * Makefile.am: make the version script conditional.
17194         * jit-icalls.c: handle missing truncl().
17195
17196 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
17197
17198         * exceptions.cs: Add more tests for double->int conversion.
17199
17200         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
17201         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
17202
17203 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
17204
17205         * driver.c: make --verbose --version emit an error
17206         if the loaded corlib doesn't match the runtime version.
17207
17208 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
17209
17210         * mini-ppc.h: export ppc_patch().
17211         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
17212         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
17213         on par or better than on MacOSX.
17214
17215 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
17216
17217         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
17218         mono_lookup_pinvoke_call.
17219
17220         * mini-x86.c: Under windows, the default pinvoke calling convention is
17221         stdcall. Fixes #52834.
17222
17223         * mini.c (optimize_branches): Add an upper bound to the number of
17224         iterations to prevent infinite loops on strange loops. Fixes #53003.
17225
17226 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
17227
17228         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
17229         and ISINST. Fixes #52093.
17230
17231         * objects.cs (test_0_vector_array_cast): New tests.
17232         
17233 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
17234
17235         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
17236         checking in Array.Set ().
17237
17238         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
17239         #52590.
17240
17241         * object.cs (test_0_multi_array_cast): New regression test.
17242
17243 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
17244
17245         * exceptions-ppc.c: fix build on Linux/PPC.
17246
17247 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
17248
17249         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
17250         running under valgrind.
17251         (x86_magic_trampoline): Fix build bustage.
17252
17253         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
17254         negative values as well. This is needed for the encoding of the line number
17255         info, since sometimes the line numbers are not in increasing order.
17256
17257 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
17258
17259         * cpu-pentium.md (localloc): Increase the size of the localloc 
17260         instruction since it is a loop under Win32.
17261
17262         * debug-mini.c (record_line_number): Get rid of unneccesary memory
17263         allocation.
17264
17265 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
17266
17267         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
17268         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
17269         Max Horn (max@quendi.de). Fix file names in comments.
17270
17271 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
17272
17273         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
17274         avoid stack overflow.
17275         (replace_usage): Avoid uninitialized variable warnings.
17276
17277         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
17278         and taking the address of valuetype variables.
17279
17280 2004-01-03  Patrik Torstensson
17281
17282         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
17283         for other purposes than FP later on.
17284
17285 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
17286
17287         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
17288         of tail calls.
17289
17290 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
17291
17292         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
17293
17294 2003-12-30  Patrik Torstensson <p@rxc.se>
17295
17296         * mini-x86.h: Decreased number of availiable fp regs.
17297         Solves corner cases with FP spilling.
17298
17299 2003-12-23  Patrik Torstensson <p@rxc.se>
17300
17301         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
17302         for floating point stack tracking / spilling on x86. 
17303         Fixes bug #49012.
17304         
17305         * basic-float.cs: added float mul overflow test.
17306
17307 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
17308
17309         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
17310
17311 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17312
17313         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
17314         supports for cond branches that overflow the immediate
17315         overflow offset. mcs can compile simple programs.
17316
17317 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17318
17319         * exceptions-ppc.c: exception handling support wip:
17320         finally handlers get run on exception.
17321
17322 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
17323
17324         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
17325         profiling.
17326
17327 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17328
17329         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
17330         initial support for stack walking and unwinding.
17331
17332 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
17333
17334         * driver.c (mono_main): Make corlib-out-of-sync message more 
17335         descriptive. Also remove verify_corlib call.
17336
17337 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17338
17339         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
17340         not overlap with other call's arguments, too.
17341
17342 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
17343
17344         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
17345         move to arch-specific code the choice of arch-specific
17346         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
17347         * mini.c: ensure emulation calls will not interleave
17348         with other calls.
17349
17350 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
17351
17352         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
17353         the magic trampoline stack frame is dropped before executing
17354         the new method.
17355
17356 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
17357
17358         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
17359         and integer to fp conversions. Added support for overflowing
17360         arguments on the stack. Reserve a couple more registers as temps.
17361         Added support for aot compilation (as output still needs to be
17362         tweaked, though).
17363
17364 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17365
17366         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
17367         Don't overwrite return register in some corner cases.
17368
17369 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
17370
17371         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
17372         static constructors when AOT compiling.
17373
17374         * driver.c (mono_main): Call mono_check_corlib_version.
17375
17376 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17377
17378         * cpu-g4.md, basic.cs: fixed div target register.
17379
17380 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
17381
17382         * mini-ppc.c, basic.cs: shl_imm fix with test.
17383
17384 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17385
17386         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
17387         structures by value. Misc fixes.
17388         * objects.cs: more tests.
17389
17390 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
17391
17392         * mini-ppc.c: lconv.ovf.i implemented.
17393
17394 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17395
17396         * mini.c:
17397         (mini_init): don't error out if someone already called g_thread_init.
17398
17399 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17400
17401         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
17402         to be any type per the spec. Fix abnormal memory usage when
17403         the same object is repeatedly thrown.
17404
17405 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
17406
17407         * mini.c: check for overruns in IL code.
17408
17409 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
17410
17411         * TODO: Add/remove some todo entries.
17412
17413 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
17414
17415         * driver.c (mono_main): Call mono_verify_corlib.
17416
17417 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
17418
17419         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
17420         This has been moved to mini.c
17421         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
17422         type being casted is marshalbyref it could be a proxy, so instead of
17423         emitting the type check code, emit a call to a runtime method that will
17424         perform the check by calling CanCastTo if needed.
17425
17426 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
17427
17428         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
17429         methods with large stack frames under Win32.
17430
17431 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
17432
17433         * Makefile.am: Distribute regression tests.
17434
17435         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
17436         at the end instead of inserting each variable into the sorted list.
17437
17438         * linear-scan.c (mono_varlist_sort): New helper function.
17439         
17440 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17441
17442         * mini.c: ensure arguments and locals are within bounds.
17443
17444 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17445
17446         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
17447         related fixes.
17448
17449 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
17450
17451         * mini.c (mono_cprop_copy_values): Fix crash.
17452
17453         * aot.c: Set verbosity back to 0.
17454         
17455 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17456
17457         * regalloc.c: complete memory leak fix by Laurent Morichetti
17458         (l_m@pacbell.net).
17459
17460 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
17461
17462         * driver.c (main_thread_handler): Revert the previous patch.
17463
17464         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
17465         under valgrind.
17466
17467         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
17468         memory from the memory pool.
17469
17470         * driver.c (main_thread_handler): Turn on all optimizations when
17471         --aot is used.
17472
17473         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
17474         an array for better performance.
17475
17476         * regalloc.c (mono_regstate_assign): Fix memory leak.
17477
17478         * debug-mini.c (mono_debug_serialize_debug_info): New function to
17479         serialize the debug info.
17480
17481         * debug-mini.c (mono_debug_add_aot_method): New function to load the
17482         debug info from the serialized representation.
17483
17484         * aot.c: Save debug info into the generated file and load it when 
17485         loading a method.
17486
17487         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
17488
17489 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17490
17491         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
17492         More FP-related fixes.
17493
17494 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
17495
17496         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
17497         and register allocation buglet. Hello world now runs.
17498
17499 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17500
17501         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
17502         * tramp-ppc.c: fixed class init trampoline.
17503         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
17504
17505 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17506
17507         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
17508         mini.c: more ppc changes/fixes.
17509
17510 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
17511
17512         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
17513         Also optimize the case when the arguments are the same in the caller 
17514         and in the callee.
17515
17516         * iltests.il: Add tests for tail calls with valuetype arguments.
17517
17518 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17519
17520         * mini-ppc.c: fixes for struct return type.
17521
17522 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
17523
17524         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
17525         mono_spillvar_offset() to arch-specific code.
17526
17527 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
17528
17529         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
17530
17531 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
17532
17533         * exceptions-x86.c: Fix stack space leaks.
17534         
17535         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
17536         registers from the lmf if the method has save_lmf set.
17537
17538 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
17539
17540         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
17541         of icall wrappers into InvokeInDomain, since these are now per-domain.
17542
17543 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
17544
17545         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
17546         make some opcode emulation and intrinsic ops enabled/disabled 
17547         according to the architecture. More fixes.
17548
17549 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17550
17551         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
17552
17553 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17554
17555         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
17556         arch-specific handling for 'this' and struct return type to
17557         arch-specific code.
17558
17559 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17560
17561         * aot.c: prevent divide by zero error when reporting (it happened with
17562         Accessibility.dll).
17563
17564 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
17565
17566         * mini.h (inst_switch): Remove unused macro.
17567
17568 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17569
17570         * aot.c:
17571         (load_aot_module): free 'info->methods' and 'info' properly. No more
17572         "free(): invalid pointer blah" messages when you have an old aot
17573         compiled assembly.
17574
17575 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
17576
17577         * jit-icalls.c, mini.c: Added support for context static fields.
17578
17579 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
17580
17581         * mini.c (mono_method_blittable): Methods which set LastError are not 
17582         blittable either. Fixes #51108.
17583         
17584 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17585
17586         * mini.c: flush icache.
17587         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
17588
17589 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
17590
17591         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
17592
17593 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
17594
17595         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
17596         safe on IA32.
17597
17598         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
17599         vararg calls.
17600
17601         * inssel.brg (CEE_MKREFANY): Fix AOT case.
17602
17603 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
17604
17605         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
17606         instruction when the result is discarded.
17607
17608         * iltests.il (test_0_div_regalloc): New regression test.
17609
17610         * arrays.cs: Fix compilation error.
17611
17612 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
17613
17614         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
17615         float rules to inssel-x86.brg: sane architectures with FP registers
17616         don't need to implement these rules.
17617
17618 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17619
17620         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
17621
17622 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17623
17624         * mini.h, inssel-long32.brg: fixed endianess issues in int64
17625         implementation of 32 bit systems.
17626
17627 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17628
17629         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
17630         (Jeroen Zwartepoorte).
17631
17632 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
17633
17634         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
17635         the caller and the callee matches.
17636         
17637         * mini.c (mono_method_to_ir): Add comment.
17638
17639         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
17640         signbit is missing on some platforms.
17641
17642 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
17643
17644         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
17645
17646         * mini.c (setup_jit_tls_data): Call the new function.
17647         
17648         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
17649
17650         * mini-x86.c: Add experimental support for fast access to the lmf
17651         structure under NPTL/Linux 2.6.x.
17652
17653 2003-11-06  Martin Baulig  <martin@ximian.com>
17654
17655         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
17656         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
17657         the debugger.
17658
17659 2003-11-02  Martin Baulig  <martin@ximian.com>
17660
17661         * mini.c (inflate_generic_field): New static method.
17662         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
17663         generic instance and the field is declared in a generic type, call
17664         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
17665
17666 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
17667
17668         * mini.h mini.c (mono_method_same_domain): New function to return
17669         whenever the caller and the callee are in the same domain.
17670
17671         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
17672
17673 2003-10-30  Martin Baulig  <martin@ximian.com>
17674
17675         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
17676         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
17677         method parameters.
17678         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
17679         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
17680
17681 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
17682
17683         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
17684         propagation.
17685
17686         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
17687         object here, so it is in the correct appdomain etc.
17688
17689 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
17690
17691         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
17692         already done.
17693         (mono_method_to_ir): Avoid freeing the type created returned from
17694         mono_type_create_from_typespec, since it is put into an internal cache
17695         by the function. Fixes pointer.exe.
17696
17697         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
17698         trampolines for icalls and pinvokes as well. Fixes #33569.
17699
17700 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
17701
17702         * mini.c: Update after appdomain changes.
17703
17704         * mini.c (mono_jit_compile_method_inner): Allways compile native
17705         method wrappers in the root domain, since there can only be one
17706         instance of them, whose address is stored in method->info.
17707
17708 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
17709
17710         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
17711         environment variable. Instead detect automatically whenever running
17712         under valgrind using the magic macro RUNNING_ON_VALGRIND from
17713         valgrind.h.
17714
17715 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
17716
17717         * trace.c, trace.h: New files that implement the new trace option
17718         parsing. 
17719
17720         * driver.c: Document new --trace options.
17721
17722         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
17723         mini-x86.c: Apply:
17724
17725         -       if (mono_jit_trace_calls)
17726         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
17727
17728         * mini.h: prototypes.
17729         
17730 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
17731
17732         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
17733
17734         * mini.c inssel.brg: Implement typedefbyref opcodes.
17735
17736         * mini.c (mono_jit_compile_method): Remove unused local variable.
17737
17738         * mini.c (mono_jit_compile_method_inner): Ditto.
17739         
17740 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
17741
17742         * tramp-x86.c (x86_class_init_trampoline): Fix build.
17743         
17744         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
17745
17746 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
17747
17748         * mini.c (mono_no_aot): Remove unused global variable.
17749
17750         * mini.c: Thread safety fixes.
17751
17752 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
17753
17754         * mini.c (mono_create_class_init_trampoline): Add a lock around
17755         class_init_hash_addr.
17756
17757         * arrays.cs (test_0_newarr_emulation): Add new regression test for
17758         #30073.
17759
17760         * mini.c: Decompose the NEWARR instruction before decomposing its
17761         arguments. Fixes #30073.
17762
17763 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
17764
17765         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
17766         convention.
17767
17768 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
17769
17770         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
17771
17772         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
17773
17774         * driver.c: Add support for compiling icall wrappers to --compile.
17775
17776 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
17777
17778         * inssel.brg: The empty value in class->interface_offsets is -1, not
17779         0. Fixes #49287.
17780
17781 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
17782
17783         * objects.cs: New test for 'is' operator on an array of interfaces.
17784
17785 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17786
17787         * tramp-ppc.c: update trampoline code to support jumps
17788         and class initialization.
17789
17790 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
17791
17792         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
17793
17794         * inssel.brg (OP_UNBOXCAST): Fix #46027.
17795
17796         * inssel.brg (OP_UNBOX): Remove unused rule.
17797
17798         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
17799         region instead of one for each method. Fixes #47813.
17800
17801 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
17802
17803         * exceptions.cs (test_0_nested_finally): New regression test for
17804         nested exception handlers.
17805
17806         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
17807
17808         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
17809
17810         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
17811         inlining.
17812
17813         * mini.c (mono_method_check_inlining): Make the inlining limit 
17814         configurable by an environment variable.
17815         
17816         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
17817
17818         * mini.h: Bump AOT file version.
17819
17820         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
17821         token, store the image along with the token, since the token might not 
17822         refer to the same image as the method containing the relocation, 
17823         because of inlining.
17824
17825 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
17826
17827         * mini.c (mono_precompile_assemblies): New function to compile
17828         all methods in all loaded assemblies.
17829
17830         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
17831
17832         * regalloc.h regalloc.c (MonoRegState): Change the type of 
17833         iassign and fassign to int*, since they can contain large negative
17834         values if the register is spilled. Also added some comments. Fixes
17835         #45817.
17836
17837         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
17838         under Win32. Fixes #42964.
17839
17840 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
17841
17842         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
17843
17844         * aot.c: Added support for AOT compiling methods which contain calls
17845         to wrappers. Currently, only remoting-invoke-with-check wrappers are
17846         handled.
17847         
17848         * driver.c (compile_all_methods): Run the compilation in a thread
17849         managed by mono. Fixes #44023.
17850
17851         * mini.c (mono_codegen): Print full method name in verbose output.
17852
17853         * mini-x86.c (mono_arch_patch_code): Fix warning.
17854         
17855         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
17856         jumps, since the method we are jumping to might be domain-specific.
17857
17858         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
17859
17860 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
17861
17862         * inssel.brg: string chars are unsigned.
17863
17864 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
17865
17866         * TODO: New todo item.
17867
17868         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
17869         which calls mono_runtime_class_init and patches the call site to
17870         avoid further calls.
17871         (mono_arch_create_class_init_trampoline): New arch specific function 
17872         to create a class init trampoline.
17873         (create_trampoline_code): Generalized so it can create
17874         class init trampolines as well.
17875
17876         * mini.c (helper_sig_class_init_trampoline): New helper variable.
17877         (mono_create_class_init_trampoline): New function to create and cache
17878         class init trampolines.
17879         (mono_find_class_init_trampoline_by_addr): New function to lookup the
17880         vtable given the address of a class init trampoline. Used by the
17881         patching process.
17882         (mono_codegen): Generate a call to a trampoline instead of
17883         mono_runtime_class_init in LDSFLD[A].
17884         (mono_codegen): Add relocations for the new trampoline.
17885         
17886         * mini.h mini-x86.c aot.c: Added a new relocation type: 
17887         MONO_PATCH_INFO_CLASS_INIT.
17888
17889         * mini.h: Bump AOT version number.
17890
17891         * aot.c: Create a copy of the loaded code instead of using the original
17892         so methods which call each other will be close in memory, improving
17893         cache behaviour.
17894         
17895         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
17896         patch since it breaks the regression tests.
17897         
17898         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
17899         for the register saving instruction sequence since the 
17900         frame_state_for function in glibc 2.3.2 don't seem to detect it.
17901
17902 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
17903
17904         * TODO: Fix todo item && remove another.
17905
17906 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
17907
17908         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
17909         previous checkin.
17910
17911         * aot.c: Moved the check for MONO_LASTAOT into the initialization
17912         function of the module.
17913
17914         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
17915         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
17916         --no-aot command line option.
17917
17918 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
17919
17920         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
17921         by Bernie Solomon (bernard@ugsolutions.com).
17922
17923         * inssel.brg: Refactor the interface offset table related code into
17924         its separate functions and add support for the AOT case.
17925
17926 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
17927
17928         * aot.c (mono_aot_get_method_inner): Fix memory leak.
17929         
17930         * aot.c: Added mono_aot_verbose variable and made all debugging
17931         output depend on the value of this variable.
17932
17933         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
17934         method_label and info_label.
17935
17936         * mini.h mini-x86.c aot.c: Added a new relocation type 
17937         MONO_PATCH_INFO_IID for klass->interface_id.
17938
17939         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
17940         the MonoJitInfo structure.
17941
17942         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
17943         a non-root appdomain in shared mode.
17944
17945 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17946
17947         * aot.c: make aot loader less verbose. Remove free of unused variable.
17948
17949 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
17950
17951         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
17952
17953         * .cvsignore: Added *.dll.
17954
17955         * mini.c (mono_print_tree_nl): New function callable while debugging.
17956
17957         * mini.c (mono_print_code): Export this.
17958
17959         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
17960         patched code.
17961
17962 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
17963
17964         * mini.h (MonoCompile): Added 'jit_info' field.
17965
17966         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
17967         the cfg structure, since it is needed by the AOT compiler.
17968
17969         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
17970
17971         * aot.c: A major rewrite. Changes include:
17972         - save exception tables for methods which have them.
17973         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
17974         to g_module_symbol.
17975         - reworked the file format so it is now much smaller and needs
17976         fewer relocation entries.
17977         
17978 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
17979
17980         * aot.c (load_aot_module): Fix build bustage on platforms without
17981         Boehm GC.
17982
17983 2003-09-04  Martin Baulig  <martin@ximian.com>
17984
17985         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
17986
17987 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
17988
17989         * TODO: Some new optimization ideas.
17990
17991         * aot.c: Move AOT module loading logic here from mono_assembly_open.
17992
17993         * aot.c: Save the optimization flags used to compile the code into
17994         the AOT module.
17995
17996         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
17997         support emitting domain specific code.
17998         
17999         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
18000         no longer domain neutral. It can be made domain neutral by compiling 
18001         with --optimize=shared.
18002
18003         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
18004         between appdomains.
18005
18006         * driver.c mini.h mini.c: New --no-aot debugging option which disables
18007         loading of AOT code.
18008
18009         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
18010         
18011         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
18012         if there is no domain neutrality information.
18013
18014 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
18015
18016         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
18017         format version into the generated library.
18018
18019         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
18020         callee method into the caller since one of them could be shared.
18021
18022         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
18023         system exceptions from AOT code now works.
18024
18025         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
18026         method if it is domain neutral and the callee is not.
18027
18028         * graph.c (cfg_emit_one_loop_level): Fix warning.
18029
18030 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
18031
18032         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
18033         last checkin.
18034
18035 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
18036
18037         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
18038         is needed  by code which is executed before mono_runtime_init ().
18039         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
18040         
18041         * mini.c (mono_thread_abort): Fix warning.
18042         (mono_jit_compile_method): Call static constructor in the AOT case too.
18043
18044         * aot.c (mono_compile_assembly): Fix warning.
18045
18046 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18047
18048         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
18049
18050 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
18051
18052         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
18053
18054         * cpu-pentium.md: Fix the length of call opcodes so they include the
18055         ESP restoring instruction. Fixes #47968.
18056
18057 2003-08-28  Martin Baulig  <martin@ximian.com>
18058
18059         * mini-x86.c (mono_arch_call_opcode): Added support for
18060         MONO_TYPE_GENERICINST.
18061
18062         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
18063
18064 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
18065
18066         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
18067         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
18068
18069         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
18070         metadata_section.
18071
18072 2003-08-26  Martin Baulig  <martin@ximian.com>
18073
18074         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
18075         when reporting an error, set this to the actual error location.
18076         (mono_method_to_ir): Report the correct error location if
18077         get_basic_blocks() returned an error.
18078
18079 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
18080
18081         * mini.c (mono_type_blittable): OBJECT is not blittable.
18082         (mono_method_blittable): Methods which have marshalling descriptors
18083         are not blittable either. Fixes #47842.
18084
18085 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
18086
18087         * driver.c mini.c: Use an environment variable instead of a global 
18088         variable. Also fix the build.
18089
18090         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
18091         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
18092         reporting this. 
18093
18094         * driver.c mini.c: Added --with-valgrind option to turn off some
18095         code which prevents mono from running under valgrind.
18096
18097         * mini.c (mono_emit_call_args): Fixed warning.
18098
18099         * mini.c (mono_emulate_opcode): Fixed warning.
18100
18101 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18102
18103         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
18104         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
18105         regalloc.c, regalloc.h: specify available registers in arch-specific
18106         code and support floats in the regallocator (patch by Laurent Morichetti 
18107         <l_m@pacbell.net>)
18108
18109 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18110
18111         * mini.c: mono_thread_current() can be called only after
18112         mono_runtime_init(): rearrange code to not call it early on.
18113
18114 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18115
18116         * mini.c: allocate jump tables in the code mempools.
18117
18118 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18119
18120         * mini.c, mini.h: make sure per-thread data allocated by the jit is
18121         freed.
18122
18123 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
18124
18125         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
18126         12 to 16.  This fixes bug #47453.
18127
18128
18129 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
18130
18131         * mini-ppc.c: fixed indexed load and unsigned compares.
18132
18133 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
18134
18135         * mini.c: reenabled installation of handler for
18136           thread abort signal.
18137
18138 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18139
18140         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
18141         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
18142         until it's fixed and actually useful.
18143
18144 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18145
18146         * inssel-long32.brg: couple more opcodes implemented.
18147
18148 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18149         
18150         * mini-sparc.c: Even more opcodes implemeted.
18151
18152 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
18153
18154         * mini-sparc.c: More opcodes implemented.
18155
18156 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
18157
18158         * mini-sparc.c: More opcodes implemented.
18159
18160 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18161
18162         * inssel-sparc.brg: Add some needed rules.  Direct
18163         copy from PPC.
18164         * Makefile.am: Use inssel-sparc.brg
18165         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
18166         an assert happy for now.
18167
18168 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
18169
18170         * mini-sparc.c: Fixed compile errors.
18171         * exceptions-sparc.c: Same.  We now produce a mono binary 
18172         on sparc-linux.  Yea.
18173
18174 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
18175
18176         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
18177         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
18178         They compile, but do not work.
18179
18180 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18181
18182         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
18183         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
18184         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
18185         (ct@gentoo.org).
18186
18187 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18188
18189         * mini.c: more opcodes implemented and better support for generics.
18190
18191 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18192
18193         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
18194         * mini.c, mini.h: first cut at generics support: some new instructions 
18195         added and changed the behaviour of some of the existing ones.
18196
18197 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
18198
18199         * mini.c: Removed definition of metadata_shared mutex here.
18200
18201 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18202
18203         * mini-x86.c: make vararg calls work for instance methods.
18204
18205 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18206
18207         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
18208         returns the arguments in a separte list, now.
18209
18210 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18211
18212         * aot.c, mini.c: updates for array type representation changes.
18213
18214 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
18215
18216         * mini.c: register function to perform jit shutdown.
18217
18218 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18219
18220         * mini.c: use a faster allocator if possible.
18221
18222 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18223
18224         * aot.c: some cleanups and portability changes.
18225
18226 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18227
18228         * mini.c: use faster allocation for CEE_BOX if possible.
18229
18230 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18231
18232         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
18233         Moved inlined mempcy code to its own function so that is can be
18234         reused. Added an inline memset function as well (optimized initobj).
18235         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
18236
18237 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18238
18239         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
18240
18241 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18242
18243         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
18244         arch code can setup the cpu for CLR execution, if needed.
18245         We use it on x86 to set the precision of FP operations.
18246
18247 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18248
18249         * mini.c: disable some optimizations if we can guess they'll cost too
18250         much for a given method.
18251
18252 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18253
18254         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
18255         
18256 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18257         * mini.h mini.c mini-x86.c: Added instruction level coverage 
18258         info collection support.
18259
18260 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18261
18262         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
18263         is now implemented in the profiling API. Get rid of a couple of
18264         unnecessary global variables.
18265
18266 2003-06-15  Nick Drochak <ndrochak@gol.com>
18267
18268         * basic-long.cs: tests for negative values for bigmul, and unsigned.
18269         * cpu-g4.md: add op_bigmul and op_bigmul_un
18270         * cpu_pentium.md: add op_bigmul_un
18271         * inssel-long32.brg: add rule for unsigned bigmul
18272         * mini-ops.h: define OP_BIGMUL_UN
18273         * mini-x86.c: THE BUG: handle (un)signed properly
18274         * mini.c: choose unsigned opcode if needed.
18275         This set of patches fixes bug #44291
18276
18277 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
18278
18279         * mini.c (optimize_branches): improved to handle all kinds of
18280         conditional branches.
18281
18282 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18283
18284         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
18285         don't raise exceptions.
18286
18287 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18288
18289         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
18290         to arch-specific files.
18291
18292 2003-06-09  Martin Baulig  <martin@ximian.com>
18293
18294         * Makefile.am (libs): Added $(LIBGC_LIBS).
18295
18296 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
18297
18298         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
18299         and OP_ATAN (fixes bug#44293).
18300
18301 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
18302
18303         * Makefile.am, mini-x86.c: rename cpu description array to
18304         pentium_desc, since some compilers define the 'pentium' preprocessor
18305         symbol.
18306
18307 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
18308
18309         * mini.c (mini_select_instructions): add explicit branch if the
18310         following block is not the false target of a conditional branch -
18311         we need this with any optimization that reorder or remove bblocks
18312
18313         * mini.c (optimize_branches): bug fixes
18314
18315 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
18316
18317         * mini.c (mono_method_to_ir): inline static readonly fields
18318
18319         * ssa.c (fold_tree): start cfold support for long (very simple
18320         cases only)
18321
18322         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
18323
18324 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18325
18326         * inssel.brg: fixed memcpy (bug #44219).
18327
18328 2003-06-05  Dick Porter  <dick@ximian.com>
18329
18330         * driver.c: Set the glib log levels to not abort if g_message
18331         recurses.
18332
18333         g_set_prgname() has to happen before mini_init() so that the
18334         process handle gets the info.
18335         
18336 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18337
18338         * driver.c: add intrins to the default optimizations to get wider
18339         exposure.
18340
18341 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18342
18343         * mini.h: some large basic blocks will overflow a 16-bit
18344         integers for symbolic registers.
18345
18346 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
18347
18348         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
18349         (mono_arch_output_basic_block): fix bug 43499 
18350
18351 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18352
18353         * mini.c: kill duplicated definition of mono_debug_format.
18354
18355 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18356
18357         * mini-x86.c, arrays.cs: fixed register allocation bug.
18358
18359 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
18360
18361         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
18362
18363         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
18364
18365 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18366
18367         * mini.c:
18368         (print_method_from_ip): also print source location information if
18369         available.
18370
18371 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
18372
18373         * mini.c (mono_find_block_region): bug fix in region code
18374         (mini_method_compile): enable removing unreachable code again, but
18375         only in methods without exception clauses.
18376
18377 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18378
18379         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
18380         Implemented arglist opcode and handling of TypedReference type.
18381         Fixed x86 call convention when a structure is returned.
18382         Minimal support for calling static vararg methods.
18383
18384 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
18385
18386         * mini.c (mini_method_compile):  always remove unreachable code,
18387         because the code in them may be inconsistent  (access to dead
18388         variables for example).
18389
18390 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18391
18392         * driver.c, debug-mini.c: warning fixes.
18393
18394 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
18395
18396         * Makefile.am, jit.h, mini.h: install header for embedding mono.
18397
18398 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
18399
18400         * mini.c: thread-static fields are registered in mono_class_vtable(),
18401         so ensure the function is called before checking for them.
18402
18403 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
18404
18405         * mini.c (optimize_branches): fix for bug 43586
18406
18407         * jit-icalls.c (mono_llmult_ovf): added an additional check for
18408         overflow (fixes Bug #43639)
18409
18410 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18411
18412         * mini.c, objects.cs: allow the use of stobj for primitive types.
18413
18414 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18415
18416         * mini.c: be less strict about argument checking until we support
18417         running the verifier.
18418
18419 2003-05-27  Nick Drochak <ndrochak@gol.com>
18420
18421         * basic-long.cs: tests for (ulong)int * (ulong)int also
18422         * mini.c: use the same trick for (ulong)int * (ulong)int
18423
18424 2003-05-27  Nick Drochak <ndrochak@gol.com>
18425
18426         * basic-long.cs: add regression test for (long)int * (long)int
18427         * cpu-pentium.md: add op_bigmul specification
18428         * inssel-long32.brg: add OP_BIGMUL rule
18429         * mini-ops.h: add OP_BIGMUL
18430         * mini-x86.c: register allocator: handle case where src1 needs to be
18431         in EAX.
18432         * mini.c: substitute special BIGMUL opcode in the tree for 
18433         (long)int * (long)int
18434
18435 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18436
18437         * jit-icalls.c: call the type ctor on field access if needed.
18438
18439 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18440
18441         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
18442         to a method (including results of ldelema, bug#43207).
18443
18444 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
18445
18446         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
18447         colors to show exception handler blocks.
18448
18449         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
18450         (fix for pinvoke7.cs).
18451
18452 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18453
18454         * mini.h, mini.c: ensure correct initialization order for types that
18455         require it. Prepare for lazy compilation of jit icall wrappers.
18456         Provide a name for opcode emulation to reduce unneeded mallocing.
18457
18458 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
18459
18460         * mini-x86.c: better register restoring code and profiling
18461         support for tail calls.
18462
18463 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18464
18465         * mini.h, driver.c: prepare for leaf methods optimization.
18466
18467 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18468
18469         * mini.c: get targets of branches before converting a method.
18470
18471 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
18472
18473         * mini.c (optimize_branches): added some experimental code (disbaled) 
18474
18475 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
18476
18477         * mini.c (optimize_branches): fix branch to branch optimization 
18478
18479         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
18480
18481         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
18482
18483         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
18484
18485         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
18486         if needed.
18487
18488 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
18489
18490         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
18491         enable use of interface variables again.
18492
18493         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
18494         I1 to registers because there is no simply way to sign extend 8bit
18495         quantities in caller saved registers on x86.
18496
18497         * inssel-float.brg: set costs of some rules to 2 so
18498         that monobure always select the arch. specific ones if supplied,
18499         regardless of the order we pass the files to monoburg.
18500
18501 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18502
18503         * mini.c, mini-x86.c: since the magic trampoline for jumps
18504         can't patch the code directly, we do it as soon as the
18505         method gets compiled.
18506
18507 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18508
18509         * mini-x86.c, mini.h: introduce a new patching method
18510         to support CEE_JMP and tail calls.
18511         * mini.c: obey tail.call. Don't precompile methods target
18512         of CEE_JMP.
18513         * tramp-x86.c: new trampoline code to handle methods
18514         reached through a jump.
18515
18516 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
18517
18518         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
18519         bit values to registers
18520
18521 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
18522
18523         * mini.c (mono_compile_get_interface_var): share interface
18524         variables if possible.
18525
18526 2003-05-16  Martin Baulig  <martin@ximian.com>
18527
18528         * debug-mini.c (mono_init_debugger): New function to initialize
18529         the debugger.  This is not in the debugger since it needs to
18530         access some of mini's internals.
18531
18532 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
18533
18534         * mini.c (mono_method_to_ir): inlining fixes/cleanups
18535
18536 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
18537
18538         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
18539         for value type handling.
18540
18541 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
18542
18543         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
18544         (mono_method_check_inlining): enable inlining of all kinds of wrappers
18545
18546 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
18547
18548         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
18549           the constructor through a proxy.
18550
18551 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18552
18553         * jit-icalls.c, inssel.brg: fixes to array element address
18554         calculations.
18555
18556 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
18557
18558         * mini-x86.c (is_regsize_var): allocate pointer to registers
18559
18560 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18561
18562         * driver.c: fixed typo, added intrins to the set of optimizations
18563         tested with regressions.
18564
18565 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18566
18567         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
18568         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
18569         test case.
18570
18571 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
18572
18573         * inssel.brg: remove some common pop instructions without side effects
18574
18575 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18576
18577         * inssel-x86.brg: fixed thinko in int to double conversions.
18578
18579 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18580
18581         * mini.c, jit-icalls.c: added runtime thread-static variable support.
18582
18583 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18584
18585         * inssel-long32.brg: two more missing instructions.
18586
18587 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
18588
18589         * mini.c (mono_emit_call_args): set the cil_code for all arguments
18590         if not already set.
18591
18592 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
18593
18594         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
18595         correctly.
18596
18597         * basic-float.cs: Added tests for negative zero.
18598
18599 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18600
18601         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
18602         a couple of missing operations for long casts, with test cases.
18603
18604 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18605
18606         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
18607
18608 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
18609
18610         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
18611         code size estimation.
18612
18613 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
18614
18615         * mini.c (mono_jit_create_remoting_trampoline): make it work with
18616         abstract methods (fix bug 42542)
18617
18618         * aot.c: add ability to handle array types
18619         
18620 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
18621
18622         * mini.c: Call the _specific versions of the object allocation
18623         functions if possible.
18624
18625 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18626
18627         * driver.c: call setlocale ().
18628
18629 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18630
18631         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
18632         windows build.
18633
18634 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
18635
18636         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
18637
18638         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
18639         wrappers (fix bug 42122)
18640
18641 2003-05-04  Martin Baulig  <martin@ximian.com>
18642
18643         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
18644
18645         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
18646         s/mini_set_defaults/mono_set_defaults/g.
18647
18648 2003-05-04  Martin Baulig  <martin@ximian.com>
18649
18650         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
18651
18652 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18653
18654         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
18655         (reported by Don Roberts).
18656
18657 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18658
18659         * mini.c: temporarily work around two bugs for this release.
18660
18661 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18662
18663         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
18664         that contains -export-dynamic and it makes using the ld script
18665         useless.
18666         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
18667
18668 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18669
18670         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
18671         specific cpu.
18672
18673 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18674
18675         * mini.c: make sure leave calls all the needed finally blocks,
18676         even when the target jumps out of multiple exception clauses.
18677
18678 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18679
18680         * ldscript, Makefile.am: add linker script to reduce the number of
18681         exported symbols (should also fix the issues with libwine defining
18682         some of the same symbols in io-layer).
18683
18684 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
18685
18686         * driver.c (mini_main): Avoid assertion when no file name is given on 
18687         the command line.
18688
18689 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
18690
18691         * driver.c: added --version/-V command line option.
18692         Added the inline optimization in the regression tests.
18693
18694 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18695
18696         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
18697         to the type in the method signature (fixes bug#42134).
18698
18699 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
18700
18701         * mini.c: when inlining, check this is not null only when needed (bug #42135).
18702
18703 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
18704
18705         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
18706
18707 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18708
18709         * driver.c: fixed bug #42100.
18710
18711 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
18712
18713         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
18714
18715 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18716
18717         * mini.c: moved most of the code required to do inlining to its own
18718         function so it can be reused. Inline also ctors if appropriate.
18719
18720 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
18721
18722         * Makefile.am: Link with -export-dynamic so shared libs loaded by
18723         the runtime can call mono API functions.
18724
18725 2003-04-27  Martin Baulig  <martin@ximian.com>
18726
18727         * debug-mini.c (mono_debug_init_method): Added
18728         `guint32 breakpoint_id' argument; if the method has a breakpoint,
18729         send a notification to the debugger.
18730
18731         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
18732         running in the Mono Debugger, just pass the breakpoint number to
18733         mono_debug_init_method().
18734
18735         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
18736
18737 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
18738
18739         * mini.c: allow some more unsafe compares.
18740
18741 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18742
18743         * mini-x86.c, Makefile.am: make distcheck works (partially from
18744         a patch by Richard Lee <r.h.lee@attbi.com>).
18745         * regset.c, regset.h: removed, they are unused.
18746
18747 2003-04-25  Dick Porter  <dick@ximian.com>
18748
18749         * driver.c: Usage reports the name as 'mono' not 'mini'
18750         * exceptions-x86.c: Build and run on freebsd
18751
18752 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
18753
18754         * Makefile.am: install the program with the 'mono' name and
18755         the library as libmono instead of mini and libmini.
18756
18757 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18758
18759         * driver.c: provide the APIs for the embedding interface of the old jit.
18760
18761 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
18762
18763         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
18764
18765 2003-04-23  Martin Baulig  <martin@ximian.com>
18766
18767         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
18768
18769         * driver.c: Added `--debug' command line argument to enable
18770         debugging support.
18771
18772 2003-04-23  Martin Baulig  <martin@ximian.com>
18773
18774         * debug.[ch]: Removed.  The code is now in
18775         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
18776
18777         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
18778         last six months.
18779
18780 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
18781
18782         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
18783
18784 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18785
18786         * mini.c:
18787         (mini_cleanup): moved mono_runtime_cleanup call after the call to
18788         mono_domain_finalize.
18789         (mini_method_compile): use mono_method_profile* if the the option is
18790         enabled.
18791
18792 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
18793
18794         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18795         methods with their wrapper.
18796
18797         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18798         methods with their wrapper.
18799
18800         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
18801         their wrapper.
18802
18803         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
18804         wrapper.
18805
18806         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
18807         methods.
18808
18809 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
18810
18811         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
18812
18813 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
18814
18815         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
18816         of the mempool. This is slightly faster and uses less memory
18817
18818 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18819
18820         * mini.c: avoid O(n) allocation for variables.
18821
18822 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18823
18824         * mini.c: handle items on the stack after inlining methods.
18825
18826 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18827
18828         * mini.c: make the method->opcode optimization dependent
18829         on MONO_OPT_INSTRINS and do it lazily.
18830
18831 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18832
18833         * driver.c: print overall results at the end of regression run.
18834
18835 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
18836
18837         * inssel.brg: don't overwrite symbolic registers.
18838
18839 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
18840
18841         * inssel-x86.brg: fix conversion from long to float.
18842
18843 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
18844
18845         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
18846
18847 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
18848
18849         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
18850
18851         * driver.c: Added --print-vtable option as in the old JIT.
18852
18853 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18854
18855         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
18856
18857 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
18858
18859         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
18860
18861 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
18862
18863         * mini.c regalloc.c regalloc.h: Fix memory leak.
18864
18865 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
18866
18867         * aot.c (mono_aot_get_method): register all used strings
18868
18869 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18870
18871         * mini.c: always intern strings references with ldstr at compile time.
18872
18873 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18874
18875         * Makefile.am: add BUILT_SOURCES.
18876
18877 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
18878
18879         * driver.c: give a better error message when the assembly to execute
18880         doesn't have an entry point.
18881
18882 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
18883
18884         * Makefile.am: added hack for automake
18885
18886         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
18887         correct sematics.
18888
18889         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
18890
18891 22003-04-07  Martin Baulig  <martin@ximian.com>
18892
18893         * Makefile.am: Added Makefile.am.
18894
18895         * debugger-main.c: Removed, this is now in the debugger where it
18896         belongs.
18897
18898         * mini.pc.in: Call this package `mini' for the moment.
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913