2009-02-09 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2009-02-09  Zoltan Varga  <vargaz@gmail.com>
2
3         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
4
5         * aot-runtime.c (is_shared_got_patch): Ditto.
6
7         * aot-runtime.c (load_named_code): Cope with the fact that 
8         decode_got_entry () won't decode the patch fully if its corresponding got
9         entry is already filled.
10         
11         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): 
12         Initialize *ji.
13         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
14
15         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
16         as the moving pointer instead of 'buf' for consistency with the rest of the
17         codebase.
18         (mono_arch_create_monitor_exit_trampoline): Ditto.
19
20         * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
21         generic_class_init trampolines.
22         (add_generic_class): Extract some code from add_generic_instances () into a
23         separate function so it can be called from other places too.
24         (compile_method): Call add_generic_class () for the classes of inflated methods
25         referenced by the method.
26         (can_encode_patch): Allow references to generic parameters.
27
28         * aot-runtime.c: Add support the patches required by the new trampolines.
29         
30         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
31         support.
32
33         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
34         full-aot support.
35
36         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
37         this from get_throw_pending_exception, make the signature full aot compatible.
38
39         * Makefile.am (fullaotcheck): New target to run full-aot tests.
40
41         * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
42
43         * exceptions.cs: Add a test.
44
45 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
46
47         * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
48         use the DWARF_DATA_ALIGN constant instead.
49
50         * exception-<ARCH>.c: Update after the above change.
51
52         * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
53         dwarf unwinder.
54
55         * mini-arm.c: Enable the dwarf unwinder.
56
57         * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
58         instead of mono_class_setup_vtable ().
59
60 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
61
62         * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
63         dwarf unwinder.
64
65         * mini-x86.h: Enable the dwarf unwinder.
66
67 2009-02-06  Raja R Harinath  <harinath@hurrynot.org>
68
69         Fix mcs/tests/test-7.cs
70         * mini-amd64.c (mono_arch_allocate_vars): Revert change from
71         2009-02-03.
72
73 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
74
75         * mini.c (print_jit_stats): Remove some unused statistics.
76
77 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
78
79         * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
80
81 2009-02-05  Mark Probst  <mark.probst@gmail.com>
82
83         * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
84         the method we get from mono_object_get_virtual_method() because
85         that function does it properly, now.
86
87 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
88
89         * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
90         opcodes. Fixes #472775.
91
92 2009-02-05  Mark Probst  <mark.probst@gmail.com>
93
94         * mini-exceptions.c (ves_icall_get_frame_info): Account for the
95         fact that mono_find_jit_info() sometimes returns the context
96         corresponding to the jit info in new_ctx.  Fixes #472600.
97
98 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
99
100         * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
101         mini-s390.c: Use mono_class_enum_basetype () instead of accessing
102         klass->enum_basetype directly.
103
104         * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
105         enum subtypes.
106
107         * unwind.c: Avoid 0 sized arrays.
108
109 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
110
111         * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
112         size on systems with 64k pages. Fixes #471389.
113
114 2009-02-04  Mark Probst  <mark.probst@gmail.com>
115
116         Contributed under the terms of the MIT/X11 license by Steven
117         Munroe <munroesj@us.ibm.com>.
118
119         * mini-ppc.c (mono_arch_output_basic_block): Generate better code
120         for LOADI4_MEMBASE.  Use addi instead of addic if it's not
121         necessary.
122
123 2009-02-04  Mark Probst  <mark.probst@gmail.com>
124
125         Contributed under the terms of the MIT/X11 license by Steven
126         Munroe <munroesj@us.ibm.com>.
127
128         * exceptions-ppc.c (mono_arch_get_restore_context): Code size
129         comparison fix.
130
131         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
132         The trampoline can be longer on PPC64.
133
134 2009-02-04  Mark Probst  <mark.probst@gmail.com>
135
136         Contributed under the terms of the MIT/X11 license by Steven
137         Munroe <munroesj@us.ibm.com>.
138
139         * mini-ppc.c: Compiler warning fixes and trivial code
140         simplifications.
141
142 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
143
144         * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
145         ins->dreg which could be a hardware register, not a vreg.
146
147         * aot-compiler.c (emit_method_dwarf_info): Ditto.
148         
149         * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
150         (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
151
152         * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
153         
154         * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
155         ->dreg, that is not the vreg we are looking for.
156
157         * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
158
159         * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
160         LIVERANGE_END.
161
162         * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
163         strange crashes.
164
165 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
166
167         * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
168
169         * aot-compiler.c (emit_line_number_info): Fix line number emission when
170         the line diff is 0.
171
172         * aot-compiler.c: Add xdebug support on x86.
173
174         * unwind.c: Add x86 support.
175         
176         * aot-compiler.c (emit_exception_debug_info): Control the emission of
177         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
178
179         * mini.c (mini_method_compile): Ditto.
180         
181         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
182         the variable index.
183
184         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
185         which mimic .push_section/.pop_section in GAS.
186         
187         * aot-compiler.c: Emit precise live range information for variables.
188
189         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
190
191         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
192         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
193         them.
194
195         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
196         the live ranges of variables.
197
198         * mini.h (struct MonoMethodVar): Add two fields containing the live range
199         of the variable in terms of native offsets.
200
201 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
202
203         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
204         
205 2009-02-02  Mark Probst  <mark.probst@gmail.com>
206
207         Contributed under the terms of the MIT/X11 license by Steven
208         Munroe <munroesj@us.ibm.com>.
209
210         * exceptions-ppc.c (restore_regs_from_context): Correct operand
211         order (offset then base reg) for ppc_load_multiple_regs.
212         (emit_save_saved_regs) Correct operand order for
213         ppc_store_multiple_regs.
214         (mono_arch_get_call_filter): Correct operand order for
215         ppc_load_multiple_regs.
216
217         * mini-ppc.c (emit_memcpy): Fix operand order for
218         ppc_load_reg_update and ppc_store_reg_update.
219         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
220         (mono_arch_emit_epilog): Correct operand order for
221         ppc_load_multiple_regs.
222
223         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
224         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
225
226 2009-02-02  Mark Probst  <mark.probst@gmail.com>
227
228         * cpu-ppc64.md: Fixed storer4_memindex length.
229
230 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
231
232         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
233         line number info.
234         
235         * aot-compiler.c (emit_line_number_info): Optimize this.
236
237 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
238
239         * aot-compiler.c: Disassemble tokens in the IL disassembly.
240         
241         * aot-compiler.c: Add debug info for methods without debug info by
242         emitting an IL file and having the line number info referencing that file.
243
244         * aot-compiler.c: Optimize the size of the generated line number info.
245
246         * aot-compiler.c: Emit line number info in xdebug mode.
247
248         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
249         million arguments.
250
251 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
252
253         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
254
255         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
256         is used.
257
258 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
259
260         * basic-calls.cs: Test for the weird crash found on arm.
261         
262 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
263
264         * cpu-arm.md: Increase the size of storer8_membase_reg and
265         loadr8_membase_reg to 24 bytes to accomodate the extra add.
266
267         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
268         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
269         reg to LR otherwise we'll be loading/storing from just the offset.
270
271 2009-01-30  Miguel de Icaza  <miguel@novell.com>
272
273         Question: if we are storing gint32's inside the "*native_offset",
274         should we change the signature to "gint32 *native_offset" to
275         ensure that we do not have type definition problems?
276         
277         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
278         an int * as this is what the other function expects, causes
279         problems with Freescale's compiler that defined int32_t to be a
280         long and makes int incompatible 
281
282 2009-01-30  Miguel de Icaza  <miguel@novell.com>
283
284         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
285         filename conflict with bjam.
286
287 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
288
289         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
290         as it might use decomposed ops.
291
292 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
293
294         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
295
296         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
297         is defined.
298
299         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
300
301         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
302         offsets.
303
304         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
305         way registers are stored in MonoContext on arm.
306
307         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
308         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
309
310         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
311
312         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
313
314         * mini.c (mini_init): Register mono_isfinite.
315
316         * jit-icalls.c (mono_isfinite): New jit icall.
317
318         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
319         
320         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
321         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
322         the parent frame.
323
324 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
325
326         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
327         separate frame and stack pointers, so we must use FP to find the register
328         spill area.
329         The FP reg is retrieved from the MonoContext::regs array.
330
331 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
332
333         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
334         as FPA requires it.
335
336 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
337
338         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
339         return R4 and R8 when not running under softfloat.
340
341         Fixes basic-calls.exe
342
343 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
344
345         * mini-arm.c: Implement some overflow opcodes.
346
347 2009-01-29  Miguel de Icaza  <miguel@novell.com>
348
349         * ssa.c: handle another alloca.h
350
351         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
352         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
353         MONO_ARCH_USE_SIGACTION. 
354
355         * aot-runtime.c, mini-exceptions.c: Replace platform define with
356         capability defines.
357
358         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
359
360         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
361         PPC targets as sigaction does not exist on all platforms, define
362         this on a per-platform basis.
363
364         Instead of erroring out if the platform is not defined, include
365         mini-ppc-os.h, and expect that the OS specific setting provides
366         the required information.   
367
368 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
369
370         * aot-compiler.c: Fix --enable-minimal=aot.
371
372 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
373
374         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
375         previous change.
376
377 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
378
379         * exceptions-arm.c: Fix warnings.
380
381         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
382         ARM.
383
384         * mini-x86.c: Fix --enable-minimal=jit build.
385
386         * mini.c: Really fix --enable-minimal=jit build.
387         
388         * mini.c (construct_object_context_for_method): Move this outside
389         the DISABLE_JIT block to fix the --enable-minimal=jit build.
390
391         "Backported" of r124984 from 2.0 branch.
392         
393         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
394
395         "Backport" of r124977 + r124978 from 2.0 branch.
396         
397         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
398         to avoid calling mono_exception_from_token () from the throw trampoline.
399         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
400         for throwing corlib exceptions, this fixes full-aot support for corlib
401         exceptions.
402
403         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
404
405 2009-01-29  Miguel de Icaza  <miguel@novell.com>
406
407         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
408         part of the changes to split the code in mini into operating
409         system specific files.
410
411         This patch was done by copying mini.c to the respective files to
412         preserve SVN history.
413
414 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
415
416         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
417
418 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
419
420         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
421         remoting-invoke-with-check wrappers of shared methods.
422
423         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
424
425 2009-01-27  Mark Probst  <mark.probst@gmail.com>
426
427         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
428         optimization if the top of stack is the last instruction in the
429         bblock.  Otherwise it might have been used after its definition.
430         Fixes #469742.
431
432 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
433
434         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
435         method as well when get_vcall_slot () fails to match a code sequence.
436
437         * mini-arm.c: Fix the android build, which doesn't have
438         __aeabi_read_tp.
439
440 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
441
442         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
443         the s390x build.
444
445 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
446
447         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
448
449 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
450
451         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
452         and put its id into jinfo->used_regs. This is only used on amd64,
453         which is currently the only platform generating unwind info.
454
455         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
456         the dwarf unwinder. This is required to correctly handle async exceptions
457         like thread abort and stack overflows, which can happen while a method
458         is in the middle of its prolog or epilog.
459         
460         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
461         the unwind info belonging to an AOTed method.
462
463         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
464         into cfg->unwind_ops.
465         
466         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
467
468         * mini.c (mini_init): Call mono_unwind_init ().
469         (mini_cleanup): Call mono_unwind_cleanup ().
470
471         * unwind.c: Add functions for managing a set of unwind info entries, allowing
472         unwind info to be shared between methods.
473
474         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
475         saved in the LMF.
476
477         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
478         get_throw_pending_exception () to avoid initialization races.
479
480         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
481         mono_arch_exceptions_init () function.
482
483         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
484
485 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
486
487         * mini.c (mono_get_domain_intrinsic): New helper function.
488         (mono_get_thread_intrinsic): Ditto.
489
490         * mini-arm.c mini-ia64.c: Use the new helper functions.
491         
492         * method-to-ir.c (mono_method_to_ir): Fix the comment for
493         the last constrained_call change, since it is needed in the non-AOT
494         case as well.
495
496         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
497         
498         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
499         mono_get_lmf_addr () on arm eabi linux.
500
501 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
502
503         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
504         code sequence which matches a non-virtual call.
505
506 2009-01-23  Mark Probst  <mark.probst@gmail.com>
507
508         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
509         stack pointer (r1).
510
511 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
512
513         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
514         runtime-invoke wrappers, since they are also shared based on signature.
515
516 2009-01-22  Mark Probst  <mark.probst@gmail.com>
517
518         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
519         info from the (correct) context.
520
521 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
522
523         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
524         
525         * unwind.c (mono_unwind_frame): New function to unwind through a frame
526         using dwarf unwinding info. Not yet used.
527
528         * mini.c (mini_init): When using xdebug, disable freeing of domains.
529
530 2009-01-21  Mark Probst  <mark.probst@gmail.com>
531
532         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
533         descriptors.
534
535         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
536         special case and handle mono_arch_delegate_invoke_impl() returning
537         function descriptors.
538
539         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
540         trampolines return function descriptors, too.
541
542 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
543
544         * method-to-ir.c (handle_alloc): Avoid generic instances in the
545         out_of_line optimization.
546
547 2009-01-21  Martin Baulig  <martin@ximian.com>
548
549         * mini.h
550         (MonoCompile): Added `disable_deadce_vars' to disable removing
551         unused variables.
552
553         * mini.c
554         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
555         inside the debugger.
556
557         * liveness.c (mono_analyze_liveness): Don't remove any unused
558         variables if `cfg->disable_deadce_vars' is set.
559
560 2009-01-21  Mark Probst  <mark.probst@gmail.com>
561
562         * method-to-ir.c: Only apply exception constructor optimization if
563         the the method actually belongs to an exception class.  Fixes
564         #467456.
565
566 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
567
568         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
569         change inside a #ifdef __mono_ppc64__.
570
571         * aot-compiler.c (compile_method): Remove the previous limitation.
572
573         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
574         on type variables in AOTed code.
575         
576         * aot-compiler.c (compile_method): Skip generic methods having type 
577         constraints on their generic parameters.
578
579         * aot-compiler.c (compile_method): Check for methods which cannot be
580         encoded inside RGCTX_FETCH patches as well.
581
582         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
583         build.
584
585 2009-01-20  Mark Probst  <mark.probst@gmail.com>
586
587         * method-to-ir.c: Force the vtable variable in shared generic code
588         for the case that they might show up on a stack trace where they
589         are needed.
590
591         * mini-exceptions.c: Save and use generic sharing info as well as
592         IP in stack traces to resolve shared generic instantiations.
593
594 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
595
596         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
597         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
598
599 2009-01-20  Mark Probst  <mark.probst@gmail.com>
600
601         * method-to-ir.c: Do generic sharing for array constructors.
602
603 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
604
605         * mini-exceptions.c (mono_print_thread_dump): Add information
606         about the thread state using wapi_current_thread_desc.
607
608 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
609
610         * basic-simd.cs: Tests for the new constructors. 
611
612 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
613
614         * mini-ops.h: Added OP_EXPAND_*
615
616         * cpu-x86.md: Same.
617
618         * mini-x86.c (mono_arch_output_basic_block): Same.
619         
620         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
621
622 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
623
624         * iltests.il.in: Add a test for #467385.
625
626 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
627
628         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
629         thread been cleaned up is not the same currently in execution.
630
631         Fixes appdomain-unload crashes on windows, osx and linux variants
632         without the __thread keyword.
633
634 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
635
636         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
637         (koush@koushikdutta.com). Implement this for android.
638
639         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
640         begins with a digit.
641
642         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
643         mono_marshal_get_write_barrier ().
644
645 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
646
647         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
648         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
649         that pass them on a register pair.
650
651         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
652         test was crashing due to that.
653
654 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
655
656         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
657         trampoline code. Include ucontext.h only if available.
658
659 2009-01-15  Mark Probst  <mark.probst@gmail.com>
660
661         * mini.c: mono_domain_lookup_shared_generic() takes an open method
662         and doesn't check whether it's sharable, like it was before
663         removing the shared generics hash.  This brings IronPython
664         performance back to what it was before that change.
665
666 2009-01-14  Mark Probst  <mark.probst@gmail.com>
667
668         * method-to-ir.c: Handle delegate invocation optimization earlier,
669         otherwise it would be handled (much more slowly) by the
670         final/sealed optimization.
671
672 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
673
674         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
675         domain is not set. Fixes #465864.
676
677 2009-01-12  Mark Probst  <mark.probst@gmail.com>
678
679         * method-to-ir.c: Don't stop sharing of generic methods with catch
680         clauses - we already handle those.
681
682 2009-01-12  Mark Probst  <mark.probst@gmail.com>
683
684         * mini.c, mini.h: lookup_generic_method() is now
685         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
686         making the shared_generics_hash obsolete.
687
688 2009-01-12  Mark Probst  <mark.probst@gmail.com>
689
690         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
691         use the red zone.  Make room on the stack first and then use it,
692         not the other way around.
693
694 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
695
696         * mini.c (mini_init): Call mono_xdebug_init ().
697
698         * aot-compiler.c (mono_xdebug_init): Make this non-static.
699
700 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
701
702         * TestDriver.cs: Add an --iter argument to run tests multiple times.
703
704         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
705         trampolines.
706
707         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
708         debug+unwind info for trampolines.
709
710         * mini.c (mono_create_unwind_op): New helper function.
711
712         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
713
714 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
715
716         * aot-compiler.c: Fix the build.
717
718 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
719
720         * Makefile.am: Update dtrace-prelink.sh location.
721
722 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
723
724         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
725         optimization. Fixes #464520.
726
727 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
728
729         * mini-amd64.c : Adding code to save/restore non-volatile registers
730            on Winx64.
731
732         * exceptions-amd64.c : Adding code to save/restore non-volatile 
733           registers on Winx64.
734
735         Contributed under MIT/X11 license.
736
737 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
738
739         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
740         __GNUC_MINOR__ which can break when the major version changes.
741
742 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
743
744         * basic-simd.cs: Add tests for usage of the sizeof opcode.
745
746 2009-01-07  Geoff Norton  <gnorton@novell.com>
747
748         * helpers.c:  Allow mono -v -v -v to work on darwin.
749
750 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
751
752         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
753           pattern. 
754
755         Contributed under MIT/X11 license.
756
757 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
758
759         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
760         instead of directly accessing type->data.klass. Fixes #462016.
761         (mono_allocate_stack_slots_full): Ditto.
762
763         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
764         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
765
766         * aot-compiler.c (emit_plt): Fix ARM build.
767
768 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
769
770         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
771         
772         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
773         change.
774
775         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
776         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
777         #463357.
778
779         * iltests.il.in: Add a regression test.
780
781 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
782
783         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
784
785 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
786
787         * basic-simd.cs: Add a regression test for #462457.
788
789 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
790
791         * mini-ops.h: Add a definition of XPHI.
792
793         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
794
795         * ssa.c (op_phi_to_move): Handle XPHI.
796
797         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
798
799         Fixes #462457
800
801 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
802
803         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
804
805 2008-12-31  Geoff Norton  <gnorton@novell.com>
806
807         * mini-ppc.c: The prolog size allocated can be too small for darwin
808         ppc32 under certain circumstances.  Also fix a small logic bug.
809
810 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
811
812         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
813         while loading AOT methods.
814
815         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
816         since only the former is nulled out after a successful cast. This prevents
817         crashes with rethrown exceptions when using --debug=casts.
818
819 2008-12-24  Mark Probst  <mark.probst@gmail.com>
820
821         * mini.h: New macro for checking whether a method is final,
822         i.e. whether the method or its class is marked final.
823
824         * method-to-ir.c: Use the new macro for all final-checks
825         consistently.  Fixes the crash in the System.ServiceModel tests.
826
827 2008-12-23  Mark Probst  <mark.probst@gmail.com>
828
829         * mini-exceptions.c (get_exception_catch_class): Corrected another
830         overly strict assertion.
831
832 2008-12-23  Mark Probst  <mark.probst@gmail.com>
833
834         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
835         Clobbering it is not allowed because the caller might use it as
836         the vtable register in the interface call.
837
838 2008-12-19  Mark Probst  <mark.probst@gmail.com>
839
840         * mini-exceptions.c (get_exception_catch_class): Corrected an
841         overly strict assertion.
842
843 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
844         
845         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
846
847         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
848
849         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
850
851         * cpu-mips.md: correct lengths for certain long_ opcodes.
852
853         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
854
855         * 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().
856         
857 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
858
859         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
860         
861 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
862         
863         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
864         
865 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
866
867         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
868         next basic block.
869         
870 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
871
872         * 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
873
874         * 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)
875         
876 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
877         
878         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
879         
880 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
881
882         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
883         gshared code. Fixes #458947.
884
885         * generics.cs: Add a test.
886
887 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
888         
889         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
890         
891         * mini-mips.c: first pass n32 code generation.
892
893         * mini-mips.h: datatypes and defines for n32 support.
894
895         * exceptions-mips.c: first pass n32 code generation.
896         
897         * tramp-mips.c: first pass n32 code generation.
898         
899         * cpu-mips.md: add long_ opcodes.
900         
901 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
902
903         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
904
905         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
906         
907         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
908         
909         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
910
911         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
912
913         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
914
915         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
916
917         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
918
919         * helpers.c: for mips/n32, don't pass -mips32 to objdump
920
921 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
922
923         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
924
925 2008-12-12  Andrés G. Aragoneses  <aaragoneses@novell.com>
926
927         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
928
929 2008-12-12  Mark Probst  <mark.probst@gmail.com>
930
931         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
932         descriptors for helper functions directly in front of the code.
933
934 2008-12-11  Mark Probst  <mark.probst@gmail.com>
935
936         * method-to-ir.c: Removed an unnecessary assertion.
937
938 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
939
940         * method-to-ir.c: Merge SGEN changes from the old JIT.
941
942 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
943
944         * driver.c (compile_all_methods_thread_main): Handle failure of
945         mono_get_method ().
946
947 2008-12-10  Mark Probst  <mark.probst@gmail.com>
948
949         * mini-ppc.c: Merged with mini-ppc64.c.
950
951         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
952
953         * Makefile.am: Use the same sources for PPC and PPC64.
954
955         * mini-ppc64.c: Removed.
956
957 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
958
959         * branch-opts.c (remove_block_if_useless): Extract fall through detection
960         code to mono_bb_is_fall_through.
961         
962         * branch-opts.c (mono_remove_critical_edges): Same.
963
964 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
965
966         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
967         expect that an OP_BR_REG will be there.
968
969 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
970
971         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
972         for the many branch ops. The original check miss OP_BR_REG.
973
974         Fixes #457574.
975         
976 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
977
978         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
979
980 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
981
982         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
983         while holding the aot lock.
984
985 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
986
987         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
988         
989 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
990
991         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
992           to release all runtime callable wrappers held by the runtime.
993
994         Contributed under MIT/X11 license.
995
996 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
997
998         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
999           for Winx64.
1000
1001         Contributed under MIT/X11 license.
1002
1003 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
1004
1005         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
1006         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
1007
1008 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
1009
1010         * cpu-mips.md: fix ckfinite length
1011
1012         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
1013         (mono_arch_lowering_pass): cleanup, rearrange for clarity
1014         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
1015         
1016 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
1017
1018         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
1019         
1020 2008-12-08  Geoff Norton  <gnorton@novell.com>
1021
1022         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
1023         size by 8 bytes as well.
1024
1025 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1026
1027         * basic-simd.cs: Fix method names for Vector16b.
1028         
1029 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1030
1031         * basic-simd.cs: Fix method names for Vector16sb.
1032
1033 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1034
1035         * basic-simd.cs: Fix method names for Vector8us.
1036         
1037 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1038
1039         * basic-simd.cs: Fix method names for Vector8s.
1040         
1041 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1042
1043         * basic-simd.cs: Fix method names for Vector4ui.
1044
1045 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1046
1047         * basic-simd.cs: Fix method names for Vector2l.
1048
1049 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1050
1051         * basic-simd.cs: Fix method names for Vector2d.
1052
1053 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1054
1055         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
1056         that are extension methods.
1057
1058 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1059
1060         * basic-simd.cs: Fix method names for Vector4f.
1061
1062 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
1063
1064         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
1065         as such. Fixes #456669.
1066
1067 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
1068
1069         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
1070         
1071 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
1072
1073         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
1074         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
1075         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
1076         (mips_adjust_stackframe): handle FP spills
1077                 
1078         * mini-ops.h: add mips_mtc1_s2
1079         
1080         * cpu-mips.md: add mips_mtc1_s2
1081         
1082 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
1083
1084         * unwind.c: New file, move the unwind info encoding functions here from
1085         aot-compiler.c, so they could be used at runtime too.
1086
1087 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
1088
1089         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
1090         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
1091         
1092 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
1093
1094         * mini-mips.c: cleanup warnings
1095         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
1096         (mips_adjust_stackframe): handle case of taking the address of stack locals
1097         
1098 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
1099
1100         * aot-compiler.c: Implement a few functions missing from the asm writer.
1101         (emit_method_code): Only write symbols for methods when using the bin
1102         writer, since the assembler can't deal with the characters in our method
1103         names.
1104
1105         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
1106
1107         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
1108         call.
1109
1110         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
1111         a bit to also restore %rax.
1112
1113 2008-12-05  Mark Probst  <mark.probst@gmail.com>
1114
1115         * mini-ppc.c: Some simple merges from mini-ppc64.c.
1116
1117 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
1118
1119         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
1120         arguments.
1121
1122 2008-12-05  Mark Probst  <mark.probst@gmail.com>
1123
1124         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
1125
1126         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
1127         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
1128
1129         * exceptions-ppc64.c: Removed.
1130
1131         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
1132
1133 2008-12-05  Mark Probst  <mark.probst@gmail.com>
1134
1135         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
1136         tramp-ppc64.c.
1137
1138         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
1139
1140         * tramp-ppc64.c: Removed.
1141
1142 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
1143
1144         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
1145         the TYPESPEC table.
1146
1147 2008-12-05  Mark Probst  <mark.probst@gmail.com>
1148
1149         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
1150
1151         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
1152         mini-ppc.h instead of mini-ppc64.h.
1153
1154         * mini-ppc64.h: Removed.
1155
1156 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1157
1158         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
1159         
1160         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
1161         
1162 2008-12-05  Mark Probst  <mark.probst@gmail.com>
1163
1164         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
1165         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
1166         code easier.
1167
1168 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1169
1170         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
1171
1172 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1173
1174         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
1175
1176 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1177
1178         * basic-simd.cs: Tests for operator == and != on Vector4f.
1179
1180 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1181
1182         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
1183
1184         * simd-intrinsics.c: Kill useless enum.
1185
1186 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1187
1188         * cpu-mips.md: add long_conv_to_ovf_i4_2
1189         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
1190
1191 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1192
1193         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
1194         
1195         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
1196
1197 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1198
1199         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
1200         
1201 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1202
1203         * basic-simd.cs: Add tests for new methods.
1204
1205 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1206
1207         * simd-intrinsics.c: Add support for operator == and !=
1208         on Vector4(u)i.
1209
1210         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
1211
1212 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1213
1214         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
1215
1216 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
1217
1218         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
1219
1220         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
1221         MONO_PATCH_INFO_ICALL_ADDR.
1222
1223         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
1224
1225         * aot-compiler.c: Resurrect full-aot support.
1226
1227 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1228
1229         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
1230         
1231 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1232
1233         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
1234         
1235 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
1236
1237         * basic-simd.cs: Fix tests to work under ppc.
1238         Remove tests for methods that will be removed.
1239
1240 2008-12-03  Mark Probst  <mark.probst@gmail.com>
1241
1242         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
1243         generic type (via a typedef or typeref) correctly.
1244
1245 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
1246
1247         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
1248         diagnose an assertion failure.
1249
1250 2008-12-02  Mark Probst  <mark.probst@gmail.com>
1251
1252         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
1253         Fix trampoline size.
1254
1255         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
1256         conversion opcodes are implemented natively instead via emulation.
1257
1258 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1259
1260         * cpu-mips.md: remove mips_xori
1261
1262         * mini-ops.h:  remove mips_xori
1263
1264         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
1265
1266         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
1267         
1268         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
1269         
1270 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1271
1272         * cpu-mips.md: fix instruction lengths.
1273
1274         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
1275
1276         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
1277
1278         * mini-ops.h: fix slti / sltiu op profiles.
1279         
1280 2008-12-02  Martin Baulig  <martin@ximian.com>
1281
1282         * method-to-ir.c (mono_method_to_ir): Disable debugging
1283         information for the init locals block to make the debugger stop
1284         after all locals have been initalized.
1285
1286 2008-12-02  Martin Baulig  <martin@ximian.com>
1287
1288         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
1289         running inside the debugger.
1290
1291 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
1292
1293         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
1294         is enabled.
1295
1296         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
1297         alu->alu imm optimization which only shows if deadce is disabled.
1298
1299         * aot-compiler.c: Rename the function names for the binary and asm writers
1300         so they can coexist in the same process. Rework the xdebug code to use the
1301         asm writer. This avoids the need to call into the runtime to dump the
1302         debugging info. Add more debugging info for types.
1303
1304         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
1305
1306         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
1307         cpu description tables, they can't occur in cpu-<ARCH>.md.
1308
1309         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
1310         the stack in CEE_LDFLDA. Fixes #450542.
1311
1312         * generics.cs: Add a new test.
1313
1314 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1315
1316         * mini-ops.h: updated MIPS opcodes
1317         * mini-mips.c: decompose long opts
1318         * mini-mips.h: decompose long opts
1319         
1320 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
1321
1322         * cpu-mips.md: fix length on int_rem_un
1323         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
1324         
1325 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
1326
1327         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
1328
1329         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
1330
1331 2008-11-29  Martin Baulig  <martin@ximian.com>
1332
1333         * mini-exceptions.c (mono_handle_native_sigsegv): Check
1334         mono_debug_using_mono_debugger() in addition to the
1335         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
1336
1337 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1338
1339         * mini-ops.h: updated more MIPS opcodes
1340         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
1341         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
1342         
1343 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1344
1345         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
1346
1347 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1348
1349         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
1350         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
1351         * mini-ops.h: correct selected mips opcode entries
1352         
1353 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1354
1355         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
1356         make them work.
1357
1358 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1359
1360         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
1361
1362 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1363
1364         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
1365         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
1366         * mini-mips.h: disable IMT
1367         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
1368         
1369 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1370
1371         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
1372
1373 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1374
1375         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
1376
1377 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
1378
1379         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
1380         consistency.
1381
1382 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1383
1384         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1385         for Set/GetVector aligned versions.
1386
1387 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1388
1389         * basic-simd.cs: Add tests for Get/SetVector.
1390
1391 2008-11-27  Mark Probst  <mark.probst@gmail.com>
1392
1393         * mini.c: Removed g_slist_append_mempool().  Now in
1394         metadata/mempool.c.
1395
1396 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1397
1398         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
1399         size properly and make the bounds check optional.
1400
1401         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1402         for SetVector and IsAligned.
1403
1404 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
1405
1406         * mini.c: Remove unused mono_normalize_opcodes () function.
1407
1408 2008-11-26  Mark Probst  <mark.probst@gmail.com>
1409
1410         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
1411         using the new atomic add ops now.
1412
1413         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
1414         add.
1415
1416 2008-11-26  Mark Probst  <mark.probst@gmail.com>
1417
1418         * mini-ppc64.c: Several fixes.
1419
1420 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1421
1422         * cpu-mips.md: added jump_table
1423         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
1424
1425 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1426
1427         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
1428
1429 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1430
1431         * mini-ops.h: corrected a handful of MIPS opcodes.
1432
1433 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1434
1435         * aot-compiler.c: MIPS to use ELF writer
1436
1437 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1438
1439         * mini-codegen.c: remove MIPS specific assert.
1440
1441 2008-11-25  Mark Probst  <mark.probst@gmail.com>
1442
1443         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
1444         fixes.  PPC64 now passes most of the runtime regressions.
1445
1446 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
1447
1448         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
1449         volatile intervals a bit.
1450
1451 2008-11-24  Mark Probst  <mark.probst@gmail.com>
1452
1453         * basic-long.cs: New test case.
1454
1455 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
1456
1457         * mini.c (mini_method_compile): Disable globalra for large methods for 
1458         now.
1459
1460         * regalloc2.c (order_moves): Add fp support.
1461
1462         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
1463         source bblock ends with an OP_BR_REG.
1464
1465         * ratests.cs: Add a new test.
1466
1467 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1468
1469         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
1470         sharing.  PPC64 now passes generics.exe.
1471
1472 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1473
1474         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
1475
1476 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
1477
1478         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
1479         memory when mono_jit_info_table_find () can't find the method in the
1480         LMF case.
1481
1482         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
1483         AOTed code too.
1484         
1485         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
1486         writer too.
1487
1488 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1489
1490         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
1491         Several fixes.  PPC64 now runs exceptions.exe and
1492         devirtualization.exe.
1493
1494 2008-11-22  Mark Probst  <mark.probst@gmail.com>
1495
1496         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
1497         arrays.exe and basic-math.exe.
1498
1499 2008-11-22  Mark Probst  <mark.probst@gmail.com>
1500
1501         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
1502         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
1503
1504 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1505
1506         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
1507
1508 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1509
1510         * method-to-ir.c: Move bounds checking macros to ir-emit.h
1511
1512         * ir-emit.h: Move macros from method-to-ir.c to here.
1513
1514 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1515
1516         * mini-ops.h: Correct the long simd ops to use LREG.
1517
1518 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
1519
1520         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
1521         
1522         * mini-ops.h: Correct the dreg type of a few long opcodes.
1523
1524         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
1525         Add netbsd support.
1526
1527 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
1528
1529         * mini-ppc.c: remove negative stack references in epilog
1530         for platforms that don't support the red zone.
1531
1532 2008-11-21  Mark Probst  <mark.probst@gmail.com>
1533
1534         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
1535         point regs.  Now PPC64 passes basic-calls.exe.
1536
1537 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1538
1539         * basic-simd.cs: Add tests for accessors of Vector2l.
1540
1541 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1542
1543         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
1544
1545         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
1546         
1547         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
1548
1549 2008-11-21  Mark Probst  <mark.probst@gmail.com>
1550
1551         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
1552         PPC64 passes basic-long.exe.
1553
1554 2008-11-20  Mark Probst  <mark.probst@gmail.com>
1555
1556         * decompose.c: Decompose carry and overflow add on PPC64 like on
1557         other 64 bit archs.  Don't decompose sub at all on PPC64.
1558
1559         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
1560         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
1561         basic-long.exe.
1562
1563 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1564
1565         * basic-simd.cs: Add tests for accessors of Vector2d.
1566
1567 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1568
1569         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
1570
1571         * cpu-x86.md: Same.
1572
1573         * mini-x86.c (mono_arch_output_basic_block): Same.
1574         
1575         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
1576
1577 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1578
1579         * basic-simd.cs: Add tests for accessors of Vector4f.
1580
1581 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1582
1583         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
1584
1585         * cpu-x86.md: Same.
1586
1587         * mini-x86.c (mono_arch_output_basic_block): Same.
1588         
1589         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
1590
1591 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1592
1593         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
1594
1595 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1596
1597         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
1598
1599         * cpu-x86.md: Same.
1600
1601         * mini-x86.c (mono_arch_output_basic_block): Same.
1602         
1603         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
1604
1605 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1606
1607         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
1608
1609 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1610
1611         * simd-intrinsics.c: Enable setters for Vector16sb.
1612
1613 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1614
1615         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
1616
1617         * cpu-x86.md: Same.
1618
1619         * mini-x86.c (mono_arch_output_basic_block): Same.
1620         
1621         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
1622
1623 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
1624
1625         * simd-intrinsics.c: Implement setter for Vector8us.
1626
1627 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
1628
1629         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
1630         for dead variables.
1631
1632 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
1633
1634         * mini-ppc.c: remove references to the red zone in the prolog
1635         (for systems that don't support it).
1636
1637 2008-11-19  Mark Probst  <mark.probst@gmail.com>
1638
1639         * cpu-ppc64.md: Fixed a few instruction lengths.
1640
1641         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
1642         now.
1643
1644 2008-11-19  Mark Probst  <mark.probst@gmail.com>
1645
1646         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
1647         basic.exe now.
1648
1649 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
1650
1651         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
1652
1653 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
1654
1655         * mini-ops.h: Added OP_INSERT_I2.
1656
1657         * cpu-x86.md: Same.
1658
1659         * mini-x86.c (mono_arch_output_basic_block): Same.
1660         
1661         * simd-intrinsics.c: Implement setter for Vector8s.
1662
1663         * simd-methods.h: Add the names of get setters of Vector8s.
1664
1665 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
1666
1667         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
1668         
1669         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
1670         parameters.
1671
1672         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1673
1674 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1675
1676         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
1677         for PPC64.  An empty program runs now.
1678
1679 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
1680
1681         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1682
1683         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
1684         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
1685         info for JITted code is emitted into a shared library, loadable into gdb.
1686
1687 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1688
1689         * Makefile.am: Changes to build PPC64.
1690
1691         * mini-arch.h: Include mini-ppc64.h on PPC64.
1692
1693 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1694
1695         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
1696         in PPC code up to r119147.
1697
1698 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1699
1700         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1701         cpu-ppc64.md: Changes for PPC64.
1702
1703         Based on code submitted by andreas.faerber@web.de at
1704         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
1705         X11/MIT license.
1706
1707 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1708
1709         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1710         cpu-ppc64.md: Copied from the corresponding PPC files from
1711         r118846.
1712
1713 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
1714
1715         * mini-ops.h: Added OP_ROUND.
1716
1717         * cpu-x86.md: Added round.
1718
1719         * mini-x86.c: Added support for intrinsicing Math.Round (double).
1720
1721         * basic-math.cs: Added test_0_round to test rounding.
1722
1723         Contributed under MIT/X11 license.
1724
1725 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
1726
1727         * aot-compiler.c : Fix the Winx64 build.
1728
1729         Contributed under MIT/X11 license.
1730
1731 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
1732
1733         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
1734         in OP_EXTRACT_R8 to avoid possible stack corruption.
1735
1736 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
1737
1738         * mini-ops.h: Added OP_EXTRACT_R8/I8.
1739
1740         * cpu-x86.md: Added extract_r8.
1741
1742         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
1743         
1744         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
1745         a couple of OP_EXTRACT_I4.
1746
1747         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
1748
1749         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
1750
1751 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
1752
1753         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
1754         and not 4.1. 
1755
1756 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
1757
1758         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
1759         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
1760
1761         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
1762         are not needed any more.
1763
1764         * mini.h: Remove the unused INS_LIST macros.
1765
1766         * mini.c (mini_method_compile): Remove a disable globalra case which is no
1767         longer needed.
1768
1769         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
1770         ir-emit.h.
1771
1772         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
1773         mono_alloc_ireg () instead.
1774
1775         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
1776         macros.
1777
1778         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
1779         on amd64.
1780
1781         * aot-runtime.c (load_aot_module): Disable AOT when running under
1782         CAS.
1783
1784         * mini-amd64.h: Change the monitor fastpath defines to check for
1785         !PLATFORM_WIN32 so they work on *bsd too.
1786
1787         * mini.h mini.c mini-hhpa.c: Remove more unused code.
1788
1789         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
1790
1791         * mini.h (MonoCompile): Remove new_ir flag.
1792
1793         * regalloc.h regalloc.c: Remove unused code.
1794
1795         * cpu-*.md: Remove more unused opcodes.
1796
1797         * simple-cee-ops.h simple-mini-ops.h: Removed.
1798
1799         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
1800         
1801 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
1802
1803         * aliasing.h: Removed.
1804
1805         * *.c: Remove references to aliasing.h and inssel.h.
1806
1807         * mini.c: Remove additional unused functions.
1808
1809         * mini-ops.h cpu-*.md: Remove unused opcodes.
1810
1811 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
1812
1813         Remove the old JIT code.
1814
1815         * inssel*.brg: Removed.
1816
1817         * ssa.c abcremoval.c aliasing.c: Removed.
1818
1819         * ssa2.c: Renamed to ssa.c.
1820
1821         * abcremoval2.c: Renamed to abcremoval.c.
1822
1823         * *.c: Removed all !cfg->new_ir code.
1824
1825         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
1826         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
1827
1828         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
1829         
1830 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
1831
1832         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
1833         to simplify the code and cut back on the number of global symbols in the AOT
1834         file.
1835         
1836         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
1837
1838 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
1839
1840         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
1841         with the got/got_info tables.
1842
1843         * mini.h: Bump AOT file format version.
1844         
1845         * unwind.h: New file, contains definitions for stack unwinding.
1846
1847         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
1848         to cfg->unwind_ops.
1849         
1850         * aot-compiler.c: Generalize the emitting of unwind information to use the
1851         information in cfg->unwind_ops.
1852
1853         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
1854
1855         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
1856         AOT method frames. Enable writing symbols for methods by default.
1857
1858 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
1859
1860         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
1861         and make it work with vectors of element sizes 1, 2 and 4.
1862
1863         * simd-intrinsics.c: Enable getter for all vectors with element size
1864         1, 2 or 4.
1865
1866         * simd-methods.h: Add the names of other getters.
1867
1868         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
1869
1870         * cpu-x86.md: Same.
1871
1872         * mini-x86.c: Same.
1873
1874 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
1875
1876         * mini-ppc.h: portability fix.
1877
1878 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
1879
1880         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
1881         buggy and will overwrite it.
1882
1883 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
1884
1885         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
1886         Use it to emit local symbols for all methods so AOTed methods show up with
1887         their full name in gdb/valgrind output.
1888
1889 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
1890
1891         * mini-ppc.c: portability fixes.
1892
1893 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
1894
1895         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
1896         entries out of the if (!generic_shared...) code so it is always done.
1897         (mono_class_init_trampoline): Do the patching when running under valgrind
1898         too, newer versions of valgrind have no problems with it.
1899
1900 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
1901
1902         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
1903         further sections.
1904
1905 2008-11-13  Mark Probst  <mark.probst@gmail.com>
1906
1907         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
1908         filters.
1909
1910 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1911
1912         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
1913
1914 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1915
1916         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
1917
1918         * cpu-x86.md: Same.
1919
1920         * mini-x86.c: Same.
1921
1922         * simd-intrinsics.c: Same.
1923
1924 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1925
1926         * simd-intrinsics.c: Enable constructor intrinsics for all types.
1927
1928 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1929
1930         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
1931         to work with more Vector types.
1932
1933 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1934
1935         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
1936         store the elemens directly instead of using and intermediate.
1937
1938 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
1939
1940         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
1941
1942         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
1943         to preserve %eax for aot plt trampolines.
1944
1945         * aot-compiler.c (compile_method): Don't skip synchronized methods.
1946         (encode_method_ref): Flag synchronized methods so they won't go through
1947         the AOT trampoline.
1948
1949         * aot-compiler.c: Additional work to support AOTing synchronized methods/
1950         wrappers.
1951
1952         * cpu-ia64.md (jmp): Increase max length.
1953
1954 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
1955
1956         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
1957         open generic classes.
1958
1959         * aot-compiler.c: Enable the ELF writer on ELF platforms.
1960
1961         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
1962         box+brtrue optimization since it causes test failures on x86.
1963
1964 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
1965
1966         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
1967
1968         * cpu-x86.md: Same.
1969
1970         * mini-x86.c: Same.
1971
1972         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
1973         for simd ctor values. 
1974
1975         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
1976         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
1977
1978 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
1979
1980         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
1981         LogicalRightShift.
1982
1983         * simd-instrincs.c: Same.
1984
1985         * basic-simd.cs: Same.
1986
1987 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
1988
1989         * ratests.cs: Add more tests.
1990
1991         * regalloc2.c (add_spill_code): Handle more corner cases.
1992
1993 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
1994
1995         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
1996         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
1997         both the source an destination of an instruction.
1998
1999 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
2000
2001         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
2002         wapihandles.c: more portability changes.
2003
2004 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
2005
2006         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
2007         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
2008         safe to execute in a signal handler and the kernel provides better
2009         the info in /proc/self/smaps. Avoid the assert on sigaction during
2010         cleanup.
2011
2012 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
2013
2014         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
2015         do the bblock linking hack if it is actually needed.
2016
2017         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
2018         up linking.
2019
2020         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
2021         crash problem is fixed.
2022
2023         * branch-opts.c (mono_remove_critical_edges): Link up newly added
2024         bblocks.
2025
2026         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
2027         for catch clauses.
2028         (mini_method_compile): Set the starting value of next_vreg to 
2029         MAX_IREGS + MAX_FREGS when using globalra.
2030
2031         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
2032         filter clauses with BB_EXCEPTION_HANDLER.
2033
2034         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
2035
2036 2008-11-10  Mark Probst  <mark.probst@gmail.com>
2037
2038         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
2039         space for stdcall.  Fixes regressions on Win32.
2040
2041 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
2042
2043         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
2044         bblocks.
2045         (linear_scan): Remove an assert which doesn't seem to be needed.
2046
2047         * local-propagation.c (mono_local_deadce): Avoid a call to
2048         MONO_DELETE_INS which would screw up the instruction linking.
2049
2050         * mini.c (mono_decompose_op_imm): Make this work with globalra.
2051
2052         * regalloc2.c: Upgrade to work the current JIT code.
2053
2054 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
2055
2056         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
2057         case.
2058
2059         * aot-runtime.c: Remove some dead code.
2060
2061         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
2062         consistency.
2063         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
2064
2065         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
2066         trampolines using sscanf since atoi doesn't work on large unsigned values.
2067
2068         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
2069         Initialize code_size.
2070
2071 2008-11-08  Mark Probst  <mark.probst@gmail.com>
2072
2073         * method-to-ir.c (mini_emit_inst_for_method): Make
2074         Interlocked.CompareExchange work for Int arguments on 32 bit
2075         archs, as well.
2076
2077 2008-11-07  Mark Probst  <mark.probst@gmail.com>
2078
2079         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
2080
2081 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
2082
2083         * main.c Fix MSVC build.
2084
2085         Contributed under MIT/X11 license.
2086
2087 2008-11-06  Mark Probst  <mark.probst@gmail.com>
2088
2089         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
2090         alignment larger than 8 bytes are aligned correctly, too.
2091
2092         * mini.c: Honor the min_align field of MonoClass when laying out
2093         the stack.
2094
2095 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
2096
2097         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
2098
2099         * aot-compiler.c (emit_plt): Fix a warning.
2100         
2101         * aot-compiler.c: Implement ARM support in the binary writer.
2102
2103 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2104
2105         * basic-simd.cs: Add test for getter with byref arg.
2106         Fix the naming of a few tests.
2107         Add missing checks to a test.
2108
2109 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
2110
2111         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
2112
2113         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
2114         most of the full-aot support for monitor enter/exit trampolines.
2115
2116         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
2117         enter/exit trampoline creation functions.
2118
2119         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
2120         make dist.
2121
2122 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
2123
2124         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
2125         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
2126         implement the needed functionality without adding crap to the runtime.
2127
2128 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
2129
2130         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
2131         non-x86 builds.
2132
2133         * mini.c (mono_build_date): New global version holding the build date in
2134         string format.
2135         
2136         * Makefile.am (buildver.c): Generate a file containing the build date.
2137
2138         * main.c: Set the build date from the generated file.
2139
2140         * mini.c (mono_get_runtime_build_info): New helper function returning build
2141         information in a string format.
2142         
2143         * driver.c (mono_main): Print the build date in --version.
2144
2145         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
2146         file when the bind-to-runtime-version option is used.
2147
2148 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2149
2150         * simd-intrinsics.c: Fix bug when using getters and byref args. 
2151
2152 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2153
2154         * simd-methods.h: Rename prefetch methods.
2155
2156         * simd-intrinsics.c: Same.      
2157
2158 2008-11-05  Mark Probst  <mark.probst@gmail.com>
2159
2160         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
2161         sizes.
2162
2163 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2164
2165         * aot-compiler.c: Use the bundled elf header files instead of depending on
2166         the system one.
2167         
2168         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
2169         mempool.
2170
2171         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
2172         on every call.
2173
2174 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
2175
2176         * cpu-x86.md: Add store nta ops.
2177
2178         * mini-ops.h: Same.
2179
2180         * mini-x86.c: Same.
2181
2182         * mini.h: Add an enum for simd prefetch modes.
2183
2184         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
2185         of store. Use the changed code to support store nta.
2186
2187         * simd-intrinsics.c: Add prefetch ops for all vector types.
2188
2189 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2190
2191         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
2192         threads.
2193         
2194         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
2195         names.
2196
2197         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
2198         trampolines.
2199
2200 2008-11-04  Mark Probst  <mark.probst@gmail.com>
2201
2202         * mini-x86.c: Fixed commit.
2203
2204 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2205
2206         * aot-compiler.c (emit_plt): Align the plt section only on x86.
2207
2208 2008-11-04  Mark Probst  <mark.probst@gmail.com>
2209
2210         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
2211         and MONITOR_EXIT, for the ASM fastpaths.
2212
2213         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
2214         available.
2215
2216         * mini.c, patch-info.h: Signature and patch infos for
2217         Monitor.Enter/Exit trampolines.
2218
2219         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
2220
2221         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
2222         Monitor.Enter/Exit ASM fastpath for Linux.
2223
2224 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2225
2226         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
2227
2228         * objects.cs: Add a new test.
2229         
2230         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
2231
2232         * aot-runtime.c (load_method): Run class initialization in the PLT case even
2233         if MONO_LOG_LEVEL is set.
2234
2235         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
2236
2237         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
2238
2239         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
2240         
2241         * aot-compiler.c: Change the relocation code to use virtual addresses instead
2242         of file offsets. Align the sections belonging to the data segment to 
2243         PAGESIZE.
2244
2245 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
2246
2247         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
2248         elf.h. Port it to amd64.
2249
2250 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2251
2252         * driver.c: Enable SIMD by default.
2253
2254 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2255
2256         * cpu-x86.md: Add prefetch op.
2257
2258         * mini-ops.h: Same.
2259
2260         * mini-x86.c: Same.
2261
2262         * mini.h: Add an enum for simd prefetch modes.
2263
2264         * simd-methods.h: Add prefetch function names.
2265
2266         * simd-intrinsics.c: Add prefetch ops for all vector types.
2267
2268 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
2269
2270         * aot-compiler.c (emit_bytes): Speed this up a little.
2271
2272 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
2273
2274         * aot-compiler.c: Add JIT time etc. statistics.
2275         
2276         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
2277
2278         * mini.h (MonoCompile): Add 'got_offset' field.
2279
2280         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
2281         method_got_offsets array.
2282
2283         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
2284         wrappers.
2285
2286         * aot-compiler.c (compile_method): Add generic method instances referenced
2287         by the method to the list of methods to be compiled, this is required so if
2288         A<T> references B<T>, and another assembly references A<int>, then it will
2289         also get a copy of B<int>.
2290
2291         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
2292         when checking for monitor enter/exit.
2293
2294 2008-10-30  Mark Probst  <mark.probst@gmail.com>
2295
2296         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
2297         for Monitor.Enter and Monitor.Exit if enabled.
2298
2299         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
2300         Solaris.
2301
2302 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
2303
2304         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
2305         of an OP_MOVE. Fixes #440046.
2306
2307         * basic-long.cs: Add a new test.
2308
2309 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
2310
2311         * mini.h: Add synchronization note for the managed counter-part.
2312
2313         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
2314         returns the simd caps of the current cpu.
2315
2316 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
2317
2318         * basic-simd.cs: Remove Console.WriteLine.
2319
2320 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2321
2322         * basic-simd.cs: New tests for Vector2ul.
2323
2324 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2325
2326         * simd-intrinsics.c: Add new vector type Vector2ul.
2327
2328 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2329
2330         * basic-simd.cs: New tests for Vector2l.
2331
2332 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2333
2334         * cpu-x86.md: Add long version of most packed int ops.
2335
2336         * mini-ops.h: Same.
2337
2338         * mini-x86.h: Same.
2339
2340         * simd-intrinsics.c: Add new vector type Vector2l.
2341
2342 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2343
2344         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
2345
2346         * simd-methods.h: Remove SN_op_BitwiseXor.
2347
2348 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
2349
2350         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
2351         alignment.
2352
2353 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2354
2355         * basic-simd.cs: Test for Vector2d.
2356
2357         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
2358         value.
2359
2360 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2361
2362         * cpu-x86.md: Add double version of all packed float ops.
2363
2364         * mini-ops.h: Same.
2365
2366         * mini-x86.h: Same.
2367
2368         * simd-intrinsics.c: Add new vector type Vector2d.
2369
2370         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
2371
2372         * simd-methods.h: Add Duplicate.
2373
2374 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2375
2376         * basic-simd.cs: Test for packing with signed saturation.
2377
2378 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
2379
2380         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
2381         found in the TYPESPEC table.
2382
2383 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
2384
2385         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
2386         too.
2387
2388         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2389
2390         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
2391         instead of the RVA, since the RVA can be changed by tools like the cil 
2392         stripper.
2393
2394         * method-to-ir.c (mono_method_to_ir2): Ditto.
2395
2396         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
2397         (deserialize_variable): Ditto.
2398
2399 2008-10-25  Martin Baulig  <martin@ximian.com>
2400
2401         * debug-mini.c (write_variable): Use
2402         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
2403
2404 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2405
2406         * cpu-x86.md: Add unsigned variants of packd and packw.
2407
2408         * mini-ops.h: Same.
2409
2410         * mini-x86.h: Emit the right instruction for packd and packw.
2411         Add unsigned variants of packd and packw.
2412
2413         * simd-intrinsics.c: Packd and packw were used in place of their
2414         unsigned variants. Change that.
2415         Add intrinsics for (Signed)PackWithSignedSaturation.
2416
2417         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
2418
2419 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2420
2421         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
2422
2423 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2424
2425         * mini-ops.h: Remove dword packed add/sub with saturation ops.
2426
2427         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
2428
2429         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
2430         sse instructions.
2431
2432         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
2433
2434 2008-10-24  Mark Probst  <mark.probst@gmail.com>
2435
2436         * method-to-ir.c, mini.c: Special casing for the synchronized
2437         wrapper for the ldtoken+GetTypeFromHandle case.
2438
2439 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
2440
2441         * mini.c (mono_replace_ins): Move this to branch-opts.c.
2442
2443         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
2444         created/split bblocks.
2445
2446 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2447
2448         * mini-ops.h: Add packed signed mul high.
2449         
2450         * cpu-x86.md: Same.
2451
2452         * mini-x86.c (mono_arch_output_basic_block): Same.
2453
2454         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
2455
2456         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
2457
2458 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2459
2460         * basic-simd.cs: Tests for Vector16sb.
2461
2462 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
2463
2464         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
2465
2466 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
2467
2468         * mini-ops.h: Add packed signed min, max and compare greater.
2469         
2470         * cpu-x86.md: Same.
2471
2472         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
2473         saturation.
2474
2475         * simd-methods.h: Add CompareGreaterThan.
2476
2477         * simd-methods.h: Remove CompareEquals.
2478
2479         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
2480
2481         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
2482
2483         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
2484         CompareEqual.
2485
2486 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
2487
2488         * basic-simd.cs: Fix tests due to change in the API.
2489
2490 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2491
2492         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
2493
2494 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2495
2496         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
2497
2498         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
2499         inst_offset as this has invalid values for LDADDR.
2500
2501 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2502
2503         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2504
2505         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
2506
2507 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2508
2509         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
2510         for accessing field->data.
2511
2512 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2513
2514         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2515
2516 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2517
2518         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
2519
2520         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
2521
2522 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2523
2524         * dominators.c (mono_compute_natural_loops): Allocate GList enties
2525         from the cfg mempool.
2526
2527 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
2528
2529         * basic-simd.cs: Tests for new methods in Vector8us.
2530
2531 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
2532
2533         * mini-ops.h: Add multiply and store high.
2534         
2535         * cpu-x86.md: Same.
2536
2537         * mini-x86.c (mono_arch_output_basic_block): Same.
2538
2539         * simd-methods.h: Same.
2540
2541         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
2542         and CompareEqual.
2543
2544 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
2545
2546         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
2547         mono_class_setup_vtable ().
2548
2549         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
2550         mono_class_get_vtable_entry () for accessing klass->vtable.
2551
2552         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
2553
2554         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
2555         found.
2556
2557         * method-to-ir.c (mono_save_token_info): Don't save references made from
2558         wrappers.
2559
2560         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
2561         of generic instances.
2562
2563         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
2564
2565 2008-10-19  Mark Probst  <mark.probst@gmail.com>
2566
2567         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
2568         OP_JMP depends on the method signature.  Calculate it properly.
2569
2570 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
2571         
2572         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
2573         called directly.
2574
2575         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
2576         instances.
2577         (emit_extra_methods): Add another table mapping method indexes to 
2578         offsets in the extra_method_info table.
2579
2580         * mini.h: Bump AOT file format version.
2581         
2582         * aot-runtime.c: Merge most of the code from mono_aot_get_method
2583         and mono_aot_get_method_from_token () into one function.
2584
2585 2008-10-19  Mark Probst  <mark.probst@gmail.com>
2586
2587         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
2588         separate counter.
2589
2590 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
2591
2592         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
2593         methods.
2594
2595         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
2596         disable_aot.
2597
2598         * mini.c (mono_patch_info_equal): Compare the generic context as well.
2599
2600         * mini.h: Bump aot file format version.
2601
2602         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
2603         AOT file can contain native code for methods which are not in the METHOD
2604         table. Generate code for non-sharable generic instances of generic methods
2605         found in the METHODSPEC table.
2606         
2607         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
2608         encoding generic type handles.
2609
2610         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
2611         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
2612
2613         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
2614         macros + MONO_ADD_INS.
2615
2616         * mini.c (mono_jump_info_token_new2): New function which takes a generic
2617         context as well.
2618
2619         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
2620
2621         * mini.h: Bump aot file format version.
2622
2623         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
2624
2625 2008-10-17  Mark Probst  <mark.probst@gmail.com>
2626
2627         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
2628         platforms, with definable stack alignment value.  Set to 16 now
2629         for all platforms.
2630
2631         * mini.c, mini.h, driver.c: Command line option for disabling
2632         stack alignment.
2633
2634 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
2635
2636         * basic-simd.cs: Tests for new methods in Vector4ui.
2637
2638 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
2639
2640         * mini-ops.h: Add packed int shuffle.
2641         
2642         * cpu-x86.md: Same.
2643
2644         * mini-x86.c (mono_arch_output_basic_block): Same.
2645
2646         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
2647         extract mask, max, min, shuffle.
2648
2649         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
2650
2651 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
2652
2653         * basic-simd.cs: Tests for new methods in Vector8us.
2654
2655 2008-10-17  Mark Probst  <mark.probst@gmail.com>
2656
2657         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
2658         RuntimeTypeHandle, not a TypedReference.
2659
2660 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
2661
2662         * simd-intrinsics.c: remove relocations.
2663
2664 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
2665
2666         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
2667         optimizations from the x86 backend.
2668
2669 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
2670
2671         * simd-methods.h, simd-intrinsics.c: debloat method names and
2672         prepare for no relocations.
2673
2674 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2675
2676         * mini-ops.h: Add packed min/equal and sum of absolute differences.
2677         
2678         * cpu-x86.md: Same.
2679
2680         * mini-x86.c (mono_arch_output_basic_block): Same.
2681
2682         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
2683         extract mask, max, min and sum of absolute differences.
2684
2685         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
2686         method name.
2687
2688 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2689
2690         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
2691         Renamed one test for consistency.
2692
2693 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2694
2695         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
2696         fix to the code that deal with other blocks.
2697
2698 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2699
2700         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
2701
2702 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2703
2704         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
2705         that deals with vreg interference. Explicitly check for OP_LDADDR to be
2706         able to process the source reg.
2707
2708 2008-10-16  Martin Baulig  <martin@ximian.com>
2709
2710         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
2711
2712         * inssel.brg: Add `OP_HARD_NOP'.
2713
2714         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
2715
2716         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
2717         `OP_HARD_NOP' instruction when running inside the debugger.
2718
2719         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
2720         `OP_HARD_NOP' instruction when running inside the debugger.
2721
2722 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2723
2724         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
2725         now works. The issue with the regalloc tripping up no longer
2726         happens.
2727
2728         * simd-intrinsics.c (load_simd_vreg): Same.
2729
2730 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2731         
2732         * basic-simd.cs: Tests for new Vector8ui methods.
2733
2734 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2735
2736         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
2737         only for type. This fixes crashes where MonoInst::klass is checked
2738         for ops of type != VTYPE or OBJ.
2739
2740         * simd-intrinsics.c (load_simd_vreg): Same.
2741
2742 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2743
2744         * mini-ops.h: Add ops for packed shuffle/max/avg and
2745         extract mask.
2746         
2747         * cpu-x86.md: Same.
2748
2749         * mini-x86.c (mono_arch_output_basic_block): Same.
2750
2751         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
2752         extract mask.
2753
2754         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
2755         to emit extract mask op.
2756
2757         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
2758         to emit word shuffles.
2759
2760 2008-10-15  Mark Probst  <mark.probst@gmail.com>
2761
2762         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
2763         the largest alignment needed by a variable, but at least
2764         sizeof(gpointer).
2765
2766 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2767
2768         * basic-simd.cs: Tests for the fixes in the last commit.
2769
2770 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2771
2772         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
2773         no longer handles STACK_PTR input.
2774
2775         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
2776
2777         * simd-intrinsics.c (load_simd_vreg): New function that works like 
2778         get_simd_vreg   but handles STACK_PTR input.
2779
2780         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
2781         as the input can be an arbitrary pointer.
2782
2783         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
2784         LDADDR local optimization directly otherwise use a store op.
2785
2786 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2787
2788         * basic-simd.cs: Tests for dup low and dup high.
2789
2790 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2791
2792         * mini-ops.h: Add dup low and dup high ops.
2793         
2794         * cpu-x86.md: Same.
2795
2796         * mini-x86.c (mono_arch_output_basic_block): Same.
2797
2798         * simd-intrinsics.c (vector4f_intrinsics): Same.
2799
2800 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
2801
2802         * basic-simd.cs: Tests for recently added functionality.
2803
2804 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
2805
2806         * mini-ops.h: Add remaining sse1 fp ops.
2807         
2808         * cpu-x86.md: Add remaining sse1 fp ops.
2809
2810         * mini-x86.c (mono_arch_output_basic_block): Same.
2811
2812         * mini.h: Add enum for simd FP compare conditions.
2813
2814         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
2815
2816         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
2817         so the backed can generate the appropriate op.
2818
2819 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
2820         This patch squeese one more byte from the SimdIntrinsc struct.
2821
2822         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
2823         a a shift amount intead of simply or'ing it.
2824
2825         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
2826
2827         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
2828         byte so we can have an aditional flags field without increasing struct size.
2829
2830         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
2831         against the simd_supported_versions bitmask.
2832
2833         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
2834
2835 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
2836
2837         * mini.c: remove rawbuffer code (the only use here is unsafe because
2838         it takes locks during signal handling and the kernel now provides much
2839         better info in proc/pid/smaps these days).
2840
2841 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
2842
2843         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
2844         OP_X86_PUSH_OBJ. Fixes #434620.
2845
2846         * objects.cs: Add a test.
2847         
2848 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
2849
2850         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
2851         that the packuswb/packusdw don't work with unsigned numbers for what
2852         would be negative numbers in signed format.
2853
2854         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
2855         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
2856
2857         * mini-ops.h: Add doubleword forms of many ops and packing ones.
2858
2859         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
2860
2861         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
2862
2863         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
2864
2865         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
2866         add more ops.
2867
2868         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
2869         version as the enum in mini.h.
2870
2871         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
2872         for sse3 ops, check the simd_version field if present. This way the code
2873         works with all versions of sse.
2874
2875 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2876
2877         * simd-intrinsics.c: Fixed intrinsic name typo.
2878
2879         * mini.h: Added missing simd exported function.
2880
2881         * basic-simd.cs: Added tests for Vector4ui.
2882         Fixed broken test for Vector16b.
2883
2884 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
2885
2886         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
2887         the max length to 64.
2888
2889 2008-10-10  Mark Probst  <mark.probst@gmail.com>
2890
2891         * method-to-ir.c: Only do the fast virtual generic method call for
2892         non-wrapper methods.
2893
2894         * mini.h, mini-trampolines.c: The new generic virtual remoting
2895         trampoline handles virtual method calls via the vtable (as done by
2896         the fast virtual generic method calls) to remoting proxies.
2897
2898         * mini.c (mono_jit_create_remoting_trampoline): For generic
2899         methods reate a generic virtual remoting trampoline.
2900
2901         * mini-amd64.h: Enable fast virtual generic method calls again.
2902
2903 2008-10-10  Mark Probst  <mark.probst@gmail.com>
2904
2905         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
2906         restore registers when doing tail calls.
2907
2908 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2909
2910         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
2911         Vector4ui.
2912
2913 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2914
2915         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
2916
2917 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2918
2919         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
2920
2921 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2922
2923         * basic-simd.cs: Retrofit for API changes.
2924
2925 2008-10-10  Mark Probst  <mark.probst@gmail.com>
2926
2927         * mini-ppc.c: Handle integer stack arguments for tail calls.
2928
2929 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2930
2931         * optflags-def.h: Removed sse3 optimization.
2932
2933         * driver.c: Same.
2934
2935         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
2936         sse3.
2937
2938         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
2939
2940         * mini.h: Added enumeration with simd versions.
2941
2942         * simd-intrinsics.c (emit_intrinsics): Use the new static var
2943         for detecting SSE3.
2944
2945         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
2946
2947         * mini.c (mini_init): Call mono_simd_intrinsics_init.
2948
2949 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
2950
2951         * basic-simd.cs: Added tests for Vector8u and Vector16u.
2952
2953         * basic-simd.cs: Fixed test naming.
2954
2955 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
2956
2957         * mini-ops.h: Added ops for packed and saturated math, shifts
2958         and packing/unpacking.
2959
2960         * cpu-x86.md: Added descriptors for the above ops.
2961
2962         * mini-x86.c: Added code to emmit the above ops.
2963
2964         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
2965
2966 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
2967
2968         * aot-compiler.c (compile_method): Enable AOT for generic code.
2969
2970         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
2971
2972 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
2973
2974         * mini.c: add a workaround for a common screwup that ends up blamed
2975         to mono (other processes blocking signal delivery).
2976
2977 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
2978
2979         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
2980         in the LDFLD/STFLD opcodes. Fixes #432673.
2981
2982         * iltests.il.in: Add a new test.
2983
2984 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
2985
2986         * mini-arm.c: attach the thread in unmanaged->managed transitions
2987         using delegates (bug #433148).
2988
2989 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
2990
2991        * basic-simd.cs: Use new ShuffleSel constants.
2992
2993 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
2994
2995         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
2996
2997         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
2998         only disable simd intrinsics if no sse2 is detected.
2999
3000         * optflags-def.h: Added sse3.
3001
3002         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
3003         is disabled.
3004
3005 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
3006
3007         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
3008         when adding delegate-invoke wrappers.
3009
3010 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
3011
3012         * Makefile.am: Reenable the simd tests.
3013
3014 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
3015
3016         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
3017           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
3018           other vreg is allocated to that hreg.
3019
3020         Contributed under MIT/X11 license.
3021
3022 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
3023
3024         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
3025         yet checked in.
3026
3027 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
3028
3029         * basic-simd.cs: New test suite for SIMD intrinsics.
3030
3031         * Makefile.am: Added new tests.
3032
3033 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
3034
3035         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
3036
3037         * mini-ops.h: Same.
3038
3039         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
3040
3041         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
3042         using SSE2 aware opcodes.
3043
3044         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
3045         is enabled, this code path is only reachable if conversion ops are emmited after
3046         mono_method_to_ir.
3047
3048         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
3049
3050         This optimization saves 6 bytes per conversion against the old version.
3051
3052 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
3053
3054         * aot-compiler.c (compile_method): Don't skip methods referencing 
3055         generic methods without a corresponding entry in token_info_hash, since
3056         encode_method_ref () can handle all generic methods now.
3057
3058         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
3059         generic context is set.
3060         
3061         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
3062         generic sharing of LDTOKEN.
3063
3064 2008-10-06  Mark Probst  <mark.probst@gmail.com>
3065
3066         * mini-amd64.h: Temporarily disabled fast virtual generic method
3067         calls because it breaks the System.Runtime.Remoting tests.
3068
3069 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
3070
3071         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
3072
3073         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
3074         so inlining actually works.
3075         (check_inline_caller_method_name_limit): Ditto.
3076
3077 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
3078
3079         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
3080         64 bit safety (from Olaf Hering and Andreas Färber).
3081
3082 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
3083         
3084         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
3085         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
3086         unused virtual call support code.
3087
3088         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
3089         
3090         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
3091         which can't use aot trampolines.
3092         (decode_patch): Don't create aot trampolines for methods which can't use
3093         them.
3094
3095         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
3096         use aot trampolines.
3097
3098         * mini.h: Bump AOT image format version.
3099         
3100 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
3101
3102         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
3103         to save_token_info () since cmethod is inflated for constrained calls.
3104
3105         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
3106
3107 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
3108
3109         * Makefile.am: Add build rules for ppc64.
3110         This avoids the build failing at pedump with unresolved symbols
3111         due to lack of arch_sources. Instead it will now fail earlier
3112         due to lack of cpu-ppc64.md.
3113
3114         Contributed under MIT/X11 license.
3115
3116 2008-10-04  Mark Probst  <mark.probst@gmail.com>
3117
3118         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
3119         tail calls.
3120
3121         * iltests.il.in: Add test case for tail call with many arguments.
3122
3123 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
3124
3125         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
3126         to the fast virtual generic method code until the aot case is fixed.
3127
3128 2008-10-03  Mark Probst  <mark.probst@gmail.com>
3129
3130         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
3131
3132 2008-10-03  Mark Probst  <mark.probst@gmail.com>
3133
3134         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
3135         thunks.
3136
3137 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
3138         
3139         * simd-intrinsics.c: Forgot to add this one.
3140
3141         * mini-codegen.c: Fix macro in case SIMD is not supported.
3142
3143 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
3144         
3145         This patch land initial JIT support for simd intrinsics.
3146
3147         * mini-x86.h: Added new define to make --enable_minimal work on x86.
3148
3149         * Makefile.am: Added simd-intrinsics.c
3150
3151         * simd-intrinsics.c: New file with simd instrinsic related
3152         code.
3153
3154         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
3155
3156         * cpu-x86.md: Add simd related instructions.
3157
3158         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
3159
3160         * driver.c: Added two new --regression variants.
3161
3162         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
3163
3164         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
3165
3166         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
3167         extract some complicated logic to helper functions.
3168
3169         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
3170
3171         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
3172
3173         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
3174         the specialized simplification pass.
3175
3176         * method-to-ir.c (mono_spill_global_vars): Use new macro.
3177
3178         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
3179
3180         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
3181         table.
3182
3183         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
3184         if MONO_ARCH_NEED_SIMD_BANK is defined.
3185
3186         * mini-ops.h: Added the new simd ops.
3187
3188         * mini-x86.c: Added mono_arch_xregname.
3189
3190         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
3191
3192         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
3193
3194         * mini-x86.h: Define simd related MONO_ARCH macros.
3195
3196         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
3197
3198         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
3199
3200         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
3201         MONO_CLASS_IS_SIMD to deal with simd related IR.
3202
3203         * mini.h (MonoInst): Added spill_var to the backend union.
3204
3205         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
3206
3207         * mini.h: Added forward declarations of the new simd fuctions.
3208
3209         * optflags-def.h: Added new optimization names SIMD.
3210
3211         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
3212
3213         * regalloc.h: Added support for working with 3 register banks.
3214
3215         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
3216
3217         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
3218
3219 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
3220
3221         * mini-exceptions.c: remove 64 bit related ifdef clutter.
3222
3223 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
3224
3225         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
3226         instead of one on 64 bit systems.
3227
3228         * method-to-ir.c: Remove unused includes.
3229
3230 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
3231
3232         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
3233         cfg->used_int_regs, since the two are different on arm.
3234
3235 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3236
3237         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
3238         mono_method_get_vtable_index() to get the vtable index.
3239
3240 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3241
3242         * method-to-ir.c (mono_method_to_ir2): Don't create native
3243         wrappers for array methods, because they're never called (and if
3244         they were called they wouldn't work).
3245
3246 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3247
3248         * method-to-ir.c (mono_method_to_ir2): Array methods are
3249         special-cased and must not be invoked indirectly via the (M)RGCTX
3250         when generic sharing is turned on.  Fixes #431413.
3251
3252 2008-10-01  Mark Probst  <mark.probst@gmail.com>
3253
3254         * method-to-ir.c: When generic sharing is active, call
3255         non-interface virtual generic methods via the standard trampoline.
3256
3257         * mini-trampolines.c: Handle virtual generic shared methods.
3258
3259         * mini.h, mini-x86.c, mini-x86.h: New argument for
3260         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
3261         method thunks and which is the trampoline to call if the lookup
3262         fails.  Enable the virtual generic method thunk for x86.
3263
3264         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
3265         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
3266         argument but assert that it's NULL, because these archs don't yet
3267         implement the virtual generic method thunk.  Changes in the IMT
3268         thunk data structures.
3269
3270 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
3271
3272         * aot-compiler.c (emit_globals): Avoid invalid characters in
3273         the static linking symbol.
3274
3275         * objects.cs: Add a test for the range check optimization. Fix warnings.
3276
3277         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
3278         optimization from the current JIT.
3279
3280         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
3281         later in decompose_array_access_opts () to allow more optimizations.
3282
3283         * method-to-ir.c (mono_handle_soft_float): Rename this to 
3284         mono_decompose_soft_float () for consistency.
3285
3286         * mini-ops.h: Fix arguments of OP_STRLEN.
3287
3288         * method-to-ir.c (save_cast_details): Extract the cast details saving code
3289         into a separate function.
3290         (reset_cast_details): Ditto.
3291         (handle_unbox): Save cast details. Fixes #431254.
3292
3293         * method-to-ir.c: Remove some obsolete FIXMEs.
3294
3295 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3296
3297         * ir-emit.h (alloc_dreg): Write a warning before crashing.
3298
3299 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3300
3301         * mini-codegen.c: More work on macros to make them
3302         ready for multiple regbanks.
3303
3304 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3305
3306         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
3307
3308         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
3309
3310 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3311
3312         * mini-codegen.c (mono_spillvar_offset): Proper support for
3313         multiple regbanks.
3314
3315 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
3316
3317         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
3318         the stack overflow changes.
3319
3320 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3321
3322         * mini-codegen.c: Make all bank macros depend on reg_bank.
3323
3324         * mini-codegen.c (mono_local_regalloc): Make free mask
3325         initialization regbank aware.
3326
3327 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3328
3329         * mini-codegen.c (mono_local_regalloc): Extract callee
3330         mask selection to a function and make it regbank aware.
3331
3332 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3333
3334         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
3335         code to deal with many regbanks.
3336
3337 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
3338
3339         * mini-codegen.c: More fp->regbank changes.
3340
3341 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
3342
3343         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
3344         of a hardcoded constant.
3345
3346 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
3347
3348         * method-to-ir.c (type_from_stack_type): Fix typo.
3349
3350 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
3351
3352         * mini-ia64.c (emit_move_return_value): Convert float return values to
3353         double.
3354
3355         * objects.cs: Add a new test.
3356         
3357         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
3358         VARARG methods to fix an assert later.
3359
3360         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
3361         end so it at least compiles.
3362
3363 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
3364
3365         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
3366
3367 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
3368
3369         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
3370         optimization to a new function (emit_optimized_ldloca_ir) and enable
3371         it for both ldloca and ldloca_s.
3372
3373 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
3374
3375         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
3376         gshared CASTCLASS code.
3377
3378         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
3379         amd64, where the libc stack unwinder encounters stack frames referring to
3380         native code in unmapped memory.
3381
3382         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
3383         sharing.
3384
3385         * generics.cs: Add new test.
3386
3387 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
3388
3389         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
3390         add a check that one of the ARM_FPU_ constants is defined.
3391
3392         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
3393         
3394         * mini-exceptions.c: Fix build on non-altstack platforms.
3395
3396         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
3397         sharing of vtypes.
3398
3399         * ir-emit.h: Add a comment to NEW_PCONST.
3400
3401         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
3402
3403         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
3404
3405         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
3406         after the changes to MonoJitDomainInfo.
3407
3408 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3409
3410         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
3411
3412 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3413
3414         * mini-ppc.c: Compiler warning fixes.
3415
3416 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3417
3418         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
3419         for pinvokes.
3420
3421 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3422
3423         * exceptions-ppc.c, mini-ppc.h: Compile
3424         mono_arch_handle_altstack_exception() on Darwin, too.
3425
3426 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3427
3428         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
3429         work on archs which don't have generic sharing implemented, only
3430         without the vtable_arg.
3431
3432 2008-09-26  Mark Probst  <mark.probst@gmail.com>
3433
3434         * mini.c: Added comment explaining why delegate ctor icall
3435         wrappers are compiled.
3436
3437 2008-09-26  Mark Probst  <mark.probst@gmail.com>
3438
3439         * mini.c: Don't produce trampolines to delegate ctor icall
3440         wrappers but compile them upfront.
3441
3442 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
3443
3444         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
3445         runtime-set function when going back to managed code. Currently this
3446         is used to set back the protection on the soft ovf pages and/or to
3447         throw the stack overflow exception that happened in unmanaged code.
3448
3449 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
3450
3451         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
3452         runtime-set function when going back to managed code. Currently this
3453         is used to set back the protection on the soft ovf pages and/or to
3454         throw the stack overflow exception that happened in unmanaged code.
3455
3456 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
3457
3458         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
3459         the support code for restoring stack protection after stack overflows
3460         that happen in unmanaged code. Don't set the exec permission on the
3461         soft overflow area.
3462
3463 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
3464
3465         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
3466         delegate->method_ptr is set. Fixes #428054.
3467
3468 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
3469
3470         * tests.cs: Rename to ratests.cs.
3471
3472         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
3473         emit_get_rgctx_... functions.
3474
3475 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3476
3477         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
3478
3479 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3480
3481         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
3482         before asserting that method is sharable.
3483
3484 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3485
3486         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
3487         whether method needs a static RGCTX wrapper used instead of
3488         complex conditions.
3489
3490         * generic-sharing.c, mini.h: A few functions moved to
3491         metadata/generic-sharing.c.
3492
3493 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3494
3495         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
3496         Generic code sharing for value types, which essentially means
3497         treating value type methods like static methods.  The RGCTX is
3498         passed in the same way.
3499
3500 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
3501
3502         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
3503         opcode when creating multi-dimensional arrays of open types.
3504
3505         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
3506         open generic types.
3507
3508         * generics.cs: Add a test.
3509
3510         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
3511
3512 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
3513
3514         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
3515
3516         * mini.c (mini_method_compile): Set it when running under the debugger. 
3517
3518         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
3519         vreg optimization if the flag is set.
3520
3521         * driver.c (mono_main): Add --attach= option to pass options to
3522         the attach agent.
3523
3524         * mini.c (sigquit_signal_handler): Start the attach agent.
3525
3526         * ssapre.c: Disable this to save space since it is not yet ported to
3527         linear IR.
3528
3529         * regalloc2.c: Disable this to save space.
3530
3531         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
3532
3533 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
3534
3535         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
3536         the -v option useful again.
3537
3538 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
3539
3540         * mini-amd64.c (mono_arch_output_basic_block): Add support for
3541         --break-at-bb.
3542
3543         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
3544         arrays of arrays. Fixes #428406.
3545
3546         * method-to-ir.c (mini_emit_castclass): Ditto.
3547
3548         * objects.cs: Add new test.
3549         
3550 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
3551
3552         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
3553         was wrong at it choked against target_type_is_incompatible for byref types.
3554
3555 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
3556
3557         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
3558         places.
3559
3560 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
3561
3562         * mini-exceptions.c: update a few more exceptions-related counters.
3563
3564 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
3565
3566         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
3567         new functions to allocate from persistent mempools.
3568
3569 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
3570
3571         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
3572         multiple register banks in the future.
3573
3574         * mini-codegen.c (mono_local_regalloc): Fix a warning.
3575
3576 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
3577
3578         * mini.c (type_to_eval_stack_type): Remove duplicated function.
3579
3580         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
3581
3582         * mini.h: Export type_to_eval_stack_type.
3583
3584         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
3585         is only ins->klass of byref types.
3586
3587 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
3588
3589         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
3590         (mini_emit_memcpy2): Ditto.
3591
3592         * mini-amd64.c: Fix a warning.
3593
3594 2008-09-21  Mark Probst  <mark.probst@gmail.com>
3595
3596         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
3597         linking.
3598
3599 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
3600
3601         * method-to-ir.c: Extract stloc micro-optimization to a
3602         function and apply it to all cases.
3603
3604 2008-09-19  Mark Probst  <mark.probst@gmail.com>
3605
3606         * method-to-ir.c: Don't fail generic code sharing in cases we
3607         already support.
3608
3609 2008-09-18  Mark Probst  <mark.probst@gmail.com>
3610
3611         * mini-ppc.c: Handle structs in tailcalls on Darwin.
3612
3613 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
3614
3615         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
3616         implementation.
3617
3618 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
3619
3620         * trace.c: make tracing more useful and correct, with per-thread
3621         id and indent info.
3622
3623 2008-09-15  Mark Probst  <mark.probst@gmail.com>
3624
3625         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
3626         doing a method call and the argument is an R4.
3627
3628 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
3629
3630         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
3631         generic methods.
3632
3633 2008-09-13  Mark Probst  <mark.probst@gmail.com>
3634
3635         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
3636
3637 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
3638
3639         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
3640         (MONO_JUMP_TABLE_FROM_INS): Ditto.
3641
3642 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
3643
3644         * driver.c: Add a --agent argument (not supported yet) to load managed
3645         agent assemblies before loading the main assembly, similarly to how the
3646         Java VM handles agents.
3647
3648 2008-09-11  Mark Probst  <mark.probst@gmail.com>
3649
3650         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
3651         function to do stack layout of local variables.
3652
3653 2008-09-11  Mark Probst  <mark.probst@gmail.com>
3654
3655         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
3656         calculation.
3657
3658 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
3659
3660         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
3661         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
3662         JIT if DISABLE_JIT is defined.
3663
3664         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
3665         defined.
3666
3667 2008-09-10  Mark Probst  <mark.probst@gmail.com>
3668
3669         * iltests.il.in: Disable the fconv test on PPC (the result is
3670         undefined according to ECMA).
3671
3672 2008-09-10  Mark Probst  <mark.probst@gmail.com>
3673
3674         * iltests.il.in: Enable tail call tests for PPC.
3675
3676         * mini.h: Add variable for storing incoming valuetype argument
3677         addresses for tail calls.
3678
3679         * mini-ppc.c: Implement valuetype arguments and return values for
3680         tailcalls on Linux.
3681
3682 2008-09-09  Mark Probst  <mark.probst@gmail.com>
3683
3684         * mini-ppc.c: Partially implement tail calls (struct arguments and
3685         return values not supported).
3686
3687         * method-to-ir.c: Enable tail calls on PPC.
3688
3689 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
3690
3691         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
3692         runtime-invoke wrappers to work around the problem of them getting
3693         assigned to a random class.
3694
3695         * aot-runtime.c (mono_aot_get_method): Ditto.
3696         
3697 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
3698
3699         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
3700         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
3701
3702 2008-09-07  Mark Probst  <mark.probst@gmail.com>
3703
3704         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
3705         until they're implemented properly.
3706
3707         * exceptions-ppc.c: Use arch-independent exception-handling code
3708         instead of custom one.
3709
3710         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
3711         for Linear IR.
3712
3713         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
3714
3715         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
3716         applies when __powerpc__ is defined.
3717
3718 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
3719
3720         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
3721         methods to their code to avoid computing the full name of wrappers and
3722         doing a lookup in a string hash table.
3723
3724 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
3725
3726         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
3727         we identify bblocks before method_to_ir () is ran.
3728
3729         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
3730         Also avoid optimizing branches pointing to themselves.
3731
3732         * mini.c (mini_method_compile): Ditto. Fixes #422947.
3733
3734 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
3735
3736         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
3737
3738 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
3739
3740         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
3741         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
3742         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
3743         'buf'.
3744
3745         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
3746         jumped to the same entry in plt_jump_table.
3747
3748 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
3749
3750         * method-to-ir.c (initialize_array_data): Handle field with RVA from
3751         dynamic images.
3752
3753 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
3754
3755         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
3756         other assignment can be if converted. Saves 1.5% on corlib size and fixes
3757         #421807.
3758
3759 2008-08-29  Geoff Norton  <gnorton@novell.com>
3760
3761         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
3762         segment, and doesn't properly handle .space as .text.  Fixes
3763         AOT Mach/ARM
3764
3765 2008-08-29  Geoff Norton  <gnorton@novell.com>
3766
3767         * mini.c: Disable the mach exception handler when running on 
3768         ARM
3769
3770 2008-08-29  Geoff Norton  <gnorton@novell.com>
3771
3772         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
3773         globals on Darwin/ARM
3774
3775 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
3776
3777         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
3778         since too many things depend on it. Instead, call 
3779         mono_runtime_set_no_exec ().
3780         
3781         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
3782         the new JIT.
3783
3784         * aot-compiler.c: Add an 'asm-only' AOT option.
3785
3786         * mini.c: Avoid initializing the runtime when doing AOT compilation.
3787                 
3788         * aot-compiler.c (compile_method): Disable gshared support for now as it
3789         doesn't yet work.
3790
3791 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
3792
3793         * mini-amd64.h : Fix a compiler warning.
3794
3795         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
3796           Changed to use a callback function to retrieve the unwind info.
3797           This avoids problems observed when code blocks were removed by
3798           unloading an app domain.
3799
3800         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
3801           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
3802           to work properly.
3803
3804         Contributed under MIT/X11 license.
3805
3806 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
3807
3808         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
3809           case to keep the stack aligned to 8.
3810
3811         Contributed under MIT/X11 license.
3812
3813 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
3814
3815         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
3816         avoid repeated linear searches.
3817
3818 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
3819
3820         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
3821         methods it can't handle.
3822         
3823         * aot-compiler.c (add_method): Avoid adding a method twice.
3824         (add_wrappers): Add runtime invoke wrappers for all methods.
3825
3826         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
3827         function to create an aot-compatible version of this trampoline.
3828
3829         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
3830
3831 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
3832
3833         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
3834
3835         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
3836         with a generic sharing failure.
3837
3838         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
3839
3840         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
3841         CEE_RETHROW. Fixes #419634.
3842
3843         * mini.c (mono_method_to_ir): Ditto.
3844
3845         * exceptions.cs: Add a new test.
3846         
3847         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
3848         to mono_type_stack_size_internal () since some callers might not pass in
3849         an rgctx.
3850
3851         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
3852         instrument_prolog. Fixes #419878.
3853
3854         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
3855         doubles in soft float mode volatile.
3856
3857 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
3858
3859         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
3860
3861         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
3862         to handle soft float correctly.
3863
3864         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
3865         the fast path.
3866
3867         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
3868
3869         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
3870         to sp, since the generics catch code requires it.
3871
3872         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
3873         copying.
3874
3875         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
3876         mono_arch_emit_imt_argument ().
3877
3878         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
3879
3880         * mini-arm.c tramp-arm.c: Generic sharing updates.
3881
3882 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
3883
3884         * mini-arm.c: Fix the arm build.
3885
3886         * generic-sharing.c (mini_type_get_underlying_type): New helper function
3887         handling enums, generic instances and generic sharing.
3888         (mini_type_stack_size_full): Ditto.
3889
3890         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
3891         
3892         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
3893
3894         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
3895
3896         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
3897         trampolines.
3898
3899         * mini-arm.c: Various small generic sharing changes.
3900
3901         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
3902         this for x86.
3903         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
3904         custom code.
3905
3906         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
3907         helper function to return a generic class init trampoline.
3908
3909         * method-to-ir.c mini.c: Use it.
3910         
3911         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
3912         arch-specfic function to return a generic class init trampoline.
3913
3914         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
3915         the GENERIC_CLASS_INIT custom code.
3916
3917         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
3918         a fatal error, not a sharing failure.
3919
3920         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
3921         needed.
3922
3923         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
3924         trampoline argument from MONO_ARCH_VTABLE_REG.
3925
3926         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3927         order of the arguments to the C trampoline: pass 'slot' as the trampoline
3928         argument, and pass the vtable in VTABLE_REG.
3929
3930         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3931         order of the arguments to the C trampoline: pass 'slot' as the trampoline
3932         argument, and pass the vtable in VTABLE_REG.
3933         (mono_arch_create_trampoline_code_full): Remove some special casing for
3934         the rgctx fetch trampoline.
3935
3936         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
3937         Fixes #419273.
3938
3939         * iltests.il: Add a test for it.
3940
3941 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
3942
3943         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
3944
3945         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
3946         no longer needed.
3947
3948         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
3949         use mono_jit_info_table_find () to avoid recursion.
3950         (mono_delegate_trampoline): Add a sync wrapper here.
3951
3952         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
3953         here.
3954
3955         * mini.c (mono_method_to_ir): Ditto.
3956         
3957         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
3958         add_sync_wrapper argument. Don't add a sync wrapper here.
3959         (mono_create_jump_trampoline): Don't add a sync wrapper here.
3960
3961         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
3962         
3963 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
3964
3965         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
3966           of nonvolatile registers back from MonoContext to CONTEXT.
3967
3968         Contributed under MIT/X11 license.
3969
3970 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
3971
3972         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
3973           arguments on Winx64 there are only 4 argument registers.  For this
3974           logic to work the last argument must be pulled from the stack.  
3975
3976         Contributed under MIT/X11 license.
3977
3978 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
3979
3980         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3981
3982         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
3983         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
3984         encode/decode_method_ref ().
3985
3986         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
3987
3988         * aot-runtime.c (decode_patch): Ditto.  
3989
3990         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
3991         MONO_PATCH_INFO_METHOD.
3992
3993         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
3994         MonoGenericJitInfo.
3995
3996         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
3997         MonoGenericJitInfo.
3998
3999         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
4000
4001         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
4002         one from the caller.
4003
4004         * aot-runtime.c (decode_generic_inst): New function to decode and
4005         return a interned generic inst.
4006         (decode_klass_ref): Use it.
4007         (decode_method_ref): Ditto.
4008
4009         * aot-compiler.c (emit_exception_debug_info): Save 
4010         jinfo->has_generic_jit_info too.
4011
4012 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
4013
4014         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
4015
4016         * iltests.il.in: Add a test for fconv_to_i.
4017
4018         * liveness.c: Disable the liveness2 pass for now to save space.
4019
4020         * regalloc2.c: Include mempool-internals.h to fix warnings.
4021
4022         * aot-compiler.c (encode_method_ref): Encode the context of generic
4023         instance methods.
4024
4025         * aot-runtime.c (decode_method_ref): Inflate generic methods using
4026         the context saved in the aot file.
4027
4028         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
4029
4030         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
4031
4032         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
4033         volatile so they won't be optimized away.
4034
4035 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
4036
4037         * ssa.c:
4038         * ssa2.c:
4039         * mini.c:
4040         * regalloc2.c:
4041         * dominators.c: Remove duplicated functions that now are in
4042         mempool-internals.h.
4043
4044 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
4045
4046         * aot-compiler.c: Fix warnings.
4047
4048         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
4049
4050         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
4051
4052         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
4053         as the patch type.
4054
4055         * mini.c (mono_resolve_patch_target): Ditto.
4056         
4057         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
4058         (encode_klass_ref): Add support for encoding VARs/MVARs.
4059
4060         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
4061
4062         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
4063         the handling of the got entries into a separate 'decode_got_entry' function.
4064         Add support for RGCTX_FETCH.
4065
4066         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
4067         clobbered by the trampoline code.
4068
4069         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
4070         not clobbered by the indirect calling code.
4071
4072 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
4073
4074         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
4075         to fix the build.
4076
4077 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
4078
4079         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
4080         signature using the compilation mempool otherwise we would leak it.
4081
4082 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
4083
4084         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
4085         mono_emit_abs_call ().
4086
4087         * patch-info.h: Add GENERIC_CLASS_INIT.
4088
4089         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
4090
4091         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
4092         as their target as a near call.
4093
4094         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
4095         ABS handling code.
4096         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
4097
4098         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
4099         call to a runtime function described by a patch.
4100
4101         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
4102         mono_emit_abs_call, this has the advantage that the ABS handling code in
4103         mono_codegen () can handle them both, and can handle other stuff in the
4104         future without additional code.
4105
4106         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
4107         entry.
4108         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
4109         abs addresses.
4110
4111         * mini.h: Add missing bblock related prototypes.
4112
4113         * mini.h (MonoCompile): Remove unused reverse_inst_list and
4114         reverse_inst_list_len fields.
4115
4116         * mini.c: Refactor this file a bit by moving branch optimizations to 
4117         branch-opts.c.
4118
4119         * method-to-ir.c: Merge generic sharing changes missed earlier.
4120
4121         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
4122
4123         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
4124         shared patches. Process METHODCONST as a shared patch.
4125
4126         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
4127         as it crashes on the 2.0 mscorlib.
4128
4129         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
4130         to cause crashes.
4131         
4132         * aot-compiler.c: Use is_plt_patch () in a few additional places.
4133         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
4134         by IMT.
4135
4136         * aot-compiler.c: Reorganize the got handling code to be a bit more
4137         understandable.
4138
4139 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
4140
4141         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
4142         mono_patch_info_equals/hash, and use it to massively simplify
4143         get_plt_index ().
4144
4145         * mini.c (mono_patch_info_hash): Simplify this and add support for
4146         more patch types.
4147
4148         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
4149
4150         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
4151         handling code, since an offset is not enough to identify a trampoline.
4152
4153         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
4154
4155 2008-08-17  Mark Probst  <mark.probst@gmail.com>
4156
4157         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
4158
4159         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
4160
4161         * mini-ops.h: Argument and result types for OVF_CARRY ops.
4162
4163         * decompose.c: PPC decompositions for various ops.
4164
4165         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
4166
4167 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
4168
4169         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
4170         call the generic trampoline code using a call, instead of a jump, to
4171         remove some special casing from the generic trampoline code.
4172
4173         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
4174         (mono_codegen): Ditto.
4175
4176         * aot-compiler.c aot-runtime.c: Ditto.
4177
4178         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
4179
4180         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
4181         helper function to find the offset corresponding to a lazy fetch trampoline.
4182
4183         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
4184         when doing generic sharing.
4185
4186         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
4187         places.
4188         
4189         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
4190         mini-trampolines.c to be with the other trampoline creation functions.
4191
4192         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
4193         as it is equal to method->signature in most cases, add a 
4194         mono_emit_method_call_full variant which takes a signature and an imt
4195         argument as well.
4196
4197 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
4198
4199         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
4200         to this function, since it could be computed easily from the method 
4201         argument.
4202         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
4203         more.
4204
4205         * method-to-ir.c mini.c: Remove references to 
4206         compile_generic_method_wo_context.
4207
4208         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
4209         generic method calls.
4210         
4211         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
4212         dimensional non-szarrays.
4213
4214         * mini.c (mini_init): Register mono_array_new_1.
4215
4216         * jit-icalls.c (mono_array_new_1): New jit icall.
4217
4218         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
4219         pointing to the method.
4220
4221         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
4222         method addresses belonging to METHOD_JUMP patches in the 
4223         jump_target_got_slot_hash.
4224         (mono_aot_load_method): Ditto.
4225
4226         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
4227         METHOD_JUMP patches.
4228
4229         * mini.c (mini_create_jit_domain_info): New helper function which 
4230         initializes/frees domain->runtime_info.
4231         (mini_free_jit_domain_info): Ditto.
4232         (mini_init): Install the domain hook functions with the runtime.
4233
4234         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
4235         information maintained by the JIT.
4236
4237         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
4238         insertion into jump_table_hash into mono_codegen (), also implement proper
4239         locking.
4240
4241         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
4242         tail calls, it is already done by the aot code.
4243         
4244         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
4245         mechanism on amd64.
4246
4247         * iltests.il.in: Make the jmp test a bit more complex.
4248
4249         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
4250         generic instances which doesn't have a token.
4251
4252         * aot-runtime.c (decode_method_ref): Ditto.
4253         
4254         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
4255         can handle this case now.
4256         (handle_box): Ditto.
4257
4258 2008-08-15  Geoff Norton  <gnorton@novell.com>
4259
4260         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
4261         debugging check.
4262
4263 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
4264
4265         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
4266         calling generic methods.
4267
4268         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
4269
4270         * aot-runtime.c (decode_patch_info): Ditto.
4271
4272         * mini.c (mono_resolve_patch_target): Ditto.
4273         
4274         * patch-info.h: Add METHOD_RGCTX.
4275
4276         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
4277
4278 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
4279
4280         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
4281         arguments in registers.
4282
4283         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
4284         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
4285
4286         * mini.c (mini_method_compile): Abort aot compilation for generic
4287         methods if generic sharing is disabled.
4288         
4289         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
4290         an mrgctx.
4291
4292         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
4293         requiring an mrgctx.
4294
4295         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
4296         store instructions when converting a vcall to a normal call.
4297
4298         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
4299         mono_arch_find_jit_info.
4300
4301 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
4302
4303         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
4304         avoid calling mono_method_full_name () for every method even if the
4305         env var is not set.
4306         (check_inline_caller_method_name_limit): Ditto.
4307
4308 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
4309
4310         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
4311         assemblies in one run.
4312
4313         * aot-compiler.c (mono_compile_assembly): Only print out a count of
4314         skipped methods if it is not 0.
4315
4316         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
4317
4318 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
4319
4320         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
4321           MONO_ARCH_HAVE_UNWIND_TABLE.
4322
4323         Contributed under MIT/X11 license.
4324
4325 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
4326
4327         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
4328           from default optimizaton list on Winx64.
4329
4330         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
4331
4332         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
4333           the LMF from the MonoJitTlsData structure.
4334
4335         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
4336
4337         Contributed under MIT/X11 license.
4338
4339 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
4340
4341         * mini.c (sigsegv_signal_handler): Fix the build.
4342
4343         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
4344         assembly->aot_module.
4345
4346         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
4347         hash table. This simplifies and speeds up a lot of code, and fixes support
4348         for .netmodules.
4349
4350         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
4351         with the runtime.
4352
4353         * mini-exceptions.c: Ditto.
4354         
4355         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
4356         'native_offset' argument, since these are computed in the 
4357         mono_find_jit_info () function.
4358
4359         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
4360         is used by exceptions-ppc.c.
4361
4362         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
4363         mono_arch_find_jit_info ().
4364         
4365         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
4366         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
4367         generic code in mini-exceptions.c.
4368
4369 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
4370
4371         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
4372
4373         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
4374         
4375         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
4376         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
4377         called while holding the loader lock. Fixes #415608.
4378         (mono_aot_get_method_from_token_inner): Ditto.
4379
4380 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
4381
4382         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
4383         to reduce differences between this and the generic implementation in
4384         mini-exceptions.c.
4385         (ves_icall_get_frame_info): Ditto.
4386
4387         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
4388
4389         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
4390         longer neccesarry.
4391
4392         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
4393         mono_arch_get_call_filter () and make it non-static, for consistency with the
4394         other architectures.
4395
4396 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
4397
4398         * mini.c:
4399         * local-propagation.c:
4400         * mini-x86.c: Correct the name of arch defines.
4401
4402 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
4403
4404         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
4405         NO_EMULATE_LONG_SHIFT_OPS define.
4406
4407 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
4408
4409         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
4410         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
4411
4412         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
4413         MACH fixes. Merged from the 2.0 branch.
4414
4415         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
4416
4417         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
4418         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
4419
4420         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
4421
4422         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
4423         mono_marshal_get_native_wrapper () signature changes.
4424
4425 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
4426
4427         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
4428         conversion bug under arm.
4429
4430 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
4431
4432         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
4433
4434         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
4435         with overflow checking.
4436
4437 2008-08-05  Marek Habersack  <mhabersack@novell.com>
4438
4439         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
4440         to the genmdesc.pl file
4441
4442 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
4443
4444         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
4445         arg_array in the soft-float versions of the LOAD/STORE macros.
4446
4447         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
4448         implementation.
4449
4450         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
4451
4452 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
4453
4454         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
4455         a float HFA. Fixes #413621.
4456
4457 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
4458
4459         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
4460         frame_size to args_size. Fixes build.
4461
4462 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
4463
4464         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
4465         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
4466
4467         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
4468         the stack are not unaligned. Fixes #413247.
4469         
4470 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
4471
4472         * mini.c: update jitted methods performance counters.
4473
4474 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
4475
4476         * mini-exceptions.c: increase the exceptions thrown performance
4477         counter in mono_handle_exception ().
4478
4479 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
4480
4481         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
4482         can work with netmodules.
4483
4484 2008-07-28  Geoff Norton  <gnorton@novell.com>
4485
4486         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
4487         regression tests.
4488
4489 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
4490
4491         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
4492         correct place.
4493
4494 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
4495
4496         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4497           The float param registers and other param registers must be the 
4498           same index on Windows x64.
4499
4500         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
4501           ArgValuetypeAddrInIReg argument case.  Setting the argument
4502           op to OP_VTARG_ADDR (OP_REGOFFSET)).
4503
4504         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
4505           variable computed above as the copy length for arguments of storage
4506           type ArgValuetypeAddrInIReg.
4507
4508         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
4509           ArgValuetypeAddrInIReg argument case.  This case will rely on
4510           mono_arch_emit_outarg_vt to emit the correct code later in the process.
4511
4512         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
4513           a 32 byte stack allocation for all calls.  We will omit the adjustment for
4514           jump and tail call instructoins as they do not follow the typical call behavior.
4515
4516         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
4517           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
4518           local variable and pass the local variable by reference to the called method.
4519
4520         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
4521           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
4522           of a struct is passed in a register it must be saved with the other
4523           volatile argument on the stack.
4524
4525         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
4526           frame pointer the stack adjustment value must be saved to the unwind 
4527           info structure.
4528
4529         Contributed under MIT/X11 license.
4530
4531 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
4532
4533         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
4534         which got lost in the merge.
4535
4536 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
4537
4538         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
4539         build.
4540
4541         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
4542         
4543         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
4544         icalls, since they won't be patched.
4545
4546         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
4547         different code sequence when running under valgrind to prevent some valgrind
4548         errors.
4549
4550         * iltests.il.in: Add new regression test.
4551
4552         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
4553         end with a throw.
4554
4555         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
4556         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
4557
4558         * iltests.il.in: Add new test.
4559
4560         * aot-compiler.c: Fix some warnings.
4561
4562         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
4563         Fixes #412494.
4564
4565 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
4566
4567         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
4568         (mini_usage_jitdeveloper): Add a missing --wapi option.
4569
4570 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
4571
4572         * mini-codegen.c: Simplify the is_fp macros.
4573         (free_up_ireg): Remove, use free_up_reg instead.
4574         (free_up_reg): Fix the fp case.
4575
4576 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
4577
4578         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
4579         lowered earlier.
4580
4581         * exceptions-x86.c: Merge some changes which seemed to have got lost
4582         in the linear-ir merge.
4583
4584         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
4585
4586         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
4587         long vreg volatile even if the variable was already created.
4588
4589         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
4590         volatile variables.
4591
4592 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
4593
4594         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
4595
4596         * mini.c (mono_jit_compile_method_inner): Add support for 
4597         MONO_EXCEPTION_BAD_IMAGE.
4598
4599         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
4600         mini_method_get_context () returns NULL. Fixes #356531.
4601
4602         * mini.c (mono_method_to_ir): Ditto.
4603         
4604         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
4605         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
4606
4607 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
4608
4609         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
4610         in the LDFTN implementation.
4611
4612 2008-07-25  Mark Probst  <mark.probst@gmail.com>
4613
4614         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
4615         code, patch calls to icalls, too, even if they're not in the
4616         shared generic code hash.  Fixes #411962.
4617
4618 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
4619
4620         * cpu-x86.md: Increase the length of the fcall opcodes.
4621
4622         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
4623         calls returning floats.
4624
4625         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
4626         on NEWARR.
4627         
4628         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
4629         missed earlier.
4630
4631         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
4632         into the domain->method_code_hash.
4633
4634         * aot-compiler.c: Fix win32 build.
4635
4636         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
4637         
4638         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
4639         gshared NEWARR implementation.
4640
4641         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
4642
4643         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
4644         can be used outside of method_to_ir.
4645
4646         * mini.h (MonoCompile): Add arg_types field.
4647
4648         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
4649         
4650         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
4651         the values of the local arg_array and param_types array.
4652
4653 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
4654
4655         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
4656         got accesses might only get generated later when NEWOBJ is decomposed.
4657         
4658         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
4659         looking up the native code of the target method when a delegate is called
4660         for the first time.
4661
4662         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
4663         optimization.
4664
4665         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
4666
4667         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
4668         AOT work on platforms without a working dlsym implementation.
4669
4670         * mini.h: Bump AOT image format version.
4671         
4672 2008-07-24  Mark Probst  <mark.probst@gmail.com>
4673
4674         * mini-exceptions.c: Free a MonoType with
4675         mono_metadata_free_type() instead of g_free().
4676
4677         * aot-runtime.c: Free a MonoType.
4678
4679 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
4680
4681         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
4682         optimization.
4683
4684         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
4685         fp stack on x86.
4686
4687 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
4688         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
4689         profiler hook.
4690
4691 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
4692
4693         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
4694         NEWOBJ calls on valuetypes.
4695
4696         * iltests.il.in: Add new test.
4697
4698         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
4699
4700 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
4701
4702         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
4703         is no longer needed.
4704
4705         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
4706         non register sized integer arguments.
4707         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
4708         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
4709         emit_memcpy2 ().
4710
4711         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
4712         CEE_MONO_RETOBJ.
4713         
4714         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
4715         two a binop with different sized arguments is emitted.
4716
4717         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
4718         instruction in the ins==NULL case.
4719
4720 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
4721
4722         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
4723
4724         * mini-x86.c: Fix osx build.
4725
4726         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
4727         opcodes as well.
4728
4729         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
4730         instruction for non int sized variables.
4731
4732         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
4733         implementation.
4734
4735 2008-07-23  Robert Jordan  <robertj@gmx.net>
4736
4737         * method-to-ir.c: Fix MSVC build.
4738
4739 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
4740
4741         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
4742         a non int sized type, widen it to an int since newer versions of gcc seem to
4743         generate code which needs this.
4744
4745         * ssa2.c abcremoval2.c: Fix warnings.
4746
4747         * *: Merge the Linear IR branch.
4748
4749         The original branch is at trunk/branches/vargaz/mini-linear-il, and
4750         the ChangeLog file there describes all the changes done over the years. 
4751         Further documentation can be found at www.mono-project.com/Linear_IL.
4752
4753 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
4754
4755         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4756           The float param registers and other param registers must be the 
4757           same index on Windows x64.
4758
4759         Contributed under MIT/X11 license.
4760
4761 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
4762
4763         * mini.c: Make the previous fix GC safe.
4764
4765 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
4766
4767         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
4768
4769 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
4770
4771         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
4772           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
4773           ArgValuetypeAddrInIReg instead.
4774
4775         Contributed under MIT/X11 license.
4776
4777 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
4778
4779         * mini-codegen.c (get_register_spilling): Fix a warning.
4780
4781 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
4782
4783         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
4784         for types which the initialization fails. Raises the provided exception
4785         at the right stop after cleanup.
4786
4787 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
4788
4789         * aot-compiler.c: Free most of the memory allocated during compilation.
4790
4791         * mini.c (mini_parse_debug_options): Fix a leak.
4792         
4793         * mini.c (mini_method_compile): Don't add the method to the jit info tables
4794         during aot compilation.
4795
4796 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
4797
4798         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
4799         it has too much register pressure.
4800
4801 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
4802
4803         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
4804
4805 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
4806
4807         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4808         on x86.
4809
4810         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4811         on amd64 similar to the way it is done on arm.
4812
4813         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4814
4815         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
4816         consistency, normalize error messages, avoid loading aot-only modules in
4817         normal mode.
4818
4819         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
4820         for consistency.
4821
4822         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
4823
4824 2008-07-11  Martin Baulig  <martin@ximian.com>
4825
4826         * debug-debugger.h
4827         (MonoDebuggerInfo): Add `interruption_request'.
4828
4829 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
4830
4831         * aot-compiler.c (emit_plt): Remove some dead code.
4832
4833         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
4834
4835         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
4836         return the plt info offset belonging to a given plt entry.
4837
4838         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
4839         mono_aot_get_plt_info_offset.
4840         
4841         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
4842         similar to the amd64 code by makeing jumps through a separate jump table 
4843         instead of embedding the jump addresses into the code.
4844
4845 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
4846
4847         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
4848         method.
4849
4850 2008-07-10  Martin Baulig  <martin@ximian.com>
4851
4852         * mini.c (mini_method_compile): Disable generics sharing when
4853         running in the debugger.
4854
4855 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
4856
4857         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
4858
4859         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
4860         the local register allocator from running out of registers on x86 when 
4861         using aot.
4862
4863 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
4864
4865         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
4866         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
4867         C4146.
4868
4869         Contributed under MIT/X11 license.
4870
4871 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
4872
4873         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
4874         speed up the assembler.
4875
4876 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
4877
4878         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
4879         support.
4880
4881         * mini.c: Move the soft float handling macros a bit earlier, add 
4882         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
4883         place.
4884
4885         * mini.h: Add prototype for mono_arch_fixup_jinfo.
4886
4887         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
4888         read-only to help catch code allocation requests.
4889         
4890         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
4891         and turn it off when using --aot-only or when compiling with --aot=full.
4892
4893         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
4894         jump table for switches from the normal domain mempool, not the code
4895         manager.
4896
4897         * mini-trampolines.c (get_unbox_trampoline): New function to return an
4898         unbox trampoline which handles aot-only mode too.
4899
4900         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
4901         an AOTed unbox trampoline.
4902
4903         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
4904
4905 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
4906
4907         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
4908         ""
4909
4910         Contributed under MIT/X11 license.
4911
4912 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
4913
4914         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
4915           the unwind information for the method at the end of the allocated block.
4916           
4917         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
4918           MonoCompileArch to hold the unwind info for SEH on Winx64
4919         
4920         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
4921           frame pointer info for the method being compiled.
4922           
4923         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
4924           the call to mono_exception_from_token.
4925           
4926         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
4927           storing the method prolog information in a format that the Winx64 SEH can understand.  This
4928           information is stored a the end of the method block because it is all 32-bit offset based.
4929
4930         Contributed under MIT/X11 license.
4931
4932 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
4933
4934         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
4935
4936         * wapihandles.c: Fix warnings.
4937
4938         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
4939         mode.
4940
4941         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
4942         mono_jit_compile_method in aot-only mode since that calls the type 
4943         initializer.
4944         
4945         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
4946         get_delegate_invoke_impl in aot-only mode.
4947
4948         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
4949
4950 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
4951
4952         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
4953
4954         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
4955         is on by default.
4956
4957         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
4958
4959         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
4960         init trampoline from the AOT file as well.
4961
4962         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
4963         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
4964         code.
4965
4966         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
4967         mono_init.
4968
4969         * exceptions-amd64.c: Add _full variants for the remaining exception code
4970         creation functions as well, allow emission of relocatable code, remove
4971         caching since that is now done by the caller.
4972
4973         * mini-exceptions.c: Add _full variants for the remaining exception code
4974         creation functions as well, add aot-only support.
4975
4976         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
4977         if we can determine a proper token for them.
4978         (add_wrappers): Add a few more wrappers.
4979         (emit_method_code): Remove some dead code.
4980         (emit_trampolines): Emit exception code too.
4981
4982         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
4983
4984         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
4985         mono_array_new_va which avoids varargs.
4986
4987         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
4988
4989         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
4990         mono_arch_create_specific_trampoline () in all places.
4991
4992         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
4993         a bit so it can be used for other things as well.
4994         
4995         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
4996         on demand as well.
4997
4998         * exceptions-amd64.c: Rename the caching from the exception code creation
4999         functions, it is done by the caller instead.
5000         
5001         * exceptions-amd64.c: Change the signature of the exception code creation 
5002         functions to allow the creation of relocatable code later.
5003
5004         * mini-exceptions.c: Add a set of functions to query the various 
5005         runtime-generated exception functions.
5006
5007         * mini.c mini-exceptions.c: Use the newly added functions instead of the
5008         mono_arch_.. () functions.
5009         
5010 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
5011
5012         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
5013
5014         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
5015
5016         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
5017         (mini_get_vtable_trampoline): Ditto.
5018
5019         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
5020         code in the AOT case by returning the code size and a list of relocations to
5021         the caller.
5022
5023         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
5024
5025 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
5026
5027         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
5028           clean the stack.
5029
5030         Contributed under MIT/X11 license.
5031
5032 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
5033
5034         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
5035         so the buffer size can be computed correctly. Fixes #404735.
5036
5037         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
5038         normally as cfg->debug_info is already freed.
5039
5040 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
5041
5042         * mini-amd64.c: For calls returning vtypes in registers, don't store
5043         the return address on the stack, instead allocate a separate local for
5044         it. Fixes #404729.
5045
5046 2008-07-05  Mark Probst  <mark.probst@gmail.com>
5047
5048         * mini-trampolines.c, mini.h: Add an argument to
5049         mono_create_jit_trampoline_in_domain() for turning off the adding
5050         of the sync wrapper.
5051
5052         * mini.c: Use the JIT trampoline without sync instead of
5053         ldftn_nosync in static RGCTX invoke wrappers so that the call can
5054         be patched.
5055
5056 2008-07-04  Mark Probst  <mark.probst@gmail.com>
5057
5058         * driver.c: Turn on GSHARED optimization by default.
5059
5060 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
5061
5062         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
5063         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
5064
5065         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
5066         create a variant of the generic trampoline code callable from AOTed trampolines.
5067
5068         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
5069         trampoline code callable from AOTed trampolines.
5070
5071         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
5072
5073 2008-07-04  Mark Probst  <mark.probst@gmail.com>
5074
5075         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
5076         pass-through manner.
5077
5078         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
5079         and don't fail sharing for them anymore.
5080
5081         * mini-exceptions.c: Handle exceptions in shared generic methods.
5082
5083         * generic-sharing.c: When checking the context of a generic
5084         method, also check its class's context.  Don't treat wrappers as
5085         sharable.
5086
5087         * mini-trampolines.c: Some code factored out to
5088         metadata/generic-sharing.c.  Handle the MRGCTX case.
5089
5090         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
5091         we must deal with the method being of another instantiation of the
5092         class.  Add static rgctx invoke wrappers to generic methods.
5093
5094 2008-07-04  Mark Probst  <mark.probst@gmail.com>
5095
5096         * mini.c: Provide all jit infos of generic shared methods with a
5097         generic jit info.
5098
5099         * mini-exceptions.c: Handle the new situation that a generic info
5100         might be available, but not info about the this/vtable/mrgctx
5101         variable.
5102
5103 2008-07-03  Mark Probst  <mark.probst@gmail.com>
5104
5105         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
5106         generic methods.
5107
5108 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
5109
5110         * dominators.c (check_dominance_frontier): Fix a warning.
5111
5112         * mini.h: Add some missing prototypes.
5113
5114         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
5115
5116         * driver.c (mono_jit_init_version): Correct the comments since the first
5117         argument should be the name of the root domain, not a filename.
5118
5119         * aot-runtime.c (make_writable): Error out if this is called while running
5120         with --aot-only.
5121         (load_aot_module): Ditto.
5122
5123         * aot-compiler.c: Really fix the computation of method indexes.
5124
5125         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
5126         optimizations as this is no longer called frequently.
5127
5128         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
5129         method and the invoke impl code and pass it to the delegate trampoline instead of
5130         just the delegate class.
5131
5132 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
5133
5134         * aot-compiler.c: Fixup the computation of method indexes.
5135         (add_wrappers): Create the base methods of the runtime invoke wrappers using
5136         the method builder infrastructure.
5137
5138         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
5139         has no header.
5140
5141         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
5142         mode, load the method right away instead of creating a trampoline.
5143
5144         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
5145
5146         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
5147         some checks a bit.
5148
5149 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
5150
5151         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
5152         (mono_aot_load_method): Use method_index instead of method->token.
5153
5154         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
5155         can handle icalls etc. properly.
5156
5157         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5158
5159         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
5160
5161         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
5162         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
5163         JIT_ICALL_ADDR patch type.
5164
5165         * patch-info.h: Add JIT_ICALL_ADDR patch type.
5166
5167         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
5168         request flag.
5169         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
5170
5171         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
5172
5173 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
5174
5175         * mini.c: Use domain->jit_code_hash_lock for controlling access to
5176         domain->jit_code_hash.
5177
5178 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
5179
5180         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
5181
5182 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
5183
5184         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
5185         get_this_arg_from_call, let it compute it when needed.
5186
5187         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
5188         gsctx from code only when needed.
5189
5190         * mini-trampolines.c (get_generic_context): Rename this to 
5191         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
5192         it can be called by the arch backends.
5193
5194         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
5195
5196 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
5197
5198         * driver.c (mono_main): Add experimental --aot-only command line option.
5199
5200         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
5201         set.
5202
5203 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
5204
5205         * driver.c (DllMain): Remove mono_module_handle.
5206
5207         Contributed under MIT/X11 license.
5208
5209 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
5210
5211         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
5212         for emitting methods which are not in the source assembly. Detect and report
5213         failure of assembling+linking.
5214         
5215         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
5216
5217         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
5218
5219 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
5220
5221         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
5222
5223 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
5224
5225         * mini.h: Remove some obsolete prototypes.
5226
5227         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
5228
5229 2008-06-24  Mark Probst  <mark.probst@gmail.com>
5230
5231         * mini.c (get_object_generic_inst): Variable-sized arrays are not
5232         supported by Visual Studio, so use alloca().
5233
5234 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
5235
5236         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
5237         Fixes #402585.
5238
5239 2008-06-23  Mark Probst  <mark.probst@gmail.com>
5240
5241         * mini.c: Fail sharing of a generic method if it contains an open
5242         catch clause (because we don't pass MRGCTXs yet).
5243
5244 2008-06-23  Mark Probst  <mark.probst@gmail.com>
5245
5246         * mini.c: When compiling a method with generic sharing, insert the
5247         method instantiated with an all-Object generic context into the
5248         jit info table, instead of the context of the first instantiation
5249         of the method we happen to compile.
5250
5251 2008-06-18  Martin Baulig  <martin@ximian.com>
5252
5253         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
5254         `major_version' and `minor_version'.
5255
5256 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5257
5258         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
5259         mono_method_is_generic_sharable_impl() takes an additional
5260         argument specifying whether to treat type variables as reference
5261         types.
5262
5263 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5264
5265         * mini.h: Removed obsolete prototypes.
5266
5267 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5268
5269         * mini.c: Don't fail generic sharing for initobj and sizeof - we
5270         already handle them.
5271
5272 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5273
5274         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
5275         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
5276         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
5277         tramp-x86.c: Added a MonoGenericContext* argument to
5278         mono_arch_get_unbox_trampoline() so that it can call other
5279         functions which require it.
5280
5281 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5282
5283         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
5284         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
5285         mono_arch_get_this_arg_from_call() takes a
5286         MonoGenericSharingContext* as well.
5287
5288 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5289
5290         * mini.c: Factor out code for emitting unbox into emit_unbox() and
5291         implement generic sharing of unbox.
5292
5293 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5294
5295         * mini.c: Don't compute the vtable to determine whether a field is
5296         special static, because it might not work for open types.
5297
5298 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5299
5300         * mini.c: Removed the unused token_type and token_source arguments
5301         from get_runtime_generic_context_ptr().
5302
5303 2008-06-17  Marek Habersack  <mhabersack@novell.com>
5304
5305         * mini.c (ADD_BINOP): fix the build
5306
5307 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
5308
5309         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
5310         a widening op.
5311
5312 2008-06-16  Mark Probst  <mark.probst@gmail.com>
5313
5314         * mini.h: Removed class relations enum that's not used anymore.
5315
5316 2008-06-16  Mark Probst  <mark.probst@gmail.com>
5317
5318         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
5319
5320         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
5321         the lazy fetch trampoline access code.
5322
5323 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
5324
5325         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
5326
5327 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
5328
5329         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
5330
5331         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
5332
5333         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
5334
5335 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5336
5337         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
5338         intrinsics.
5339
5340         * mini-ops.h: Add MIN/MAX_UN opcodes.
5341
5342         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
5343         intrinsics.
5344
5345         * basic-math.cs: Add more min/max tests.
5346
5347         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5348
5349 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5350
5351         * mini.c: Small fix in the prologue of emit_castclass.
5352
5353 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5354
5355         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5356
5357         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
5358         do not work even for unsigned types. Fixes #400014.
5359
5360         * basic-math.cs: Add regression tests for unsigned Min/Max.
5361
5362 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5363
5364         * mini.c: Added additional context_used argument to several
5365         functions, which will be needed for sharing generic methods.  Use
5366         GET_RGCTX macro wherever appropriate.  Declare only one
5367         context_used in mono_method_to_ir().
5368
5369 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5370
5371         * mini.c, generic-sharing.c: Removed generic class relations.
5372
5373         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
5374         functions due to MRGCTX changes.
5375
5376 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5377
5378         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
5379         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
5380         with calculated IMT.
5381
5382         * mini.c: Generic sharing of calls via generic interfaces.
5383
5384         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
5385         generic method with non-constant MonoGenericContext*.  Instead,
5386         the context is taken out of the method itself.
5387
5388 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5389
5390         * mini.c: Generic sharing of ldvirtftn.
5391
5392 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5393
5394         * mini.c: Generic sharing of ldftn.
5395
5396 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5397
5398         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
5399
5400 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5401
5402         * mini.c: Generic sharing of the special case of ldtoken followed
5403         by a call to GetTypeFromHandle.
5404
5405 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5406
5407         * mini.c: Generic sharing of box for nullable types.
5408
5409 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5410
5411         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
5412         are passed on the stack. Fixes #324807.
5413
5414 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
5415
5416         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
5417         for the ArgValuetypeAddrInIReg case.
5418
5419         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
5420         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
5421
5422         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
5423         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
5424         local variable and pass the local variable by reference to the called method.
5425           
5426         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
5427         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
5428
5429         Contributed under MIT/X11 license.
5430
5431 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
5432
5433         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
5434
5435         * debug-mini.c (mono_debug_print_vars): Release memory after printing
5436         everything.
5437
5438 2008-06-10  Martin Baulig  <martin@ximian.com>
5439
5440         * debug-mini.c
5441         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
5442
5443 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
5444
5445         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
5446         possible error when no arguments are passed.
5447
5448         Contributed under MIT/X11 license.
5449
5450 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
5451
5452         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
5453         where the file name is NULL.
5454
5455 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
5456
5457         * mini.c: Fix s390 build.
5458
5459 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
5460
5461         * trace.c (mono_trace_parse_options): Fix warnings.
5462
5463         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
5464
5465 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
5466
5467         * mini.c (remove_block_if_useless): Avoid printing the method name.
5468         
5469         * mini.c: Remove needless setting of ins->cil_code which is now done by 
5470         MONO_INST_NEW.
5471
5472         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
5473         LMF. Not yet used.
5474
5475         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
5476         translated code after it has been patched.
5477
5478 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
5479
5480         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
5481         avoid problems during code patching on SMP systems.
5482         (emit_call): Avoid adding a patch info which is already added by 
5483         emit_call_body.
5484         (mono_arch_emit_exceptions): Ditto.
5485
5486 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
5487
5488         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
5489         MONO_TYPE_ISSTRUCT already checks for it.
5490
5491 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
5492
5493         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
5494           structs with floats on Winx64 the float registers are not used.  
5495           The integer registers are always used..
5496         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
5497           only one register will be used and only if the size of the struct 
5498           is 1,2,4, or 8 bytes.
5499
5500         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
5501           to work for Winx64.
5502
5503         Contributed under MIT/X11 license.
5504
5505 2008-06-05  Martin Baulig  <martin@ximian.com>
5506
5507         * debug-debugger.c (debugger_lookup_class): Also call
5508         mono_class_setup_methods() here; we're only called from RTI.
5509
5510 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
5511
5512         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
5513         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
5514         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
5515         Post-process object files and add dtrace-generated object, if necessary.
5516
5517         Contributed under MIT/X11 license.
5518
5519 2008-06-04  Mark Probst  <mark.probst@gmail.com>
5520
5521         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
5522         element class.
5523
5524         * mini.c: Generic sharing for unbox.any and castclass.
5525
5526 2008-06-04  Mark Probst  <mark.probst@gmail.com>
5527
5528         * mini.c: Ignore tailcall prefix in shared generic code and when
5529         doing calls which require a vtable/rgctx argument.
5530
5531 2008-06-04  Mark Probst  <mark.probst@gmail.com>
5532
5533         * mini.c: Don't free the JIT info.
5534
5535         * driver.c: Changes in the JIT info table testing code.
5536
5537 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
5538
5539         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
5540         interruption. Fix some warnings.
5541
5542         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
5543         interruption_checkpoint.
5544
5545 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
5546
5547         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
5548         from embedding applications.
5549
5550 2008-06-02  William Holmes  <billholmes54@gmail.com>
5551
5552         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
5553           reserving 32 bytes on the stack when making calls. 
5554
5555         Contributed under MIT/X11 license.
5556
5557 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
5558
5559         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
5560         the linear IL branch.
5561
5562         * driver.c: Print out more information for --version on arm.
5563
5564 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
5565
5566         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
5567         bb_exit instead, since out of line bblocks might not actually be emitted
5568         out-of-line.
5569         
5570         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
5571         maximum epilog size for out of line bblocks if tracing is enabled.
5572
5573         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
5574
5575 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
5576
5577         * arrays.cs: Regression tests for allocating arrays with negative sizes.
5578
5579 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
5580
5581         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
5582         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
5583         opcodes.
5584
5585 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
5586
5587         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
5588         the 'value' to store is a constant.
5589
5590         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
5591
5592         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
5593         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
5594
5595 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
5596
5597         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
5598         for accessing method->generic_container.
5599
5600 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
5601
5602         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
5603         
5604         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
5605
5606         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
5607
5608         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
5609         fails.
5610
5611 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
5612
5613         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
5614
5615         * mini.c: Handle the case when mono_class_vtable () fails.
5616
5617 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
5618         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
5619         the stat profiler.
5620
5621 2008-05-22  Mark Probst  <mark.probst@gmail.com>
5622
5623         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
5624         together with domain sharing.
5625
5626 2008-05-22  Mark Probst  <mark.probst@gmail.com>
5627
5628         * mini.c: Treat callvirts to final methods like non-virtual calls
5629         when doing generic sharing, i.e. look them up in the runtime
5630         generic context.
5631
5632 2008-05-22  Mark Probst  <mark.probst@gmail.com>
5633
5634         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
5635         with computed types (for generic sharing).
5636
5637         * mini.c: Generic sharing for mkrefany and refanyval.
5638
5639 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
5640
5641         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
5642         possible.
5643
5644         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
5645         the generic sharing code.
5646         
5647         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
5648         when needed.
5649
5650 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
5651
5652         * mini.h: Remove the declaration of mono_aot_init_vtable ().
5653
5654 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
5655
5656         * driver.c: updated copyright date
5657
5658 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
5659
5660         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
5661         needed.
5662
5663 2008-05-19  Martin Baulig  <martin@ximian.com>
5664
5665         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
5666         pointing to the new `_mono_debug_using_mono_debugger' variable.
5667
5668         * driver.c
5669         (mono_main): Check mono_debug_using_mono_debugger() rather than
5670         the `MONO_INSIDE_MDB' environment variable to check whether we're
5671         inside the debugger.
5672
5673 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
5674
5675         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
5676         argument.
5677
5678 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
5679
5680         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
5681
5682         * mini.c: Added mini_assembly_can_skip_verification. This
5683         function checks if the assembly requested to skip verification. 
5684         Fixes part of #387274.
5685
5686 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
5687
5688         * mini.c (mini_get_method): Disable the check for open generic classes when
5689         using generic sharing.
5690
5691         * generics.cs: Add a test for #387034.
5692
5693         * mini.c (mini_get_method): Check whenever the method class is an open generic
5694         type, and return NULL in that case, causing a verification error. Fixes
5695         #384123.
5696
5697 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
5698
5699         * driver.c (mono_main): Revert r102623. The right
5700         thing to do is to enable the verifier under verifiable
5701         unless a --security flag was passed.
5702
5703         We need this non-trivial behavior for --verify-all otherwise
5704         mcs-compileall won't be able to use it. As it needs everything to
5705         be verified under validil.
5706
5707 2008-05-06  Martin Baulig  <martin@ximian.com>
5708
5709         Fix #383749.
5710
5711         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
5712         (mono_debugger_thread_cleanup): Likewise.
5713         (mono_debugger_extended_notification): Likewise.
5714
5715 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
5716
5717         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
5718         against both inflated and non-inflated methods. We need to check against the
5719         generic definition for cases where the instantiated method is not visible.
5720         We need to check against the inflated types for cases where the instantiation
5721         changes any super type. This fixes #382986.
5722
5723         Note that this doesn't need to be applied to other parts of mono_method_to_ir
5724         that check for visibiliy as generic params only appears as the type subject
5725         of tokens on call opcodes. Field manipulation and ldftn must always
5726         target an exact type.
5727
5728 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
5729
5730         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
5731         if no related --security flag is passed.
5732
5733 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
5734
5735         * mini-arch.h: Prepare support for ppc64.
5736
5737         Contributed under MIT/X11 license.
5738
5739 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
5740
5741         * aot-runtime.c: Prepare support for ppc64.
5742
5743         Contributed under MIT/X11 license.
5744
5745 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
5746
5747         * mini-ops.h: Prepare support for ppc64.
5748
5749         Contributed under MIT/X11 license.
5750
5751 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
5752
5753         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
5754
5755         Contributed under MIT/X11 license.
5756
5757 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
5758
5759         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
5760         assemblies, since aot_name is not a full path, causing us to load MS.NET 
5761         assemblies on windows.
5762
5763 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
5764
5765         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
5766         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
5767         * main.c: Use UTF-8 encoded command line instead of Windows default code
5768         page on Windows to support Unicode.
5769         * driver.c (DllMain): New function for mixed-mode assembly support.
5770         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
5771         export __stdcall functions without decoration.
5772
5773         Contributed under MIT/X11 license.
5774
5775 2008-04-28  Mark Probst  <mark.probst@gmail.com>
5776
5777         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
5778         saving it very early.
5779
5780 2008-04-28  Mark Probst  <mark.probst@gmail.com>
5781
5782         * mini.h, mini.c: Lots of code for accessing the old RGCTX
5783         deleted.  The only way to access the new RGCTX is via the
5784         trampline.
5785
5786         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
5787         vtable instead of the RGCTX to static methods.
5788
5789         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
5790         accessing the new RGCTX.
5791
5792         * generic-sharing.c: There is no separation between self, type
5793         arguments and other types in the RGCTX anymore.
5794
5795 2008-04-25  Jonathan Chambers <joncham@gmail.com>
5796
5797         * mini-amd64.c (add_general): Remove previous stack adjustment.
5798         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
5799         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
5800         for 32 bytes of stack space reserved for all calls.
5801         
5802         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
5803         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
5804         adjustment.
5805         
5806         Code contributed under MIT/X11 license.
5807
5808 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
5809
5810         * mini.c (mini_method_verify): Only verify non-inflated methods, check
5811         against the root definition, peeling out method and type instantiations.
5812         Cache verify success results, code that fails verification is still
5813         checked multiple times.
5814
5815 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
5816
5817         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
5818
5819 2008-04-23  Jonathan Chambers <joncham@gmail.com>
5820
5821         * mini-amd64.c (add_general): Always increment stack on Win64.
5822         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
5823         on Win64.
5824         
5825         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
5826         stack based argument handling on Win64.
5827         
5828         Code contributed under MIT/X11 license.
5829
5830 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
5831
5832         * Makefile.am (version.h): Add support for git-svn.
5833
5834 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
5835
5836         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
5837         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
5838         avoiding allocations and libc functions which might deadlock.
5839         
5840         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
5841         'no-gdb-backtrace' option is set.
5842
5843         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
5844
5845         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
5846
5847 2008-04-21  Martin Baulig  <martin@ximian.com>
5848
5849         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
5850         and `get_lmf_addr'; `notification_address' is no longer a pointer.
5851
5852 2008-04-21  Martin Baulig  <martin@ximian.com>
5853
5854         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
5855         `thread_vtable', `event_handler_ptr' and `event_handler'.
5856
5857 2008-04-21  Martin Baulig  <martin@ximian.com>
5858
5859         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
5860         allows delayed initialization of the `executable_code_buffer' when
5861         attaching.
5862
5863 2008-04-21  Martin Baulig  <martin@ximian.com>
5864
5865         * mini.h (mono_debugger_create_notification_function): Removed.
5866         * tramp-*.c (mono_debugger_create_notification_function): Removed.
5867
5868         * mdb-debug-info64.s
5869         (MONO_DEBUGGER__notification_function): Added this in the .text section.
5870
5871         * mdb-debug-info32.s
5872         (MONO_DEBUGGER__notification_function): Added this in the .text section.
5873
5874         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
5875         currently only works on x86 and x86_64, so don't create it on ppc.
5876
5877 2008-04-21  Martin Baulig  <martin@ximian.com>
5878
5879         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
5880
5881         * mini.c
5882         (mini_method_compile): In the fp elimination check, check
5883         `debug_options.mdb_optimizations' in addition to
5884         mono_debug_using_mono_debugger().       
5885
5886         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
5887         disable some JIT optimizations which are only disabled when
5888         running inside the debugger.
5889         Added `--help-debug' option to describe the debugging options.
5890         (parse_debug_options): New static function to parse the `--debug'
5891         options, so we can easily add more stuff in future.
5892
5893 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
5894
5895         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
5896         the method has no body.
5897
5898 2008-04-19  Jonathan Chambers <joncham@gmail.com>
5899
5900         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
5901         assembly is not allowed in MSVC 64-bit compiler. 
5902         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
5903         as we get floating point exceptions everywhere.
5904         
5905         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
5906         correctly align arguments for call to throw_exception.
5907         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
5908         
5909         Code contributed under MIT/X11 license.
5910
5911 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
5912
5913         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
5914
5915 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
5916
5917         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
5918
5919         * mini-amd64.c (NEW_INS): Set cil_code.
5920
5921         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
5922         from mini-amd64.c so all debugger related logic is in one place.
5923
5924         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
5925         later won't have a random ip assigned to them.
5926
5927 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
5928
5929         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
5930         the arch specific function initializes code_size.
5931         (mono_create_delegate_trampoline): Ditto.
5932
5933         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
5934         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
5935         platforms.
5936
5937         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
5938         running under the debugger.
5939
5940         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
5941         debugger.
5942
5943         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
5944         debugger. Also move the disabling of optimizations here from driver.c.
5945         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
5946         debugger.
5947
5948         * mini.h (MonoCompile): Add a few new flags.
5949
5950 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
5951
5952         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
5953         so the cil_code field of created MonoInst's is properly set.
5954         (mini_select_instructions): Ditto.
5955
5956         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
5957         (MONO_INST_NEW_CALL): Ditto.
5958
5959         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
5960         in many places so the ins->cil_code field is properly initialized.
5961
5962         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
5963         place.
5964
5965 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
5966
5967         * mini.c (mini_method_compile): Print a different message when compiling a 
5968         shared method.
5969         
5970         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
5971         > 1.
5972
5973 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
5974
5975         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
5976         SSE2 instructions.
5977
5978         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
5979         
5980 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
5981
5982         * mini.c (handle_stack_args): Make this return void since its return value was
5983         never used. Also set cfg->unverifiable for invalid IL instead of calling
5984         G_BREAKPOINT ().
5985
5986 2008-04-10  Mark Probst  <mark.probst@gmail.com>
5987
5988         * mini.c: Make sure "this" is live in catch clauses with type
5989         variables in shared generic code.
5990
5991 2008-04-08  Mark Probst  <mark.probst@gmail.com>
5992
5993         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
5994         generic_class_is_reference_type() to ensure the proper behaviour
5995         when sharing generic code and the type in question is a type
5996         argument.
5997
5998 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
5999
6000         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
6001         race conditions when printing thread dumps. Fixes #377738.
6002
6003 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
6004         
6005         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
6006         shows up when both MonoInst arguments can cause aliasig.
6007         There is likely no way in the current JIT to trigger this problem, but
6008         it showed up in the development of generics sharing, when in a new
6009         opcode both args of an OP_GROUP can be aliases (addresses of a local).
6010         When the generics sharing code will be committed, its tests will be
6011         valid also for this bug.
6012
6013 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
6014
6015         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
6016         PATCH_INFO_METHOD.
6017
6018         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
6019         NULL.
6020
6021 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
6022
6023         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
6024         use a more detailed exception message for InvalidCastException.
6025
6026         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
6027
6028         * driver.c (mono_main): Add --debug=casts option to turn on better 
6029         InvalidCastException message details.
6030
6031         * mini.c (mini_get_debug_options): New helper function to return the address of
6032         the debug_options variable.
6033
6034         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
6035         the jit_tls TLS variable.
6036
6037         * mini.c (mono_jit_tls): New TLS variable.
6038
6039         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
6040         option is used.
6041
6042 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
6043
6044         * mini.h: Removed verifer related stuff. This code was moved to verify.c
6045
6046         * mini.c: Removed verifer related stuff, code moved to verify.c.
6047
6048         * driver.c: Using code from verify.c instead of mini.c.
6049
6050 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
6051
6052         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
6053         longer valid.
6054
6055 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
6056
6057         * mini.c (check_for_method_verify): Enabling verification of
6058         corlib if mono_verify_all is set. Bugs in the verifier preventing that
6059         have been fixed.
6060
6061 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
6062
6063         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
6064         caller saved registers as well.
6065         
6066         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
6067         saved registers as well.
6068
6069 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
6070
6071         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
6072
6073         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
6074         code.
6075
6076 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
6077
6078         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
6079         to get_call_info.
6080         (get_call_info): Take a gsctx argument instead of 'cfg'.
6081
6082 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
6083
6084         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
6085         mono_verify_all is set.
6086
6087         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
6088
6089         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
6090
6091 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
6092
6093         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
6094         an exception.
6095
6096         * driver.c mini.c mini.h: Add a --verify-all development option to test the
6097         verifier and the code generated by the compiler.
6098
6099 2008-03-25  Mark Probst  <mark.probst@gmail.com>
6100
6101         * mini.c: Generic sharing of the non-nullable case of the box
6102         instruction.
6103
6104 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
6105
6106         * inssel.brg: Fix the build.
6107
6108         * iltests.il.in: Add a test for lconv.ovf.u8.un.
6109
6110 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
6111
6112         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
6113         Array:Address. Fixes #372410.
6114
6115         * iltests.il.in: New tests for readonly prefix.
6116
6117 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
6118
6119         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
6120         mini-trampolines.c.
6121
6122         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
6123         mini-exceptions.c.
6124
6125         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
6126         
6127         * mini.c (mono_decompose_op_imm): New helper function.
6128
6129         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
6130         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
6131         return value.
6132
6133         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
6134         mono_arch_output_basic_block. Fix warnings.
6135
6136         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
6137         for now.
6138
6139 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
6140
6141         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
6142         since the extra frame is now detected automatically inside the loop.
6143
6144         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
6145         opts which are now in mono_peephole_ins ().
6146         
6147         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
6148
6149         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
6150         frames and skip duplicate managed-to-native frames. Fixes #367665.
6151
6152         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
6153         opts which are now in mono_peephole_ins ().
6154         (mono_arch_peephole_pass_2): Ditto.
6155
6156         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
6157
6158         * mini-codegen.c (mono_peephole_ins): New helper function containing the
6159         arch independent peephole optimizations.
6160
6161         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
6162         opts which are now in mono_peephole_ins ().
6163
6164         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
6165         
6166         * mini-s390.c (mono_arch_output_basic_block): Fix build.
6167
6168         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
6169         pattern.
6170
6171         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
6172         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
6173         opcode. 
6174
6175 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
6176
6177         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
6178         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
6179         return value.
6180
6181         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
6182         mono_arch_output_basic_block. Fix warnings.
6183
6184 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
6185
6186         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6187         conv.ovf.u.un.
6188
6189 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
6190
6191         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6192         conv.ovf.u.un.
6193
6194         * iltests.il: Add new tests.
6195
6196 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
6197
6198         * mini.c: Removed Windows version macros.
6199
6200 2008-03-20  Mark Probst  <mark.probst@gmail.com>
6201
6202         * generic-sharing.c: Put reflection types in the extensible part
6203         of the runtime generic context.
6204
6205         * mini.c: Generic sharing of the GetTypeHandle special case of the
6206         ldtoken instruction.
6207
6208 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
6209
6210         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
6211
6212         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
6213         
6214         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
6215         consistency with the other version on the linear IR branch.
6216
6217         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
6218
6219         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
6220
6221         * iltests.il.in: Add new tests.
6222
6223 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
6224
6225         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
6226
6227         * iltests.il.in: Add new tests.
6228
6229 2008-03-19  Mark Probst  <mark.probst@gmail.com>
6230
6231         * mini.c: Two variables with the same name were declared in
6232         nesting contexts and one wasn't initialized.  Fixed.
6233
6234 2008-03-19  Mark Probst  <mark.probst@gmail.com>
6235
6236         * mini.c: Generic sharing of the initobj instruction.
6237
6238 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
6239
6240         * mini.c: make the test to optimize ldtoken from typeof() more
6241         precise.
6242
6243 2008-03-18  Mark Probst  <mark.probst@gmail.com>
6244
6245         * mini.c: Generic sharing of the initobj instruction for reference
6246         types.
6247
6248 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
6249
6250         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
6251         the mono_breakpoint_clean_code() code to perform bound checks.
6252
6253 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
6254
6255         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
6256         mono_arch_patch_callsite() to include the start of the managed method
6257         to be able to perform bound checks.
6258
6259 2008-03-17  Mark Probst  <mark.probst@gmail.com>
6260
6261         * mini.c: Generic sharing for the isinst instruction.
6262
6263 2008-03-17  Mark Probst  <mark.probst@gmail.com>
6264
6265         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6266         inssel-long32-mips.brg: Added opcodes for doing indirect calls
6267         with the runtime generic context argument.
6268
6269         * mini.c: Share calls to several types of unsharable methods by
6270         putting the address of the method code in the runtime generic
6271         context and doing an indirect call.
6272
6273         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6274         to switches.
6275
6276 2008-03-16  Mark Probst  <mark.probst@gmail.com>
6277
6278         * generic-sharing.c: Change due to a change in the runtime genric
6279         context API.
6280
6281 2008-03-15  Martin Baulig  <martin@ximian.com>
6282
6283         * tramp-x86.c
6284         (mono_arch_nullify_class_init_trampoline): Add call to
6285         mono_breakpoint_clean_code() to make things work when running
6286         inside the debugger.
6287
6288         * tramp-amd64.c
6289         (mono_arch_nullify_class_init_trampoline): Add call to
6290         mono_breakpoint_clean_code() to make things work when running
6291         inside the debugger.
6292
6293 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
6294
6295         * inssel-long.brg (reg): Fix 64 bit build.
6296
6297 2008-03-14  Mark Probst  <mark.probst@gmail.com>
6298
6299         * mini.c, mini.h: Share static generic code by passing it an
6300         implicit argument pointing to the runtime generic context.
6301
6302         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6303         inssel-long32-mips.brg: New opcodes for calling shared static,
6304         which need to be passed the runtime generic context.
6305
6306         * mini-amd64.c, mini-x86.c: Save the runtime generic context
6307         argument on the stack in the prologue if needed.  New function for
6308         finding the runtime generic context argument from the registers
6309         saved by the trampoline.
6310
6311         * mini-amd64.h, mini-x86.h: Specify which register to use for the
6312         runtime generic context argument.
6313
6314         * tramp-amd64.c: Also restore the register used for the runtime
6315         generic context argument.
6316
6317         * mini-trampoline.c: Resolve shared static calls by consulting the
6318         runtime generic context via the new argument.
6319
6320         * generic-sharing.c: Add an argument to sharability-checking
6321         functions that specifies whether type variables should be treated
6322         as sharable type arguments.
6323
6324         * inssel-x86.brg: Removed a superfluous, buggy rule.
6325
6326         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6327         to switches.
6328
6329 2008-03-14  Martin Baulig  <martin@ximian.com>
6330
6331         * debug-debugger.c (main_thread_handler): Call
6332         mono_runtime_run_main() without sending any notifications.
6333
6334         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
6335
6336 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
6337
6338         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
6339
6340 2008-03-14  Mark Probst  <mark.probst@gmail.com>
6341
6342         * tramp-x86.c: Fixed register restore offsets in the trampoline
6343         code for ECX and EDX.
6344
6345 2008-03-12  Geoff Norton  <gnorton@novell.com>
6346
6347         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
6348         different ucontext_t implementations.
6349         * exceptions-arm.c: Use the above defines to get exceptions working on 
6350         iPhone (based on a patch by Luke Howard lukeh@padl.com)
6351         * mini-arm.c: Implement iPhone icache support (based on a patch by
6352         Luke Howard lukeh@padl.com)
6353
6354 2008-03-12  Mark Probst  <mark.probst@gmail.com>
6355
6356         * mini.c: Enable generic sharing of calls to non-static
6357         non-interface non-generic non-value-type methods.
6358
6359         * mini-trampolines.c: Resolve calls from shared generic code.
6360
6361 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
6362
6363         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
6364
6365         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
6366
6367 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
6368
6369         * mini.c: some fixes for the AOT compiler.
6370
6371 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
6372
6373         * cpu-amd64.md: Add clob:1 to some float opcodes.
6374
6375 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
6376
6377         * mini.h: Added MiniVerifierMode enumeration.
6378
6379         * mini.c: Added mini_verifier_set_mode to control
6380         the usage of the new verifier.
6381
6382         * mini.c (mono_method): Integrated the new verifier.
6383
6384         * driver.c: Extended --security option with validil and
6385         verifiable options to activate the new verifier.
6386
6387 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
6388
6389         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
6390         optimization to ctors taking 0 or 2 arguments too.
6391
6392         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
6393         a bit.
6394
6395         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
6396
6397         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
6398
6399 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
6400
6401         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
6402         non-aot case as well.
6403
6404         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
6405
6406         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
6407         changes.
6408
6409         * aot-compiler.c (encode_patch): Ditto.
6410
6411         * mini.h (G_MININT32): Fix the definition of this.
6412
6413 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
6414
6415         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
6416
6417         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
6418
6419 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
6420
6421         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
6422         methods returning vtypes in registers.
6423         (mono_arch_allocate_vars): Ditto.
6424
6425         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
6426
6427         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
6428
6429         * generics.cs: Add a test from the linear IR branch.
6430
6431         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
6432
6433         * mini.c (inline_method): Cache failed inline attempts.
6434
6435 2008-03-04  Mark Probst  <mark.probst@gmail.com>
6436
6437         * mini.c: For shared methods of generic classes put the location
6438         of "this" into the MonoGenericJitInfo.
6439
6440         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
6441         register out of a MonoContext by register number.  Add the generic
6442         sharing context as an argument to mono_arch_find_this_argument().
6443
6444         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
6445         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
6446         for new arch function.
6447
6448         * mini-exception.c: Handle open exception clauses in shared
6449         generic code.
6450
6451         * mini-trampolines.c: Supply additional argument to
6452         mono_arch_find_this_argument().
6453
6454 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
6455
6456         * Makefile.am (regtests): Run the bench.exe tests last.
6457
6458 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
6459
6460         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
6461         a bit.
6462
6463 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
6464
6465         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
6466         with MS.
6467
6468         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
6469         
6470         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
6471
6472         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
6473         whose class has no cctor.
6474
6475         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
6476
6477 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
6478
6479         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
6480         unverified.
6481
6482 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
6483
6484         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
6485         to be in sync with the code on the linear IR branch.
6486
6487         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
6488
6489         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
6490
6491 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
6492
6493         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
6494
6495         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
6496
6497         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
6498
6499         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
6500
6501         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
6502         
6503         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
6504         body.
6505
6506 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
6507
6508         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
6509         OP_LOADR4_MEMBASE emission.
6510
6511         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
6512         (mono_spillvar_offset_float): Ditto.
6513
6514         * mini-mips.c (mono_arch_emit_prolog): Ditto.
6515
6516         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
6517         emission.
6518
6519         * basic-long.cs: Add regression tests for them.
6520
6521         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
6522         use.
6523         (mono_arch_allocate_vars): Fix representation of single-precision float
6524         argument.
6525         (mono_arch_output_basic_block): Ditto.
6526
6527         * inssel-mips.brg: Ditto, remove duplicate items.
6528
6529         * mini-mips.c (emit_load_volatile_arguments): New function to handle
6530         arguments of tail calls as on other platforms.
6531         (mono_arch_output_basic_block): Handle tail calls.
6532
6533         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
6534         register.
6535
6536         * objects.cs (test_5_pass_static_struct): Add test for it.
6537
6538         Contributed under MIT/X11 license.
6539
6540 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
6541
6542         * Makefile.am: Use gmcs for compiling the regression tests.
6543
6544         * *.2.cs *.2.il: Rename to *.cs and *.il.
6545
6546 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
6547
6548         * regalloc.h: Make the vassign array smaller.
6549
6550         * mini.c (mini_method_compile): Remove an unused field in cfg.
6551
6552         * mini-codegen.c: Add a bunch of micro optimizations.
6553
6554 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
6555
6556         * regalloc.h: Remove some unused fields.
6557
6558 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
6559
6560         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
6561
6562         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
6563
6564 2008-02-22  Mark Probst  <mark.probst@gmail.com>
6565
6566         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
6567
6568         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
6569         trampoline: Fetch an entry from the runtime generic context.  If
6570         it's NULL, jump to the actual trampoline to fill the runtime
6571         generic context.  Otherwise, return it.
6572
6573         * mini.c: Call the lazy fetch trampoline to get entries out of the
6574         runtime generic context.
6575
6576         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
6577         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
6578         tramp-sparc.c: Stubs for the lazy fetch trampoline.
6579
6580 2008-02-21  Mark Probst  <mark.probst@gmail.com>
6581
6582         * mini.c: Fetch data out of the extensible part of the runtime
6583         generic context instead of calling a helper function.
6584
6585         * generic-sharing.c: Some functions moved into
6586         metadata/generic-sharing.c.  Helper function for fetching other
6587         types now checks and asserts against extensible rgctx (just for
6588         debugging purposes - the helper function isn't called anymore
6589         unless for debugging).
6590
6591 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
6592
6593         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
6594         for tail calls up to the point that the tests in iltests.exe run. Also add a
6595         dummy CKFINITE implementation.
6596         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
6597         needed for trampoline LMF frames.
6598
6599         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
6600         trampoline LMF frames.
6601
6602 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
6603
6604         * mini.c (inline_method): clean any pending loader error when inlining fail.
6605         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
6606
6607 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
6608
6609         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
6610
6611         * aot-runtime.c (decode_patch_info): Ditto.
6612
6613         * mini.c (mono_resolve_patch_target): Ditto.
6614         
6615         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
6616         icall wrappers.
6617
6618         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
6619         
6620         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
6621         if it references an icall address.
6622
6623 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
6624
6625         * cpu-s390x.md: Remove some more unused opcodes.
6626         
6627         * cpu-s390x.md: Remove some unused opcodes.
6628
6629         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
6630         mono_op_imm_to_op ().
6631
6632         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
6633         instead of a switch statement.
6634         
6635         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
6636         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
6637
6638         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
6639         
6640         * mini-codegen.c: Remove unused mono_regstate2_... functions.
6641
6642         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
6643         -1.
6644
6645 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
6646
6647         * driver.c (mono_main): Improve error reporting when an assembly cannot be
6648         opened. Fixes #362607.
6649
6650         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
6651
6652         * iltests.il.in: Add a test for static methods in interfaces.
6653
6654 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
6655
6656         * genmdesc.c (build_table): Fix a crash on older glib versions.
6657
6658         * cpu-sparc.md: Remove some unused opcodes.
6659         
6660         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
6661         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
6662
6663         * cpu-amd64.md: Remove some unused opcodes.
6664
6665         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
6666         like the other opcodes.
6667
6668 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
6669
6670         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
6671
6672         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
6673
6674         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
6675         variables 'cfg' instead of 'm' for consistency.
6676
6677         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
6678
6679         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
6680         argument holding the vtype return address, to avoid the ambigious use of
6681         cfg->ret for this purpose.
6682
6683         * mini.c (NEW_RETLOADA): Use vret_addr if set.
6684
6685         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
6686         
6687         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
6688         new mono_print_ins () function which only takes one argument.
6689
6690 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
6691
6692         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
6693         macro arguments.
6694
6695 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
6696
6697         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
6698
6699         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
6700
6701         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
6702         opcodes and other small changes.
6703
6704         * mini-ops.h: Add some new opcodes from the linear IR branch.
6705
6706         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
6707
6708         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
6709         opcodes, use the REG_MEMBASE opcodes instead.
6710         
6711         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
6712         opcodes, use the REG_MEMBASE opcodes instead.
6713         
6714         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
6715         linear IR branch.
6716
6717         * mini.c (mono_op_imm_to_op): New helper function.
6718
6719         * mini-ops.h: Add some opcodes from linear IR branch.
6720
6721 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
6722
6723         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
6724         <tsv@solvo.ru>.
6725
6726 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
6727
6728         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
6729         OP_ICONV_TO_R4/R8.
6730
6731         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
6732
6733 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
6734
6735         * aot-compiler.c (emit_method_code): Add an assert.
6736
6737         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
6738         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
6739         methods.
6740
6741 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
6742
6743         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
6744         some load/store opcodes so they are consistent. 
6745         (mono_arch_emit_prolog): Simplify some code.
6746
6747         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
6748
6749         * objects.cs: Add tests for large argument offsets on ARM.
6750
6751         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
6752         stack offsets. Fixes #359651.
6753
6754         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
6755
6756         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
6757
6758         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
6759
6760         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
6761
6762         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
6763
6764         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
6765         rid of CEE_CONV_R_UN.
6766
6767         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
6768
6769 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
6770
6771         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
6772
6773         * mini.c (mono_normalize_opcodes): Add some more opcodes.
6774
6775         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
6776
6777         * cpu-amd64.md: Remove some unused opcodes.
6778
6779         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
6780
6781         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
6782
6783         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
6784         arch specific functions for its parts. Call the peephole pass after local
6785         regalloc so the prolog can compute a more accurate max_offset.
6786         
6787         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
6788         the corresponding OP_I/OP_L opcodes.
6789
6790         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
6791
6792         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
6793
6794 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
6795
6796         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
6797         as they are handled in mini.c.
6798
6799         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
6800         
6801         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
6802         case since it is handled in mini.c.
6803
6804         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
6805
6806         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
6807
6808         * *.c: Use the new opcodes in the IR and back end code.
6809
6810         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
6811
6812         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
6813
6814 2008-02-06  Mark Probst  <mark.probst@gmail.com>
6815
6816         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
6817         an assert because it has a race condition.
6818
6819 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
6820
6821         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
6822
6823         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
6824
6825         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
6826
6827         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
6828         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
6829
6830 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
6831
6832         * cpu-amd64.md (move): Correct the maximum size of move.
6833
6834 2008-02-05  Mark Probst  <mark.probst@gmail.com>
6835
6836         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
6837         the generic class init trampoline to return quickly if the class
6838         is already inited.
6839
6840 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
6841
6842         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
6843         issues where an 32 bit callsite cannot be patched by a 64 bit address.
6844
6845 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
6846
6847         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
6848         branch.
6849
6850 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
6851
6852         * objects.cs: Add some soft-float tests.
6853
6854         * mini.c: Fix a couple more soft-float issues.
6855
6856         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
6857
6858         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
6859         avoid a REX prefix.
6860
6861 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
6862
6863         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
6864         exception happens while compiling a virtual method.
6865
6866 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
6867
6868         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
6869         
6870         * mini-sparc.c: Fix build.
6871
6872         * mini-sparc.c (get_call_info): Add support for generic sharing.
6873
6874         * mini-exceptions.c: Add a FIXME.
6875
6876 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
6877
6878         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
6879         altstack handling code.
6880
6881         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
6882         
6883         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
6884
6885         * mini-s390.c: Add support for generic sharing.
6886
6887         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
6888         Fix CAS on s390.
6889         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6890
6891         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
6892
6893         * mini-s390x.c: Add support for generic sharing.
6894         
6895         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
6896         Fix CAS on ia64.
6897         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6898
6899         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
6900         can be used since it takes a 16 bit signed immediate.
6901
6902         * inssel-s390x.brg: Fix OP_SETRET.
6903
6904         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
6905
6906         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
6907
6908         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
6909
6910         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
6911
6912         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
6913         in one place.
6914
6915         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
6916         stuff.
6917
6918         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
6919         of the unused mono_arch_patch_delegate_trampoline stuff.
6920
6921 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
6922
6923         * basic-long.cs: Move the fp related tests to basic-float.cs.
6924
6925         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
6926
6927         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
6928
6929         * basic-calls.cs: Add a test for proper float argument passing.
6930
6931         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
6932         if the context corresponds to an exception received through a signal.
6933
6934         * exceptions.cs: Add a test for nullref handling at the start of a try
6935         clause.
6936
6937         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
6938
6939         * jit-icalls.c (mono_break): New JIT icall.
6940
6941         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
6942
6943         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
6944
6945 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
6946
6947         * cpu-*.md: Get rid of unused opcodes.
6948
6949         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
6950
6951         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
6952         by all platforms.
6953
6954         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
6955         define.
6956
6957         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
6958         the arch independent trampoline code in mini-trampolines.c.
6959
6960         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
6961
6962         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
6963
6964         * mini-s390.h: Remove an unused define.
6965         
6966         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
6967         the arch independent trampoline code in mini-trampolines.c.
6968
6969         * mini-arm.c (mono_arch_emit_prolog): Fix build.
6970
6971 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
6972
6973         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
6974
6975         * mini-s390.c (mono_arch_emit_prolog): Fix build.
6976
6977         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
6978
6979         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
6980
6981         * cpu-amd64.md: Use smaller sizes for int opcodes.
6982
6983         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
6984
6985         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
6986         objects.cs.
6987
6988         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
6989         debugging.
6990
6991         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
6992         instead of though a pointer to save an indirection when accessing elements of
6993         the array.
6994
6995         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
6996         some typos.
6997         (NOT_IMPLEMENTED): New helper macro.
6998         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
6999         of a bb.
7000
7001         * *.c: Use the new helper macro.
7002
7003 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
7004
7005         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
7006
7007 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
7008
7009         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
7010         stack slots.
7011
7012 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
7013
7014         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
7015         profiling is enabled.
7016         
7017         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
7018         the end.
7019         (mono_arch_emit_prolog): Add more first bblock optimizations.
7020
7021         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
7022         in order if possible.
7023         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
7024         bblock, since the arguments are still in their original registers.
7025
7026         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
7027
7028 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
7029
7030         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
7031         as well.
7032
7033         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
7034         offset 0.
7035
7036         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
7037
7038         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
7039         process async exceptions received while in unmanaged code.
7040
7041         * mini.c (mini_init): Install a callback with the runtime which will be called
7042         when a thread receives an async exception while in unmanaged code.
7043
7044         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
7045
7046         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
7047
7048 2008-01-16  Wade Berrier  <wberrier@novell.com>
7049
7050         * cpu-g4.md:
7051         * cpu-arm.md:
7052         * cpu-s390x.md:
7053         fix build
7054
7055 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
7056
7057         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
7058         compilation with sun cc.
7059
7060         * cpu-*.md: Fix the build.
7061
7062         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
7063
7064         * mini-amd64.h: Add some comments to the MonoLMF structure.
7065
7066         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
7067         
7068         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
7069         in the LMF structure if possible. This saves two instructions in the
7070         managed->native wrappers.
7071
7072         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
7073
7074 2008-01-16  Mark Probst  <mark.probst@gmail.com>
7075
7076         * generic-sharing.c: New type argument lookup code which uses the
7077         runtime generic context template.
7078
7079 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
7080
7081         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
7082
7083         * mini-arm.c (add_general): Fix arm eabi parameter passing.
7084         (mono_arch_output_basic_block): Fix localloc implementation.
7085
7086         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
7087
7088         * mini-ia64.c (peephole_pass): Fix ia64 build.
7089
7090         * mini-amd64.c (peephole_pass): Fix a warning.
7091         
7092         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
7093         at a constant offset from sp/fp.
7094
7095         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
7096         instead of obtaining it from *lmf in the managed method case.
7097
7098 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
7099
7100         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
7101
7102 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
7103
7104         * mini.h (MonoInstList): New type.
7105         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
7106         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
7107         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
7108         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
7109         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
7110         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
7111         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
7112         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
7113         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
7114         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
7115         MONO_INST_LIST_FOR_EACH_ENTRY,
7116         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
7117         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
7118         mono_inst_list_first, mono_inst_list_last,
7119         mono_inst_list_next, mono_inst_list_prev): New instruction
7120         list handling interfaces.
7121         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
7122         list head 'ins_list'.
7123         (MonoInst): Replace next pointer with list head 'node'.
7124         (MonoCallInst): Make 'out_args' a MonoInstList.
7125         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
7126         (MonoCompile): Delete reverse_inst_list and
7127         reverse_inst_list_len.
7128         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
7129         mono_arch_lowering_pass, mono_arch_local_regalloc,
7130         mono_arch_output_basic_block, mono_arch_emit_prolog):
7131         Convert to new instruction lists.
7132         (insert_after_ins): Delete.
7133         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
7134         instruction lists.
7135         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
7136         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
7137         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
7138         mono_emulate_opcode, mono_emit_load_got_addr,
7139         inline_method, mono_method_to_ir, mono_print_bb_code,
7140         print_dfn, decompose_pass, nullify_basic_block,
7141         replace_out_block_in_code, remove_block_if_useless,
7142         merge_basic_blocks, move_basic_block_to_end,
7143         try_unsigned_compare, optimize_branches, mono_print_code,
7144         mini_select_instructions, remove_critical_edges): Likewise.
7145         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
7146         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
7147         mono_arch_output_basic_block, mono_arch_emit_prolog):
7148         Likewise.
7149         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
7150         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7151         mono_arch_output_basic_block): Likewise.
7152         (inst_list_prepend, insert_after_ins): Delete.
7153         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
7154         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
7155         instruction lists.
7156         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
7157         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
7158         mono_arch_emit_prolog): Likewise.
7159         * cfold.c (mono_constant_fold): Likewise.
7160         * liveness.c (visit_bb, mono_analyze_liveness,
7161         optimize_initlocals): Likewise.
7162         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
7163         * graph.c (mono_draw_code_cfg): Likewise.
7164         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
7165         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
7166         mono_ssa_cprop): Likewise.
7167         * abcremoval (get_relations_from_previous_bb, process_block):
7168         Likewise.
7169         * local-propagation (mono_cprop_invalidate_values,
7170         mono_local_cprop_bb): Likewise.
7171         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
7172         peephole_pass, mono_arch_output_basic_block,
7173         mono_arch_emit_prolog): Likewise.
7174         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
7175         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7176         mono_arch_emit_prolog): Likewise.
7177         (insert_after_ins): Delete.
7178         * aliasing.c (print_code_with_aliasing_information,
7179         mono_build_aliasing_information, mono_aliasing_deadce):
7180         Convert to new instruction lists.
7181         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
7182         peephole_pass, NEW_INS, mono_arch_lowering_pass,
7183         mono_arch_local_regalloc, mono_arch_output_basic_block):
7184         Likewise.
7185         (insert_after_ins): Delete.
7186         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
7187         peephole_pass, mono_arch_output_basic_block): Convert to
7188         new instruction lists.
7189         * mini-codegen (InstList, inst_list_prepend,
7190         insert_after_ins): Delete.
7191         (insert_before_ins, get_register_force_spilling,
7192         get_register_spilling, free_up_ireg, free_up_reg,
7193         create_copy_ins, create_spilled_store, alloc_int_reg,
7194         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
7195         to new instruction lists.
7196         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
7197         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7198         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
7199         (insert_after_ins): Delete.
7200         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
7201         mono_arch_local_regalloc, mono_arch_output_basic_block,
7202         mono_arch_call_opcode): Convert to new instruction lists.
7203         (insert_after_ins): Delete.
7204         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
7205         peephole_pass, mono_arch_output_basic_block,
7206         mono_arch_emit_prolog): Convert to new instruction lists.
7207
7208 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
7209
7210         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
7211
7212         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
7213         Fixes #353182.
7214
7215         * Makefile.am (version.h): Make this work with non-bash shells.
7216
7217 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
7218
7219         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
7220
7221 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
7222
7223         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
7224         the InitializeArray optimization.
7225
7226 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
7227
7228         * mini.c driver.c: Don't include os/gc_wrapper.h.
7229
7230 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
7231
7232         * mini.c (print_jit_stats): Print GC statistics if available.
7233
7234 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
7235
7236         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
7237
7238 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
7239
7240         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
7241
7242 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
7243
7244         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
7245         
7246         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
7247
7248         * driver.c (mono_main): Ditto.
7249
7250 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
7251
7252         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
7253
7254         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
7255         in the vtable can't be encoded.
7256         (compile_method): Ditto.
7257
7258 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
7259
7260         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
7261         defined.
7262
7263         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
7264         lmf->rbp.
7265
7266         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
7267         the top LMF entry belongs to the current method.
7268
7269         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
7270
7271 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
7272
7273         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
7274         
7275         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
7276
7277         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
7278
7279         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
7280
7281         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
7282
7283         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
7284         implementation.
7285
7286         * basic-float.cs: Add an ulong->double cast test.
7287
7288 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
7289
7290         * mini.c (mono_method_to_ir): Fix a warning.
7291
7292 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
7293
7294         * mini-ops.h: Add OP_SWITCH.
7295
7296         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
7297         CEE_SWITCH in back-end code, use OP_SWITCH instead.
7298
7299 2007-12-11  Geoff Norton  <gnorton@novell.com>
7300
7301         * mini-s390x.c: Minor change to the MAX() define to allow
7302         it to compile with other gcc versions.
7303
7304 2007-12-11  Geoff Norton  <gnorton@novell.com>
7305
7306         * cpu-s390x.md:
7307         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
7308
7309 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
7310
7311         exceptions-arm.c (mono_arch_get_restore_context): Restore
7312         the frame pointer.
7313
7314         exceptions-arm.c (throw_exception): Save the frame pointer.
7315         This is a partial fix for #323747. Only the client side is
7316         fixed.
7317
7318 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
7319
7320         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
7321         was using an unrelated variable to log the class which
7322         needed the cctor to be called. This was crashing on arm.
7323
7324 2007-12-09  Robert Jordan  <robertj@gmx.net>
7325
7326         * mini-x86.c (mono_arch_emit_epilog):
7327         Consider all kinds of 64-bit types. Fixes #323114.
7328
7329 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
7330
7331         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
7332
7333 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7334
7335         * mini-amd64.c (peephole_pass): Add a missing instruction check.
7336
7337 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7338
7339         * mini.c: run type ctor before allocating an object, not only
7340         when running it's constructor method (fixes at least part of bug #342507).
7341
7342 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7343         
7344         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
7345         
7346         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
7347         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
7348         function.
7349
7350         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
7351         mono_generic_class_init_trampoline () the same as it is done with the other
7352         trampolines.
7353
7354         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
7355         aot-runtime.c aot-compiler.c: Implement AOT support.    
7356
7357 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7358
7359         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
7360         build for archs which don't have the vtable trampoline defined
7361         yet.
7362
7363 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7364
7365         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
7366
7367         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
7368
7369         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
7370
7371         * tramp-<ARCH>.c: Use the new helper function.
7372
7373 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7374
7375         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
7376         trampoline call, which takes a vtable argument.
7377
7378         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
7379         OP_TRAMPCALL_VTABLEs like other calls.
7380
7381         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
7382         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
7383         call.  Implemented a support function which fetches the vtable
7384         from a register set.
7385
7386         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
7387         Implemented a generic class init trampoline, using the
7388         OP_TRAMPCALL_VTABLE opcode.
7389
7390         * mini.c: Implemented static field access when sharing generic
7391         code.  This implies initing the class using the new
7392         OP_TRAMPCALL_VTABLE call.
7393
7394 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7395
7396         * mini.c: Don't compile methods with sharing enabled if their
7397         classes are disabled for sharing.
7398
7399 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
7400
7401         * inssel.brg: Add a missing sign extension to the GETCHR and array access
7402         opcodes. Fixes #346563.
7403
7404         * objects.cs: Add a new test.
7405
7406         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
7407
7408         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
7409         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
7410
7411 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
7412
7413         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
7414
7415 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
7416
7417         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
7418         code stream.
7419
7420 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
7421
7422         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
7423
7424         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
7425         optimization in the AOT case.
7426         
7427 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
7428
7429         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
7430         
7431         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
7432
7433         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
7434
7435         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
7436
7437         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
7438         is created by the inlined delegate ctor.
7439
7440         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
7441
7442         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
7443
7444 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
7445
7446         * cpu-x86.md: Fix the length of ckfinite.
7447
7448 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
7449
7450         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
7451         
7452         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
7453         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
7454
7455         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
7456
7457         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
7458         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
7459
7460 2007-11-28  Martin Baulig  <martin@ximian.com>
7461
7462         * mini-x86.c
7463         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
7464         after creating the trampoline.
7465
7466 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
7467
7468         * aot-runtime.c (load_aot_module): Check runtime version if needed.
7469
7470         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
7471         the same version.
7472
7473         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
7474         instead of the calling method to help AOT.
7475
7476         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
7477
7478 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
7479
7480         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
7481         is defined.
7482
7483 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
7484
7485         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
7486         
7487         * aot-compiler.c (compile_method): Correct check for generic method definitions.
7488         (encode_method_ref): No need to handle generic method definitions specially.
7489
7490         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
7491
7492         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
7493         decode_klass_info.
7494
7495         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
7496         encode_klass_info.
7497         (compile_method): Enable generic sharing.
7498
7499 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
7500
7501         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
7502         (mini_method_compile): Add preliminary support for AOTing shared generic code.
7503
7504         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
7505         generic code.
7506
7507         * mini-trampolines.c: Fix a warning.
7508
7509         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
7510         NEW_PCONST.
7511         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
7512         (generic_class_is_reference_type): Remove unused function.
7513
7514         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
7515         in the generic vtable trampoline case.
7516
7517         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
7518         
7519         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
7520         return an AOT method based on a vtable slot.
7521
7522         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
7523
7524         * mini.c (mini_get_vtable_trampoline): Export this.
7525
7526 2007-11-22  Martin Baulig  <martin@ximian.com>
7527
7528         * debug-debugger.h
7529         (MonoDebuggerInfo): Move `debugger_version' up.
7530
7531 2007-11-22  Martin Baulig  <martin@ximian.com>
7532
7533         * mini-amd64.c
7534         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
7535
7536         * mini-trampolines.c
7537         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
7538         after compiling the method.
7539
7540 2007-11-20  Martin Baulig  <martin@ximian.com>
7541
7542         * debug-mini.c
7543         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
7544         (mono_debugger_remove_breakpoint): Likewise.
7545         (mono_debugger_check_breakpoints): Likewise.
7546
7547         * debug-debugger.c: Implement the new breakpoint interface here.
7548
7549 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
7550
7551         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
7552         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
7553
7554         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
7555
7556 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
7557
7558         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
7559
7560         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
7561         mini.c.
7562
7563         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
7564         mini.c.
7565
7566         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
7567         returning a vtype in a register.
7568
7569         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
7570         here from the arch specific code.
7571
7572         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
7573         mini.c.
7574
7575         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
7576         (mono_arch_emit_prolog): Increment maximum prolog size.
7577
7578         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
7579         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
7580
7581         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
7582         MonoGenericSharingContext.
7583
7584         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
7585         MonoGenericSharingContext. Allocate memory from the cfg mempool.
7586
7587 2007-11-15  Mark Probst  <mark.probst@gmail.com>
7588
7589         * mini.c, mini.h, generic-sharing.c: Functions for producing code
7590         which extract fields out of the runtime generic context.  Full
7591         sharing of the NEWARR opcode.
7592
7593 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
7594
7595         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
7596         --enable-minimal=ssa.
7597
7598 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
7599
7600         * mini-trampolines.c (mono_delegate_trampoline): Update after 
7601         mono_marshal_get_delegate_invoke () signature change.
7602
7603 2007-11-13  Mark Probst  <mark.probst@gmail.com>
7604
7605         * mini.c: Removed the shared context in favor of the generic
7606         sharing context.  Allocate the MonoJitInfo structure with room for
7607         the generic sharing context if it's needed.
7608
7609         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
7610         domain-internals.h now.
7611
7612         * mini-x86.c: Pass the generic sharing context to get_call_info ().
7613
7614         * generic-sharing.c: Several changes for working without a shared
7615         context and instead operating on open types instead.
7616
7617 2007-11-12  David S. Miller  <davem@davemloft.net>
7618
7619        * inssel-sparc.brg: Fix double instruction emit.
7620
7621 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
7622
7623         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
7624         Get/Set/Address methods.
7625         
7626         * mini.c debug-debugger.c mini-trampolines.c: Update after 
7627         mono_marshal_get_delegate_invoke signature change.
7628
7629 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
7630
7631         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
7632         This can happens with dynamic methods. Fixes the other bug in #322722.
7633
7634 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
7635
7636         * tramp-arm.c (mono_arch_patch_callsite): Support patching
7637         BX call sequence.
7638
7639         * mini-arm.c (arm_patch): Implement patching of BX call
7640         sequence. Fixes one of the bugs in #322722.
7641
7642 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
7643
7644        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
7645        under Linux.  We only need to flush every 32-byte cache line.    
7646
7647 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
7648
7649         * mini.c:
7650         move_basic_block_to_end: Add branches when needed, eventually creating
7651         a new BB.
7652         optimize_branches: added a parameter that tells if it's ok to create
7653         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
7654         and avoid calling move_basic_block_to_end when it's not ok.
7655         Fixes bug 318677.
7656
7657 2007-11-07  Mark Probst  <mark.probst@gmail.com>
7658
7659         * mini.c: Abort inlining call to InitializeArray if something
7660         looks wrong.  Let the icall handle it, which now has proper safety
7661         checks.
7662
7663 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
7664
7665         * mini.c (mono_spill_call): add support for soft-float.
7666
7667         * mini.c (mono_method_to_ir): add support for soft-float
7668         to inlined functions that return float.
7669
7670         * mini.c (mono_method_to_ir): add support for soft-float
7671         to cee_stsfld opcode on float fields.
7672
7673 2007-11-05  Geoff Norton  <gnorton@novell.com>
7674
7675         * mini-x86.h: Fix the structure access for X86 Leopard.
7676
7677
7678 2007-11-05  Martin Baulig  <martin@ximian.com>
7679
7680         * mini-trampolines.c
7681         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
7682         after compiling the method to notify the debugger.
7683
7684 2007-11-05  Martin Baulig  <martin@ximian.com>
7685
7686         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
7687
7688 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
7689
7690         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
7691         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
7692
7693 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
7694
7695         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
7696         native-to-managed wrappers.
7697         
7698 2007-11-01  Geoff Norton  <gnorton@novell.com>
7699
7700         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
7701         members.
7702
7703 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7704
7705         * mini.c, mini-x86.c: when getting back from unmanaged code
7706         to managed via a marshaled delegate we also need to set the
7707         right domain.
7708
7709 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7710
7711         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
7712         for amd64.
7713
7714 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
7715
7716         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
7717         let the debugger or other external agents to tell the JIT when
7718         a sw breakpoint has been inserted in the code that the JIT needs
7719         to be able to inspect.
7720
7721 2007-10-31  Martin Baulig  <martin@ximian.com>
7722
7723         * debug-debugger.h
7724         (MonoDebuggerInfo): Remove `runtime_class_init'.
7725
7726 2007-10-30  Martin Baulig  <martin@ximian.com>
7727
7728         * debug-mini.h
7729         (mono_debugger_thread_created): Added `MonoThread *' argument.
7730         (mono_debugger_extended_notification): New public method.
7731         (mono_debugger_trampoline_compiled): New public method.
7732
7733         * debug-mini.c
7734         (MonoDebuggerThreadInfo): Added `thread' and
7735         `extended_notifications' fields.
7736
7737         * debug-debugger.c
7738         (debugger_executable_code_buffer): New static variable.
7739
7740         * debug-debugger.h
7741         (MonoDebuggerInfo): Added `executable_code_buffer',
7742         `executable_code_buffer_size', `breakpoint_info_area',
7743         `breakpoint_table' and `breakpoint_table_size'.
7744
7745 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
7746
7747         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
7748         that IP  either is an unused value or the vtable pointer. IMT 
7749         calls use vtable + offset now. Reduced by almost half the size
7750         of IMT entries.
7751
7752 2007-10-26  Jonathan Chambers <joncham@gmail.com>
7753
7754         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
7755         defines to access param registers. Replace long usage with
7756         gsize as sizeof(long) != sizeof(void*) on Win64.
7757
7758         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
7759         on Win64. Fix intrinsic, use _AddressOfReturnAddress
7760         instead of non-existant _GetAddressOfReturnAddress.
7761
7762         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
7763         param registers. Save/restore %rdi and %rsi in MonoLMF.
7764
7765         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
7766         param registers. Modify (throw_exception) signature to take 
7767         %rdi and %rsi on Win64. 
7768
7769         Code is contributed under MIT/X11 license.
7770
7771 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7772
7773         * helpers.c: unlink debugging output files.
7774
7775 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
7776
7777         * mini.c: Move mono_create_ftnptr () to object.c.
7778
7779 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
7780
7781         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
7782         optional. This function can now be used to disassemble code generated
7783         outside the JIT such as trampolines and IMT thunks.
7784
7785         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
7786
7787         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
7788         vtable pointer from a ldr instruction.
7789
7790         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
7791         new IMT call sequence.
7792
7793         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
7794         call sequence for interface invocations.
7795
7796         * mini-arm.c (mono_arch_emit_imt_argument): added, required
7797         for imt support. This function is empty since IMT on ARM requires no
7798         special handling on the IR side.
7799
7800         * mini-arm.c (mono_arch_find_imt_method): added, required for
7801         imt support.
7802
7803         * mini-arm.c (mono_arch_find_this_argument): added, required
7804         for imt support.
7805
7806         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
7807         a ldr instruction to load a value stored in the code stream.
7808
7809         * mini-arm.c (mono_arch_build_imt_thunk):added, required
7810         for imt support.
7811
7812
7813 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
7814
7815         * mini.c (mini_init): Install the jump trampoline callback.
7816
7817 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7818
7819         * mini-trampolines.c: handle synchronized methods with the common
7820         vtable trampoline (bug #335601).
7821
7822 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
7823
7824         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
7825
7826         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
7827         64 bit platforms.
7828
7829         * mini-ia64.h mini-ia64.c: Add support for IMT.
7830
7831         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
7832         prolog. Fixes #331958.
7833
7834 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
7835
7836         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
7837
7838 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7839
7840         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
7841         trampoline.
7842
7843 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7844
7845         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
7846         trampoline.
7847
7848 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
7849
7850         * mini-x86.c, mini-x86.h: x86 support for the common vtable
7851         trampoline.
7852
7853 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
7854
7855         * mini-trampolines.c: changed the magic rampoline to understand
7856         the common vtable trampoline method: the method to invoke is
7857         determined by the vtable displacement of the call.
7858
7859 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7860
7861         * mini.c, mini.h: register the common vtable trampoline if the
7862         architecture supports it.
7863
7864 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7865
7866         * cpu-amd64.md: use the correct max length for tls_get.
7867
7868 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
7869
7870         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
7871         CEE_STELEM_ANY. Fixes #333696.
7872
7873 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
7874
7875         * exceptions-x86.c: provide more graceful handling of the case where
7876         we followed a bogus function pointer from managed code (bug #332866).
7877
7878 2007-10-11  Mark Probst  <mark.probst@gmail.com>
7879
7880         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
7881         replaces the generic_shared flag and will carry more information
7882         in the future.
7883
7884         * generic-sharing.c: Added mini_type_stack_size() which allows
7885         allows open types if given a generic sharing context.
7886         mini_get_basic_type_from_generic() takes a
7887         MonoGenericSharingContext* instead of a MonoCompile* now.
7888
7889         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
7890         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
7891         mini-sparc.c, mini-x86.c: Trivial changes required by the two
7892         changes above.  Just passing arguments through to the right
7893         places.
7894
7895 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7896
7897         * mini-arm.c: unify the call emission to emit_code_seq().
7898
7899 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
7900
7901         * tramp-arm.c: reduced the trampoline size.
7902
7903 2007-10-10  Mark Probst  <mark.probst@gmail.com>
7904
7905         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
7906         variable handling out of arch-specific code.
7907
7908 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7909
7910         * mini-arm.c: implemented fast delegate dispatch.
7911
7912 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
7913
7914         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
7915         that fp elimination is turned off if the space required by locals is too
7916         big. Fixes #331958.
7917
7918 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7919
7920         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
7921         ARM to the new style trampoline.
7922
7923 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
7924
7925         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
7926
7927         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
7928
7929 2007-10-09  Martin Baulig  <martin@ximian.com>
7930
7931         * debug-debugger.h
7932         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
7933         `field_info_offset_offset'.     
7934
7935 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
7936
7937         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
7938         removed more internal usage of the r11 register and made it available
7939         to the register allocator.
7940
7941 2007-10-08  Mark Probst  <mark.probst@gmail.com>
7942
7943         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
7944         when sharing generics and treat type variables as references.
7945
7946 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7947
7948         * mini-ppc.c: started removing the internal uses of register r11
7949         to eventually allow the register allocator to manage it as an
7950         additional available register.
7951
7952 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
7953
7954         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
7955
7956 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
7957
7958         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
7959         specific trampolines as they are not performance critical as a jump
7960         target (maybe align as before only for AOT code?). This saves about
7961         200 KB of native code on x86 for monodevelop startup.
7962
7963 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
7964
7965         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
7966         monodevelop startup.
7967
7968 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
7969
7970         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
7971
7972         * mini-sparc.h mini-sparc.c: Implement IMT support.
7973
7974         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
7975         its smaller and doesn't clobber sparc_g1.
7976
7977         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
7978
7979 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7980
7981         * mini-ppc.c: optimized the size of the IMT thunks a bit.
7982
7983 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
7984
7985         * mini-ppc.c: implemented fast delegate invocation.
7986
7987 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
7988
7989         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
7990
7991 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7992
7993         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
7994         code to the new style trampoline in preparation for IMT support.
7995
7996 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
7997
7998         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
7999         systems already. This also reduces the specific trampiline sizes and
8000         prepares for the use of r12 as the IMT identifier register.
8001
8002 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
8003
8004         * mini-mips.h: endianess fix (simplified from a patch by
8005         Thomas Kunze <thommy@tabao.de>, bug #323737).
8006
8007 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
8008
8009         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
8010         to access ucontext fields and enable netbsd support
8011         (partially from Magnus Henoch <mange@freemail.hu>).
8012
8013 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
8014
8015         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
8016         use the preprocessor from the CPP env var if it is set.
8017
8018 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
8019
8020         * mini-trampolines.c: fixed an assertion and moved it earlier in the
8021         code, before interface_offset gets used.
8022
8023 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
8024
8025         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
8026         mono_class_setup_vtable () before accessing klass->vtable.
8027
8028 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
8029
8030         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
8031         hackish.
8032
8033 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
8034
8035         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
8036         IMT slots (this saves hundreds of KB of memory in programs like
8037         IronPython and Monodevelop).
8038
8039 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
8040
8041         * mini.c: print the delegate counter.
8042
8043 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
8044
8045         * mini-x86.c: make it easier to enable the debugging code for IMT
8046         slots.
8047
8048 2007-09-28  Martin Baulig  <martin@ximian.com>
8049
8050         * debug-debugger.h
8051         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
8052         `mono_method_klass_offset' and `mono_method_token_offset'.
8053
8054 2007-09-20  Mark Probst  <mark.probst@gmail.com>
8055
8056         * mini.c: First generics sharing implementation.  Can only share
8057         in very simple cases.  If sharing doesn't work it falls back to
8058         dedicated compilation.
8059
8060         * mini.h: Flag in MonoCompile to specify whether generic
8061         compilation is shared.  Flags enum for marking which generic inst
8062         of a context is used.  Prototypes for helper functions.
8063
8064         * generic-sharing.c: Helper functions for generic method sharing.
8065
8066         * optflags-def.h: Optimization flag (gshared) for enabling generic
8067         method sharing added.
8068
8069         * Makefile.am: generic-sharing.c added.
8070
8071 2007-09-19 Daniel Nauck <dna@mono-project.de>
8072
8073         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
8074
8075 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
8076         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
8077         fixes bug 325507.
8078
8079 2007-09-19  Martin Baulig  <martin@ximian.com>
8080
8081         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
8082         mono_debug_cleanup() is now part of mono_cleanup().
8083
8084 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
8085
8086         * driver.c (mono_main): Fix a warning.
8087
8088 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
8089
8090         * aot-compiler.c: Optimize various parts when processing large assemblies.
8091         Fixes ##325568.
8092
8093         * mini.c (mono_patch_info_hash): Improve hash function.
8094
8095 2007-09-14  Jonathan Chambers <joncham@gmail.com>
8096
8097         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
8098         
8099         Code is contributed under MIT/X11 license.
8100
8101 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
8102
8103         * mini.c (mini_init): Fix a leak.
8104
8105         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
8106
8107 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8108
8109         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
8110
8111 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
8112
8113         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
8114
8115 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
8116
8117         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
8118         variance tests.
8119
8120         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
8121
8122         * mini.c (handle_alloc): Enable managed allocators in AOT code.
8123
8124         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
8125
8126         * aot-runtime.c (decode_patch_info): Ditto.
8127
8128 2007-09-12  Jonathan Chambers <joncham@gmail.com>
8129
8130         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
8131         static case. Cache delegates in architecture specific code, 
8132         based on number of parameters.
8133         
8134         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
8135         in architecture specific code, based on number of parameters.
8136         
8137         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
8138         caching happen in architecture specific code now.
8139         
8140         Code is contributed under MIT/X11 license.
8141
8142 2007-09-12  Jonathan Chambers <joncham@gmail.com>
8143
8144         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
8145         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
8146         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
8147
8148         Code is contributed under MIT/X11 license.
8149
8150 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
8151         * mini.c: (mono_thread_abort) Fixed bug #82416.
8152
8153 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
8154
8155         * mini.: hook the new managed GC allocation feature into the JIT.
8156
8157 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8158
8159         * mini.c: implementation for the new runtime tls opcode.
8160
8161 2007-09-11  Martin Baulig  <martin@ximian.com>
8162
8163         * debug-debugger.h
8164         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
8165         `mono_method_inflated_offset'.
8166
8167 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
8168
8169         * driver.c mini.h mini.c: Add a new devel command line option for injecting
8170         async exceptions into a method.
8171
8172         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
8173         purpose of testing whenever the unwinder works at every instruction.
8174
8175 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
8176
8177         * mini.c: check accessibility of method used in ldftn (fixes
8178         bug #82635).
8179
8180 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
8181
8182         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
8183
8184         * inssel.brg: Fix a warning.
8185
8186 2007-09-03  Martin Baulig  <martin@ximian.com>
8187
8188         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
8189         now takes the `main_method' as argument.
8190
8191 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
8192
8193         * cpu-sparc.md (endfilter): Add missing src1:i argument.
8194
8195 2007-08-30  Jonathan Chambers <joncham@gmail.com>
8196
8197         * driver.c: include the cil-coff.h header on Windows.
8198         
8199         Code is contributed under MIT/X11 license.
8200
8201 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8202
8203         * mini.c, driver.c: don't include the cil-coff.h header.
8204
8205 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
8206
8207         * mini.c: flag places that needs fixes fo soft-float support.
8208
8209 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
8210
8211         * mini.h, inssel-float.brg: fix soft-float constant loads on big
8212         endian systems (partially from Dean Jenkins, bug #81924).
8213
8214 2007-08-28  Mark Probst  <mark.probst@gmail.com>
8215
8216         * mini.c (check_linkdemand): Remove embedded reference object in
8217         call to LinkDemandSecurityException.
8218         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
8219         with an IntPtr instead of a reference object.
8220
8221 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
8222
8223         * mini.c (handle_initobj): Handle alignment properly.
8224
8225         * inssel.brg (mini_emit_memset): Ditto. 
8226
8227         * inssel.brg (mini_emit_memcpy): Ditto. 
8228
8229         * inssel-sparc.brg: Ditto.              
8230
8231         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
8232
8233 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
8234
8235         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
8236         exceptions raised in unmanaged code. Fixes part of #82594.
8237
8238 2007-08-24  Mark Probst  <mark.probst@gmail.com>
8239
8240         * mini.c (mono_method_to_ir), declsec.c
8241         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
8242
8243 2007-08-22  Martin Baulig  <martin@ximian.com>
8244
8245         * debug-mini.h
8246         (MonoDebuggerThreadInfo): New typedef.
8247         (mono_debugger_thread_table): New global variable.
8248         (mono_debugger_thread_created): New public function.
8249         (mono_debugger_thread_cleanup): New public function.
8250
8251         * debug-debugger.h
8252         (MonoDebuggerInfo):
8253         - removed `get_current_thread' and `lookup_assembly'.
8254         - removed `data_table'.
8255         - added `thread_table'.
8256
8257         * mini.c
8258         (mono_thread_start_cb): Call mono_debugger_thread_created().
8259         (mono_thread_attach_cb): Likewise.
8260         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
8261         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
8262         initial domain.
8263
8264         * driver.c (mono_main): Move mono_debug_init() up, before calling
8265         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
8266
8267 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8268
8269         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
8270         together when passing several arguments of type double (gives a small
8271         speedup and saves a few bytes of generated code).
8272
8273 2007-08-20  Jb Evain  <jbevain@novell.com>
8274
8275         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
8276
8277 2007-08-20  Jb Evain  <jbevain@novell.com>
8278
8279         * mini.c (mono_method_to_ir): throw MethodAccessException
8280         and FieldAccessException instead of InvalidProgramException.
8281
8282 2007-08-20  Mark Probst  <mark.probst@gmail.com>
8283
8284         * mini.c: CoreCLR security checks.
8285
8286         * mini.h: Removed MonoSecurityMode (moved to
8287         metadata/security-manager.h) and mono_security_mode global var
8288         (replaced by set/get functions in security-manager.h).
8289
8290         * driver.c: Added "core-clr-test" security mode for testing.  Used
8291         set-function for setting security mode.
8292
8293 2007-08-17  Mark Probst  <mark.probst@gmail.com>
8294
8295         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
8296         the new jit_info_table.
8297
8298         * driver.c: Test code for the new jit_info_table (enabled by the
8299         define MONO_JIT_INFO_TABLE_TEST).
8300
8301 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
8302
8303         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
8304         detection of call <REG> instruction sequence. Fixes build on freebsd.
8305
8306 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
8307
8308         * mini-exceptions.c: Fix a warning.
8309
8310 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
8311
8312         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
8313         stack overflow handling code on amd64 too.
8314
8315         * mini-exceptions.c (mono_setup_altstack): Make this use 
8316         mono_thread_get_stack_bounds ().
8317
8318         * mini-x86.h: Disable sigaltstack on solaris x86.
8319
8320 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
8321
8322         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
8323
8324 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
8325
8326         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
8327
8328 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
8329
8330         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
8331
8332         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
8333
8334 2007-08-03  Neale Ferguson <neale@sinenomine.net>
8335
8336         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
8337         due to alignment.
8338
8339 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8340
8341         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
8342         to be emitted (bug #82281).
8343
8344 2007-08-01  Martin Baulig  <martin@ximian.com>
8345
8346         Merged the `debugger-dublin' branch.
8347
8348         * debug-debugger.h (MonoDebuggerInfo):
8349         Removed the `old_*' compatibility entries.
8350         Added `debugger_version' and `data_table'.
8351         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
8352         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
8353
8354         * debug-mini.c
8355         (MiniDebugMethodBreakpointInfo): Add `address_list'.
8356         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
8357         instead of a `gconstpointer'.
8358         (mono_debugger_insert_method_breakpoint): Return a
8359         `MonoDebugMethodAddressList *'.
8360
8361 2007-06-28  Martin Baulig  <martin@ximian.com>
8362
8363         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8364
8365 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
8366
8367         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
8368         __builtin_frame_address () since it is broken on older gcc versions.
8369
8370 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
8371
8372         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
8373         on the stack overflow handling and made the managed stack overflows
8374         catchable in most cases using soft guard pages.
8375         * exceptions-x86.c: added code to restore the protection in the soft
8376         guard pages at the end of exception handling.
8377
8378 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
8379
8380         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
8381
8382 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8383
8384         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
8385         exception handling.
8386
8387 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8388
8389         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
8390         signal handling support until it has been ported to the new mechanism.
8391         * mini.c: fixed stack overflow detection and use the new
8392         architecture code  to handle signals on the altstack.
8393
8394 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
8395
8396         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
8397         stack overflows on the alt stack.
8398
8399 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
8400
8401         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
8402         stack overflows on the alt stack.
8403
8404 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
8405
8406         * exceptions-ppc.c: cleanup preparing for altstack support.
8407
8408 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8409
8410         * exceptions-arm.c: cleanup preparing for altstack support.
8411
8412 2007-07-27  Mark Probst  <mark.probst@gmail.com>
8413
8414         * mini.c (print_jit_stats): Output hazard pointer stats.
8415
8416 2007-07-26  Mark Probst  <mark.probst@gmail.com>
8417
8418         * driver.c, mini.c: Replaced security mode flags with a single
8419         enum variable.
8420
8421 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8422
8423         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
8424
8425 2007-07-25  Mark Probst  <mark.probst@gmail.com>
8426
8427         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
8428         (which doesn't do anything yet) for activating Core CLR
8429         (Silverlight) security.
8430
8431 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
8432
8433         * mini-codegen.c: work around a possible gcc bug on arm.
8434
8435 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
8436
8437         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
8438         message for platforms that don't support AOT compilation.
8439
8440 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
8441
8442         * mini.h, mini.c, driver.c: temporary smcs hack.
8443
8444 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
8445
8446         * mini-arm.h, mini-arm.c: arm EABI fixes.
8447
8448 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
8449
8450         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
8451         case.
8452
8453         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
8454         trampolines taking a method argument.
8455
8456         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
8457
8458         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
8459         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
8460
8461         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
8462         JIT compilation throws an exception. Fixes #82050.
8463
8464 2007-07-19  Mark Probst  <mark.probst@gmail.com>
8465
8466         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
8467         with the MONO_EXCEPTION_ defines.
8468
8469 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
8470
8471         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
8472         #82117.
8473         
8474         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
8475         the cause of an assertion.
8476
8477 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
8478
8479         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
8480         removed.
8481
8482 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
8483
8484         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
8485         assert. Should fix #82103.
8486
8487 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
8488
8489         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
8490         here too. Fixes #82095.
8491
8492         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
8493         addresses.
8494
8495         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
8496
8497         * mini-amd64.h: Enable IMT for amd64.
8498         
8499         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
8500
8501 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
8502
8503         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
8504
8505 2007-07-12  Mark Probst  <mark.probst@gmail.com>
8506
8507         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
8508         as soon as check_linkdemand sets an exception_type.
8509
8510 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8511
8512         * mini-x86.c: fixed offsets for IMT call sequence.
8513         * mini-x86.h: enable IMT again.
8514
8515 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
8516
8517         * trace.c (mono_trace_enter_method): Decode MonoType too.
8518
8519         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
8520
8521         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
8522
8523         * mini-amd64.c: Add preliminary IMT implementation.
8524         
8525 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
8526
8527         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
8528         understand the new IMT-base interface invocation (thanks to
8529         Daniel Nauck for the report and the remote debugging session).
8530
8531 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
8532
8533         * mini-x86.c: size and speed optimizations for the IMT bsearch.
8534
8535 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
8536
8537         * Makefile.am (aotcheck): Make this actually use the AOTed code.
8538
8539 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
8540
8541         * mini-trampolines.c: implement AOT IMT support.
8542         * mini-x86.h: enable IMT support for wider testing.
8543
8544 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
8545
8546         * inssel.brg (emit_imt_argument): Add aot support here.
8547
8548         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
8549
8550 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
8551
8552         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
8553         of the IMT implementation, partially from massi, with my
8554         implementation of the bsearch sequence. Disabled by default until
8555         the AOT code is implemented.
8556
8557 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
8558
8559         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
8560
8561         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
8562
8563 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8564
8565         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
8566         arch-independent IMT JIT code from Massimiliano
8567         Mantione (massi@ximian.com) with small cleanups from me.
8568
8569 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8570
8571         * Makefile.am: fix svn invocation to get the svn revision to be
8572         independent of the local language (build fix).
8573
8574 2007-07-09  Mark Probst  <mark.probst@gmail.com>
8575
8576         * mini.c (inline_method): Reset cfg->exception_type if the
8577         inlining is aborted.  Fixes: 82049.
8578
8579 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
8580
8581         * mini.c: remove assert from exception handling code when exception_ptr
8582         is not set.
8583
8584 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
8585
8586         * mini.c (mono_codegen): Add an assert.
8587
8588         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
8589         enter and leave code.
8590         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
8591
8592 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8593
8594         * mini-ppc.c: fixed memory corruption for localloc(0)
8595         (bug #81852).
8596
8597 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
8598         
8599         * mini.c: Fix warnings.
8600
8601 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
8602
8603         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
8604         to emit better double->int conversions.
8605
8606 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8607
8608         * mini.c: the provided Min/Max optimizations are valid for unisgned
8609         ints.
8610
8611 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
8612
8613         * 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
8614
8615 2007-06-28  Miguel de Icaza  <miguel@novell.com>
8616
8617         * mini.c (mono_running_on_valgrind): Add support for reporting the
8618         method and  its boundaries to valgrind.
8619
8620 2007-06-28  Martin Baulig  <martin@ximian.com>
8621
8622         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8623
8624 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
8625
8626         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
8627
8628         * generic.2.cs: Add new test case.
8629
8630 2007-06-25  Martin Baulig  <martin@ximian.com>
8631
8632         Merged the `debugger-dublin' branch.
8633
8634         * debug-mini.c
8635         (mono_debugger_insert_method_breakpoint): New public method.
8636         (mono_debugger_remove_method_breakpoint): Likewise.
8637         (mono_debugger_check_breakpoints): New static method.
8638         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
8639
8640         * debug-debugger.h (MonoDebuggerInfo):
8641         Renamed (to keep backward compatibility in the vtable):
8642         `insert_breakpoint' -> `old_insert_breakpoint'.
8643         `remove_breakpoint' -> `old_remove_breakpoint'.
8644         `create_string' -> `old_create_string'.
8645         `lookup_class' -> `old_lookup_class'.
8646         `lookup_type' -> removed; changed into a dummy field.
8647         `lookup_assembly' -> `old_lookup_assembly'.
8648         Added (same functionality, but different signature):
8649         `create_string', `lookup_class', `lookup_assembly'
8650         Added new:
8651         `get_method_addr_or_bpt', `remove_method_breakpoint',
8652         `runtime_class_init'.
8653
8654         * debug-debugger.c: Merged the `debugger-dublin' branch.
8655
8656 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
8657
8658         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
8659         well.
8660         (peephole_pass): Likewise.
8661
8662 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
8663
8664         * driver.c: hopefully make setaffinity work also for ancient
8665         versions of linux.
8666
8667 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
8668
8669         * driver.c : win32 build fix.
8670
8671 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
8672
8673         * driver.c: check for the MONO_NO_SMP env var and bind to a single
8674         processor if it is set.
8675
8676 2007-06-21  Martin Baulig  <martin@ximian.com>
8677
8678         * debug-mini.h: New file.
8679
8680         * debug-mini.c
8681         (mono_debugger_insert_breakpoint_full): Moved here from
8682         ../metadata/mono-debug-debugger.c.
8683         (mono_debugger_remove_breakpoint): Likewise.
8684         (mono_debugger_breakpoint_callback): Likewise.
8685
8686 2007-06-15  Raja R Harinath  <rharinath@novell.com>
8687
8688         * jit-icalls.c (mono_helper_compile_generic_method): Update to
8689         changes in MonoGenericClass.
8690
8691 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
8692
8693         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
8694
8695 2007-06-14  Raja R Harinath  <rharinath@novell.com>
8696
8697         * jit-icalls.c (mono_helper_compile_generic_method): Update to
8698         removal of MonoGenericMethod.
8699
8700 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8701
8702         * mini-exceptions.c: hooks for the exception events profiling API.
8703
8704 2007-06-14  Randolph Chung  <tausq@debian.org>
8705
8706         * Makefile.ma: Add hppa target.
8707         * mini-arch.h: Include mini-hppa.h
8708         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
8709         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
8710         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8711
8712 2007-06-14  Randolph Chung  <tausq@debian.org>
8713
8714         * inssel.brg: Add rules for "chained" compare-branch operations so that
8715         a single compare op can affect multiple branches.  Adjust cost for
8716         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
8717         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
8718         cost for some rules so that they can more easily be overridden by
8719         per-arch rules (with fixes from lupus).
8720         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8721
8722 2007-06-13  Randolph Chung  <tausq@debian.org>
8723
8724         * mini-ops.h: Reorder branch ops so that they match the order of the
8725         corresponding CEE_* ops.  The code expects them this way.
8726         Add new ops for HPPA target.
8727         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8728
8729 2007-06-13  Randolph Chung  <tausq@debian.org>
8730
8731         * mini-exceptions.c: Handle cases where the stack grows towards
8732         larger addresses.
8733         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8734
8735 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8736
8737         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
8738         counter.
8739         * driver.c: explain where a non-matching corlib is found.
8740
8741 2007-06-13  Mark Probst  <mark.probst@gmail.com>
8742
8743         * mini.c (print_jit_stats): Output dynamic code allocation stats.
8744
8745 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
8746
8747         * mini-exceptions.c: Generate a method profile leave event during
8748         an exception to ensure that the profiler gets notified.
8749
8750 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
8751
8752         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
8753         branch.
8754
8755         * cpu-amd64.md: Add long_and/or/xor opcodes.
8756
8757 2007-06-06  Wade Berrier  <wberrier@novell.com>
8758
8759         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
8760         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
8761         length of instruction shr_imm (expected 8, got 10)
8762
8763 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
8764
8765         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
8766
8767 2007-06-06  Mark Probst  <mark.probst@gmail.com>
8768
8769         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8770         MonoInternalHashTable again (fixed bug in the internal hash table
8771         code).
8772
8773 2007-06-06  Mark Probst  <mark.probst@gmail.com>
8774
8775         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
8776         Have to figure out what makes it crash the SWF regression.
8777
8778 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
8779
8780         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
8781
8782 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8783
8784         * mini.c: optimize out the type check when storing null in a
8785         reference array.
8786
8787 2007-06-04  Mark Probst  <mark.probst@gmail.com>
8788
8789         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8790         MonoInternalHashTable.
8791
8792 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
8793
8794         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
8795         signed integer methods.
8796
8797 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
8798
8799         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
8800         permanently since the current approach doesn't work.
8801
8802 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
8803
8804         * inssel.brg (stmt): Only call delegate->invoke_impl if 
8805         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
8806
8807 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
8808
8809         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
8810         the sreg2==rdx case.
8811         
8812         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
8813         account if it contains a rex prefix.
8814         (peephole_pass): Handle OP_FMOVE as well.
8815
8816 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
8817
8818         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
8819         as it causes regressions.
8820
8821 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
8822
8823         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
8824         static case as well.
8825
8826         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
8827
8828         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8829         (mono_arch_get_this_arg_from_call): Ditto.
8830
8831         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
8832
8833         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
8834         invoke_impl field.
8835
8836         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8837         (mono_arch_get_this_arg_from_call): Ditto.
8838
8839         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
8840         
8841         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
8842         try to create optimized invoke code and use that for further invocations. 
8843         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
8844
8845         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
8846
8847 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
8848
8849         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
8850         sealed classes or methods.
8851         *devirtualization.cs: tests for the new optimization
8852
8853 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
8854
8855         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
8856         by the update_volatile () function.
8857
8858 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
8859
8860         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
8861         require it.
8862
8863         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
8864
8865 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
8866
8867         * mini.c: Add configure checks for header files.
8868         * mini-x86.c: Add configure checks for header files.
8869         * trace.c: Add configure checks for header files.
8870         * aot-runtime.c: Add configure checks for header files.
8871         * aot-compiler.c: Add configure checks for header files.
8872         * driver.c: Add configure checks for header files.
8873         * mini-codegen.c: Add configure checks for header files.
8874         
8875         Code is contributed under MIT/X11 license.
8876
8877 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
8878
8879         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
8880         icompare_imm -128 + op_iclt. Fixes #81703.
8881
8882 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
8883
8884         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
8885
8886 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
8887
8888         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
8889         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
8890         so that all isinst checks now use "interface_bitmap".
8891
8892 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
8893
8894         * cpu-amd64.md (jmp): Fix a warning.
8895
8896         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
8897
8898         * basic.cs: Add new regression test.
8899
8900         * basic.cs: Remove test which is now in basic-long.cs.
8901
8902         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
8903
8904         * basic-long.cs: Add new test.
8905         
8906 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
8907
8908         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
8909
8910 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
8911
8912         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
8913
8914         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
8915         places.
8916         
8917         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
8918         throwing code a bit.
8919
8920         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
8921         the exception throwing code a bit.
8922
8923         * mini-x86.c (get_call_info): Allocate result from a mempool.
8924
8925 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
8926
8927         * aot-compiler.c (find_typespec_for_class): Fix the assert.
8928
8929         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
8930
8931         * mini.h (MonoCompile): Add 'token_info_hash' field.
8932
8933         * mini.c: Save token->method associations during compilation so the AOT 
8934         compiler can use it.
8935         
8936         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
8937         which reference generic classes and methods.
8938
8939 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
8940
8941         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
8942
8943         * aot-compiler.c (compile_method): Fix a typo in a comment.
8944
8945         * aot-runtime.c (decode_cached_class_info): Skip generic types.
8946
8947         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
8948         everything generic.
8949
8950         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
8951
8952 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
8953
8954         * mini.h (MonoCompile): Add 'args' field.
8955
8956         * mini.c (mono_compile_create_vars): Store variables representing the arguments
8957         into cfg->args.
8958
8959         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
8960
8961 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
8962
8963         * mini.c (mono_compile_get_interface_var): Remove this unused function.
8964
8965         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
8966
8967         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
8968         opcodes for some opcodes.
8969
8970         * mini.h *.brg *.c: Use the new opcodes.
8971
8972 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
8973
8974         * mini.h: Bumped aot revision.
8975
8976         * inssel.brg: modified code generation of type checks for interfaces
8977         to use the new "MonoClass.interface_bitmap" instead of the old
8978         "MonoClass.interface_offsets".
8979
8980 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
8981
8982         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
8983
8984 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
8985
8986         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
8987         64 bit platforms.
8988
8989 2007-04-27  Neale Ferguson <neale@sinenomine.net>
8990
8991         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
8992
8993 2007-04-27  Wade Berrier  <wberrier@novell.com>
8994
8995         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
8996         mini.h) to fix build.
8997
8998 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
8999
9000         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
9001         
9002         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
9003         causes the corlib unit tests to fail.
9004
9005 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
9006
9007         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
9008
9009         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
9010
9011         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
9012         opcodes to the comparison relations.
9013
9014         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
9015         opcodes to their types.
9016         
9017         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
9018
9019         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
9020         it in cfg->arch.cinfo.
9021
9022         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
9023
9024         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
9025         cfg->cil_offset_to_bb.
9026
9027 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
9028
9029         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
9030         created becase of initlocals.
9031
9032 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
9033
9034         * mini-alpha.c cpu-alpha.md: More alpha port work from 
9035         Sergey Tikhonov <tsv@solvo.ru>.
9036
9037 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
9038
9039         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
9040
9041 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
9042
9043         * cpu-s390.md (break): Correct the length of break instruction.
9044
9045 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
9046
9047         * mini.c: fix a couple of soft-float issues and comments.
9048
9049 2007-04-15  Miguel de Icaza  <miguel@novell.com>
9050
9051         * trace.c (is_filenamechar): - is also a filename char.
9052
9053 2007-04-15  Neale Ferguson <neale@sinenomine.net>
9054
9055         * mini-s390.c: Correct checking for enum type in return value processing.
9056
9057 2007-04-14  Raja R Harinath  <rharinath@novell.com>
9058
9059         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
9060         (version.h): Makefile is in the build directory.
9061
9062 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
9063
9064         * mini-amd64.h: fix for assertion failure on Solaris/amd64
9065
9066 2007-04-11  Martin Baulig  <martin@ximian.com>
9067
9068         * mini.c (can_access_member): Fix handling of generic classes;
9069         fixes #81259.
9070
9071 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
9072
9073         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
9074
9075 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
9076
9077         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
9078
9079 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9080
9081         * mini-codegen.c: make sure the right spill amount is
9082         used for fp or integer registers (fixes the float_sub_spill() on ppc).
9083
9084 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
9085
9086         * mini-ppc.c: fixes for the fp_branch_nan test.
9087
9088 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
9089
9090         * basic.cs: Comment out new test which still fails on ia64.
9091
9092 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
9093
9094         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
9095
9096 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9097
9098         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
9099
9100 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
9101
9102         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
9103         on 64 bit machines. Fixes part of #80738.
9104
9105         * basic.cs: Add regression test.
9106
9107 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
9108
9109         * inssel.brg basic.cs: Revert previous change to fix build.
9110
9111         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
9112         platforms.
9113         
9114         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
9115
9116         * basic.cs: Add new regression test.
9117
9118 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
9119
9120         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
9121         many arguments.
9122
9123 2007-03-16  Neale Ferguson <neale@sinenomine.net>
9124
9125         * cpu-s390x.md: Correct length of break instruction.
9126
9127 2007-03-16  Neale Ferguson <neale@sinenomine.net>
9128
9129         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
9130         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
9131
9132 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
9133
9134         * *.c: Begin WIN64 port.
9135         * mini.c:  Use correct register in profiler.
9136         * mini-amd64.c: No inline assembly on Win64.
9137         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
9138         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
9139         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
9140         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
9141         mono_arch_ip_from_context for Win64.
9142         
9143         Contributed under MIT/X11 license.
9144
9145 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
9146
9147         * exceptions-amd64.c (seh_handler): Ditto.
9148
9149         * exceptions-x86.c (seh_handler): Fix a memory leak.
9150
9151 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
9152
9153         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
9154         mini-s390x.c: fixed peephole optimizations to deal
9155         correctly with 1 and 2 byte reload avoidance.
9156
9157 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
9158
9159         * cpu-s390.md, cpu-s390x.md: update localloc length.
9160
9161 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9162
9163         * cpu-g4.md: added missing descriptions.
9164
9165 2007-03-14  Miguel de Icaza  <miguel@novell.com>
9166
9167         *  Makefile.am: Add support so the tail tests are not executed on
9168         PowerPC as that is a known limitation of the PowerPC port.
9169
9170 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
9171
9172         * runmdesc.bat:  Move to msvc directory.
9173         
9174 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
9175
9176         * runmdesc.bat:  Run executable that was produced by the current
9177         target and sent via an argument.
9178         
9179 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
9180
9181         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
9182         #81102.
9183
9184         * generics.2.cs: Add regression test.
9185
9186 2007-03-09  Wade berrier  <wberrier@novell.com>
9187
9188         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
9189
9190 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
9191
9192         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
9193         AOT code depends on this.
9194
9195 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9196
9197         * mini.c: more precise tracking of types in the eval stack
9198         (part of fix for bug #81044).
9199
9200 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
9201
9202         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
9203
9204         * aot-compiler.c (encode_patch): Remove an obsolete comment.
9205
9206 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
9207
9208         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
9209
9210         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
9211
9212 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
9213
9214         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
9215         a pointer on 64 bit systems. Fixes #80190.
9216
9217         * iltests.il: Add new regression test.
9218
9219 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9220
9221         * mini.c: inline a constant for Environment.IsRunningOnWindows.
9222
9223 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
9224
9225         * trace.c: Remove an erroneous alignemnt check when tracing.
9226           Fixes --trace on OSX86.
9227
9228 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9229
9230         * mini-$(arch).h: initialize SP in context for all the archs.
9231
9232 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
9233
9234         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
9235         regressions in the thread tests.
9236
9237 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
9238
9239         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
9240         - fixed implementation of LOCALLOC opcode
9241         - implemented non-un compare for floats
9242         - code cleanup
9243         - implementation of FDIV and CKFINITE opcodes
9244         - fixes for latest mono updates
9245         - additional arch opcodes
9246
9247 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9248
9249         * Makefile.am: simplify and merge rules for cross-compilation.
9250
9251 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
9252
9253         * local-propagation.c: Actually *apply* the fix for bug 80591...
9254
9255 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9256
9257         * mini-exceptions.c: backuot part of the last change
9258         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
9259
9260 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
9261         * inssel.brg: Fix bug 59286.
9262
9263
9264 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
9265
9266         * mini-exceptions.c: patch from Zoltan to correctly check for
9267         stack boundaries (using the stack register, not the frame register),
9268         fixes bugs #80724, #79717.
9269
9270 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
9271
9272         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
9273         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
9274
9275         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
9276         presence of frame pointer elimination.
9277
9278 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
9279         
9280         * mini-x86.h: NetBSD UCONTEX_REG defines.
9281
9282 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
9283
9284         * inssel-amd64.brg: Fix amd64 build.
9285
9286 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
9287
9288         * mini.h: remove extern to workaround what looks likes gcc bug 26905
9289         on amd64.
9290
9291 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
9292
9293         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
9294         ends.
9295
9296         * mini-<ARCH>.c: Use mono_is_regsize_var ().
9297
9298 2007-01-30 Mark Mason <mason@broadcom.com>
9299
9300            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
9301            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
9302            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
9303            beginning support for CEE_JMP [not quite working yet]
9304            * tramp-mips.c: LMF handling now works
9305         
9306 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
9307
9308         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
9309
9310         * mini.h (NULLIFY_INS): New macro.
9311
9312 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9313
9314         * mini.c: statistical profiler fix for windows, patch
9315         from Tor Lillqvist (tml@novell.com).
9316
9317 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
9318         * local-propagation.c: Fix bug 80591.
9319
9320 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9321
9322         * Makefile.am: put back the --export-dynamic option as with
9323         the previous gmodule flags (thanks to Robert Jordan).
9324
9325 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
9326
9327         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
9328
9329         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
9330         simplify and speed up the local register allocator. Also rename some fields
9331         like iassign->vassign.
9332         
9333         * regalloc.c: Remove some functions which are no longer used since their
9334         inlined version is in mini-codegen.c.
9335         
9336         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
9337
9338         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
9339
9340 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
9341
9342         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
9343         narrowing. Fixes #80622.
9344
9345         * iltests.il: Add new regresssion test. 
9346
9347 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9348
9349         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
9350         debug-debugger.c, debug-debugger.h: warning fixes.
9351         * driver.c: updated copyright year and made it fit in one line.
9352
9353 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
9354
9355         * aot-runtime.c: updated to use mono-dl instead of gmodule.
9356
9357 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
9358
9359         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
9360
9361         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
9362
9363         * iltests.il: Add new test for bug #80507.
9364
9365 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9366
9367         * mini-arm.h: use soft-float also on vfp for now.
9368
9369 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9370
9371         * mini.c: fix some more soft-float issues.
9372
9373 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
9374
9375         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
9376
9377 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
9378         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
9379         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
9380         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
9381
9382 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
9383
9384         * mini-arm.c: typo fix.
9385
9386 2007-01-23  Neale Ferguson <neale@sinenomine.net>
9387
9388         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
9389
9390 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
9391
9392         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
9393         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
9394
9395         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
9396
9397         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
9398
9399         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
9400         
9401         * inssel.brg: Fix a warning.
9402
9403         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
9404
9405         * abcremoval.c ssa.c ssapre.c: Update after this change.
9406         
9407         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
9408
9409         * dominators.c (df_set): Use mono_bitset_union_fast.    
9410
9411 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9412
9413         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
9414         mini-codegen.c: reduce relocations and memory usage for the cpu
9415         description.
9416
9417 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
9418
9419         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
9420
9421         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
9422         to reduce their size.
9423
9424 2007-01-19 Mark Mason <mason@broadcom.com>
9425
9426         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
9427         * mini-mips.c: more configuration macros, support long conditional branches, additional
9428         asserts, fix epilog instrumentation.
9429         * mini-mips.h: use standard stack walk
9430         * cpu-mips.md: increase size of div, rem and conditional branches
9431         
9432 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
9433
9434         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
9435         to cpu spec data.
9436
9437 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
9438
9439         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
9440         (compile_method): Ditto.
9441
9442         * aot-runtime.c (decode_klass_info): Ditto.
9443
9444         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
9445         needed by the code generated by inssel.brg. Also fix a warning.
9446
9447 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
9448
9449         * mini.c: deal with enums that become genericinsts by
9450         being nested in a generic class (bug #79956).
9451
9452 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9453
9454         * mini.c: match the generic definition to check for
9455         private access with generic types (bug #78431).
9456
9457 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9458
9459         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
9460         to make life easier for people cross-compiling that insist on not
9461         using scratchbox.
9462
9463 2007-01-17 Mark Mason <mason@broadcom.com>
9464
9465         * inssel-long.brg: patch to deal with mips missing flags
9466         * inssel-long32-mips.brg: implement overflow checks
9467         * insset-mips.brg: implement overflow checks
9468         * mini-mips.h: implement conditional exception handling
9469         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
9470           Remove unused code, minor cleanups.
9471         * exceptions-mips.c: minor cleanups
9472         * mini-ops.h: add mips conditional exception ops
9473         * cpu-mips.md: add mips conditional exception ops
9474
9475         
9476 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9477
9478         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
9479         to deal with mips missing of flags.
9480
9481 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9482
9483         * exceptions-ppc.c: execute fault handlers.
9484
9485 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
9486
9487         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
9488
9489 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9490
9491         * mini.c: handle also floating point values in initialize_array.
9492
9493 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9494
9495         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
9496         array initialization and make it conditional on the intrins option.
9497
9498 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9499
9500         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
9501         relocations and put the patch info names close to the enum definition.
9502
9503 2007-01-15 Mark Mason <mason@broadcom.com>
9504
9505         * basic.cs, exceptions.cs: break up large tests to increase debugability.
9506
9507 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
9508
9509         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
9510
9511 2007-01-12  Raja R Harinath  <rharinath@novell.com>
9512
9513         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
9514
9515 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
9516
9517         * Makefile.am: distribute the mips sources.
9518
9519 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9520
9521         * mini-codegen.h: handle bug #80489 here, by excluding ecx
9522         directly.
9523
9524 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
9525
9526         * cpu-x86.md: back out for now as this triggers other regressions.
9527
9528 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9529
9530         * cpu-x86.md: force src1 and dest regpair for long shift instructions
9531         to eax:edx, so ecx can't get allocated to them (bug #80489).
9532
9533 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
9534
9535         * mini.c, mini-exceptions.c: enabled running fault handlers
9536         (bug #80469).
9537
9538 2007-01-03  Miguel de Icaza  <miguel@novell.com>
9539
9540         * driver.c: If nothing fail, do not use the string "failed",
9541         because it makes it very annoying to view test result logs on the
9542         web. 
9543
9544 2006-12-30  Miguel de Icaza  <miguel@novell.com>
9545
9546         * debug-debugger.c (mono_debugger_main): Rename "main" to
9547         "main_method" to prevent a warning.
9548
9549         Remove a warning for unused field.
9550
9551 2006-12-28  Martin Baulig  <martin@ximian.com>
9552
9553         * debug-debugger.c
9554         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
9555
9556 2006-12-22  Martin Baulig  <martin@ximian.com>
9557
9558         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
9559         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
9560         seperate `.mdb_debug_info' section, so we can access it from the
9561         debugger even if the binary is stripped.
9562
9563         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
9564         from the `.mdb_debug_info' here to prevent the linker from
9565         removing that section.
9566
9567         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
9568         mdb-debug-info64.s.
9569
9570 2006-12-19  Robert Jordan  <robertj@gmx.net>
9571
9572         * mini-x86: enable the code to return small structures in
9573         registers for FreeBSD as well. Fixes bug #80278.
9574         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
9575
9576 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9577
9578         * mini-x86.c: align the stack when calling the profiler
9579         function instrumenting the prolog (on OSX).
9580
9581 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
9582
9583         * mini.c: emit a break opcode where Debugger.Break () is called.
9584
9585 2006-12-13  Miguel de Icaza  <miguel@novell.com>
9586
9587         * mini.c (mono_method_to_ir): Provide useful information on this
9588         assert, to prevent others from debugging like I did.
9589
9590 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9591
9592         * mini.c: enable code which was incorrectly commented
9593         (bug #80235).
9594
9595 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9596
9597         * mini-x86.c: enable on OSX, too, the code to return small
9598         structures in registers.
9599
9600 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9601
9602         * mini-x86.c: remove the use of the dynamic code manager here, too.
9603
9604 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9605
9606         * mini.h, debug-debugger.c, tramp-*.c: fixed 
9607         mono_debugger_create_notification_function() to use
9608         mono_global_codeman_reserve () instead of a dynamic code manager.
9609
9610 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
9611
9612         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
9613         ves_array_element_address() jit icall and use a generated
9614         managed method instead (which is about 4 times faster for a rank 3
9615         array access).
9616
9617 2006-11-29  Mark Mason  <mason@broadcom.com>
9618
9619         * basic-calls.cs: additional tests for passing
9620         structures as function arguments.
9621
9622 2006-11-29  Mark Mason  <mason@broadcom.com>
9623
9624         * mini-mips.h: disable custom exception handling
9625         * mini-mips.c: throw/rethrow should use jalr to call
9626         exception stubs.  Fixed bug with passing structures
9627         by value. More support for tracing floating point
9628         functions.
9629
9630 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9631
9632         * mini.c: fixed typo in the soft-float ldind.r4 handling
9633         (bug #80086).
9634
9635 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9636
9637         * mini.c, mini.h, driver.c: added --runtime command line
9638         option to select a different runtime than the autodetected one.
9639         * jit.h: added API for embedders to initialize with a specific
9640         runtime version.
9641
9642 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9643
9644         * mini.c: handle also boxing of r4 values (bug #80024).
9645
9646 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9647
9648         * mini-ppc.c: force indirect calls until we reserve
9649         enough address space for all the generated code.
9650
9651 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
9652
9653         * exceptions-arm.c: workaround bugs in the libc definition
9654         of struct ucontext.
9655
9656 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9657
9658         * inssel.brg: fixes from me and Mark Mason.
9659
9660 2006-11-23  Dick Porter  <dick@ximian.com>
9661
9662         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
9663         semaphore display now we've fixed the initial value
9664
9665 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9666
9667         * inssel.brg: partially revert the last change to fix the build.
9668
9669 2006-11-21  Mark Mason  <mason@broadcom.com>
9670
9671         * inssel.brg: Add and use compare-and-branch macros to support
9672         architectures that do not have condition code registers (ie. MIPS).
9673         * *-mips.{c,brg,md}: Fix copyright statements
9674
9675 2006-11-20  Mark Mason  <mason@broadcom.com>
9676
9677         * Makefile.am: remove mini-codegen.c from list of MIPS sources
9678         * mini.c: Allow GET_CONTEXT to be specified by the arch port
9679         * mini.h: Added declaration for mono_print_ins()
9680         * mini-codegen.c: added ins_spec initializer for MIPS
9681         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
9682         vreg to be virtual and hreg to be non-virtual.
9683         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
9684         is not yet working/implemented correctly.
9685         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
9686         non-static, fixup calls to print_ins() from other parts in the file.
9687
9688 2006-11-20  Mark Mason  <mason@broadcom.com>
9689
9690         * basic-calls.cs: added tests for passing structures as arguments
9691         to calls.
9692
9693 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9694
9695         * inssel-long32.brg: optimize signed division by power of two.
9696
9697 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
9698
9699         * mini-arm.c: added support for interworking with thumb code
9700         (mono must be still be built using the ARM instruction encoding).
9701
9702 2006-11-19  Miguel de Icaza  <miguel@novell.com>
9703
9704         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
9705         verifier has different rules for it.   Fixes a few verifier issues
9706         in the test suite.
9707
9708         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
9709         at the end, so people know what happened.
9710
9711 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9712
9713         * brach-opts.c: in optimize_exception_target() make sure we
9714         are in a catch clause (fixes bug #79871).
9715
9716 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9717
9718         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
9719         more soft-float support fixes.
9720
9721 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
9722
9723         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
9724         that are passed half on the stack and half in registers.
9725
9726 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
9727
9728         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
9729         more mips integration work from Mark E Mason 
9730         <mark.e.mason@broadcom.com>.
9731
9732 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9733
9734         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
9735         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
9736         tramp-mips.c: added sources for the mips port, not
9737         integrated in the build yet. Contributed by
9738         Mark E Mason <mark.e.mason@broadcom.com>.
9739
9740 2006-11-14  Neale Ferguson <neale@sinenomine.net>
9741
9742         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
9743
9744 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9745
9746         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
9747         put the soft-float rules in its own file since it seems to
9748         break s390 compilation.
9749
9750 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9751
9752         * mini-arm.c: fixed wrnings.
9753
9754 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
9755
9756         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
9757         inssel-arm.brg: ARM support for soft-float.
9758
9759 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9760
9761         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
9762         loads and stores of 32 bit fp values.
9763
9764 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
9765
9766         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
9767
9768         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
9769         works. Fixes #79852 and #79463.
9770
9771 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9772
9773         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
9774         more soft-float support WIP and fixes.
9775
9776 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
9777
9778         * mini-arm.c: some VFP updates.
9779
9780 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9781
9782         * mini-exceptions.c: 0 is a valid local var offset in some
9783         architectures, don't assert (bug #78508).
9784
9785 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
9786
9787         * exceptions-arm.c: fixed off by one error in stack walk code.
9788
9789 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
9790
9791         * mini.h, mini.c: more precise tracking of type load exceptions.
9792
9793 2006-11-03  Robert Jordan  <robertj@gmx.net>
9794
9795         * Makefile.am: [WIN32] Add monow.exe target.
9796         * driver.c: [WIN32] Don't detach the console when debugging.
9797         Fixes bug #79797.
9798         
9799 2006-10-30  Miguel de Icaza  <miguel@novell.com>
9800
9801         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
9802
9803 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
9804
9805         * aot-compiler.c (emit_method_info): Add a case missed earlier.
9806
9807         * driver.c (mini_regression): Fix --regression with AOT.
9808
9809         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
9810
9811 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
9812
9813         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
9814
9815         * mini-sparc.h: Don't use sigaction on sparc/linux.
9816
9817         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
9818
9819         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
9820
9821         * mini-exceptions.c: Add proper include files for getpid ().
9822
9823 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
9824
9825         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
9826         address instead of a MonoJitInfo* to avoid decoding the exception info for the
9827         method.
9828
9829         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
9830         name cache to reduce its size.
9831
9832         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
9833
9834 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
9835
9836         * mini-x86.c: Save/restore the current LMF structure more efficiently using
9837         the mono_lmf TLS variable.
9838
9839         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
9840         trampoline lmf frames.  
9841
9842         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
9843
9844 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
9845
9846         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
9847         the mono_lmf TLS variable.
9848
9849         * mini-exceptions.c: Access the LMF structure through accessors.
9850
9851         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
9852         variable instead of in jit_tls->lmf.
9853
9854         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
9855         
9856         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
9857         trampoline lmf frames.
9858
9859         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
9860
9861 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
9862
9863        * mini.c trace.c mini-x86.c: Revert these too.
9864         
9865        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
9866        signature change.
9867
9868 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
9869
9870         * genmdesc.c: removed now dead code.
9871
9872 2006-10-09  Robert Jordan <robertj@gmx.net>
9873
9874         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
9875
9876 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
9877
9878         * mini.h: do not leave gaps in the opcode values.
9879
9880 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
9881
9882         * jit-icalls.h: flag functions as internal here, too.
9883
9884 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
9885
9886         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
9887         functions with the internal attribute.
9888
9889 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
9890
9891         * aot-compiler.c: fclose the file descriptor in the profile read loop.
9892
9893 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
9894
9895         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
9896         for soft-float.
9897
9898 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
9899
9900         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
9901         tail calls as on other platforms.
9902
9903         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
9904
9905         * iltests.il: Add a few tailcall tests.
9906
9907 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9908
9909         * driver.c: fix loop for old compilers (bug #79521).
9910
9911 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
9912
9913         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
9914
9915         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
9916
9917         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
9918         metadata without any code.
9919
9920         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
9921         more precise debugging information using gdb.
9922
9923 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
9924
9925         * inssel-ia64.brg: Make the helper methods static.
9926
9927 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9928
9929         * inssel-x86.brg: make the helper methods static.
9930
9931 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
9932
9933         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
9934
9935 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9936
9937         * mini.c: updates for monoburg changes.
9938         * inssel.brg: make a few helper functions static as they should.
9939
9940 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
9941
9942         * Makefile.am: Move mini-codegen.c to common_sources.
9943
9944 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9945
9946         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
9947         instructions.
9948         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
9949         mini-ppc.h: port to use the common local register allocator.
9950
9951 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
9952
9953         * mini.h: Remove the comment too then.
9954
9955 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
9956
9957         * mini.h: put back backend.data which is to be used shortly and
9958         doesn't increase the size of MonoInst. If any 64 bit arch aligned
9959         pointers on 4 byte boundaries it'd have much bigger issues running
9960         and you can ifdef it out anyway.
9961
9962 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
9963
9964         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
9965         MonoInst size by 4 bytes on 64 bit machines.
9966
9967 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
9968
9969         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
9970         replacement with more meaningful field names. Arch maintainers, please
9971         check the assigned names are good enough for your arch.
9972
9973 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
9974
9975         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
9976         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
9977
9978 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
9979
9980         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
9981         relocations and memory requirements, put the optimization flags
9982         definitions in their own file.
9983
9984 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
9985
9986         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
9987
9988         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
9989
9990 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
9991
9992         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
9993
9994 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
9995
9996         * inssel.brg: use the correct function to get the size of an item
9997         in an array, given an element class.
9998         * aot-compiler.c: do not access class->class_size directly.
9999
10000 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
10001
10002         * mini.h, debug-mini.c: added a debugging function to print
10003         info about local variables and arguments in a jitted method.
10004
10005 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
10006
10007         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
10008
10009         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
10010
10011 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
10012
10013         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
10014         inner and outer loops when passing vtypes.
10015
10016 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
10017
10018         * mini-ppc.c: take into account the cpu errata for cache flushing
10019         which caused some random errors (bug #79381).
10020
10021 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
10022
10023         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
10024         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
10025
10026 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
10027
10028         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
10029         loaded.
10030
10031         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
10032         freebsd ports tree.
10033
10034         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
10035         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
10036
10037         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
10038         displacement.
10039
10040 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
10041
10042         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
10043
10044 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
10045
10046         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
10047         macro does not have to be changed during debugging.
10048
10049         * 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>.
10050
10051         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
10052
10053         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
10054         
10055         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
10056         MONO_ARCH_NO_EMULATE_MUL is defined.
10057
10058         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
10059
10060         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
10061
10062         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
10063
10064         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
10065         
10066 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
10067
10068         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
10069         stuff to mini-exceptions.c where it is used.
10070
10071         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
10072         setup code, the real one is in mini-exceptions.c.
10073
10074         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
10075         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
10076         some changes from the freebsd ports tree.
10077
10078         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
10079         constants.
10080         
10081         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
10082
10083 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
10084
10085         * mini.c: on Linux, check for /proc to be mounted
10086         (bug# 79351, novell bug#201204).
10087
10088 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
10089
10090         * mini.c: handle cases where pthread_attr_getstack() behaves
10091         incorrectly (bug #78096).
10092
10093 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
10094
10095         * mini-arm.c: support larger stack frames (bug #79272).
10096
10097 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
10098
10099         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
10100
10101         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
10102         tokens.
10103
10104         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
10105         mono_class_from_name () to find a class from its name.
10106
10107         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
10108
10109 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
10110
10111         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
10112
10113 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
10114
10115         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
10116
10117 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
10118
10119         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
10120         callinfo->trampoline.
10121
10122         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
10123         fixes #79271.
10124         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
10125         future.
10126
10127 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
10128
10129         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
10130
10131 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
10132
10133         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
10134         stats.method_trampolines, it is already done by the generic trampoline code.
10135
10136         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
10137         
10138 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
10139
10140         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
10141
10142         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
10143
10144         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
10145
10146         * mini.c (print_jit_stats): Print mscorlib mempool size too.
10147         
10148         * mini.c (print_jit_stats): Print new stats.
10149
10150         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
10151
10152 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
10153
10154         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
10155         Address on two dimensional arrays. Fixes #78729.
10156
10157         * mini.h (MonoCompile): Add a 'skip_visibility' field.
10158
10159         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
10160         a method.
10161
10162         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
10163
10164         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
10165         #79130.
10166         
10167         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
10168         a race condition.
10169         (mini_get_ldelema_ins): Ditto.
10170
10171 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
10172
10173         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
10174         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
10175         Fixes #79213.
10176
10177 2006-08-29 Neale Ferguson <neale@sinenomine.net>
10178
10179         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
10180         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
10181
10182         * exceptions-s390x.c: Cosmetic change.
10183
10184         * tramp-s390.c: Fix warning.
10185
10186         * cpu-s390.md: Correct length of mul_imm.
10187
10188 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
10189
10190         * aot-compiler.c: added binary writer with ELF backend
10191         implementation (only on Linux/x86 for now).
10192
10193 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
10194
10195         * Makefile.am: Don't run net 2.0 AOT tests.
10196
10197         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
10198         (mono_compile_assembly): Skip net 2.0 assemblies as well.
10199
10200         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
10201
10202 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10203
10204         * aot-compiler.c: simplified and refactored the asm-writing code
10205         to allow different backends.
10206
10207 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
10208
10209         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
10210
10211         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
10212         little. Share patches of type TYPE_FROM_HANDLE as well.
10213
10214         * mini.c (mono_patch_info_equal): New helper function.
10215         (mono_patch_info_hash): Ditto.
10216
10217         * aot-compiler.c (emit_method_code): Fix s390 build.
10218
10219         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
10220         is not handled because it is stored as a flag and not as a type ctor. Fixes
10221         #79016.
10222
10223 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
10224
10225         * aot-compiler.c: Fix computation of GOT slot statistics.
10226         
10227         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
10228         Also remove support for not PIC AOT.
10229
10230         * mini.h: Bump AOT file format version.
10231
10232         * objects.cs: Add a test for #78990.
10233
10234         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
10235         (peter.dettman@iinet.net.au). Fixes #79087.
10236
10237         * basic-long.cs: Add a test for the above.
10238
10239 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
10240
10241         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
10242         
10243         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
10244         code somewhat.
10245
10246 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
10247
10248         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
10249         exceptions.
10250
10251 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
10252
10253         * mini.c: Don't verify COM proxy invoke calls
10254         
10255
10256 2006-08-10  Dick Porter  <dick@ximian.com>
10257
10258         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
10259         which process is holding semaphores locked.
10260
10261 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
10262
10263         * mini-ia64.c mini-amd64.c: Fix #79027.
10264
10265         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
10266
10267         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
10268
10269         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
10270         implicit arguments in a vararg call. Fixes #79027.
10271
10272 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
10273
10274         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
10275         (mono_get_array_new_va_signature): Ditto.
10276
10277 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
10278
10279         * aot-runtime.c: Call init_plt lazily.
10280
10281         * inssel-long.brg: Fix unsigned long->int conversion.
10282
10283         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
10284
10285         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
10286         that most data is now in the .rss/.data section.
10287
10288 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
10289
10290         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
10291
10292         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
10293
10294         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
10295
10296         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
10297
10298         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
10299         virtual call. Fixes #79010.
10300
10301         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
10302         and use the result as the this argument in the real call.
10303
10304         * generics.2.cs: Add a new test for #79010.
10305         
10306 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
10307
10308         * mini-x86.c: Fix a warning.
10309
10310         * aot-compiler.c: Add a bunch of statistics.
10311
10312         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
10313
10314 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
10315
10316         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
10317
10318 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
10319
10320         * 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>.
10321
10322 2006-07-13  Miguel de Icaza  <miguel@novell.com>
10323
10324         * mini.c (mono_method_to_ir): Obtain the original method in the
10325         CIL stream and use this to perform validation.
10326
10327         Fixed: #78816
10328
10329 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
10330
10331         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
10332         (mono_arch_call_opcode): Ditto.
10333
10334         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
10335         #78826.
10336
10337         * mini.c (mono_patch_info_dup_mp): New helper function.
10338         
10339         * aot-compiler.c (compile_method): Fix some of the memory allocated during
10340         compilation. Fixes #78827.
10341
10342 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
10343
10344         * declsec.c: Use original security informations for
10345           MONO_WRAPPER_MANAGED_TO_MANAGED.
10346
10347 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
10348
10349         * mini.c: Allow Com Interop methods/classes and
10350         don't verify COM wrapper calls
10351         
10352
10353 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
10354
10355         * inssel-long32.brg: Fix long->i4 checked conversion.
10356
10357         * exceptions.cs: Add a test for the above.
10358
10359 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
10360
10361         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
10362
10363         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
10364         leaks.
10365
10366         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
10367         #78775.
10368
10369 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
10370
10371         * mini.c: Fix solaris/x86 exception handling.
10372
10373         * Makefile.am: Get rid of $(ICU_LIBS).
10374
10375 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
10376
10377         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
10378         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
10379         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
10380
10381         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
10382
10383         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
10384         this function causes a SIGSEGV.
10385
10386 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
10387
10388         * mini.c: Remove unused solaris/x86 includes.
10389
10390 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
10391
10392         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
10393
10394 2006-06-20  Jb Evain  <jbevain@gmail.com>
10395
10396         * cpu-g4.md: fix max length of start_handler instruction.
10397
10398 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
10399         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
10400
10401 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
10402         * ssa.c: Fixed bug 78653 for SSA based deadce.
10403         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
10404         MonoInst.flags, used in SSA based deadce.
10405         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
10406         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
10407
10408 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
10409
10410         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
10411         it can end up using non executable memory on ppc64 systems
10412         running ppc32 userspace (fix from Johannes Berg).
10413
10414 2006-06-14  Dick Porter  <dick@ximian.com>
10415
10416         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
10417         4.1.1
10418
10419 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
10420         * mini.c: Made so that inline is locally disabled if it would
10421         trigger a .cctor, because too many apps depend on this behavior
10422         (which seems to be also the one of the MS CLR).
10423
10424 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
10425
10426         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
10427         No idea why this worked before.
10428
10429         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
10430         which branch to outer exception clauses since they could skip the
10431         inner finally clauses. Fixes #78633.
10432
10433         * exceptions.cs: Add a test for the above.
10434
10435         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
10436         Fixes #78629.
10437
10438         * iltests.il: Add a test for the above.
10439
10440 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
10441
10442         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
10443         after the end of a try bblock, to prevent asserts in mini_method_compile ().
10444
10445         * iltests.il: Add a test for the above.
10446
10447 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
10448
10449         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
10450         
10451         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
10452         methods as instrinsics.
10453
10454 2006-06-09  Wade Berrier <wberrier@novell.com>
10455
10456         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
10457         (simple-cee-ops.h ssapre-mini-ops.h)
10458
10459 2006-06-09  Neale Ferguson <neale@sinenomine.net>
10460
10461         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
10462         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
10463         instruction).
10464         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
10465         * cpu-s390x.md: Fix max. length values for a couple of instructions.
10466
10467 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
10468
10469         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
10470
10471 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
10472
10473         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
10474         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
10475         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
10476         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
10477         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
10478         of opcodes, so that bug 78549 should not happen again.
10479         * ssapre.c: Updated to use the renamed files.
10480
10481 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
10482
10483         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
10484         in OP_ATOMIC_EXCHANGE_I4.
10485
10486 2006-06-07  Wade Berrier <wberrier@novell.com>
10487
10488         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
10489         in mono_debugger_create_notification_function)
10490
10491 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
10492
10493         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
10494         
10495         * mini.c (type_from_stack_type): Disable some changes which do not
10496         seem to work.
10497
10498         * driver.c: Reenable opts.
10499
10500         * mini.h (MonoStackSlot): New structure to keep track of the verification state
10501         of the evaluation stack.
10502         
10503         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
10504         evaluation stack trace at entry to the bblock.
10505
10506         * mini.c (merge_stacks): New function to perform verification of stack merges.
10507         Turned off by default.
10508
10509         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
10510         STACK_MP.
10511         
10512 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
10513
10514         * local-propagation.c: Fixed bug 78549.
10515
10516 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
10517
10518         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
10519
10520 2006-06-02  Miguel de Icaza  <miguel@novell.com>
10521
10522         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
10523         tramp-arm.c, tramp-ia64.c
10524         (mono_debugger_create_notification_function): Update signature to
10525         new signature and use new protocol for creating the notification
10526         function.  
10527
10528         Should fix the build.
10529
10530 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
10531
10532         * exceptions-ppc.c (mono_jit_walk_stack)
10533         (ves_icall_get_frame_info): Fix the build
10534
10535 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
10536
10537         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
10538
10539 2006-05-31  Raja R Harinath  <rharinath@novell.com>
10540
10541         * il2tests.2.il: New file for generics CIL tests.  Add test for
10542         #78019.
10543         * Makefile.am: Update.
10544
10545         Fix #78019
10546         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
10547         to nullable types.
10548
10549 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
10550
10551         * aliasing.c: Fixed bug 78311.
10552
10553 2006-05-29  Martin Baulig  <martin@ximian.com>
10554
10555         * mini-exceptions.c (mono_find_jit_info): When computing the
10556         native offset, check whether we're actually inside the method's
10557         code; call mono_debug_print_stack_frame() to format the frame.
10558         (ves_icall_System_Exception_get_trace): Call
10559         mono_debug_print_stack_frame() to format the stack frame.
10560         (ves_icall_get_trace): Update to the new debugging API.
10561         (mono_jit_walk_stack_from_ctx): Likewise.
10562         (ves_icall_get_frame_info): Likewise.
10563
10564         * mini.c (get_method_from_ip): Use the new debugging API.
10565         (mono_print_method_from_ip): Likewise.
10566
10567         * exceptions-ppc.c
10568         (mono_jit_walk_stack): Use the new debugging API.
10569         (ves_icall_get_frame_info): Likewise.   
10570
10571 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
10572
10573         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
10574
10575 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
10576
10577         * mini.c: Added "limitator" to inline for debugging.
10578
10579 2006-05-24  Martin Baulig  <martin@ximian.com>
10580
10581         * debug-debugger.c (mono_debugger_init): Create a private,
10582         malloc()-based code manager for the notification function and
10583         intentionally leak it on exit.  This fixes the crash-on-exit race
10584         condition.
10585
10586         * tramp-amd64.c
10587         (mono_debugger_create_notification_function): Added
10588         `MonoCodeManager *' argument.
10589
10590         * tramp-x86.c
10591         (mono_debugger_create_notification_function): Added
10592         `MonoCodeManager *' argument.
10593
10594 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
10595
10596         * aliasing.c: Fixed 64 bit issue.
10597         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10598         default since all known bugs are fixed (one more time!).
10599
10600 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10601
10602         * mini.c: write barrier support.
10603
10604 2006-05-23  Martin Baulig  <martin@ximian.com>
10605
10606         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
10607         check at the top of the file.
10608
10609 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
10610
10611         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
10612         reverting changes without reason and without changelog entries.
10613
10614 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
10615
10616         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
10617         to a few opcodes. Fixes #78439.
10618
10619         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
10620         consistency with other archs.
10621
10622         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
10623
10624 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10625
10626         * debug-debugger.c: fix the build.
10627
10628 2006-05-17  Martin Baulig  <martin@ximian.com>
10629
10630         * debug-debugger.c
10631         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
10632         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
10633         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
10634         (debugger_attach): Call GC_mono_debugger_add_all_threads().
10635
10636 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
10637
10638         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
10639
10640 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
10641
10642         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
10643         MONO_TYPE_GENERICINST.
10644         
10645         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
10646         MONO_TYPE_GENERICINST.
10647
10648 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
10649
10650         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
10651         #78325.
10652
10653 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
10654
10655         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
10656         mempool.
10657         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
10658
10659 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
10660
10661         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
10662         mono_trace_cleanup ().
10663
10664         * iltests.il: Fix problem with the newly added test.
10665
10666         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
10667         due to register constraints, free up the previous hreg. Fixes #78314.
10668
10669         * iltests.il: Add new test for #78314.  
10670
10671         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
10672         Interlocked.Add. Fixes #78312.
10673
10674         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
10675         
10676 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
10677
10678         * inssel.brg (mini_emit_virtual_call): Fix a warning.
10679
10680 2006-05-05  Martin Baulig  <martin@ximian.com>
10681
10682         * debug-mini.c (mono_debug_open_block): New method.
10683
10684         * mini-amd64.c
10685         (mono_arch_output_basic_block): Call mono_debug_open_block() at
10686         the beginning of each basic block.
10687
10688         * mini-x86.c
10689         (mono_arch_output_basic_block): Call mono_debug_open_block() at
10690         the beginning of each basic block.
10691
10692 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
10693
10694         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10695         default until I understand why they break the build on amd64.
10696
10697 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
10698
10699         * mini.c (mini_cleanup): Call mono_cleanup ().
10700
10701         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
10702         errors.
10703
10704 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
10705
10706         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
10707         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10708         default since all known bugs are fixed, and I cannot reproduce bug
10709         77944... I'm asking Matt Hargett to test again after this commit.
10710
10711 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
10712
10713         * mini-codegen.c: Fixed typo that thrashed inline.
10714
10715 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
10716
10717         * dominators.c (compute_dominators): Avoid using a worklist since
10718         it is not correct in some cases. Instead, iterate over all bblocks as
10719         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
10720
10721 2006-04-28  Miguel de Icaza  <miguel@novell.com>
10722
10723         * mini.c (mono_jit_compile_method_inner): Use
10724         mono_prepare_exception_from_error that resets the value
10725         internally.
10726
10727 2006-04-27  Miguel de Icaza  <miguel@novell.com>
10728
10729         * mini.c: Move the mini_loader_error_to_exception to metadata. 
10730         
10731 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
10732
10733         * aliasing.c: Fixed bug 78210.
10734
10735 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
10736
10737         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10738         default until all their problems (or the ones they trigger) are fixed.
10739
10740 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
10741
10742         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
10743         
10744         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
10745         as loaded only after resolving patches since that could invoke the same method.
10746
10747         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
10748
10749         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
10750         functions.
10751
10752         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
10753         AOT loader.
10754
10755         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
10756         stack.
10757
10758         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
10759         made from AOT code through the PLT table.
10760
10761         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
10762         holding the plt offset when a call is made to the aot plt trampoline.
10763         
10764 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
10765
10766         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
10767         amd64 AOT support.
10768
10769         * Makefile.am (common_sources): Fix build breakage.
10770
10771         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
10772         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
10773         intra-assembly calls if possible.
10774         
10775         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
10776
10777         * mini-trampolines.c: Handle PLT entries.
10778
10779         * mini.c: Avoid creating a GOT var for calls.
10780
10781         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
10782         from mscorlib code.
10783
10784         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
10785         from mscorlib code.
10786
10787         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
10788         AOT code.       
10789
10790         * mini.h: Bump AOT file format version.
10791         
10792         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
10793         covers more cases.
10794
10795 2006-04-25  Martin Baulig  <martin@ximian.com>
10796
10797         * driver.c: Disable copyprop, consprop and inline when running
10798         inside the debugger.
10799
10800 2006-04-25  Martin Baulig  <martin@ximian.com>
10801
10802         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
10803         with `get_current_thread' and added `detach'.
10804         (MonoDebuggerMetadataInfo): Added `thread_size',
10805         `thread_tid_offset', `thread_stack_ptr_offset' and
10806         `thread_end_stack_offset'.
10807
10808 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
10809
10810         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
10811         aot-runtime.c.
10812
10813         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
10814         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
10815
10816         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
10817
10818         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
10819
10820         * aot.c: Add support for ADJUSTED_IID.  
10821
10822 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
10823
10824         * aot.c (emit_method_order): Don't align method_order_end.
10825
10826         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
10827         the interface ID changes.
10828
10829 2006-04-21  Dick Porter  <dick@ximian.com>
10830
10831         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
10832         cleaning up a thread.  Fixes the new part of bug 77470.
10833
10834 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
10835
10836         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
10837         to managed wrapper.
10838                      
10839 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
10840
10841         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
10842         
10843         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
10844         SIGSEGV. Fixes #78072.
10845
10846         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
10847         unregister our SIGABRT handler.
10848
10849 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
10850
10851         * mini.c: Disabled inline where it can alter the call stack in a
10852         way visible from managed code.
10853         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
10854         default.
10855
10856 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
10857
10858         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
10859         on other platforms. Fixes #78089.
10860
10861 2006-04-13  Martin Baulig  <martin@ximian.com>
10862
10863         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
10864         determine whether we're inside the debugger.
10865
10866         * debug-debugger.h
10867         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
10868
10869 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
10870
10871         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
10872         handler clauses. Fixes #78024.
10873
10874         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
10875         in the CALL_MEMBASE opcodes. Fixes #78088.
10876         (mono_arch_get_vcall_slot_addr): Ditto.
10877
10878 2006-04-10  Martin Baulig  <martin@ximian.com>
10879
10880         * debug-debugger.c: The thread handling code has now been moved
10881         into ../metadata/threads.c.
10882
10883 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
10884
10885         * driver.c (mono_main): Fix --with-gc=none build.
10886
10887         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
10888         (mono_spillvar_offset_float): Ditto.
10889         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
10890         hreg, not when its !global, since on ia64, there is a third category: stacked
10891         registers.      
10892
10893 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
10894
10895         * mini.c: set MonoInst->klass for load field address and a few other
10896         places.
10897
10898 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
10899
10900         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
10901
10902 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
10903
10904         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
10905         the branch opt changes.
10906
10907 2006-04-06  Dick Porter  <dick@ximian.com>
10908
10909         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
10910         
10911         * wapihandles.c (mini_wapi_seminfo): 
10912         * driver.c (mono_main): Add semaphore info option
10913
10914 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
10915
10916         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
10917         branch optimization changes. Fixes #78009.
10918
10919 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10920
10921         * mini.c: ignore accessibility of methods in managed->native wrappers.
10922
10923 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
10924
10925         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
10926         
10927         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
10928
10929 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
10930
10931         * mini.c: Modify the branch optimizations to preserve the invariant that
10932         the entries inside the in_bb and out_bb arrays are unique.
10933         (mono_unlink_bblock): Avoid creation of new arrays.
10934
10935 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
10936
10937         * mini.c (mono_unlink_bblock): Fix regression caused by previous
10938         change (#77992).
10939
10940 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
10941
10942         * mini.c (optimize_branches): Remove the "optimizations" in
10943         the cbranch1/cbranch2 -> branch cases which were causing several
10944         problems in the past. Fixes #77986.
10945
10946 2006-03-31  Chris Toshok  <toshok@ximian.com>
10947
10948         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
10949         default optimizations :(
10950
10951 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
10952
10953         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
10954         branch.
10955
10956 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
10957
10958         * local-propagation.c: Added comments to structs and removed
10959         "Mono" prefixes from local tree mover types.
10960
10961 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
10962
10963         * Makefile.am (arch_sources): Define this for each architecture so 
10964         libmono_la_SOURCES is defined in one place.
10965
10966 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
10967
10968         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
10969         from handles/.
10970
10971 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
10972
10973         * driver.c: print the GC name supplied by configure.
10974
10975 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
10976
10977         * local-propagation.c: Added tree mover, and moved here all the
10978         local propagation code from mini.c
10979         * mini.c: Added support for treeprop, and moved all the local
10980         propagation code to local-propagation.c
10981         * mini.h: Added support for treeprop
10982         * driver.c: Added support for treeprop, enabled consprop, copyprop,
10983         treeprop, inline and deadce by default
10984         * Makefile.am: Added local-propagation.c
10985
10986 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
10987
10988         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
10989
10990 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
10991
10992         * debug-debugger.c: make it compile without the Boehm GC.
10993
10994 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
10995
10996         * mini.c: fixed issue with mismatch when an icall is registered
10997         with multiple names but same address.
10998
10999 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
11000
11001         * declsec.c, mini-exceptions.c: use write barrier to set reference
11002         fields of managed objects.
11003
11004 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
11005
11006         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
11007         (can_access_internals): Fix a warning.
11008
11009         * mini.c (print_method_from_ip): Rename this to 
11010         mono_print_method_from_ip so it gets exported.
11011
11012         * trace.c: Deal with strings inside StringBuilder's containing garbage
11013         and fix memory leaks. Fixes #77848.
11014
11015 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
11016
11017         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
11018         fixes #77787.
11019
11020 2006-03-16 Neale Ferguson <neale@sinenomine.net>
11021         
11022         * mini-s390.c: Remove OP_X86_TEST_NULL.
11023
11024 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
11025
11026         * mini.c: use the correct GetHashCode() for the moving collector.
11027
11028 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
11029
11030         * liveness.c: Regalloc spill cost tuning.
11031
11032 2006-03-15 Neale Ferguson <neale@sinenomine.net>
11033         
11034         * mini-s390x.h: Correct S390_LONG macro.
11035
11036         * mini-s390x.c: Cleanup unused code.
11037
11038 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
11039
11040         * jit-icalls.h: New file.
11041
11042         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
11043         icalls and include that instead of including jit-icalls.c.
11044
11045         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
11046         OP_X86 opcodes.
11047
11048 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
11049
11050         * mini.c: when checking for member accessibility, also check for
11051         friend assemblies and for explicit interface implementations.
11052
11053 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
11054
11055         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
11056
11057         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
11058
11059         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
11060         common cases are done first.    
11061
11062         * mini-ops.h: Only define platform specific opcodes on the given platform.
11063
11064         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
11065         branch.
11066         
11067 2006-03-14  Martin Baulig  <martin@ximian.com>
11068
11069         Revert Paolo's change from r57348:
11070
11071         * mini.h: don't use gboolean for bitfields.
11072         * mini.c: verifier changes for fields and methods accessibility.
11073
11074 2006-03-13  Neale Ferguson <neale@sinenomine.net>
11075
11076         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
11077
11078         * mini-s390x.c: Fix conv_r_un.
11079
11080         * cpu-s390, cpu-s390x.md: Fix lengths.
11081
11082 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
11083
11084         * mini.c: nested types have access to all the nesting
11085         levels, not just the enclosing types.
11086
11087 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
11088
11089         * mini.c: added a few more verification checks.
11090
11091 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
11092
11093         * liveness.c: Merge optimizations from the linear-il branch.
11094
11095 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
11096
11097         * mini-ia64.c (emit_call): Add a comment.
11098
11099         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
11100
11101         * tramp-ia64.c: Fix some warnings.
11102
11103 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
11104
11105         * mini.h: don't use gboolean for bitfields.
11106         * mini.c: verifier changes for fields and methods accessibility.
11107
11108 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
11109
11110         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
11111         lazy icall wrapper changes.
11112
11113         * dominators.c: Replace all the dominator algorithms with faster
11114         ones from the linear-il branch.
11115
11116         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
11117         the mempool.
11118
11119         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
11120         common cases are done first.
11121
11122         * mini-amd64.c: Fix some warnings.
11123
11124         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
11125         from the mempool.
11126
11127         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
11128         added code.
11129
11130         * mini.h: Add a missing prototype.
11131
11132 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
11133
11134         * mini.c: Compile icall wrappers lazily.
11135
11136         * mini-codegen.c: Use printf instead of g_print since its much faster.
11137
11138         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
11139         function.
11140
11141         * mini.c (optimize_branches): Cache the negative result from 
11142         remove_block_if_useless ().
11143
11144         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
11145         Also fix some bblock linking issues.
11146
11147         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
11148         assembly files.
11149
11150         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
11151
11152         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
11153         accessed fields first, for better cache behavior.
11154         
11155 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
11156
11157         * mini.c: speedup IList<T> array accesses.
11158
11159 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
11160
11161         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
11162         inline_costs counter. Fixes #77190.
11163
11164 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
11165
11166         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
11167         trace messages. Fixes #77706.
11168
11169 2006-03-04  Martin Baulig  <martin@ximian.com>
11170
11171         * tramp-amd64.c, tramp-x86.c
11172         (mono_debugger_create_notification_function): Use
11173         mono_global_codeman_reserve() to allocate a buffer at runtime and
11174         return it.
11175
11176         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
11177
11178         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
11179         notification function at runtime and then call `initialize' in the
11180         `MONO_DEBUGGER__debugger_info' vtable.
11181
11182 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
11183
11184         * iltests.il: Fix a visibility problem.
11185
11186 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11187
11188         * driver.c, mini.c: add hooks for the counters API.
11189
11190 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
11191
11192         * driver.c: show disabled options.
11193
11194 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
11195
11196         * linear-scan.c: always use cost-driven selection.
11197
11198 2006-02-28  Raja R Harinath  <rharinath@novell.com>
11199
11200         * jit-icalls.c (helper_compile_generic_method): Revert change from
11201         2006-02-24.
11202
11203 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
11204
11205         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
11206
11207 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
11208
11209         * inssel.brg: style fixes, mostly to force the updated monoburg
11210         to run for people using svn.
11211
11212 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
11213
11214         * mini.c: match monoburg changes.
11215
11216 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
11217
11218         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
11219         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
11220         declaration in the header file.
11221
11222 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
11223
11224         * helpers.c: reduce relocations and mem usage.
11225
11226 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
11227
11228         * mini.h, mini-codegen.c: disable logging features if
11229         requested by configure.
11230
11231 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
11232
11233         * mini.c: tiny verifier changes.
11234
11235 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11236
11237         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
11238         cpu-pentium.md: stack alignment changes for osx/x86,
11239         partially from Geoff Norton <gnorton@customerdna.com>.
11240
11241 2006-02-24  Raja R Harinath  <harinath@gmail.com>
11242
11243         * jit-icalls.c (helper_compile_generic_method): Update to changes
11244         in metadata/class.c.
11245
11246 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
11247         
11248         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
11249         
11250         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
11251         interface calls with large offsets.
11252
11253 2006-02-23  Raja R Harinath  <rharinath@novell.com>
11254
11255         * jit-icalls.c (helper_compile_generic_method): Document the
11256         special-case we depend on so that we can inflate the method twice
11257         with the same context with no bad side-effects.
11258
11259 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
11260
11261         * mini-x86.c, mini-amd64.c: fix for case when xen support
11262         is disabled.
11263
11264 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
11265
11266         * mini-x86.c, mini-amd64.c: generate code to access tls items
11267         in a faster way for Xen systems.
11268
11269 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11270
11271         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
11272         updates and compilation fixes for the OSX/x86 port, mostly from
11273         Geoff Norton <gnorton@customerdna.com>.
11274
11275 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
11276
11277         * inssel.brg: faster interface call implementation
11278         to sync with the interface_offsets MonoVTable changes.
11279
11280 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
11281
11282         * mini.c: more verification checks.
11283
11284 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
11285
11286         * mini.c: added a few more verification checks.
11287
11288 2006-02-17      Neale Ferguson <neale@sinenomine.net>
11289
11290         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
11291         facility on the processor and use it if available.
11292
11293 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11294
11295         * driver.c, aot.c, mini.c: throw exception if the IL code is
11296         invalid or unverifiable.
11297
11298 2006-02-17  Raja R Harinath  <rharinath@novell.com>
11299
11300         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
11301         m.StructField.
11302
11303 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
11304
11305         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
11306
11307 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11308
11309         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
11310         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
11311         handling of instantiated generic valuetypes.
11312
11313 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
11314
11315         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
11316         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
11317         instead.
11318
11319         * generics.2.cs: Revert the nullable reftypes tests.
11320
11321 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
11322
11323         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
11324         using __builtin_frame_address (1) as it doesn't work in the presence
11325         of optimizations. Hopefully fixes #77273.
11326
11327         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
11328         -> generics.cs change as it doesn't work with some automake versions.
11329
11330 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
11331
11332         * mini.c: handle systems that sue a different way to
11333         retrieve the stack address of the current thread.
11334
11335 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
11336
11337         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
11338         it specially in the makefile.
11339
11340         * generics.2.cs: Add tests for nullable reference types.
11341
11342 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11343
11344         * mini.c: always handle the case when mono_jit_init()
11345         is called in a thread different from the main thread,
11346         confusing libgc (bug #77309).
11347
11348 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
11349
11350         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
11351
11352 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
11353
11354         * mini.c: change optimize_branches () to use a single loop
11355         and introduce a new optimization to simplify some range checks.
11356
11357 2006-02-03  Martin Baulig  <martin@ximian.com>
11358
11359         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
11360         and merged with debugger_thread_manager_add_thread().
11361         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
11362         inform the debugger about the main thread.
11363
11364 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
11365
11366         * basic.cs: Add test for div.un/rem.un constant folding.
11367
11368 2006-02-03  Neale Ferguson <neale@sinenomine.net>
11369
11370         * cpu-s390x.md: correct int_xor_imm length
11371
11372 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
11373
11374         * generics.2.cs: New test for #77442.
11375
11376         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
11377         #77442.
11378
11379 2006-02-02  Martin Baulig  <martin@ximian.com>
11380
11381         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
11382         <mono/metadata/mono-debug-debugger.h>   
11383
11384         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
11385
11386 2006-02-02  Martin Baulig  <martin@ximian.com>
11387
11388         * debug-debugger.h: New header file for debug-debugger.c.
11389
11390         * debug-debugger.c: Big API cleanup; don't run the managed Main()
11391         function is a separate thread anymore; add support for attaching.
11392
11393 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
11394
11395         * tramp-x86.c: Fix a warning.
11396
11397 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
11398
11399         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
11400         on very large methods.
11401
11402         * aot.c (load_patch_info): Fix a warning.
11403
11404 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
11405
11406         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
11407         mini-ops.h: alu membase optimizations.
11408
11409 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
11410
11411         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
11412         to speedup StringBuilder.
11413
11414 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
11415
11416         * dominators.c (mono_compute_natural_loops): Fix detection of
11417         loop body start blocks.
11418
11419         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
11420
11421 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
11422
11423         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
11424         #75145.
11425
11426 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
11427
11428         * aliasing.c: Fixed aliasing issue on 64 bit archs.
11429
11430 2006-01-25  Martin Baulig  <martin@ximian.com>
11431
11432         * debug-debugger.c: Moved the `MonoDebuggerManager' and
11433         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
11434         started to cleanup this file a little bit.
11435
11436 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
11437
11438         * mini.c: optimize a codepath frequently happening in generics code.
11439
11440 2006-01-23  Martin Baulig  <martin@ximian.com>
11441
11442         * Makefile.am: Only compile debug-debugger.c on supported platforms.
11443
11444         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
11445         functions directly.
11446
11447         * driver.c: debug-debugger.c is only available if
11448         `MONO_DEBUGGER_SUPPORTED' is defined.   
11449
11450 2006-01-23  Martin Baulig  <martin@ximian.com>
11451
11452         * debug-debugger.c: Only enable this on platforms where the Mono
11453         Debugger is working (x86 and x86_64).
11454
11455 2006-01-21  Martin Baulig  <martin@ximian.com>
11456
11457         The Mono Debugger is now using the normal `mono' instead of the
11458         `mono-debugger-mini-wrapper' when executing managed code.
11459
11460         * debug-debugger.c: New file; previously known as
11461         debugger/wrapper/wrapper.c.
11462
11463         * debug-mini.c (mono_init_debugger): Removed.
11464
11465         * driver.c (mono_main): Added new `--inside-mdb' command line
11466         argument which is used when running inside the debugger.
11467
11468 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
11469
11470         * liveness.c (mono_analyze_liveness): Remove some unused data
11471         structures.
11472
11473 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
11474
11475         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
11476
11477 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
11478
11479         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
11480         depends on implementation details of monobitset.
11481
11482         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
11483         Fixes #77271.
11484
11485 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
11486
11487         * liveness.c: Update after monobitset changes.
11488
11489 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
11490
11491         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
11492
11493 2006-01-11 Neale Ferguson <neale@sinenomine.net>
11494
11495         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
11496
11497         * mini-s390x.c: Remove warning messages.
11498
11499 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
11500
11501         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
11502
11503 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
11504
11505         * generics.2.cs: Add ldelem/stelem_any test.
11506
11507 2006-01-10 Neale Ferguson <neale@sinenomine.net>
11508
11509         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
11510
11511 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
11512
11513         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
11514         
11515 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
11516
11517         * generics.2.cs: Reenable vtype tests.
11518
11519         * inssel-x86.brg: Remove an icorrect valuetype rule.
11520
11521 2006-01-06 Neale Ferguson <neale@sinenomine.net>
11522
11523         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
11524         initial support for OP_ABS.
11525
11526 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11527
11528         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
11529
11530 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11531
11532         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
11533         conversion and implement LADD/LSUB.
11534
11535         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
11536         architectures.
11537
11538 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11539
11540         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
11541
11542         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
11543         architectures.
11544
11545 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11546
11547         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
11548         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
11549         (stack walk problem).
11550
11551 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
11552
11553         * aot.c (mono_aot_load_method): Fix a warning.
11554
11555 2006-01-03  Neale Ferguson <neale@sinenomine.net>
11556
11557         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
11558
11559 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
11560
11561         * iltests.il: Add test for #77148.
11562
11563         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
11564         #77148.
11565
11566 2006-01-03  Neale Ferguson <neale@sinenomine.net>
11567
11568         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
11569
11570 2006-01-03  Neale Ferguson <neale@sinenomine.net>
11571
11572         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
11573         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
11574
11575         * basic-long.cs: Add lconv-to-r4/r8 tests.
11576
11577 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
11578
11579         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
11580
11581         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
11582         here as on other archs.
11583
11584 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11585
11586         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
11587
11588 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11589
11590         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
11591         
11592         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
11593
11594         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
11595         instrument_prolog; Add memory_barrier instruction.
11596
11597 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
11598
11599         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
11600
11601 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
11602
11603         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
11604
11605         * aliasing.c inssel.brg: Fix warnings.
11606
11607         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
11608         could skip initialization of some parts of memory.
11609
11610         * mini.c mini-ia64.c: Fix warnings.
11611
11612         * inssel-sparc.brg: Add an implementation of lneg which actually works.
11613
11614 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
11615
11616         * aliasing.c (mono_build_aliasing_information): Add a workaround for
11617         a crash seen on sparc.
11618
11619         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
11620         
11621         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
11622
11623 2005-12-21 Neale Ferguson <neale@sinenomine.net>
11624
11625         * mini-ops.h: Add s390_backchain instruction
11626
11627         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
11628
11629         * cpu-s390.md: Add s390_backchain instruction
11630
11631         * mini-s390.c: Significant ABI changes
11632
11633         * mini-s390.h: Cater for zero length structures
11634
11635 2005-12-20 Neale Ferguson <neale@sinenomine.net>
11636
11637         * mini-s390.c: ABI fixes
11638
11639         * inssel-s390.brg: Remove debug statements
11640
11641         * cpu-s390.md: Fix length of ATOMIC_xx operations
11642
11643 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
11644
11645         * basic-float.cs: Add float<->long conversion tests.
11646
11647 2005-12-16 Neale Ferguson <neale@sinenomine.net>
11648
11649         * mini-s390.c: Fix LOCALLOC processing.
11650
11651         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
11652
11653 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
11654
11655         * iltests.il: Add tests for some opcodes not covered by the other
11656         tests.
11657
11658 2005-12-15 Neale Ferguson <neale@sinenomine.net>
11659
11660         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
11661         register loading for Tail processing; Correct trace output.
11662
11663         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
11664
11665         * cpu-s390.md: Correct size of jmp instruction. 
11666
11667 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11668
11669         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
11670
11671 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11672
11673         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
11674           Bring s390 up to current level.
11675
11676 2005-12-12  Zltan Varga  <vargaz@gmail.com>
11677
11678         * generics.2.cs: Disable the newly added tests as they do not work yet.
11679         
11680         * generics.2.cs: Add valuetype tests.
11681
11682 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
11683
11684         * basic-long.cs: Add i4->u8 test.
11685
11686         * objects.cs: Add tests for JIT intrinsic.
11687
11688         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
11689         optimizations lost by a mistake.
11690
11691 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
11692
11693         * basic-long.cs: Remove a test moved to objects.cs.
11694
11695         * arrays.cs: Add more array tests.
11696
11697 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
11698
11699         * arrays.cs: Add new tests for multi-dimensional arrays.
11700
11701 2005-12-06  Raja R Harinath  <rharinath@novell.com>
11702
11703         * Makefile.am (test_sources2): Add generics.2.cs.
11704         (EXTRA_DIST): Add test_sources2.
11705
11706 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
11707
11708         Support for boxing and unboxing nullable types as well as the
11709         isinst operation on nullables, per the CLI ammendment.
11710
11711         * inssel.brg (CEE_ISINST): Special case for nullable
11712
11713         * mini.c (handle_unbox_nullable): new method
11714         (handle_box): Special case for nullable types
11715         (mono_method_to_ir): Call handle_unbox_nullable in correct
11716         places.
11717
11718         * generics.2.cs: New test suite
11719
11720         * Makefile.am: Support for regression tests with generics.
11721
11722 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
11723
11724         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
11725         allocated to registers. Fixes #76800.
11726
11727 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
11728
11729         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
11730
11731 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
11732
11733         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
11734         of platforms.
11735
11736 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
11737
11738         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
11739         objects.cs.
11740
11741         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
11742         
11743         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
11744 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
11745
11746         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
11747         single precision before storing to a single precision location.
11748
11749 2005-11-28  Raja R Harinath  <rharinath@novell.com>
11750
11751         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
11752
11753 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
11754
11755         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
11756         correct files.
11757
11758         * basic.cs: Remove test_0_byte_compares test which was moved to
11759         objects.cs a long time ago.
11760
11761 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
11762
11763         * aliasing.c: Fixed aliasing issue on 64 bit archs.
11764
11765 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
11766
11767         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
11768         handlers are called.
11769
11770         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
11771         throwing code.
11772
11773          * mini-ia64.c: Add support for the throw->branch exception 
11774         optimization.   
11775
11776         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
11777
11778 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
11779
11780         * mini.c: Enabled "fastpath" deadce :-)
11781         
11782 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
11783
11784         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
11785         alias analysis pass to support it.
11786         * mini.h: Likewise.
11787         * ssa.c: Likewise.
11788         * liveness.c: Likewise (liveness computation can use aliasing
11789         information to be more accurate).
11790         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
11791         moreover made so that "--compile-all" uses the given optimization
11792         flags and not the default ones.
11793         * aliasing.c: Alias analysis (new file).
11794         * aliasing.h: Likewise.
11795         * Makefile.am: added "aliasing.c" and "aliasing.h".
11796         
11797 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
11798
11799         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
11800         OP_L opcodes.
11801
11802 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
11803
11804         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
11805         fp >= end_of_stack exit condition, as it is not needed, and it might
11806         become true for fp eliminated frames.
11807
11808 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
11809
11810         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
11811         coded offsets.
11812
11813 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
11814
11815         * mini-arm.c: fixed alignment of doubles/longs to match
11816         the C ABI (bug #76635).
11817
11818 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
11819
11820         * aot.c: fix compilation with --enable-minimal=aot.
11821
11822 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
11823
11824         * mini-arm.c: fixed compatibility with the new
11825         floating point emulator package for compares.
11826
11827 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
11828
11829         * mini.c : reverted sig->pinvoke changes (r51396-51397).
11830
11831 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
11832
11833         * mini-exceptions.c (print_stack_frame): Output to stderr.
11834         (mono_handle_native_sigsegv): Ditto.
11835
11836 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
11837
11838         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
11839         OP_LCONV_TO_OVF_I implementation.
11840
11841         * mini-amd64.c: Add support for the throw->branch exception 
11842         optimization.
11843
11844         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
11845         when the catch clause catches a more general exception, i.e. Object.
11846
11847 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
11848
11849         * cpu-ia64.md: Remove unused opcodes.
11850
11851         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
11852         specific defines for architectures defining USE_SIGACTION.
11853
11854         * mini-ia64.c: Fix some warnings.
11855
11856         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
11857         version seemed to skip a frame.
11858
11859 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
11860
11861         * mini.c: Clean up the usage of sig->pinvoke flag. Now
11862         only calls which are made to native code use this flag.
11863
11864 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
11865
11866         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
11867         varargs methods as well.
11868         
11869         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
11870         which have save_lmf set. Reorganize methods prologs a bit.
11871
11872         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
11873         debugger to the proper place.
11874
11875 2005-10-29  Martin Baulig  <martin@ximian.com>
11876
11877         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
11878         when running inside the debugger until the debugger has support
11879         for it.
11880
11881 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
11882
11883         * mini.h: Fix a warning.
11884
11885 2005-10-24  Miguel de Icaza  <miguel@novell.com>
11886
11887         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
11888         we expose publicly, this returns the string.
11889
11890 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
11891
11892         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
11893         with fp elimination.
11894
11895 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
11896
11897         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
11898         native stacktrace using the glibc 'backtrace' function if available.
11899
11900 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
11901
11902         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
11903
11904         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
11905         handle SIGSEGVs received while in native code.
11906
11907         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
11908         code, call mono_handle_native_sigsegv which will abort the runtime
11909         after printing some diagnostics, instead of converting it into a
11910         confusing NullReferenceException.
11911
11912 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
11913
11914         * cpu-pentium.md: Remove unused opcodes.
11915
11916 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
11917
11918         * mini-amd64.h (MonoLMF): Add rsp field.
11919
11920         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
11921         the lmf too.
11922
11923 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
11924
11925         * mini-codegen.c (get_register_spilling): Fix some warnings.
11926
11927 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
11928
11929         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
11930         elimination during exception handling. Enable fp elimination by
11931         default.
11932
11933         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
11934         elimination.
11935
11936 2005-10-16  Martin Baulig  <martin@ximian.com>
11937
11938         * mini-exceptions.c
11939         (mono_debugger_run_finally): New public method for the debugger.
11940
11941 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
11942
11943         * debug-mini.c (mono_debug_init_method): Fix warning.
11944
11945         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
11946         the 'exname' parameter const to fix some warnings.
11947
11948 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
11949
11950         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
11951         introduced by the previous patch.
11952
11953 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
11954
11955         * basic-float.cs: Add test for precision of float arithmetic.
11956
11957         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
11958         when loading/storing single values from/to memory.
11959
11960         * mini.c (mono_jit_compile_method_with_opt): Create the function
11961         pointers in the correct domain.
11962
11963 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
11964
11965         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
11966         introduced by previous patch.
11967         
11968         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
11969         when out_filter_idx is NULL.
11970
11971         * mini-exceptions.c: Don't run filter clauses twice during exception
11972         handling. Fixes #75755.
11973
11974 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
11975
11976         * aot.c: Add support for ldflda wrappers.
11977
11978         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
11979         #75902.
11980
11981 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
11982
11983         * mini.c, mini.h: do not consider exception handlers blocks when
11984         setting up interface variables.
11985
11986 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
11987
11988         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
11989
11990 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
11991
11992         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
11993         causes a regression.
11994
11995         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
11996
11997 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
11998
11999         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
12000         of the OP_P definitions.
12001
12002         * TODO: Add a proposal for dealing with the CEE/OP mess.
12003
12004         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
12005         optimizations from the x86 port.
12006
12007         * cpu-amd64.md: Ditto.
12008
12009         * basic.cs basic-long.cs: Add tests.
12010
12011 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
12012
12013         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
12014         Patrik Torstensson's implementation of my exception-handling
12015         optimization idea, when the exception object is not used
12016         (bug #62150).
12017
12018 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
12019
12020         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
12021         of the mul_imm optimizations from the old jit.
12022
12023 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
12024
12025         * mini.c, liveness.c: patch by Patrik Torstensson and
12026         Zoltan Varga to improve performance in methods with
12027         exception clauses.
12028
12029 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
12030
12031         * driver.c: Remove 'Globalization' entry from --version.
12032
12033 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
12034
12035         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
12036         there is a profiler interested in JIT events.
12037
12038         * aot.c: Load profile files produced by the AOT profiling module, and
12039         reorder methods based on the profiling info. Add a 'method_order' table
12040         to the AOT file to make mono_aot_find_jit_info work with the reordered
12041         methods.
12042
12043         * mini.h: Bump AOT file version info.
12044
12045 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
12046
12047         * mini-arm.h: work around what looks like a gcc bug when optimizations
12048         are enabled.
12049
12050 2005-09-28  Raja R Harinath  <rharinath@novell.com>
12051
12052         * Makefile.am (AM_CFLAGS): Don't use += to append inside
12053         conditionals.  Use ...
12054         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
12055
12056 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
12057
12058         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
12059         to determine the amount of memory to copy when passing valuetypes.
12060
12061         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
12062         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
12063
12064 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
12065
12066         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
12067         information about aot.
12068
12069 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
12070
12071         * *.c: Replace the use of {Enter,Leave}CriticalSection with
12072         macros. This will allow a deadlock debugger to easily be plugged
12073         in.
12074
12075 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
12076
12077         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
12078
12079 2005-09-27  Raja R Harinath  <rharinath@novell.com>
12080
12081         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
12082         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
12083         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
12084         ($(arch_built)) [CROSS_COMPILING]: Error out.
12085
12086 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
12087
12088         * aot.c: Add support for the no_special_static flag for classes.
12089
12090 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
12091
12092         * Reapply reverted patches.
12093
12094         * *: Revert r50174 as well.
12095
12096         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
12097
12098 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
12099
12100         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
12101
12102 2005-09-23  Miguel de Icaza  <miguel@novell.com>
12103
12104         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
12105         part of the SIG_HANDLER_SIGNATURE.  
12106
12107 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
12108
12109         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
12110         statistics.
12111
12112         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
12113         introduced by previous patch.
12114
12115 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
12116
12117         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
12118         saved registers too.
12119
12120         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
12121         upon the information returned by get_call_info ().
12122         
12123         * mini-x86.c (add_float): Fix stack size calculation.
12124         (mono_arch_call_opcode): Rewrite this so it works based up the
12125         information returned by get_call_info ().
12126         (mono_arch_get_this_vret_args): Ditto.
12127
12128 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
12129
12130         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
12131         in cinfo to determine the registers which need to be used.
12132
12133 2005-09-20  Miguel de Icaza  <miguel@novell.com>
12134
12135         * driver.c (mono_main): Add --server and --desktop flags. 
12136
12137 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
12138
12139         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
12140         registers as global registers.
12141
12142         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
12143         longer needed with the new register allocator.
12144
12145         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
12146
12147         * cpu-ia64.md: Remove unused opcodes.
12148         
12149         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
12150         
12151 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
12152
12153         * cpu-amd64.md: Remove unused opcodes.
12154
12155         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
12156         needed with the new register allocator.
12157
12158         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
12159         reg-reg moves.
12160
12161 2005-09-16  Raja R Harinath  <rharinath@novell.com>
12162
12163         * Makefile.am (check-local): Don't invoke semdel-wrapper.
12164
12165 2005-09-16  Martin Baulig  <martin@ximian.com>
12166
12167         * exceptions-amd64.c
12168         (throw_exception): Don't call mono_debugger_throw_exception() if
12169         we're a rethrow - see the FIXME in the code.
12170
12171 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
12172
12173         * mini.c (mono_init_exceptions): This only works on some architectures.
12174         
12175 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
12176
12177         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
12178         on ia64.
12179
12180         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
12181
12182         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
12183         now in mini-exceptions.c.
12184
12185 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
12186
12187         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
12188         now in mini-exceptions.c.
12189
12190 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
12191
12192         * exceptions-x86.c: Applied patch from Patrik Torstensson 
12193         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
12194
12195         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
12196         code into mini-exceptions.c. Add some assertions to it.
12197
12198 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
12199
12200         * aot.c (emit_section_change): Applied patch from "The Software Team" 
12201         (<software@solmersa.com>). Fix as errors on windows.
12202
12203 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
12204
12205         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
12206         method info into the LMF.
12207
12208 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
12209         
12210         * mini-ia64.c: Add proper unwind info for method epilogs.
12211
12212         * exceptions-ia64.c: Add some code to help debugging.
12213         
12214         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
12215
12216         * mini-exceptions.c: Fix warning.
12217
12218 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
12219
12220         * mini.c: Really fix build.
12221
12222         * mini-x86.c mini-amd64.c: Fix build.
12223
12224 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
12225
12226         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
12227
12228         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
12229         some Interlocked methods as intrinsics.
12230
12231         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
12232         for Thread methods as well.
12233
12234         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
12235
12236         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
12237
12238         * mini-ia64.c mini-x86.c mini-amd64.c 
12239         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
12240         OP_MEMORY_BARRIER.
12241         
12242         * mini.c (mono_init_exceptions): Fix build breakage.
12243
12244 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
12245
12246         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
12247         of instructions. Use the new ia64_unw_op macros for emitting unwind
12248         info.
12249
12250         * mini.c (mono_init_exceptions): Initialize exception handling
12251         related trampolines at startup.
12252
12253 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
12254
12255         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
12256
12257 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
12258
12259         * mini.c: Handle type loading errors gracefully during compilation and
12260         throw the appropriate exception.
12261
12262 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
12263
12264         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
12265         for the mono binary.
12266
12267 2005-09-09  Martin Baulig  <martin@ximian.com>
12268
12269         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
12270         the release.
12271
12272 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12273
12274         * mini-arm.h: use emulation for conv.r.un for the release.
12275
12276 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12277
12278         * mini-arm.c, objects.cs: more fixes and tests for them.
12279
12280 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12281
12282         * mini-arm.c: align structures to at least 4 bytes to be able
12283         to keep our current optimized memcpy.
12284
12285 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
12286
12287         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
12288
12289 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12290
12291         * mini.c: ignore SIGPIPE.
12292
12293 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
12294
12295         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
12296
12297         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
12298
12299 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
12300
12301         * mini.h: Add prototype for mono_allocate_stack_slots_full.
12302
12303 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12304
12305         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
12306         exception handling support.
12307         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
12308         patch by Brian Koropoff <briank@marakicorp.com>).
12309
12310 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
12311
12312         * mini.c: revert another 'optimization' which breaks when
12313         items on the eval stack need to be saved at a basic block end
12314         (bug #75940).
12315
12316 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12317
12318         * jit-icalls.c: for arrays, ensure we always provide
12319         lower bounds.
12320
12321 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
12322
12323         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
12324         
12325         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
12326
12327 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
12328
12329         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
12330         arguments in their original register.
12331
12332 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
12333
12334         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
12335         memset/memcpy.
12336
12337         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
12338         when ssapre is enabled.
12339
12340         * inssel-long.brg: Fix bug in previous patch.
12341
12342         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
12343         multiplication by a constant.
12344
12345 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
12346
12347         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
12348         icc.
12349
12350         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
12351         saving registers.
12352
12353 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
12354
12355         * inssel-arm.brg: apply changes tested by Brian Koropoff
12356         <briank@marakicorp.com>.
12357
12358 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
12359
12360         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
12361         
12362 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
12363
12364         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
12365         to the same register if dreg is just a base register.
12366         (print_ins): Improve printing of membase opcodes.
12367
12368         * inssel-x86.brg: Add optimized ldind(reg) rules.
12369
12370         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
12371
12372 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
12373
12374         * mini.c: when running under valgrind, set the stack bottom for
12375         the GC at the actual approximate stack for the app (fixes running
12376         mono with valgrind).
12377
12378 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
12379
12380         * mini.c: do no break at the first valuetype to init found
12381         (fixes bug #75791).
12382
12383 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
12384
12385         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
12386
12387 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
12388
12389         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
12390
12391 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
12392
12393         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
12394
12395 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12396
12397         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
12398
12399         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
12400         code.
12401
12402         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
12403         code.
12404
12405         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
12406         methods.
12407
12408 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
12409
12410         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
12411
12412 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12413
12414         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
12415         in the tail recursion optimization.
12416
12417         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
12418         debug info into the assembly file.
12419
12420         * iltests.il: Add test for filter regions.
12421
12422         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
12423         initial stack of filter regions. Fixes #75755.
12424
12425 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
12426
12427         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
12428         stack requirements.
12429
12430 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12431
12432         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
12433         the check for an already compiled method on non-ia64 platforms.
12434         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
12435         proper domain.
12436
12437         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
12438
12439         * inssel-x86.brg: Add some optimized call rules.
12440
12441 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
12442
12443         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
12444         method here.
12445
12446         * mini.h mini-trampolines.c: Pass the trampoline argument to 
12447         mono_arch_patch_delegate_trampoline.
12448
12449         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
12450
12451         * mini-trampolines.c: Fix build.
12452
12453         * mini-amd64.h: Add delegate trampolines.
12454
12455         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
12456
12457         * inssel-amd64.brg: Add optimized call rules.
12458         
12459         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
12460
12461         * inssel-ia64.brg: Add optimized ldind(reg) rules.
12462
12463 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
12464
12465         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
12466         change.
12467
12468         * mini-ia64.c: Remove LMF fixmes.
12469
12470         * mini-ia64.h: Remove most fields from LMF.
12471
12472         * inssel-ia64.brg (stmt): Fix unaligned access errors.
12473
12474         * mini-trampolines.c: Add support for IA64 function descriptors.
12475
12476         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
12477         for IA64 function descriptors.
12478
12479 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
12480
12481         * tramp-arm.c: patch the vtable for virtual calls. Added
12482         support code to register/unregister the LMF.
12483         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
12484         more LMF work.
12485
12486 2005-08-19  Dick Porter  <dick@ximian.com>
12487
12488         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
12489         bit value if needed.
12490
12491 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
12492
12493         * mini.c (mini_get_method): Move handling of wrapper data here.
12494
12495         * mini.c (mono_method_to_ir): Add support for dynamic methods.
12496
12497         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
12498         virtual.
12499
12500         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
12501         bblock->code does not remain empty.
12502
12503 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
12504
12505         * arrays.cs: Add regression test for #75832.
12506
12507         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
12508         rules. Fixes #75832.
12509
12510         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
12511         instruction scheduling.
12512
12513 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
12514
12515         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
12516
12517 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
12518
12519         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
12520
12521         * mini-codegen.c: Fix VC build.
12522
12523         * cpu-pentium.md: Increase length of atomic_exhange_i4.
12524
12525 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12526
12527         * mini.h: fix signature for mono_register_opcode_emulation.
12528
12529 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
12530
12531         * mini.c: Get rid of most of the helper_sig_... constants using
12532         mono_create_icall_signature ().
12533
12534 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
12535
12536         * jit-icalls.c (helper_ldstr): New helper function.
12537
12538         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
12539
12540         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
12541         throw, load the string using a helper call instead of creating a string object.
12542
12543         * aot.c: Update after LDSTR changes.
12544
12545         * mini.h: Bump AOT file version.
12546         
12547         * aot.c: Save class size info into the AOT file. Print more statistics during
12548         compilation.
12549
12550         * mini.h: Bump AOT file version.
12551
12552         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
12553         ordering of disasm cases. Fixes #74957.
12554
12555 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
12556
12557         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
12558         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
12559         the generic code needed for the ARM port.
12560
12561 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
12562
12563         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
12564         inssel-arm.brg: more ARM features and fixes.
12565
12566 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
12567
12568         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
12569         ARM port work in progress.
12570
12571 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
12572
12573         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
12574
12575         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
12576
12577         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
12578
12579         * inssel.brg (mini_emit_memset): Add support for unaligned access.
12580
12581         * *-ia64.*: Ongoing IA64 work.
12582         
12583         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
12584
12585 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
12586
12587         * TODO: Remove out-of-data todo stuff.
12588
12589         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
12590         dead code.
12591
12592         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
12593
12594         * mini.h: Bump corlib version.
12595
12596 2005-07-27  Martin Baulig  <martin@ximian.com>
12597
12598         * mini-codegen.c
12599         (create_copy_ins): Added `const unsigned char *ip' argument; set
12600         `copy->cil_code' from it.
12601
12602 2005-07-27  Martin Baulig  <martin@ximian.com>
12603
12604         * mini-exceptions.c (mono_handle_exception): Don't call
12605         mono_debugger_handle_exception() for filters.
12606
12607 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
12608
12609         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
12610         as well.
12611
12612 2005-07-26  Martin Baulig  <martin@ximian.com>
12613
12614         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
12615
12616         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
12617         helper_compile_generic_method() if the method is actually virtual
12618         and non-final.
12619
12620 2005-07-26  Martin Baulig  <martin@ximian.com>
12621
12622         * mini.c
12623         (trampoline_code): Renamed to `mono_trampoline_code' and made it
12624         public; this is now accessed directly by the debugger.
12625         (mono_generic_trampoline_code): Removed.
12626
12627         * debug-mini.c
12628         (mono_debug_init_method): Also add interncalls and wrappers.
12629
12630 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
12631
12632         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
12633
12634 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
12635
12636         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
12637
12638 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
12639
12640         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
12641
12642 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
12643
12644         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
12645         getting TLS offsets on AMD64 too.
12646
12647 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
12648
12649         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
12650
12651 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
12652
12653         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
12654         inssel-arm.brg, mini-arm.h: ARM port work in progress.
12655
12656 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
12657
12658         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
12659
12660         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
12661         to mini.c.
12662
12663         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
12664         mono_sparc_is_virtual_call ().
12665         
12666         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
12667
12668         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
12669         trampoline parameters.
12670
12671         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
12672         
12673         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
12674         to mono_arch_get_vcall_slot_addr.
12675
12676         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
12677         trampoline code.
12678
12679         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
12680
12681 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
12682
12683         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
12684
12685 2005-07-19  Martin Baulig  <martin@ximian.com>
12686
12687         * exceptions-amd64.c (throw_exception): Call
12688         mono_debugger_throw_exception() here like we're doing it on i386.
12689
12690 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
12691
12692         * mini-ia64.c: Add optimized TLS access support.
12693
12694 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
12695
12696         * mini-exceptions.c: Ongoing IA64 work.
12697
12698         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
12699
12700         * mini.c: Use the default optimization set when embedding. Fixes
12701         #75194.
12702
12703 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
12704
12705         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
12706         of trampolines to a separate file.
12707
12708         * mini-trampolines.c: New file.
12709
12710         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
12711         separate file.
12712         
12713         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
12714         amd64/ia64 code.
12715
12716         * mini-codegen.c: Fix cygwin build.
12717
12718 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
12719
12720         * mini.c: Add some minor changes needed by the IA64 port.
12721
12722         * *-ia64.*: Ongoing IA64 work.
12723
12724 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
12725
12726         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
12727         trampolines into arch-independent and arch-dependent parts.
12728
12729         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
12730
12731 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
12732
12733         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
12734
12735         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
12736         the xp-regalloc-branch for amd64.
12737
12738         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
12739         xp-regalloc-branch for x86.
12740
12741 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
12742
12743         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
12744
12745 2005-07-06  Martin Baulig  <martin@ximian.com>
12746
12747         * mini.c
12748         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
12749         (mono_jit_runtime_invoke): Likewise.
12750
12751 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
12752
12753         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
12754         on x86 too.
12755         
12756         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
12757         without loading their metadata. Reorganize the file format so exception handling+
12758         debug info is kept separate from normal method info. Create MonoJitInfo 
12759         structures for methods lazily.
12760
12761         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
12762         loading metadata.
12763         (x86_class_init_trampoline): Patch AOT class init trampolines too.
12764
12765         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
12766
12767         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
12768         in AOT code.
12769
12770         * mini.h: Bump AOT file version.
12771
12772 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
12773
12774         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12775
12776 2005-07-01  Raja R Harinath  <rharinath@novell.com>
12777
12778         * Makefile.am (check-local): Call semdel-wrapper.
12779
12780 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
12781
12782         * mini-x86.c: Revert the last change as it seems to break the build..
12783
12784 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
12785
12786         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12787         
12788         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
12789
12790 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
12791
12792         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
12793         outside of the macro, so strange stuff doesn't happen with gcc4
12794         (NEW_AOTCONST_TOKEN): Likewise.
12795
12796 2005-06-28  Martin Baulig  <martin@ximian.com>
12797
12798         * mini.c (mini_class_is_system_array): New static method; use this
12799         instead of `klass->parent == mono_defaults.array_class' everywhere
12800         since this also works for the new generic array class.
12801
12802 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
12803
12804         * inssel.brg: Remove warnings.
12805
12806 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
12807
12808         * mini-ia64.c: Ongoing IA64 work.
12809
12810         * basic-float.cs: Add float->i1 conversion test.
12811
12812         * iltests.il: Add conv.u4 test.
12813
12814 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
12815
12816         * inssel-long.brg: Fix bug caused by last change.
12817
12818 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
12819
12820         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
12821         BSDs.  Allows the x86 JIT to work on OSX86
12822
12823 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
12824
12825         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
12826         u4->i8 conversion.
12827
12828         * mini-ia64.c: Ongoing IA64 work.
12829
12830 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
12831
12832         * mini-ia64.c: Ongoing IA64 work.
12833
12834         * driver.c: Clean up jit_code_hash as well when using --regression.
12835
12836         * inssel-long.brg: Fix long->i4/u4 conversion rules.
12837
12838         * basic-long.cs: Add tests for long->u4 conversion.
12839
12840 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
12841
12842         * mini.c: Take mono_get_domainvar out of macros. This makes sure
12843         that we do not depend on undefined C behavior: the order stuff
12844         gets evaluated within an expression. Fixes mono when compiled on
12845         GCC 4.
12846
12847 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
12848
12849         * *-ia64.*: Ongoing IA64 work.
12850
12851         * aot.c: Lower memory usage while loading AOT methods.
12852
12853         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
12854
12855         * mini.h: Bump AOT file format version.
12856
12857 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
12858
12859         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
12860
12861 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
12862
12863         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
12864         not on callee assembly). Fixed some comments.
12865
12866 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
12867
12868         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
12869         it gets proper disassembly.
12870         (emit_method_info): Remove some dead code.
12871
12872         * mini.c (mini_method_compile): Allways allocate the GOT var in
12873         mono_method_to_ir for emulating opcodes.
12874
12875 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
12876
12877         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
12878         before freeing the code memory. Fixes #74990.
12879
12880         * objects.cs: Add regression test for #74992.
12881
12882         * liveness.c: Extend live ranges of arguments to the beginning of the
12883         method. Fixes #74992.
12884
12885         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
12886         so it points into the faulting instruction.
12887
12888 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
12889
12890         * jit-icalls.c (mono_imul_ovf): Add exception handling.
12891
12892         * *-ia64.*: Ongoing IA64 work.
12893
12894         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
12895
12896 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
12897
12898         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
12899
12900         * *-ia64.*: Ongoing IA64 work.
12901
12902 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
12903
12904         * basic-long.cs: Add tests for add/sub.ovf.
12905
12906         * basic.cs: Add tests for sub.ovf.
12907
12908         * *-ia64.*: Ongoing IA64 work.
12909
12910 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
12911
12912         * *-ia64.*: Ongoing IA64 work.
12913
12914         * basic.cs: Add conv.ovf.i4.un test.
12915
12916 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
12917
12918         * mini.c: (remove_block_if_useless) Fixed bug 75061.
12919         
12920 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12921
12922         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
12923
12924 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
12925
12926         * *-ia64.*: Ongoing IA64 work.
12927
12928 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12929
12930         * trace.[ch]:
12931         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
12932
12933 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
12934
12935         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
12936
12937 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
12938
12939         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
12940
12941         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
12942         of a call is callable by a near call.
12943
12944 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
12945
12946         * mini-ia64.c: Ongoing IA64 work.
12947
12948 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
12949
12950         * genmdesc.c: Make the generated array non-static.
12951
12952         * inssel-long.brg: Fix LSHR_IMM rule.
12953
12954         * *-ia64.*: Ongoing IA64 work.
12955
12956         * *-ia64.*: Ongoing IA64 work.
12957
12958 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
12959
12960         * *-ia64.*: Ongoing IA64 work.
12961
12962         * *-ia64.*: Ongoing IA64 work.
12963         
12964         * mini-ia64.c: Ongoing IA64 work.
12965
12966         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
12967
12968 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
12969
12970         * objects.cs basic-calls.cs: Move some tests to objects.cs.
12971         
12972         * objects.cs basic-long.cs: Move some tests to objects.cs.
12973
12974 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
12975
12976         * *-ia64.*: Ongoing IA64 work.
12977
12978         * iltests.il: Add a new test.
12979
12980         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
12981         newobj. Fixes #75042.
12982
12983 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
12984
12985         * *-ia64.*: Ongoing IA64 work.
12986         
12987         * *-ia64.*: Ongoing IA64 work.
12988         
12989         * *-ia64.*: Ongoing IA64 work.
12990
12991         * basic.cs objects.cs: Move tests accessing static variables as well.
12992
12993         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
12994
12995 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
12996
12997         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
12998
12999         * driver.c: Always print failed tests.
13000
13001         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
13002         frame pointer.
13003
13004         * *ia64*: Ongoing IA64 work.
13005
13006 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
13007
13008         * basic.cs: Add tests for add.ovf. Fix warnings.
13009
13010 2005-05-18  Miguel de Icaza  <miguel@novell.com>
13011
13012         * driver.c (mono_main): Avoid crash if no argument is passed to
13013         --break;  Do not use g_error, but f_printf.   And fix all other
13014         ocurrences of the same crash.
13015
13016 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
13017
13018         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
13019         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
13020         Fixes #74742.
13021
13022 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
13023
13024         * *-ia64.*: Add beginnings of IA64 backend.
13025
13026         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
13027
13028 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
13029
13030         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
13031         Fixes #74925.
13032
13033         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
13034
13035         * mini-amd64.c: Fix a warning.
13036
13037 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
13038
13039         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
13040         in float_neg. Fixes #74897.
13041
13042         * mini-amd64.c (emit_call): Fix another near call bug.
13043
13044 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
13045
13046         * declsec.c: Keep the appdomain information in the structure. Added a 
13047         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
13048         value gets overwritten).
13049         * declsec.h: Set the default MonoArray for the the stack to 6. Added
13050         an MonoAppDomain member to MonoSecurityFrame.
13051         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
13052         used in the stack walk. Now use a MonoArray which grow (double) when
13053         it gets full.
13054
13055 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
13056
13057         * mini.c: Re-enabled runtime cleanup, since running threads should
13058         now properly stop when exiting.
13059
13060 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
13061
13062         * mini-codegen.c: New file contaning the arch-independent local
13063         register allocator. Not used by any architectures yet.
13064
13065         * mini.h linear-scan.c: Merge some changes from the 
13066         mini-xp-local-regalloc branch.
13067
13068 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
13069
13070         * mini-amd64.c (emit_call): Fix calls to native functions when the
13071         runtime is compiled as a shared library. Fixes #74756.
13072
13073         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
13074         on a literal field. Fixes #74751.
13075
13076 2005-04-25  Raja R Harinath  <rharinath@novell.com>
13077
13078         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
13079
13080 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
13081
13082         * objects.cs: Add missing null casting test.
13083
13084 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
13085
13086         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
13087         in wrapper methods. Also rename 'address' variable to 'offset'.
13088
13089 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
13090
13091         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
13092         warnings.
13093         
13094         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
13095
13096         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
13097         work on windows.
13098
13099 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
13100
13101         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
13102
13103 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
13104
13105         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
13106         just the last bytes.
13107
13108 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
13109
13110         * aot.c (mono_compile_assembly): Fix warning.
13111
13112         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
13113         by the _MSC_VER stuff.
13114
13115 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
13116
13117         * inssel-long.brg: Fix #74588.
13118
13119         * cpu-amd64.md: Fix #74591.
13120
13121         * iltests.il: Add new regression tests.
13122
13123 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
13124
13125         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
13126         valuetype.
13127
13128 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
13129
13130         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
13131
13132         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
13133         from Bill Middleton <flashdict@gmail.com>.
13134
13135 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
13136
13137         * arrays.cs: Add new regression test. Fix warnings.
13138
13139 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
13140
13141         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
13142         and leakage in CKFINITE.
13143
13144         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
13145         this to a null op since it is called on amd64 too.
13146
13147         * exceptions-amd64.c (get_throw_trampoline): Align stack.
13148
13149         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
13150         body since this is not used on amd64.
13151         
13152         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
13153
13154         * mini-amd64.c: Remove obsolete fixmes.
13155
13156         * mini.c (print_method_from_ip): Fix debugging support.
13157
13158 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13159
13160         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
13161         so that expressions that don't give much gain are not reduced.
13162         * ssapre.h: Likewise.
13163
13164 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
13165
13166         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
13167
13168         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
13169
13170         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
13171
13172 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
13173
13174         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
13175
13176         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
13177
13178 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
13179
13180         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
13181         stack touching.
13182
13183         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
13184
13185         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
13186
13187         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
13188
13189         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
13190         MONO_ARCH_USE_SIGACTION. Fixes #74252.
13191
13192         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
13193
13194         * mini-x86.c: Fix up stack overflow handling.   
13195
13196         * exceptions.cs: Add new regression test.
13197
13198 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
13199
13200         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
13201         mono_jit_thread_attach.
13202
13203         * mini.c (mono_method_to_ir): Verify called method is not abstract.
13204
13205 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
13206
13207         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
13208         avoid calling constructors using callvirt.
13209
13210         * inssel.brg: Fix #74073.
13211
13212 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
13213
13214         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
13215         compilation with non-GCC compilers.
13216         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
13217         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
13218
13219 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
13220
13221         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
13222         klass->interface_offsets (will likely fix bug#74073).
13223
13224 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
13225
13226         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
13227
13228 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
13229
13230         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
13231         to amd64_div_reg_size ().
13232         
13233         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
13234
13235 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
13236
13237         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
13238
13239 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
13240
13241         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
13242
13243 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
13244
13245         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
13246         
13247         * mini.c (mono_precompile_assembly): Load and precompile referenced
13248         assemblies as well. Fixes #74015.
13249
13250 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
13251
13252         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
13253
13254 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
13255
13256         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
13257         a lot of checks and (anyway) permissions cannot work until corlib is 
13258         loaded.
13259
13260 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
13261
13262         * mini-ppc.c: fixed ABI issue on sysv/ppc.
13263
13264 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
13265
13266         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
13267         calls (fixes bug#72824).
13268
13269 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13270
13271         * mini.c: fix tail recursion elimination (see test in bug#73936).
13272
13273 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
13274
13275         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
13276         some fp functions in sse2 mode.
13277
13278 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
13279
13280         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
13281
13282 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
13283
13284         * mini.h mini.c: Add mono_get_jit_tls_key ().
13285
13286         * mini-x86.c: Enable fast TLS support on windows.
13287
13288 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
13289
13290         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
13291         * mini.c: Check for p/invoke method when generating code. If a
13292         p/invoke method, or it's class, isn't decorated with [Suppress
13293         UnmanagedCodeSecurity] then generate code to call System.Security.
13294         UnmanagedDemand (only if the security manager is active).
13295
13296 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
13297
13298         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
13299         last change as it seems to cause strange crashes.
13300         
13301 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13302
13303         * *.c: handle unsafe function pointers where needed.
13304
13305 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
13306
13307         * mini.c (mono_jit_free_method): Remove the fixme too.
13308
13309 2005-03-15  Miguel de Icaza  <miguel@novell.com>
13310
13311         * mini.c: As discussed, make the code actually free the delegate
13312         thunk now, to enable the debugging of delegate problems, use
13313         MONO_DEBUG=1 when running Mono. 
13314
13315         This takes also care of parts of the leaks as seen by Joe.
13316
13317 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
13318
13319         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
13320         thread_tls_offset calculation.
13321
13322 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
13323
13324         * declsec.c: Reworked linkdemand checks for icall. The previous code
13325         was using the declaration code (untrusted) and didn't work as expected
13326         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
13327         specific case.
13328
13329 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
13330
13331         * iltests.il: Add new localloc test.
13332
13333         * mini-amd64.c: Handle large stack allocations the same way as on
13334         windows if stack overflow handling is working.
13335         
13336         * mini-amd64.c: Allocate the signal stack using mmap.
13337
13338         * mini.c (sigsegv_signal_handler): Fix reading of context.
13339
13340         * mini-exceptions.c: Fix up stack overflow handling.
13341
13342         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
13343
13344         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
13345
13346         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
13347
13348         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
13349
13350         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
13351         tramp_init functions as they are no longer needed.
13352
13353 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
13354
13355         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
13356         
13357         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
13358
13359         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
13360         
13361         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
13362         support that now.
13363
13364         * mini-ops.h: Add OP_LMUL_IMM.
13365
13366         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
13367         long mul/div opcodes as intrinsic.
13368
13369         * mini-amd64.c (emit_call): Handle the case when the callee might be
13370         an AOT method.
13371
13372 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
13373
13374         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
13375         extra safe.
13376         
13377         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
13378
13379         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
13380
13381 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
13382
13383         * mini.c (mono_codegen): Don't leak here, to help people running
13384         monogrind.
13385
13386 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
13387
13388         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
13389         conversions in sse2 mode.
13390
13391         * basic-float.cs: Add regression test.
13392         
13393         * mini-amd64.c: Reenable sse2.
13394
13395 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
13396
13397         * mini-amd64.c: Disable sse2 until some regressions are fixed.
13398
13399 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
13400
13401         * driver.c: Copyright text should include 2005.
13402         
13403 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
13404
13405         * cpu-amd64.md (load_membase): Fix more max lengths.
13406
13407 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
13408
13409         * cpu-amd64.md (load_membase): Fix max length.
13410
13411         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
13412
13413         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
13414
13415         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
13416         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
13417
13418         * basic-float.cs: Add rounding regression test.
13419
13420         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
13421
13422 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
13423
13424         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
13425         structures in registers for pinvoke wrappers.
13426
13427 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
13428
13429         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
13430
13431 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
13432
13433         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
13434         wrapper to mono_jit_thread_attach.
13435
13436         * mini.c (mini_jit_thread_attach): New jit icall.
13437
13438         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
13439         native->managed wrappers.
13440
13441         * exceptions.cs: Add new regression test.
13442
13443         * mini.c (optimize_branches): Check regions in the cbranch to throw
13444         block case as well. Fixes #73242.
13445
13446 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
13447
13448         * mini.c: thread safety fixes.
13449
13450 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
13451
13452         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
13453         patching stuff, since delegates use jump trampolines so there is
13454         no caller.
13455
13456         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
13457         jump trampolines.
13458         
13459         * tramp-amd64.c: Fix build.
13460
13461         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
13462         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
13463
13464         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
13465         Rename this to mono_arch....
13466         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
13467
13468         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
13469
13470         * mini-amd64.c (emit_call): If both the caller and the callee is
13471         guaranteed to have 32 bit addresses, emit a normal call.
13472
13473         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
13474
13475         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
13476         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
13477         method_ptr inside delegates.
13478
13479 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
13480
13481         * mini.c (mono_jit_free_method): Free the method info even if the native code is
13482         invalidated. Fixes #73001.
13483
13484         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
13485
13486         * mini-x86.c: Only use stdcall for pinvokes on windows.
13487
13488 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
13489
13490         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
13491         * mini-x86.c: remove unreliable __thread var offset detection,
13492         use the correct accessors and enable by default.
13493
13494 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
13495
13496         * mini.c (mono_jit_free_method): Fix memory leak.
13497
13498 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
13499
13500         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
13501
13502 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
13503
13504         * cpu-amd64.md: Fix lengths of atomic opcodes.
13505
13506 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
13507
13508         * driver.c: try to not imply using ICU is any good.
13509
13510 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
13511
13512         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
13513         functions as inline ops.
13514
13515         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
13516         some Interlocked functions as inline ops.
13517
13518         * mini.c (move_basic_block_to_end): Fix bug in last patch.
13519
13520         * mini.h (MonoBasicBlock): Reorganize fields a bit.
13521
13522         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
13523
13524         * mini.c: Add support for OP_NOT_TAKEN.
13525
13526         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
13527         structures in registers for pinvoke wrappers.
13528
13529         * mini-amd64.c: Fix warnings.
13530
13531 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
13532
13533         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
13534
13535         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
13536
13537         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
13538         address instead of loading the address from it.
13539
13540         * mini-x86.c: Add support for returning small structs in registers
13541         on Win32. Fixes part of #70864.
13542         
13543 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
13544
13545         * trace.c (get_token): Improve error checking.
13546
13547 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
13548
13549         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
13550
13551 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
13552  
13553         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
13554         it can be reused for MonoClass.
13555         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
13556         _LINKDEMAND.
13557
13558 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
13559
13560         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
13561         instead of a MonoReflectionMethod. The method information wasn't used
13562         when displaying SecurityException details (but will be now).
13563
13564 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
13565
13566         * Makefile.am : windows build fix.
13567
13568 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
13569
13570         * iltests.il: Add new regression test.
13571
13572         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
13573         #72522.
13574
13575 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
13576  
13577         * mini.c: Moved linkdemand check into helper function check_linkdemand
13578         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
13579         LDFTN, LDVIRTFTN).
13580
13581 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
13582
13583         * declsec.c: Added statistics counter for different kinds of 
13584         LinkDemands.
13585         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
13586         (and commented) declaration.
13587         * mini.c: Added statistics counter for security Demand code 
13588         generation. Added display of security statistics.
13589
13590 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
13591
13592         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
13593         Fix compilation errors under gcc-2.95.
13594
13595 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
13596
13597         * mini.c, driver.c: Use the new jit trampoline hashtable
13598
13599 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13600
13601         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
13602
13603 2005-02-11  Martin Baulig  <martin@ximian.com>
13604
13605         * debug-mini.c (mono_debug_close_method): Free the line number array.
13606
13607 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
13608
13609         * aot.c: Break up large methods into smaller ones. Share GOT slots for
13610         icalls.
13611
13612         * mini.h: Bump AOT file format version. 
13613
13614 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
13615
13616         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
13617         APTC and P/Invoke.
13618         * declsec.h: Added macros to get/set lazyly initialized security 
13619         informations about assemblies. Added new enum for different type of
13620         possible LinkDemand violation. Added function to check LinkDemands.
13621         * mini.h: Added a field to MonoCompile to hold any security violation
13622         detected when JITting a method (so it can be thrown later).
13623         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
13624         and CEE_CALLVIRT. Added code to throw exception at the end of
13625         mini_method_compile (note: the exception is unhandled right now).
13626
13627 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
13628
13629         * mini.c, jit-icalls.c: use the managed implementation of
13630         memset for initobj and memset, to avoid managed <-> unmanaged
13631         transitions.
13632
13633 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
13634
13635         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
13636         optimization if it would need a GOT var.
13637
13638         * basic.cs: Add tests for constant propagation and switch statements.
13639
13640         * ssa.c: Fix out-of-range constant propagation and switch statements.
13641
13642 2005-02-09    <vargaz@freemail.hu>
13643
13644         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
13645
13646 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
13647
13648         * cpu-amd64.md (load_membase): Fix max length of load_membase.
13649
13650 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13651
13652         * mini.c: update to new signature of mono_class_get_allocation_ftn().
13653
13654 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
13655
13656         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
13657         arithmetic operations.
13658
13659 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
13660
13661         * mini-ppc.c: add a workaround for broken user code that
13662         DllImports vararg functions with non-vararg signatures.
13663
13664 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
13665
13666         * mini.c (mono_jit_compile_method_inner): Add detection and a 
13667         meaningfull error message for assemblies written in Managed C++.
13668
13669         * tramp-amd64.c mini-amd64.h: Add support for 
13670         create_trampoline_from_token ().
13671
13672         * aot.c mini-x86.c abcremoval.c: Applied patch from
13673         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
13674
13675 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
13676
13677         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
13678         which takes a MonoImage/token as parameter instead of a MonoMethod.
13679
13680         * aot.c: Use the new trampoline for initializing vtables.
13681
13682         * aot.c: Add support for ldfld/stfld_remote wrappers.
13683
13684         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
13685         rules for compare <MEM>, IMM.
13686
13687         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
13688
13689         * aot.c: Handle inherited finalizers correctly.
13690
13691 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
13692
13693         * inssel.brg (stmt): Add a missing _setup_... ().
13694
13695         * aot.c: Save some parts of the class state to the AOT file and use it
13696         to recompute that state when a class is initialized.
13697
13698         * mini.c: Install AOT hooks into the runtime.
13699
13700         * mini.h: Bump AOT file format version.
13701         
13702         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
13703         Fixes #72148.
13704
13705         * iltests.il: Add new test.
13706
13707 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
13708
13709         * mini.c: fix typo.
13710
13711 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
13712
13713         * mini.c: setup the statistical profiler in the thread attach
13714         callback to cope with the new single thread code.
13715
13716 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
13717
13718         * mini-ppc.c: ensure we have enough room for the profiler
13719         calls (fixed bug#72084).
13720
13721 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
13722
13723         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
13724         it.
13725
13726 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13727
13728         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
13729
13730 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13731
13732         * ssapre.c: Fixed an issue with down safety (this allows IronPython
13733         to succesfully execute parrotbench).
13734         * ssapre.h: Likewise.
13735
13736 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13737
13738         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
13739         variable for stores to method arguments (fixes a SSAPRE issue).
13740
13741 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13742
13743         * mini.c: handle value types in dup, fixes gen-112.cs.
13744
13745 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
13746
13747         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
13748         sequence for calls in dynamic methods to avoid thunks.
13749
13750 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
13751
13752         * mini.c: correctly remove dynamic methods from the hashtable.
13753
13754 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13755
13756         * driver.c: Disabled SSAPRE until fix the bug that appears
13757         in IronPython's parrotbench.
13758
13759 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
13760
13761         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
13762
13763         * mini.c (mono_method_to_ir): Revert the previous change.
13764         
13765         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
13766         when AOT compiling.
13767
13768         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
13769         mono_jit_info_table_find () etc. when running under valgrind.
13770
13771         * inssel.brg: Fix warnings.
13772
13773         * mini-exceptions.c: Fix warnings.
13774
13775 2005-01-31  Martin Baulig  <martin@ximian.com>
13776
13777         * driver.c (compile_all_methods_thread_main): Don't try to compile
13778         generic methods or anything which has type parameters.
13779
13780 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
13781
13782         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
13783
13784         * TestDriver.cs: Add --verbose flags.
13785
13786         * graph.c ssa.c: Fix 64 bit warnings.
13787         
13788         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
13789         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
13790         Fix 64 bit warnings.
13791
13792         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
13793         variable not spotted by gcc.
13794         
13795         * mini-amd64.c inssel-amd64.brg: Applied patch from  
13796         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
13797         X86_COMPARE_MEMBASE opcodes.
13798
13799         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
13800
13801 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
13802
13803         * *: MonoMethod->signature might be NULL now. You *MUST* use
13804         mono_method_signature.
13805
13806 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
13807
13808         * driver.c (compile_all_methods_thread_main): Compile the methods
13809         without invoking cctors.
13810
13811 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13812
13813         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
13814         * basic-calls.cs: test for the above.
13815
13816 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
13817
13818         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
13819         MonoJitInfo changes.
13820
13821 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
13822
13823         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
13824         eagerly if it contains dynamic methods.
13825         
13826         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
13827
13828         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
13829         trace, it is now computed by an icall from trace_ips.
13830         
13831         * mini-exceptions.c: Fix a warning.
13832
13833 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
13834
13835         * mini-exceptions.c: don't bother getting stack trace info if
13836         it's not going to be used.
13837
13838 2005-01-27  Raja R Harinath  <rharinath@novell.com>
13839
13840         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
13841         ssapre-mini-ops.h.
13842
13843 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
13844
13845         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
13846
13847         * aot.c: Avoid calling mono_method_get_header () if not needed.
13848
13849         * mini.h: Bump AOT file format version.
13850         
13851         * mini.c (mono_emit_native_call): Allocate a GOT var here.
13852
13853         * mini.c (mono_print_tree): Print more info for calls.
13854
13855 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
13856
13857         * declsec.h: Remove warning by adding missing include for marshal.h
13858
13859 2005-01-26  Martin Baulig  <martin@ximian.com>
13860
13861         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
13862         `ip' twice.
13863
13864 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
13865
13866         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
13867         flags.
13868
13869         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
13870
13871         * aot.c (mono_compile_assembly): Fix a warning.
13872
13873 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
13874
13875         * declsec.c: Look for security attributes on the original MonoMethod 
13876         (and not the wrapped one). This fix permissions on icalls.
13877
13878 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
13879
13880         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13881
13882         * mini.c (mono_allocate_stack_slots): Add a fixme.
13883
13884         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13885
13886 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13887
13888         * inssel.brg: optimize casts of sealed types (more
13889         optimizations waiting for fixes in remoting).
13890
13891 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
13892
13893         * inssel.brg (stmt): Add another dummy rule.
13894
13895         * driver.c: Fix warnings.
13896
13897         * driver.c (mono_main): If running under valgrind, instruct glib to use
13898         the system allocation functions so valgrind can track the memory
13899         allocated by the g_... functions.
13900
13901         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
13902
13903         * mini-ops.h: Add OP_DUMMY_STORE opcode.
13904
13905         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
13906
13907         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
13908         variables in try regions.
13909
13910         * mini.c (mini_method_compile): Don't disable optimizations on large
13911         methods when AOT compiling.
13912
13913         * mini.c (mono_allocate_stack_slots): New arch independent method to 
13914         allocate stack slots. Not yet used.
13915
13916 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
13917
13918         * debug-mini.c (mono_debug_close_method): Plug some leaks.
13919
13920 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
13921
13922         * mini-ppc.c: make the branch info relative as the code
13923         buffer can be reallocated.
13924
13925 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
13926
13927         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
13928         * driver.c: Removed the AOT/security restriction. Now initialize the
13929         security manager (in metadata) if --security is used.
13930         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
13931         rather than the pointer to declarative security, when AOT is used.
13932
13933 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
13934
13935         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
13936         basic blocks, reduced intrinsic exception throwing code size.
13937
13938 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
13939
13940         * driver.c (mini_usage): Reorder the usage screen.
13941
13942 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
13943
13944         * mini.c (mono_resolve_patch_target): Fix warning.
13945
13946 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
13947
13948         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
13949         previous patch.
13950
13951         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
13952
13953         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
13954         breaks the amd64 build.
13955
13956         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
13957         register allocation. Fixes #71454.
13958
13959         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
13960
13961         * arrays.cs: Add new regression test.   
13962
13963 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13964
13965         * ssapre.c: Turned usage of snprintf to GString.
13966         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
13967         (I left it on by mistake in my previous commit).
13968
13969 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
13970
13971         * mini.c, cfold.c, basic-calls.cs: preserve side effects
13972         on cond branch optimization (fixes bug# 71515).
13973
13974 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13975
13976         * abcremoval.c: Fixed bug 71062.
13977         * abcremoval.h: Likewise.
13978
13979 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13980
13981         * mini.c: Added a new functionality to optimize_branches, the removal
13982         of useless basic blocks, and fixed some problem in the removal of
13983         critical edges; some utility functions added for both purposes.
13984         * ssapre.c: Added complex expression support, and fixed bug 70637.
13985         * ssapre.h: Likewise.
13986         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
13987         enabled in SSAPRE.
13988         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
13989         * driver.c: Re-enabled SSAPRE.
13990
13991 2005-01-19  Martin Baulig  <martin@ximian.com>
13992
13993         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
13994         the result of mono_get_method_constrained().
13995
13996 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
13997
13998         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
13999         manager.
14000
14001 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
14002
14003         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
14004         be detected.  Fixes #59296.
14005
14006 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
14007
14008         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
14009         which can happen. Fixes #71361.
14010
14011 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
14012
14013         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
14014         manager.
14015
14016 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
14017
14018         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
14019         appdomain-unload.exe to fail.
14020         
14021         * mini.c: Fix some memory leaks.
14022
14023 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
14024
14025         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
14026         Fixed bug and sped up some codepaths.
14027
14028 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
14029
14030         * mini.c: Fix some memory leaks.
14031
14032         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
14033         conversion.
14034
14035         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
14036
14037         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
14038         #71320.
14039
14040         * iltests.il: Add regression test for #71320.
14041
14042 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
14043
14044         * mini.c (mono_codegen): Fix installation of profiler hooks.
14045
14046         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
14047
14048 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
14049
14050         * mini.h, mini.c, cfold.c: optimize access to enum
14051         readonly fields, too. Eval conditional branches if possible
14052         to perform unreachable code removal in more cases.
14053
14054 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
14055
14056         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
14057
14058         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
14059         code manager.
14060
14061         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
14062         WinXP DEP. Fixes #71244.
14063
14064 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
14065
14066         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
14067
14068 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
14069
14070         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
14071
14072 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
14073
14074         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
14075         changes.
14076
14077         * mini.h: Bump AOT version.
14078
14079         * mini.h (MonoCompile): Change exvar to a hash table.
14080
14081         * mini.c: Allocate a separate exvar for each handler block.
14082
14083         * mini.c: Get rid of the computation of filter_lengths, its not needed.
14084
14085         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
14086         ex var with the pending exception and only throw if the two are equal.
14087         Fixes #68552.
14088         
14089         * exceptions.cs: Add tests for rethrow and nested catch clauses.
14090
14091         * mini-x86.c: Fix warnings.
14092
14093         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
14094         used by all the ports now.
14095
14096         * aot.c: Add write-symbols and save-temps options.
14097
14098 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
14099
14100         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
14101
14102 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
14103
14104         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
14105         operations.
14106
14107         * tramp-s390.c: Check vtable slot belongs to the domain.
14108
14109         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
14110         as per other platforms.
14111
14112         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
14113
14114 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
14115
14116         * driver.c: we don't run the Main() code in a subthread anymore.
14117
14118 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
14119
14120         * mini.c: added experimental rtc support in the statistical
14121         profiler: if the user has the permission, more accurate statistics
14122         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
14123         The MONO_RTC value must be restricted to what the linux rtc allows:
14124         power of two from 64 to 8192 Hz.
14125
14126 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
14127
14128         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
14129
14130 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
14131
14132         * mini-ppc.c: better icache flush for smp.
14133
14134 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
14135
14136         * mini-amd64.c (emit_move_return_value): Fix memory leak.
14137
14138         * mini-x86.c (get_call_info): Add the get_call_info () code from the
14139         amd64 port, not yet used.
14140
14141 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
14142
14143         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
14144         a struct type.
14145
14146 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
14147
14148         * driver.c: Added --security option to activate the security manager.
14149         Right now this will allow code generation for declarative demands and
14150         is disabled when AOT is specified.
14151         * mini.c: Add code generation for declarative security demands.
14152         * mini.h: Add mono_use_security_manager as an extern gboolean.
14153
14154 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
14155
14156         * aot.c (mono_compile_assembly): Speed up compilation a bit by
14157         emitting more dense assembly code.
14158
14159         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
14160         exception throwing stuff.
14161
14162 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
14163
14164         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
14165         dead code.
14166
14167         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
14168         left in by mistake.
14169
14170         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
14171         fixed.
14172
14173         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
14174
14175         * tramp-*.c: Only patch vtable slots if the object is in the current
14176         domain. Fixes appdomain-unload.exe.
14177
14178         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
14179         
14180         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
14181         x86 branch.
14182
14183 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
14184
14185         * mini.c (reverse_branch_op): New helper function.
14186
14187         * mini.c (optimize_branches): Run the new optimization only on 
14188         platforms which support it. Also reverse all kinds of branches.
14189
14190         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
14191
14192         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
14193         a throw statement.
14194
14195         * mini.c (optimize_branches): Reverse not-equals branches if the false
14196         bblock is a throw. This happens a lot of time with argument checking in
14197         corlib.
14198
14199         * mini.c (mono_codegen): Add support for placing basic blocks after
14200         the function epilogue.
14201
14202         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
14203         function epilogue.
14204         
14205 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
14206
14207         * mini.c (setup_stat_profiler): Only set this up if the platform
14208         supports ITIMER_PROF.
14209
14210 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
14211
14212         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
14213         previous patch.
14214
14215         * inssel.brg: Fix a warning.
14216
14217 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
14218
14219         * mini.c: added support for statistical profiler 
14220         (run with: --profile=default:stat).
14221
14222 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
14223
14224         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
14225
14226         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
14227
14228         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
14229         related to global registers from the amd64 port.
14230
14231 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
14232
14233         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
14234
14235         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
14236         with global registers.
14237         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
14238
14239         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
14240
14241 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
14242
14243         * debug-mini.c (encode_value): Fix off-by-one.
14244
14245         * aot.c (encode_value): Likewise.
14246
14247         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
14248
14249 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
14250
14251         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
14252         AOT.
14253
14254         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
14255         
14256         * aot.c (emit_method_info): Increase size of temp buffer.
14257
14258         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
14259         the AOT case.
14260
14261 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
14262
14263         * aot.c (emit_method_info): Fix build.
14264         
14265         * aot.c: Further rework of the AOT file format to reduce the size of
14266         the method info data.
14267
14268         * mini.h: Bump AOT file format version.
14269
14270 2004-12-27  Martin Baulig  <martin@ximian.com>
14271
14272         * mini.c (mini_get_method): New static method; call
14273         mono_get_method_full() and mono_get_inflated_method().
14274         (mono_method_to_ir): Use mini_get_method() instead of
14275         mono_get_method_full(). 
14276
14277 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
14278
14279         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
14280
14281 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
14282
14283         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
14284
14285         * inssel-amd64.brg: Add some optimization rules.
14286
14287 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
14288
14289         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
14290         standard not GC'd stuff is fine.
14291
14292 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
14293
14294         * aot.c: Rework the AOT file format to get rid of most of the global
14295         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
14296
14297         * mini.h: Bump AOT file format version.
14298         
14299 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
14300
14301         * mini.h: Bump AOT file format version.
14302
14303         * aot.c (mono_aot_is_got_entry): New function to determine if an 
14304         address is inside a GOT.
14305
14306         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
14307
14308         * cpu-pentium.md: Increase the maximum size of some instructions which
14309         might involve a got access.
14310         
14311         * mini.c (get_method_from_ip): Another debug helper function.
14312
14313         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
14314         when got var accesses are created during the decompose phase.
14315
14316         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
14317
14318         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
14319         argument mini_compile_method and to MonoCompile, and use this to
14320         determine whenever a given method is compiled for AOT. This allows the
14321         other methods compiled during AOT compilation to be free of AOT stuff,
14322         so the backends does not need to add special support for them by
14323         creating a fake GOT etc.
14324
14325         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
14326         longer needed.
14327
14328 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
14329
14330         * mini.c (mono_method_to_ir): It turns out that some of the
14331         x-appdomain wrappers are lax with types, so just ignore this for
14332         all wrappers.
14333
14334         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
14335         at the vtable->klass. If it is non-shared code we can just use the
14336         vtable.
14337
14338 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
14339
14340         * mini-ppc.c: access MonoDomain from tls, too.
14341
14342 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
14343
14344         * declsec.c: Removed unused variable (and related warning ;-)
14345
14346 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
14347
14348         * iltests.il: New test for LDELEMA on an array of ref types.
14349
14350         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
14351         all ldelema's on reftypes.
14352         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
14353         it was the wrong place to put it.
14354
14355         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
14356         register to pop to make this cleaner, at the request of Paolo.
14357
14358 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
14359
14360         * mini-ops.h (OP_GETHASHCODE): New op.
14361
14362         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
14363
14364         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
14365         operation.
14366
14367         For a microbenchmark, this reduces the cost of Hashtable.get_Item
14368         by 25%.
14369         
14370         * mini-x86.c (mono_arch_output_basic_block): Rather than
14371
14372         add ebp, 4
14373
14374         Emit
14375
14376         pop edx
14377
14378         The first is 3 bytes while the second is 1. This saves 36 kb on
14379         mscorlib, quite a big saving. When bootstraping mcs, I was able to
14380         see a small boost because of icache locality.
14381
14382         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
14383
14384 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
14385
14386         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
14387         started code sharing with the generic code.
14388
14389 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
14390
14391         * mini-ppc.c, cpu-g4.md: added code for direct access to
14392         tls data slots.
14393
14394 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
14395
14396         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
14397          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
14398         to OP_TLS_GET.
14399
14400 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
14401
14402         * declsec.c|h: Added functions to cache the declarative stack modifiers
14403         in MonoJitInfo and to create a security frame from a MonoJitInfo 
14404         structure.
14405         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
14406         created. Register internal calls for System.Security.SecurityFrame::
14407         _GetSecurityFrame and _GetSecurityStack.
14408         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
14409         the definitions for the new stack walk/callback mechanism.
14410         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
14411         first security frame for LinkDemands and InheritanceDemands) and
14412         GetSecurityStack for Demands. Both use the new mono_walk_stack code
14413         from lupus.
14414         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
14415         walk initialization (lupus).
14416
14417 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
14418
14419         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
14420         idiom.
14421         (handle_loaded_temps): Do not create a temporary variable for
14422         things that we know are temps. They will never be modified.
14423         (mono_spill_call): Set MONO_INST_IS_TEMP
14424         (mono_emulate_opcode): ditto
14425         (emit_tree): ditto
14426         (mono_method_to_ir.CEE_DUP): ditto
14427
14428 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
14429
14430         * mini.c (type_to_eval_stack_type): Make this handle the void type
14431         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
14432         (emit_tree): use ip_in_bb to special case some common idioms
14433         Update all callers to pass in the IP.
14434         (mono_method_to_ir): Make CEE_CALL* do the above as well.
14435
14436         This gives us a nice 2% speedup in mcs bootstrap.
14437
14438         * mini-x86.c (peephole_pass): Peephole pass to make
14439         mov  [foo], eax
14440         push [foo]
14441
14442         into
14443
14444         mov [foo], eax
14445         push eax
14446
14447         * mini.c (ip_in_bb): new method.
14448         (mono_method_to_ir): use this method rather than doing the hash
14449         lookup ourselves.
14450
14451         * linear-scan.c (mono_linear_scan): When expiring actives, you
14452         don't need to keep around variables that expire on this
14453         instruction. This makes it so that:
14454              a = b + 1
14455         will turn into:
14456              store (ebx add (ebx, 1))
14457         which will become
14458              add ebx, 1
14459
14460 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
14461
14462         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
14463         combination to avoid doing two copies. Fix up problems with previous
14464         patch.
14465
14466         * mini.c: Fix 64 bit warnings.
14467
14468         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
14469
14470 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
14471
14472         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
14473         changes from the x86 code.
14474
14475         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
14476
14477 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
14478
14479         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
14480         throwing code to reduce its size, unify the AOT and non-aot code and 
14481         get rid of relocations in the AOT case.
14482
14483         * mini-x86.h mini.c exceptions-x86.c 
14484         (mono_arch_get_throw_corlib_exception): New arch specific function to 
14485         raise corlib exceptions which doesn't require relocations in the 
14486         caller.
14487
14488         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
14489
14490 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
14491
14492         * mini.c (mono_emit_method_call): Only allocate the got var when it is
14493         needed.
14494
14495         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
14496         in the AOT case.
14497
14498 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14499
14500         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
14501         with add function when used from Inc/dec atomic 
14502         functions. Re-enabled optimization on x86.
14503         * mini-ops.h: renamed atomic_add functions to
14504         allow _add to match the Interlocked::Add and
14505         _add_next to match Interlocked::Inc/Dec.
14506
14507 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
14508
14509         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
14510         linking of BBs to the end BB, and enabled SSAPRE also with
14511         consprop and copyprop (which was prevented by that bug).
14512
14513 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14514
14515         * mini-x86.c: disabling the Interlocked optimizing code. 
14516
14517 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
14518
14519         * aot.c (load_aot_module): Move reading of got_addr after the AOT
14520         file version check.
14521         
14522 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14523
14524         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
14525         interlocked optimization due lack of support on x86, rewrote 
14526         exchange to take into account that base may be in eax.
14527         
14528         xsp works again; activated Interlocked optimizing code.
14529         
14530 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
14531
14532         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
14533
14534 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
14535
14536         * mini-ops.h: Add new opcodes.
14537
14538         * mini.h: Add new patch types. Add got_var to MonoCompile.
14539
14540         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
14541         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
14542         make it work with all kinds of patchable code.
14543
14544         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
14545         address of the GOT, and referencing entries in the GOT.
14546
14547         * mini.c: Add code to load the GOT address if needed by an opcode.
14548
14549         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
14550         independent AOT code on the x86 using an elf-style Global Offset Table.
14551
14552 2004-12-14  Raja R Harinath  <rharinath@novell.com>
14553
14554         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
14555
14556 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14557
14558         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
14559         when running xsp.
14560
14561 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
14562
14563         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
14564         of Interlocked:Increment/Decrement/Add as inline ops.
14565         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
14566
14567 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
14568
14569         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
14570         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
14571
14572 2004-12-12  Duncan Mak  <duncan@ximian.com>
14573
14574         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
14575         again. `patch_info->table_size' is no longer valid after Zoltan's
14576         commit #37636.
14577
14578 2004-12-12  Martin Baulig  <martin@ximian.com>
14579
14580         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
14581         if we are the "real" method, ie. not an inlined method inside it.
14582
14583 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
14584
14585         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
14586         before we look in the special fields table. This fixes
14587         ../tests/thread-static-init.cs.
14588
14589 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14590
14591         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
14592         for Array get_Rank and get_Length. Fixes bug #70465.
14593
14594 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
14595
14596         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
14597         separate structure to reduce the size of MonoJumpInfo.
14598
14599 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
14600
14601         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
14602
14603 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
14604
14605         * mini.c (mini_get_inst_for_method): Changed to allow ports
14606         to return a MonoInst instead of opcode 
14607         (renamed mini_get_opcode_for_method to better reflect the new functionality)
14608         
14609         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
14610         Allow ports to return a created MonoInst instead of op-code, will enable
14611         new optimizations.
14612         (renamed mini_get_opcode_for_method to better reflected the functionality)
14613
14614 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
14615
14616         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
14617
14618 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
14619
14620         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
14621         Fixes #69985.
14622
14623 2004-12-08  Martin Baulig  <martin@ximian.com>
14624
14625         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
14626         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
14627
14628 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
14629
14630         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
14631         correctly.
14632
14633         * exceptions.cs: Disable some tests which depend on properties of x86 fp
14634         arithmetic.
14635
14636 2004-12-08  Raja R Harinath  <rharinath@novell.com>
14637
14638         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
14639
14640 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
14641
14642         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
14643         bug introduced by the previous patch.
14644
14645 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14646
14647         * mini-ppc.c, objectc.cs: handle large structs passed by value
14648         (fixes bug #69972).
14649
14650 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
14651
14652         * mini-ppc.c: OP_ARGLIST implementation from
14653         Geoff Norton  <gnorton@customerdna.com>.
14654
14655 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14656
14657         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
14658         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
14659
14660 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14661
14662         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
14663
14664 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14665
14666         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
14667         support.
14668
14669 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
14670
14671         * mini-sparc.c: Zero out localled-ed memory.
14672
14673         * iltests.il: Add tests for zeroing out localloc-ed memory.
14674
14675 2004-12-04  Martin Baulig  <martin@ximian.com>
14676
14677         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
14678         mono_method_get_signature_full().       
14679
14680 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
14681
14682         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
14683         and some utility functions (always for SSAPRE), integrated SSAPRE.
14684         * mini.h: Likewise.
14685         * driver.c: Added ssapre option.
14686         * ssa.c: Small fix on OP_ARG handling.
14687         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
14688         * Makefile.am: Likewise.
14689
14690 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
14691
14692         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
14693         now in the xp code.
14694
14695         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
14696         icall.
14697
14698 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14699
14700         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
14701         
14702         * cpu-s390.md : Increase instruction length of oparglist.
14703
14704         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
14705
14706 2004-11-30  Martin Baulig  <martin@ximian.com>
14707
14708         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
14709         virtual generic methods.  We call a special helper_compile_generic_method()
14710         icall to retrieve the method from the vtable, inflate and compile
14711         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
14712
14713         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
14714
14715 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
14716
14717         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
14718
14719 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
14720
14721         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
14722         Fixes #69929.
14723
14724 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
14725
14726         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
14727         platforms with PIC aot.
14728
14729 2004-11-28  Martin Baulig  <martin@ximian.com>
14730
14731         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
14732         Fixes gen-112.cs.
14733
14734 2004-11-28  Martin Baulig  <martin@ximian.com>
14735
14736         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
14737         the result of mono_type_get_underlying_type() to check whether
14738         we're byref.
14739
14740 2004-11-26  Martin Baulig  <martin@ximian.com>
14741
14742         * mini.c
14743         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
14744         in the g_assert().
14745
14746 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
14747
14748         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
14749         the same way as the other arguments so they won't get clobbered.
14750
14751         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
14752         calls through R11 since it is clobbered by the trampoline code.
14753
14754 2004-11-26  Raja R Harinath  <rharinath@novell.com>
14755
14756         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
14757         pick up in-tree mscorlib.dll.
14758
14759 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
14760
14761         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
14762
14763         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
14764         runtime data/code are now stored in a table similar to the GOT in ELF. 
14765         This allows the code itself to be position independent.
14766
14767         * aot.c: Fix loading of referenced assemblies after the lazy assembly
14768         loading changes.
14769
14770         * aot.c: Attach ELF type (object/function) directives to all global
14771         symbols.
14772
14773         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
14774
14775         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
14776
14777         * mini-amd64.h: Turn on PIC AOT code.
14778
14779         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
14780         returning the offset within an OP_AOTCONST instruction where the GOT
14781         offset needs to be added.
14782
14783         * mini.h: Bump AOT file format version.
14784
14785 2004-11-25  Martin Baulig  <martin@ximian.com>
14786
14787         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
14788         uninflated generic methods.
14789
14790 2004-11-25  Martin Baulig  <martin@ximian.com>
14791
14792         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
14793
14794 2004-11-24  Martin Baulig  <martin@ximian.com>
14795
14796         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
14797         original klass (this only applies for generic instances).
14798
14799 2004-11-24  Martin Baulig  <martin@ximian.com>
14800
14801         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
14802         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
14803         that array).
14804
14805 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
14806
14807         * mini.c (mono_method_to_ir): Disable inlining for methods containing
14808         localloc. Fixes #69678.
14809
14810         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
14811         
14812 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
14813
14814         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
14815         used SSE registers on pinvoke calls. Fixes #69774.
14816
14817 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
14818
14819         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
14820         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
14821
14822 2004-11-23  Raja R Harinath  <rharinath@novell.com>
14823
14824         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
14825         Refer directly to the mcs/ tree.
14826
14827 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14828
14829         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
14830         Check if a trampoline for a synchronized method is required. 
14831
14832 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
14833
14834         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
14835         with localloc if needed. Throe arithmetric exception in
14836         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
14837         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
14838
14839 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
14840
14841         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
14842         types before switching on type.  Fixes #69622.
14843
14844 2004-11-19  Raja R Harinath  <rharinath@novell.com>
14845
14846         * Makefile.am (check-local): New.  Integrate into 'make check'.
14847         (MCS,RUNTIME): Define using in-tree mono and mcs.
14848         (ILASM): New.
14849         (%.exe): Use $(ILASM).
14850
14851 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
14852
14853         * mini-ppc.c: adjust initial prolog size (bug #69691).
14854
14855 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
14856
14857         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
14858         #69664.
14859
14860 2004-11-17  Raja R Harinath  <rharinath@novell.com>
14861
14862         * Makefile.am (clean-local): Rename from 'clean'.
14863
14864 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14865
14866         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
14867         to mono_arch_is_int_overflow. 
14868         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
14869         SIGFPE events.
14870
14871 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
14872
14873         * declsec.c|h: New files to support declarative security attributes.
14874         Added function to check if a method has (applicable) security.
14875         * mini.c|h: Add check for declarative security attributes in
14876         mono_method_check_inlining.
14877         * Makefile.am: Added declsec.c and declsec.h to the build.
14878
14879 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
14880
14881         * mini.c, mini.h: update to keep dynamic code info per-domain.
14882
14883 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
14884
14885         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
14886         (mini_init): Get rid of it from here too.
14887
14888 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
14889
14890         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
14891         implemented OP_RETHROW (patch by Geoff Norton
14892         <gnorton@customerdna.com>).
14893
14894 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
14895
14896         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
14897         between appdomains.  Fixes appdomain-unload on PPC.
14898
14899 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
14900
14901         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14902         mini-exceptions.c: handle the new wrapper types.
14903         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
14904         token value as a MonoClass* when compiling a wrapper.
14905         mono_jit_create_remoting_trampoline now takes an additional
14906         MonoRemotingTarget parameter.
14907         
14908 2004-11-10  Martin Baulig  <martin@localhost>
14909
14910         * mini.c (mono_method_to_ir): Use `generic_container->context'
14911         rather than creating a new one.
14912
14913 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14914
14915         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
14916
14917         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
14918
14919 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
14920
14921         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
14922         the experimental aot cache stuff.
14923
14924 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14925
14926         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14927         mini-exceptions.c: update to exception clause structure changes.
14928
14929 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
14930
14931         * exceptions-x86.c (throw_exception): Fix warnings.
14932
14933         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
14934         for OP_RETHROW.
14935
14936 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
14937
14938         * exceptions-sparc.c (get_throw_exception): Really fix this.
14939
14940 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
14941
14942         * tramp-*.c: we no longer support icalls without wrappers, so
14943         a bit of code can be removed here
14944
14945 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
14946
14947         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
14948         patch.
14949
14950         * cpu-sparc.md: Add op_rethrow.
14951
14952         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
14953
14954         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
14955
14956         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
14957         * mini-ops.h: Add OP_RETHROW.
14958
14959         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
14960
14961         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
14962
14963 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
14964         
14965         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
14966         Makes the output much easier to read
14967
14968 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
14969
14970         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
14971         prevents another huge leak when compiling with ssa. Secondly, the
14972         performance of doing this rather than freeing the lists is much
14973         better. GList does a lock every time you allocate a list link,
14974         so that it can use a memory pool. So, it is better to just use
14975         a memory pool of our own.
14976         
14977         * ssa.c, linear-scan.c: replace g_list_remove_link with
14978         g_list_delete.  The remove one does not free the GList, so we were
14979         leaking memory. On -O=all --compile-all with corlib, this cut down
14980         3 MB of allocations.
14981
14982 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
14983
14984         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
14985
14986         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
14987
14988         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
14989         into a new function mono_create_jit_trampoline ().
14990
14991 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
14992
14993         * trace.c (get_spec): Allow tracing of classes without a namespace.
14994
14995 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
14996
14997         * mini.c: Fix pointer overwrite in mini_method_compile.
14998
14999 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
15000
15001         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
15002         The darwin ABI needs some special handling for 1 and 2 byte structs
15003         Lets use lbz/lhz instead of lwz everywhere.
15004         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
15005         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
15006         Use stb/sth for the former, and put the latter always on stack instead of in
15007         argument registers.
15008
15009 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
15010
15011         * trace.c (is_filenamechar): Add '_'.
15012
15013 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
15014
15015         * mini-s390.c: Fix prolog length to allow for large trace requirements.
15016
15017         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
15018
15019 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
15020
15021         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
15022         depends on libmonogc. Fixes #68805.
15023
15024 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
15025
15026         * mini.c (mono_jit_free_method): Provide extra information for
15027         this error.  Currently this leaks, but will be turned into a
15028         developer option in the future.
15029
15030 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
15031
15032         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
15033
15034 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
15035
15036         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
15037         boundary. Fixes reading of PATCH_INFO_R4 and R8.
15038         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
15039
15040 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
15041
15042         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
15043         trampolines for AOT code.
15044
15045 2004-10-22    <vargaz@freemail.hu>
15046
15047         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
15048         constructed types. Fixes #68136.
15049
15050 2004-10-21  Martin Baulig  <martin@ximian.com>
15051
15052         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
15053         if it returns true, unwind the stack to the call instruction.
15054
15055 2004-10-21    <vargaz@freemail.hu>
15056
15057         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
15058
15059         * mini.h: Bump AOT version number.
15060
15061         * objects.cs: Add another test for unbox trampolines.
15062
15063         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
15064         valuetype methods.
15065
15066 2004-10-20    <vargaz@freemail.hu>
15067
15068         * driver.c: Add SHARED to the set of optimizations tested.
15069
15070         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
15071
15072         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
15073         used by CEE_NEWARR.
15074
15075         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
15076
15077 2004-10-20  Martin Baulig  <martin@ximian.com>
15078
15079         * mini-exceptions.c (mono_handle_exception): Call
15080         mono_debugger_handle_exception() to tell the debugger about
15081         catch/finally clauses.
15082
15083 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
15084
15085         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
15086
15087         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
15088         #68447.
15089
15090 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
15091
15092         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
15093         methods as their native size, fixed bug #57543, #57545.
15094         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
15095         This saves a temporary register and mullw call down into 1 (minor perf
15096         increase for cases like sum = sum * 5;  This use to translate into:
15097             li r11,5
15098             mullw r28,r28,r11
15099         It now translates to
15100             mulli r28,r28,5
15101
15102 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
15103
15104         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
15105         #68388.
15106
15107 2004-10-11  Martin Baulig  <martin@ximian.com>
15108
15109         * mini.c (mono_method_to_ir): If we're a generic method, get the
15110         MonoGenericContainer from our MonoMethodNormal and create a
15111         MonoGenericContext from it.
15112
15113 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
15114
15115         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
15116
15117         * basic-long.cs: Add test for checked i8->i2 cast.
15118
15119 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15120
15121         * inssel-ppc.brg: added a couple of speedup rules.
15122
15123 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
15124
15125         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
15126         to speed up rebuilds.
15127
15128 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15129
15130         * mini-s390.c: Minor fix to OP_OR_IMM.
15131
15132 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
15133
15134         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
15135         better. Fixes appdomain-unload.exe on sparc.
15136
15137 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
15138
15139         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
15140         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
15141         see bug 67324.
15142
15143 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
15144
15145         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
15146
15147 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
15148
15149         * mini.c: Always generate a field read/write wrapper for members
15150         of the class MarshalByRefObject since the actual instance could
15151         be a CBO.
15152
15153 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
15154
15155         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
15156
15157 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
15158
15159         * driver.c mini.h trace.c: Move the setting of the main assembly into
15160         a separate function called mono_trace_set_assembly () and call it after
15161         actually loading the main assembly. Fixes #66872.
15162
15163 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
15164
15165         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
15166         using the code manager.
15167
15168 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
15169
15170         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
15171
15172 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
15173
15174         * cpu-amd64.md: Fix bug in previous patch.
15175         
15176         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
15177         #66650.
15178
15179 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
15180
15181         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15182         mini-exceptions.c: updates for changed stack walk interface.
15183
15184 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15185
15186         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
15187
15188 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
15189
15190         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
15191
15192 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
15193
15194         * driver.c (mini_regression_list): Do not call mono_assembly_close 
15195         since assemblies can't be unloaded.
15196         
15197 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
15198
15199         * cpu-amd64.md: Fix more instruction lengths.
15200
15201         * cpu-amd64.md: Fix lengths of some instructions.
15202
15203 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
15204
15205         * inssel.brg: Make the array ldelema check aot friendly.
15206
15207 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
15208
15209         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
15210
15211         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
15212
15213 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
15214
15215         * mini-x86.c: Fix build.
15216
15217         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
15218         mono_type_get_underlying_type () helper function to simplify code.
15219         
15220 2004-09-09  Martin Baulig  <martin@ximian.com>
15221
15222         * mini-amd64.c: Don't access `type->data.klass' directly, call
15223         mono_class_from_mono_type() instead since the type may be a
15224         generic instance.
15225
15226 2004-09-09  Martin Baulig  <martin@ximian.com>
15227
15228         * mini-amd64.c (get_call_info): Fix support for generic instances.
15229         (add_valuetype): Use mono_class_from_mono_type() to get the class
15230         since we can be a generic instance.
15231
15232 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
15233
15234         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
15235
15236 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
15237
15238         * liveness.c: reset spill costs on each scan: bug 62107
15239
15240 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
15241
15242         * exceptions-sparc.c (mono_arch_find_jit_info): remove
15243         unnecessary line that doesn't compile
15244
15245 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
15246
15247         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
15248         trampolines, make them call an error function so people can fix their
15249         code.
15250
15251 2004-09-06  Martin Baulig  <martin@ximian.com>
15252
15253         * mini.c (mono_method_to_ir): When initializing locals, handle a
15254         generic instances like a valuetype if it's a valuetype and like a
15255         class if it's a class.
15256
15257 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
15258
15259         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
15260         stack. Fixes #64674.
15261
15262         * exceptions.cs: Add test for unwinding of call arguments.
15263
15264 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
15265
15266         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
15267         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
15268         set the carry/borrow flag). The sparc and s390 implementations
15269         can now use optimized versions (and simplify the code). ppc bugfixes.
15270
15271 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
15272
15273         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
15274
15275 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
15276
15277         * inssel-amd64.brg: Remove leftover 32 bit rule.
15278
15279         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
15280
15281 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
15282
15283         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
15284         mono_arch_find_jit_info functions into a new function. Fix a memory
15285         leak.
15286
15287         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
15288         refactored code.
15289         
15290 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
15291
15292         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
15293         as well.
15294         
15295         * exceptions.cs: Add array size tests.
15296
15297         * mini.c: Allocate a separate icall wrapper for each arity of 
15298         mono_array_new_va. Fixes #59509.
15299
15300         * exceptions.cs: Add testcase for 64578.
15301
15302         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
15303
15304         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
15305         
15306 2004-09-02  Martin Baulig  <martin@ximian.com>
15307
15308         * mini.c (mono_method_to_ir): When initializing the locals, call
15309         handle_initobj() on the generic instance itself, not its
15310         underlying type.
15311
15312 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
15313
15314         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
15315         MonoJitInfo for dynamic methods.
15316
15317         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
15318
15319         * mini.c: Add support for freeing JIT data for dynamic methods.
15320         
15321 2004-09-01  Martin Baulig  <martin@ximian.com>
15322
15323         * mini-x86.c (is_regsize_var): Added support for generic
15324         instances.
15325         (mono_arch_emit_prolog): Make this compile again, use
15326         `x86_push_imm_template (code)'.
15327
15328 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
15329
15330         * mini-x86.c: make all push_imm instructions that get
15331         patched always emit the long form
15332
15333 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
15334
15335         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
15336         in a per-domain hash.
15337
15338         * mini-amd64.c (merge_argument_class_from_type): Handle generic
15339         types.
15340
15341 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
15342
15343         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
15344         work.
15345         
15346         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
15347         work.
15348
15349         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
15350         Beginnings of SSE2 support.
15351
15352         * exceptions.cs: Add more tests for checked int<->uint casts.
15353
15354 2004-08-28  Martin Baulig  <martin@ximian.com>
15355
15356         * mini-x86.c (mono_arch_instrument_epilog): Added support for
15357         generic instances.
15358
15359         * mini.c
15360         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
15361         Handle generic instances recursively.
15362
15363 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15364
15365         * iltests.il: test for conv.u8 on a constant
15366
15367 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15368
15369         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
15370         LCONV_x4 (shrun_32 (membase)).
15371
15372 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15373
15374         * inssel-x86.brg: c&p rules for push/setret of long
15375
15376 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
15377
15378         * inssel-x86.brg: c&p rules for compare (base, regvar) and
15379         compare (regvar, base)
15380
15381         * inssel-x86.brg: more burg love
15382
15383         * inssel.brg: more cleanup
15384
15385         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
15386
15387 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
15388
15389         * basic-long.cs, basic-calls.cs: new tests for optimization.
15390
15391 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
15392
15393         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
15394         patch.
15395
15396 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
15397
15398         * mini-amd64.c (read_tls_offset_from_method): Add another case.
15399         
15400 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
15401
15402         * inssel.brg (mini_emit_memcpy): use 
15403         NO_UNALIGNED_ACCESS to disable memcpy optimization
15404
15405 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
15406
15407         * mini-amd64.c: Handle generic types in various places.
15408
15409         * mini.c (mono_method_to_ir): Handle generic types in init locals.
15410
15411 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
15412
15413         * mini.c (handle_box): Fix warning.
15414
15415         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
15416
15417         * mini-amd64.h: Enable the emit_state optimization.
15418
15419         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
15420
15421         * mini-amd64.c: Add some new 64 bit peephole opts.
15422
15423         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
15424
15425         * cpu-amd64.md: sreg1 of div instructions must be %rax.
15426
15427         * mini-amd64.c: Register allocator fixes.
15428
15429         * mini.c: Add an optimization to emit_state to avoid allocation of new
15430         registers on some platforms.
15431
15432 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
15433
15434         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
15435
15436         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
15437         allocation. Fixes #63085.
15438
15439         * basic-long.cs: Add new regression test.
15440
15441         * mini-amd64.c: Register allocator improvements.
15442
15443 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
15444
15445         * mini-amd64.c (read_tls_offset_from_method): Add another code
15446         sequence.
15447
15448         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
15449         instruction sequence for nullifying class init trampolines.
15450
15451         * objects.cs: Add new regalloc test.
15452
15453         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
15454
15455 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
15456
15457         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
15458         
15459         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
15460         arguments.
15461
15462         * driver.c: Fix profiling after TLS changes.
15463         
15464         * driver.c (mono_main): Set mono_stats.enabled if needed.
15465
15466         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
15467         CEE_BOX.
15468
15469 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
15470
15471         * mini-x86.c: use a 1 op rather than a 2 op tls access
15472         instruction -> faster.
15473
15474 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
15475
15476         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
15477         x86 backend.
15478
15479 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
15480
15481         * exceptions-sparc.c (throw_exception): fix typo
15482
15483 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
15484
15485         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
15486         set tree->dreg correctly with tls. Allow any
15487         register to be used.
15488
15489         * mini-x86.c (read_tls_offset_from_method): add new code
15490         generation pattern seen with GCC.
15491
15492
15493 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
15494
15495         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
15496         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15497         exceptions-sparc.c: fix some performance issues in exception
15498         handling and setting of the stack trace for exceptions that were
15499         already thrown.
15500
15501 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
15502
15503         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
15504         x86 backend.
15505         
15506         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
15507         registers.
15508
15509 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
15510
15511         This patch inlines tls access, when possible.
15512         
15513         * mini.h: new arch functions for TLS intrinsics.
15514         All platforms updated with a stub.
15515
15516         * mini.c: use the new intrinsics
15517
15518         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
15519         arch specific intrinsic for tls variables
15520
15521 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
15522
15523         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
15524         under windows.
15525
15526 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
15527
15528         * mini.c: thread local allocation
15529
15530 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
15531
15532         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
15533
15534         * Makefile.am: Link against the static version of libmonogc.
15535         
15536         * Makefile.am: Link the static versions of the convenience libraries
15537         into the mono executable.
15538
15539         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
15540
15541 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
15542
15543         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
15544         on integer overflow.
15545
15546         * mini-amd64.c: Reorganize function call code.
15547
15548         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
15549
15550 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
15551
15552         * inssel-x86.brg: use xor eax,eax.
15553         
15554         * basic.cs: new tests
15555
15556 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
15557
15558         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
15559         in exception throwing code.
15560         
15561 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
15562
15563         * inssel-x86.brg: use xor esi,esi.
15564
15565 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
15566
15567         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
15568         can trace methods compiled during mini_init () too.
15569
15570         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
15571         CEE_CONV_U4.
15572
15573 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
15574
15575         * Makefile.am: static link on x86 (r=zoltan)
15576
15577 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
15578
15579         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
15580         code since it causes some programs to fail.
15581
15582 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
15583
15584         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
15585
15586 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
15587
15588         * mini.c: ovfops_op_map - add STACK_OBJ case for
15589         CONV_I 
15590         * basic.cs: add test_0_pin_string as test
15591         case for above.
15592
15593 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
15594
15595         * Makefile.am: build C# if srcdir != builddir
15596
15597 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
15598
15599         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
15600         fall-through blocks.
15601
15602 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15603
15604         * driver.c: enable loop by default again and include abcrem in -O=all.
15605
15606 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
15607
15608         * iltests.il: Add some localloc tests.
15609
15610         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
15611
15612         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
15613         Fixes #62574.
15614
15615         * inssel-amd64.brg: Add some optimizations.
15616
15617         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
15618         for gcc-3.4.
15619
15620         * Makefile.am: Statically link mono against libmono on AMD64.
15621         
15622         * mini-amd64.c inssel-amd64.brg: Optimizations.
15623
15624 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
15625
15626         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
15627
15628         * tramp-amd64.c: Patch calling code in trampolines.
15629
15630 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
15631
15632         * mini-amd64.c: pinvoke struct passing fixes.
15633
15634 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
15635
15636         * mini-sparc.c: redo change, make mono_arch_cpu_init call
15637         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
15638
15639 2004-08-05  Duncan Mak  <duncan@ximian.com>
15640
15641         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
15642         CEE_LDELEM_ANY.
15643
15644 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
15645
15646         * mini-amd64.c (emit_move_return_value): Move return value for normal
15647         calls too.
15648
15649 2004-08-05  Martin Baulig  <martin@ximian.com>
15650
15651         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
15652         `type->type'; just modify `type' itself when dealing with enums
15653         and generic instances.
15654         (check_call_signature): Make `simple_type' a `MonoType *'.
15655
15656 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
15657
15658         * mini.c: Use OP_PADD to add offsets to addresses.
15659
15660         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
15661
15662 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
15663
15664         * mini-sparc.c (mono_arch_emit_epilog): fix check
15665         for folding last op into restore instruction
15666
15667 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
15668
15669         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
15670         helper methods using the code manager.
15671         
15672         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
15673
15674         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
15675
15676 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15677         
15678         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
15679           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
15680
15681         * mini-s390.c: fix tail processing
15682
15683 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
15684
15685         * mini-ppc.c: mul.ovf.un exception name fix.
15686
15687 2004-08-03  Martin Baulig  <martin@ximian.com>
15688
15689         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
15690         instances; before jumping to `handle_enum', also modify `ptype'.
15691
15692 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
15693
15694         * cpu-sparc.md: fcall maximal length too small.
15695
15696 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
15697
15698         * mini-amd64.c mini.h: Add initial support for passing/returning 
15699         structures to/from pinvoked methods.
15700
15701 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
15702
15703         * mini-ppc.c: reg allocator fix.
15704
15705 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
15706
15707         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
15708
15709         * inssel.brg: Optimize memset on 64 bit machines.
15710
15711         * mini-amd64.c: Fix some vararg cases.
15712
15713 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15714
15715         * mini-s390.c: Corrected macro in emit_float_to_int
15716
15717         * s390-abi.cs: Tests to exercise the s390 ABI
15718
15719 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
15720
15721         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
15722         caller saved regs.
15723
15724         * basic.cs: Add a test for add.ovf.un.
15725
15726 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
15727
15728         * mini-sparc.c: add case for OP_IDIV_UN
15729
15730 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
15731
15732         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
15733         
15734         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
15735
15736 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
15737
15738         * basic.cs: regression tests.
15739
15740         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
15741         regressions.
15742
15743 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
15744
15745         * basic.cs: Add a new test.
15746
15747         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
15748         and AOT. Various fixes and optimizations.
15749
15750         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
15751
15752 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
15753
15754         * mini-ppc.c: make sure temp regs are not used for global reg
15755         allocation.
15756
15757 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
15758
15759         * cpu-sparc.md: conv_i8 fix for 64bits
15760
15761         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
15762
15763 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
15764         
15765         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
15766         add opcode for cmp BYTE PTR [eax], imm.
15767
15768         * inssel.brg: Make memcpy and memset takes bases.
15769
15770 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
15771
15772         * *-amd64.*: More AMD64 work.
15773         
15774 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
15775
15776         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
15777         add a compare-not-equal opcode.
15778         
15779 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
15780
15781         * mini.c: Use mono_init_from_assembly instead of mono_init.
15782         
15783 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
15784
15785         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
15786
15787         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
15788
15789         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
15790
15791         * inssel.brg: 64 bit fixes.
15792
15793         * mini.h (MonoCallInst): Add some AMD64 specific data.
15794
15795         * mini.h: Add some OP_P opcodes.
15796
15797 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
15798
15799         * basic.cs: tests for 61797 and 61740
15800
15801 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
15802
15803         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
15804         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
15805
15806 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
15807
15808         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
15809
15810         * *-amd64*.*: Ongoing AMD64 work.
15811
15812 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
15813
15814         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
15815
15816         * *-amd64*: Ongoing AMD64 work.
15817
15818         * mini-arch.h: Add AMD64 support.
15819
15820         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
15821
15822         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
15823
15824         * mini-ops.h: Add new opcodes.
15825
15826         * Makefile.am: Add AMD64 support.
15827
15828         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
15829         rules into the inssel-long*.brg files.
15830
15831         * *-amd64.*: Add beginnings of AMD64 backend.
15832
15833 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
15834
15835         * mini.c (print_dfn): commenting out the code that prints
15836         the cil. With -O=deadce, this makes -v -v crash.
15837         
15838         * cpu-pentium.md: make checkthis have a length of 2
15839
15840 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
15841
15842         * mini-sparc.h: fix implementations of __builtin
15843         functions for Sun compiler for V9.
15844
15845 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
15846
15847         * mini.c: use the new stelem.ref wrapper
15848         * exceptions.cs, arrays.cs: new stelem.ref tests
15849
15850 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
15851
15852         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
15853         new XSP should work with these changes).
15854
15855 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
15856         
15857         * inssel-{long32,x86,}.brg: trivial optimizations.
15858         
15859 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
15860
15861         * mini.c: load value when emitting box operation in
15862         constrained calls.
15863
15864 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
15865
15866         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
15867         is one byte shorter than cmp DWORD PTR [eax], 0.
15868
15869 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
15870
15871         * inssel-ppc.brg: arguments on the stack are always
15872         relative to the stack pointer (spotted by Neale Ferguson).
15873
15874 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15875
15876         * exceptions-x86.c: delay appending the method name to the trace until
15877         after mono_jit_info_table_find is called, as this gets the real
15878         MonoMethod.
15879
15880 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
15881
15882         * aot.c: register roots
15883
15884 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
15885
15886         * aot.c : I could just use PLATFORM_WIN32 flag.
15887
15888 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
15889
15890         * aot.c : Reverting the previous fix. This time it broke linux build.
15891
15892 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
15893
15894         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
15895
15896 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
15897
15898         * mini.c (handle_stack_args): Remove some more debugging code.
15899         
15900         * mini.c (handle_stack_args): Remove debug output left in by mistake.
15901
15902         * driver.c mini.h aot.c: Allow additional options to be specified with
15903         --aot and pass them to mono_compile_assembly.
15904
15905         * aot.c: Add experimental code to AOT compile all loaded assemblies
15906         on demand and save the code into a cache in the filesystem.
15907
15908         * aot.c: Add support for more wrapper methods.
15909         
15910         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
15911         58863.
15912
15913         * cpu-*.md: Remove removed opcodes.
15914
15915         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
15916         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
15917         related icalls to marshal.c.
15918
15919 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
15920
15921         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
15922
15923         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
15924
15925         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
15926
15927 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
15928         * liveness.c: If liveness is recomputated we need to reset the information
15929         for each variable. This way, if the liveness range has been narrowed
15930         by optimizations that happened after the last computation, we can return
15931         a smaller range.
15932         
15933         For example, if you have
15934         
15935         {
15936                 int i = 0;
15937                 
15938                 // Tons of code that does not affect i
15939                 
15940                 i = foo ();
15941                 ...
15942         }
15943         
15944         i = 0 is dead code and will be removed by SSA. However, when
15945         linear scan gets to the code, i will still appear to be live
15946         throughout the entire block. This prevents good register allocation.
15947
15948 2004-07-06  Martin Baulig  <martin@ximian.com>
15949
15950         * debug-mini.c (mono_debug_init_method): Allow
15951         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
15952         (mono_debug_add_icall_wrapper): New method.
15953
15954         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
15955
15956 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
15957
15958         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
15959         optimization.
15960
15961 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
15962
15963         * aot.c (mono_aot_load_method): Fix loading of debug info.
15964
15965 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
15966
15967         * aot.c: Add logging support.
15968
15969 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
15970
15971         * mini.h: Add prototype for mono_print_method_from_ip.
15972
15973         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
15974
15975         * inssel.brg: 64 bit fixes.
15976
15977         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
15978         inssel-long32.brg.
15979
15980         * Makefile.am: Add SPARC64 support.
15981
15982 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
15983
15984         * aot.c: Fix alignment problems on 32 bit platforms.
15985
15986 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
15987
15988         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
15989         SPARC64.
15990
15991         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
15992         problems.
15993
15994         * mini.h: Bump AOT file version. Some 64 bit fixes.
15995
15996 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
15997
15998         * inssel-sparc.brg: Add new rule to avoid register moves.
15999
16000         * inssel.brg: Add ldind_to_load_membase helper function.
16001
16002 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
16003
16004         * mini.c: OffsetToStringData intrinsic.
16005         
16006 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
16007
16008         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
16009
16010         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
16011         regression tests.
16012
16013         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
16014 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16015
16016         * mini.c: reinstated mono_compile_get_interface_var()
16017         on x86, too, since the change breaks the Gtk# build there as well.
16018
16019 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16020
16021         * driver.c: remove loop from the default optimizations: it seems to
16022         interact badly with some of the other options (see bug #60613).
16023
16024 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
16025
16026         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
16027         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
16028
16029 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
16030
16031         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
16032         vararg-using methods.
16033
16034 2004-06-21  Martin Baulig  <martin@ximian.com>
16035
16036         * mini/mini-exceptions.c
16037         (mono_handle_exception): Added `gpointer original_ip' argument.
16038         After calling mono_unhandled_exception(), call
16039         mono_debugger_unhandled_exception() and if that returns true,
16040         restore the context and return.
16041
16042 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
16043
16044         * mini-ppc.c: prefer the use of relative branches so
16045         they won't need to be patched in aot code (patch from Patrick Beard).
16046
16047 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
16048
16049         * aot.c: patch from Patrick Beard to make the output assembly
16050         more correct for the MacOSX assembler. Small tweak to
16051         generate sane images on Linux/PPC, too.
16052
16053 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16054
16055         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
16056         case until bug #59509 is fixed (shows up in #60332).
16057
16058 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16059
16060         * mini.c: make sure the needed wrappers are compiled, too, with
16061         precomp.
16062
16063 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
16064
16065         * driver.c: remove NPTL reference in --version output.
16066
16067 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16068
16069         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
16070         generate valid assembly for the Mach-O assembler.
16071
16072 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
16073
16074         * driver.c: don't include abcrem in the all optimization specifier
16075         since it slows down jit compilation too much for now.
16076
16077 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
16078
16079         * mini.c: use BIGMUL only if both operands have the same signage.
16080         * iltests.il: Test for bug 60056. (errors related to signage in
16081         BIGMUL).
16082
16083         r=lupus.
16084
16085 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
16086
16087         * mini.c, aot.c: memory leak fixes.
16088
16089 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
16090
16091         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
16092
16093 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
16094
16095         * Makefile.am: remove the -static hack completely, it links in
16096         statically glib as well.
16097
16098 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
16099
16100         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
16101         * exceptions.cs: make it compile with new mcs/csc.
16102
16103 2004-06-03 Massimiliano Mantione <massi@ximian.com>
16104         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
16105         and added relevant test case.
16106
16107 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
16108
16109         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
16110         regressions in gtk-sharp.
16111
16112 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
16113
16114         * exceptions.cs: New regression tests.
16115
16116         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
16117
16118 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
16119
16120         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
16121
16122 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
16123
16124         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
16125
16126         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
16127
16128 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
16129
16130         * mini.c (mono_jit_runtime_invoke): Init class in this
16131         method instead of trusting mono_jit_compile_method to
16132         do the work (because wrappers can be in object class)
16133
16134 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
16135
16136         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
16137
16138         * basic-long.cs: New regression test.
16139
16140 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
16141
16142         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
16143         and div/rem checks.
16144
16145 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
16146
16147         * Makefile.am: fix miguel's change to build mono statically against
16148         libmono (track build dependencies).
16149
16150 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
16151
16152         * cfold.c: Some glib versions do not have G_MININT32.
16153
16154 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
16155
16156         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
16157         with precision of tan, atan, sin and cos, and implemented related
16158         regressions tests (fixes bug 54467, but one new problem appeared and
16159         is not fixed yet).
16160
16161 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
16162
16163         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
16164
16165         * exceptions.cs: Add test for constant folding && division by zero.
16166
16167         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
16168         since driver.c is in libmono too, so the optimization was useless.
16169
16170         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
16171         variable to driver.c so the compiler can emit more efficient code to
16172         access them.
16173
16174 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16175
16176         * Makefile.am: don't distribute generated inssel.[ch] files.
16177
16178 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
16179
16180         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
16181         into the default appdomain. Fixes #58707.
16182
16183         * jit-icalls.c: Remove the broken approximation for truncl, doing
16184         no conversion is better.
16185
16186         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
16187         Fixes #58863.
16188
16189 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16190
16191         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
16192         of the mcrxr instruction which is not available on some processors
16193         even if it's documented to be. Implement add and sub overflow correctly
16194         (still not complete for long unsigned). Speed up icalls a bit.
16195
16196 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
16197
16198         * mini.c (mono_jit_compile_method_with_opt): Make sure that
16199         we run .cctor in the current domain instead of target_domain.
16200         
16201         Fixes bug #58558, .cctor not being called in -O=shared.
16202
16203 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16204
16205         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
16206
16207 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
16208
16209         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
16210         which can be done with an imm8, do it that way.
16211         (mono_arch_output_basic_block): ditto for a jmp
16212         (mono_arch_emit_prolog): Computate maximum offset of a label.
16213
16214 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
16215
16216         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
16217         now tries to allocate prefered physical reg's for virtual
16218         regs. This reduces the number of emited spills/loads with
16219         20-30% on our core assemblies.
16220
16221 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16222
16223         * jit-icalls.c: truncl() is not needed and trunc() is
16224         the correct thing to do anyway (bug #58287).
16225
16226 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
16227
16228         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
16229         if available.
16230
16231 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
16232
16233         * driver.c: enable loop optimizations by default.
16234
16235 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
16236
16237         * mini-x86.c: fix calc of max loop size when aligning loops start.
16238
16239 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
16240
16241         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
16242         the stack.
16243
16244 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
16245
16246         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
16247         should set carry.
16248
16249         * basic-long.cs: Add tests for add/subtract of immediates with carry.
16250
16251         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
16252         
16253         * mini.c (inline_method): Allways inline some wrappers even if the cost
16254         is too large. Fixes #58785.
16255
16256         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
16257         
16258 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
16259
16260         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
16261         (crichton@gimp.org). Beginning of support for sparc/linux.
16262
16263         * mini-sparc.c: Optimize retrieval of LMF address.
16264
16265 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
16266
16267         * exceptions-ppc.c:  handle alloca in methods with clauses.
16268
16269 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
16270
16271         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
16272
16273 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
16274
16275         * mini.c: Delegate most of the abort signal work to 
16276           mono_thread_request_interruption, which also handles Stop and Suspend
16277           states.
16278
16279 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
16280
16281         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
16282         supports the save/restore lmf opcodes.
16283
16284 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
16285
16286         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
16287         by gcc-3.4 as well.
16288
16289         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
16290
16291 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
16292
16293         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
16294         methods which contain array accesses.
16295
16296         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
16297         boundaries. Fixes #58537.
16298
16299         * iltests.il: Add regression test for #58537.
16300
16301 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
16302
16303         * mini-x86.c (mono_arch_local_regalloc): Last part of
16304         fix for bug #58633 (releasing register to early).
16305
16306 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
16307
16308         * basic-long.cs: Add new regression test.
16309
16310 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
16311
16312         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
16313         register too early on the chain.
16314
16315 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
16316
16317         * mini.c (create_helper_signature): Use a helper function to reduce
16318         the code which needs to be written. Also set the calling convention of
16319         icalls on windows. Fixes #57840.
16320
16321 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
16322
16323         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
16324         exceptions-ppc.c: added helper function to get the instruction address
16325         from a signal handler context.
16326
16327 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16328
16329         * helpers.c: use g_get_tmp_dir. Invokes happyness 
16330         from gonzalo.
16331
16332 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16333
16334         * helpers.c: Add new env variable to pass args to objdump.
16335         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
16336
16337 2004-05-17  Radek Doulik  <rodo@ximian.com>
16338
16339         * Makefile.am (common_sources): added abcremoval.h so it get
16340         disted and daily mono packages on go-mono.com will build again
16341
16342 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
16343
16344         * abcremoval.c: Fixed coding style, added copyright header.
16345
16346         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
16347
16348         * mini.h: Added prototype for abc removal main function.
16349
16350         * build_relations_propagation_table.pl: Added copyright header.
16351
16352 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
16353
16354         * basic-long.cs: reg test for complex ceq_long bug.
16355
16356 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
16357
16358         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
16359         reg in long and clob case (bug #58343). Fixed/added comments.
16360
16361 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
16362
16363         * mini.c (mono_jit_runtime_invoke): Follow new convention
16364         of calling the invoke method with an function pointer.
16365
16366 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
16367
16368         * ChangeLog: Fix author of memory leak patch.
16369
16370 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
16371
16372         * Makefile.am: fix make dist as well...
16373
16374
16375 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
16376
16377         * cfold.c: Made so that conversions from pointer to int4 are no-ops
16378         on archs where pointers are 4 bytes long.
16379
16380         * Makefile.am: Added abcremoval.c source file.
16381
16382         * abcremoval.c: Added abcremoval.c.
16383
16384         * abcremoval.h: Added abcremoval.h.
16385
16386         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
16387
16388         * inssel.brg: Enabled bounds check removal.
16389
16390         * mini.c: Added support for abcrem optimization.
16391
16392         * mini.h: Added abcrem optimization label.
16393
16394         * driver.c: Added support for abcrem optimization.
16395
16396         * propagated_relations_table.def: Added propagated_relations_table.def.
16397
16398 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
16399
16400         * mini.c, cfold.c: fix style.
16401
16402 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16403
16404         * mini.c: handle issue with the low-level implementation of
16405         some long opcodes (bug #54209).
16406
16407 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
16408
16409         * basic.cs: test for my new cmov stuff.
16410
16411 2004-05-13      Patrik Torstensson
16412
16413         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
16414         opt and added peephole documentation.
16415
16416 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
16417
16418         * tramp-ppc.c: rewrote the generic trampoline code.
16419
16420 2004-05-11      Patrik Torstensson
16421
16422         * mini-x86.c: optimize long shl/shr asm code (one less branch)
16423
16424 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
16425
16426         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
16427
16428         * mini.h mini.c dominators.c: Applied patch from Derek Woo
16429         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
16430
16431         * mini.c: Add new icalls for AsAny marshalling.
16432
16433 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
16434
16435         * tramp-ppc.c, mini-ppc.c: more cleanups.
16436
16437 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16438
16439         * mini.c: no warnings.
16440
16441 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16442
16443         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
16444
16445 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
16446
16447         * mini.c: In the thread abort signal handler, if the thread is in the
16448         process of being stoped, don't throw the Abort exception, just stop the
16449         thread.
16450
16451 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
16452
16453         * tramp-ppc.c: removed old code.
16454
16455 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16456
16457         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
16458         do some simple speed optimizations on ppc.
16459
16460 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
16461
16462         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
16463         and large offsets in load/store.
16464
16465 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
16466
16467         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
16468         it causes regressions.
16469
16470 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
16471
16472         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
16473         support.
16474
16475 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16476
16477         * jit-icalls.c: remove warnings.
16478         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
16479         speedups for unsafe code.
16480
16481 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
16482
16483         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
16484
16485 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
16486
16487         * basic-calls.cs: Add new regression test.
16488
16489         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
16490         more portable.
16491
16492         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
16493
16494         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
16495         is no longer used.
16496
16497 2004-05-06      Patrik Torstensson
16498
16499         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
16500         long reg allocation in any reg (not only eax:edx) and implemented 
16501         long shl/shr ops in asm instead of helpers.
16502
16503 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
16504
16505         * mini-sparc.h: Fix warnings.
16506
16507         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
16508         stack.
16509
16510         * mini-exceptions.c (mono_handle_exception): Call the filter in a
16511         separate statement for clarity.
16512
16513         * mini-sparc.c: Update status.
16514
16515 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
16516
16517         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
16518         here.
16519
16520 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16521
16522         * inssel-ppc.brg: another small pre-release workaround:
16523         we don't do overflow detection for long_sub_un.
16524
16525 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16526
16527         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
16528         (also works around a weird ppc bug: 57957).
16529
16530 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
16531
16532         * tramp-ppc.c: trampoline fixes.
16533
16534 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
16535
16536         * mini-ppc.c: fixed typos.
16537
16538 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
16539
16540         * mini-ppc.c, exceptions-ppc.c: more code saves registers
16541         at the top of the stack. Fixed typos. Use a frame registers
16542         for all the methods with exception clauses.
16543
16544 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16545
16546         * exceptions-ppc.c: restore fp registers.
16547
16548 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16549
16550         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
16551         order from the stack top (moved the stack room to save the
16552         return value for trace after the param area). Fixed corruption
16553         in restoring registers on unwind.
16554
16555 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
16556
16557         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
16558
16559 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16560
16561         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
16562         and prolog/epilog for methods that use it. Allow
16563         enough param area room for varargs methods. Fix miguel's
16564         breakage in exception handling.
16565
16566 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16567
16568         * Makefile.am: run genmdesc only on current arch.
16569
16570 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16571
16572         * exceptions-x86.c:
16573         * mini-x86.h: fix the build on windows.
16574
16575 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
16576
16577         * 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.
16578
16579         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
16580
16581         * mini-exceptions.c: New file.
16582         
16583         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
16584         Move some parts of the x86 exception handling code to an 
16585         arch-independent file so it can be shared with other ports.
16586
16587 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
16588
16589         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
16590
16591 2004-04-26  David Waite  <mass@akuma.org>
16592
16593         * driver.c: remove comma from end of enumeration declaration
16594
16595 2004-04-26  Jackson Harper  <jackson@ximian.com>
16596
16597         * driver.c: parse config file before loading first assembly. This
16598         allows the user gac to be enabled/disabled. 
16599         
16600 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
16601
16602         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
16603         simpler mechanism: we do not care what is encoded initially
16604         (branch absolute or relative), we care about the code and its
16605         target.  I kept the old code for reference for now.
16606
16607         The new code tries first to determine if the jump is anywhere in
16608         the -/+32 absolute meg range, if it succeeds, it encodes using the
16609         absolute branch;  If not, it tried to find something in the
16610         relative range, if not, it uses the handle_thunk code. 
16611
16612 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
16613
16614         * exceptions-ppc.c: use the correct ip register on macosx.
16615
16616 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
16617
16618         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
16619
16620 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
16621
16622         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
16623         Raise exception on integer divide by zero by hand since the hw
16624         doesn't support it. Handle NaNs in FP compares.
16625
16626 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
16627
16628         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
16629         code reducing duplication between the platforms and enabled
16630         signal exception handling (on linux for now).
16631
16632 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
16633
16634         * exceptions-ppc.c: more macosx support.
16635
16636 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16637
16638         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
16639
16640 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
16641
16642         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
16643
16644 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
16645
16646         * iltests.il: more tests.
16647
16648 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
16649
16650         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
16651         vars as well.
16652
16653 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
16654
16655         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
16656
16657 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
16658
16659         * liveness.c: Mark variables as volatile in all basic blocks reachable
16660         from exception clauses.
16661
16662 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
16663
16664         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
16665         inlining.
16666
16667 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
16668
16669         * iltests.il, basic.cs: more tests for regalloc.
16670
16671 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16672
16673         * iltests.il: Some tests for register allocation modifications
16674         I have locally.
16675
16676 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
16677
16678         * exceptions.cs: Add regression test for bug #56782.
16679
16680         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
16681         original stack trace if an exception is rethrown. Fixes #56782. Oh,
16682         the beauty of fixing the same thing in 5 different files...
16683
16684 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
16685
16686         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
16687         methods.
16688
16689 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
16690
16691         * mini.c: Add support for STRWLPARRAY marshalling convention.
16692
16693 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
16694
16695         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
16696         to init the context to setup the regs pointer).
16697
16698 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16699
16700         * exceptions-ppc.c: more exceptions work.
16701
16702 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16703
16704         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
16705         not allowed.
16706
16707 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
16708
16709         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
16710         can use the memory directly.
16711
16712         * cpu-pentium.md: Update documentation from a post from Zoltan. 
16713
16714         add x86_add_membase, x86_sub_membase, x86_mul_membase
16715
16716 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
16717
16718         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
16719         GENERAL_REGS they were also hardcoded for all PPC ports.
16720
16721         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
16722
16723         Remove hard-coded limit for floating point registers, use
16724         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
16725
16726         Notice that in MacOS X calling conventions you can fit a lot more
16727         floating point values in registers, so I should update the PInvoke
16728         test to excercise the passing of floating point values on the
16729         stack (currently broken).
16730         
16731 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
16732
16733         * tramp-ppc.c (create_trampoline_code): Added
16734         JUMP_TRAMPOLINE_SIZE. 
16735         (ppc_magic_trampoline): Follow the pattern from
16736         x86_magic_trampoline: if code is set to zero, return. 
16737         (create_trampoline_code): Always pass MonoMethod to the jump
16738         trampoline, before it was passing a null.
16739         (mono_arch_create_jump_trampoline): Implement the jump stub, could
16740         share the code with mono_arch_create_jit_trampoline. 
16741
16742         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
16743         implemented.
16744         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
16745         implemented.  
16746
16747         * cpu-g4.md: Added length for jmp instruction, the worst case
16748         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
16749         for save_lmf).
16750
16751 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
16752
16753         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
16754
16755 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
16756
16757         * mini.c: Only set bblock->real_offset when adding a new bblock, and
16758         before each IL instruction.
16759
16760         * mini.c (CEE_BOX): Fix warnings.
16761
16762 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16763
16764         * mini.c: removed a few unused vars and extra whitespace.
16765
16766 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
16767
16768         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
16769         checks.
16770         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
16771         index.
16772         (OP_GETCHR): use the above
16773         (CEE_LDELEMA): use the above.
16774
16775         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
16776         version of the generic impl.
16777         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
16778         (CEE_LDELEMA): use the above.
16779
16780 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
16781
16782         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
16783         Fixes #56317.
16784
16785         * iltests.il: Added new regression test for #56317.
16786
16787 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
16788
16789         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
16790         under NetBSD. Fixes #56450.
16791
16792         * liveness.c (update_gen_kill_set): Fix previous patch.
16793
16794 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16795
16796         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
16797
16798 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
16799
16800         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
16801         ldsfld and ldsflda.
16802
16803         * inssel-sparc.brg: Add more optimizations.
16804
16805         * mini-sparc.c: Replace multiply/divide with shifts if possible.
16806
16807 2004-04-01  Martin Baulig  <martin@ximian.com>
16808
16809         * mini.c (handle_box): New static function; moved the
16810         implementation of CEE_BOX here.
16811         (mono_method_to_ir): Added `constrained_call' variable.
16812         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
16813         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
16814         mono_method_get_constrained() to get the method.
16815
16816 2004-04-01  Martin Baulig  <martin@ximian.com>
16817
16818         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
16819         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
16820         (mono_method_to_ir): We don't need these macros anymore since
16821         mono_class_get_full() already takes care of it. 
16822
16823 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16824
16825         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
16826         use @function (as doesn't accept #function here) and check the return
16827         value of system and stop if fails.
16828
16829 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16830
16831         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
16832
16833 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
16834
16835         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
16836
16837         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
16838
16839         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
16840         #56223.
16841
16842         * basic-long.cs: Add test for negation of Int64.MinValue.
16843
16844 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
16845
16846         * mini-sparc.c: Update status.
16847
16848         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
16849
16850         * exceptions-sparc.c: Fix return value in filters.
16851
16852         * inssel-sparc.brg: Fix register allocation in some rules.
16853
16854 2004-03-28  Martin Baulig  <martin@ximian.com>
16855
16856         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
16857         if neccessary.  
16858
16859 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
16860
16861         * mini-x86.c (mono_arch_patch_code): Fix warnings.
16862         
16863         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
16864         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
16865         remove unused conv_u4 opcode.
16866
16867         * mini-x86.c: Remove valgrind workaround since it slows down things
16868         even when mono is not run under valgrind.
16869
16870 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
16871
16872         * mini-sparc.c: Update status.
16873
16874         * inssel-sparc.brg: Add some optimizations.
16875
16876         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
16877         future delay slot filling. Add support for varargs, tail calls and JMP.
16878
16879         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
16880         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
16881
16882         * inssel.brg: Fix register allocation in OP_ARGLIST.
16883
16884         * inssel.brg: Fix warnings.
16885
16886 2004-03-25  Martin Baulig  <martin@ximian.com>
16887
16888         * mini.c (inflate_generic_field): Removed.
16889         (mini_get_method): Removed, use mono_get_method_full(),
16890         (mini_get_class): Removed, use mono_class_get_full().
16891         (mono_method_to_ir): Pass our generic context to
16892         mono_field_from_token().        
16893
16894 2004-03-25  Martin Baulig  <martin@ximian.com>
16895
16896         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
16897         of a `MonoMethod *'.
16898         (mini_get_method): Take a `MonoGenericContext *' instead
16899         of a `MonoMethod *'.
16900         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
16901         a new local variable called `generic_context' which holds the
16902         current `MonoGenericContext *'; use it to lookup things.
16903
16904 2004-03-24  Martin Baulig  <martin@ximian.com>
16905
16906         * mini.c (mini_get_class): New static method; if we're inside a
16907         generic instance, inflate the class if neccessary.
16908         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
16909
16910 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
16911
16912         * iltests.il: New regression test for #55976.
16913
16914         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
16915         #55976.
16916
16917 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
16918
16919         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
16920         output.
16921
16922 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
16923
16924         * liveness.c: Consider SSA stores as well as loads when making vars
16925         volatile.
16926
16927         * exceptions.cs: New regression tests for register allocation.
16928         
16929 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
16930
16931         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
16932         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
16933           domain lock only to protect puntual access to data structures.
16934           Added access lock for sighash, jit_icall_hash_name, 
16935           jit_icall_hash_addr and domain->code_mp.
16936
16937 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
16938
16939         * driver.c: Print SIGSEGV handling method.
16940
16941         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
16942
16943         * mini.c (setup_jit_tls_data): Handle case when this is called
16944         multiple times for a thread.
16945
16946         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
16947         is different from fbxx_un. Fixes #54303. Also use constants instead of
16948         magic numbers in a lot of places.
16949
16950 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
16951
16952         * exceptions.cs: Fix cctor test when --regression is used.
16953
16954 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
16955
16956         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
16957         for Linux/ppc.
16958
16959 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
16960
16961         * inssel-ppc.brg: fixed register assignments for some rules.
16962
16963 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
16964
16965         * exceptions.cs: Add test for exceptions in static constructors.
16966
16967         * mini.c (mono_jit_compile_method_with_out): Move the calling of
16968         static constructors outside the domain lock. Fixes #55720.
16969
16970 2004-03-17  Martin Baulig  <martin@ximian.com>
16971
16972         * mini.c (get_generic_field_inst): Removed, this'll never happen.
16973         (inflate_generic_field): Take the `MonoMethod *' instead of the
16974         `MonoClass *' and added support for generic method.
16975         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
16976         have a `field->parent->gen_params', only inflate the field if it's
16977         an open constructed type.
16978
16979 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
16980
16981         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
16982         exception object instead of the preconstructed ones.
16983
16984 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16985
16986         * mini.c: reverted changed to sigsegv_signal_handler commited
16987         accidentally in the previous patch.
16988
16989 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16990
16991         * mini.c:
16992         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
16993         running --aot with an old assembly.
16994
16995 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
16996
16997         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
16998         point values.
16999
17000         * mini-sparc.c: Add support for v9 branches with prediction.
17001
17002 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
17003
17004         * mini.c (mini_init): #warning is GNUC only
17005
17006         * mini-sparc.h: implement __builtin_frame_address
17007         and __builtin_return_address for Sun C compiler
17008
17009 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
17010
17011         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
17012
17013 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
17014
17015         * basic-calls.cs: Add test for unaligned byref long argument passing.
17016
17017         * mini-ops.h: Add sparcv9 compare and branch instructions.
17018
17019         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
17020         v9 instructions if we have a v9 cpu.
17021
17022         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
17023         registers for global allocation.
17024
17025         * exceptions-sparc.c: Fixes.
17026         
17027 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
17028
17029         * liveness.c (mono_analyze_liveness): Optimized version.
17030
17031         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
17032
17033         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
17034         sparc work.
17035
17036         * basic-float.cs basic-calls.cs: New regression tests.
17037
17038 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
17039
17040         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
17041         sigaltstack implementation.
17042
17043         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
17044         
17045         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
17046         stuff if SIGSEGV_ON_ALTSTACK is not defined.
17047
17048 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
17049
17050         * mini.c: Fix warnings.
17051         
17052         * mini.c (mono_resolve_patch_target): New function which contains the
17053         arch independent part of the patching process.
17054
17055         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
17056         patching code to a separate function.
17057
17058 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
17059
17060         * mini.c (add_signal_handler): ifdef out on Windows
17061
17062 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
17063
17064         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
17065         cpu-sparc.md: Add exception handling support + other fixes.
17066
17067         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
17068         typed GC detection in --version.
17069
17070         * basic.cs exceptions.cs: New regression tests.
17071
17072         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
17073         the arch specific code can store data during a compilation.
17074
17075         * mini-ops.h: Add OP_SETFRET.
17076
17077         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
17078         function, register a separate icall for each arity, so the icalls can
17079         get a wrapper.
17080         
17081         * mini.c (mono_print_tree): Print negative offsets in a more readable
17082         form.
17083         
17084         * mini.c: Make signal handling work on sparc.
17085         
17086         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
17087
17088         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
17089
17090         * jit-icalls.c: Emulate truncl by aintl on solaris.
17091
17092         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
17093
17094 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
17095
17096         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
17097
17098 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
17099
17100         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
17101         a MarshalByRef type, inline a method that performs the check, taking into
17102         account that the object can be a proxy. Also implemented tow new opcodes:
17103         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
17104         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
17105         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
17106
17107 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
17108
17109         * mini-ppc.c: if a relative branch displacement is too big
17110         but it points to and area reachable with an absolute branch, 
17111         avoid the thunks.
17112
17113 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
17114
17115         * mini.c: optimize small copies in cpblk.
17116
17117 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
17118
17119         * basic-calls.cs basic-float.cs: New regression tests.
17120
17121         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
17122         negative offsets from %fp. Implement localloc. Fix local register 
17123         allocation. Fix the case when the this argument needs to be saved to
17124         the stack. Implement some missing opcodes.
17125
17126 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
17127
17128         * mini.c (mini_method_compile): Reenable global regalloc in methods
17129         with exception handlers.
17130
17131         * linear-scan.c (mono_varlist_sort): Fix warning.
17132
17133         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
17134
17135         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
17136         regalloc costs.
17137
17138         * liveness.c: Make all variables uses in exception clauses volatile, to
17139         prevent them from being allocated to registers. Fixes #42136.
17140
17141 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
17142
17143         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
17144         causes regressions.
17145
17146         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
17147         argument to mono_arch_regalloc_cost.
17148
17149         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
17150         precisely.
17151
17152 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
17153
17154         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
17155         Make the cost of allocating a variable to a register arch dependent.
17156
17157         * basic-calls.cs: Fix compilation of tests.
17158         
17159         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
17160         helper function to cut back on the number of #ifdefs needed.
17161
17162         * mini-ppc.c: Fix compilation.
17163
17164         * basic-calls.cs: New regression tests.
17165
17166         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
17167
17168         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
17169         of l0 since that is callee saved.
17170
17171         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
17172         to virtual calls.
17173
17174         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
17175         of delay instruction.
17176
17177         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
17178
17179         * mini.h (MonoCallInst): Add 'virtual' flag.
17180
17181         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
17182
17183 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
17184
17185         * *.cs: New regression tests.
17186
17187         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
17188         work.
17189
17190         * mini.c (mono_runtime_install_handlers): Fix build.
17191
17192         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
17193         'signal_stack_size' members.
17194
17195         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
17196         alternate signal stack.
17197
17198         * exceptions-x86.c: Add stack overflow handling.
17199
17200         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
17201         functions to arch independent code.
17202
17203         * mini.c (mono_print_tree): Print more detailed info for load_membase
17204         opcodes.
17205         
17206 2004-02-23  Martin Baulig  <martin@ximian.com>
17207
17208         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
17209
17210 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
17211
17212         * mini-x86.c: fixed reg allocation for div/rem.
17213
17214 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
17215
17216         * driver.c (mono_main): Report some configuratio options on --version.
17217
17218 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
17219
17220         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
17221         low in the address space. Correctly flush memory in thunks where we
17222         output native code.
17223
17224 2004-02-20  Martin Baulig  <martin@ximian.com>
17225
17226         * mini.c (mini_get_method): New static method; inflate all generic
17227         methods and methods in open generic instances.
17228         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
17229         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
17230
17231 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
17232
17233         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
17234
17235         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
17236
17237 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
17238
17239         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
17240
17241         * mini-sparc.c (flushi mono_arch_output_basic_block): make
17242         it compile using Sun's compiler.
17243
17244 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
17245
17246         * 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.
17247
17248         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
17249
17250 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
17251
17252         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
17253         code.
17254         * mini-ppc.c: handle calls outside of the allowed range with thunks
17255         allocated using the code manager.
17256         * tramp-ppc.c: use the code manager to hold generated native code.
17257         Fixed the magic trampoline to just patch vtable entries.
17258
17259 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
17260
17261         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
17262         independent file.
17263
17264 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
17265
17266         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
17267         PPC.
17268
17269         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
17270         if we have a working __thread implementation.
17271
17272         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
17273         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
17274
17275 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
17276
17277         * mini-x86.c: Fix compilation under gcc 2.
17278         
17279 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
17280
17281         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
17282         contains a call to the wrapped function.
17283
17284         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
17285         OP_<CALL>_IMM opcodes, and use them under X86.
17286         
17287         * mini.c (mono_jit_find_compiled_method): Fix warning.
17288
17289         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
17290
17291         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
17292
17293         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
17294         functionality to mini.c.
17295
17296         * mini.c (mono_create_jump_trampoline): New function to create a jump
17297         trampoline. Return a compiled method instead of a trampoline if it
17298         exists. Add a cache for jump trampolines.
17299
17300         * mini.c (mono_jit_find_compiled_method): New function to return a
17301         compiled method if it exists.
17302
17303         * mini-x86.c: Call mono_create_jump_trampoline instead of 
17304         mono_arch_create_jit_trampoline.
17305
17306         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
17307         a jump trampoline. Fixes #52092.
17308         
17309 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
17310
17311         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
17312         which is not up-to-date. Add check_corlib_version () instead.
17313
17314         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
17315         have to call it.
17316         
17317         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
17318         since newer valgrind versions do not need it.
17319
17320         * mini.c (mono_jit_compile_method_with_opt): New helper function to
17321         compile a method with a given set of optimizations.
17322
17323         * mini.c: Compile icall wrappers on-demand instead of at startup.
17324
17325         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
17326         wrapper for an icall.
17327
17328 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
17329
17330         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
17331         #54063.
17332
17333         * iltests.il: Add test for non-empty stack before switch instruction.
17334
17335 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
17336
17337         * mini.c: Add support for new stringbuilder marshalling conventions.
17338
17339         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
17340
17341 2004-02-01  Martin Baulig  <martin@ximian.com>
17342
17343         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
17344         in `ginst->mtype_argv'.
17345
17346 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
17347
17348         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
17349         facilitate grepping.
17350
17351 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
17352
17353         * mini.c: fixed buglet in initobj generic implementation for references.
17354
17355 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
17356
17357         * Makefile.am: make the version script conditional.
17358         * jit-icalls.c: handle missing truncl().
17359
17360 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
17361
17362         * exceptions.cs: Add more tests for double->int conversion.
17363
17364         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
17365         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
17366
17367 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
17368
17369         * driver.c: make --verbose --version emit an error
17370         if the loaded corlib doesn't match the runtime version.
17371
17372 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
17373
17374         * mini-ppc.h: export ppc_patch().
17375         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
17376         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
17377         on par or better than on MacOSX.
17378
17379 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
17380
17381         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
17382         mono_lookup_pinvoke_call.
17383
17384         * mini-x86.c: Under windows, the default pinvoke calling convention is
17385         stdcall. Fixes #52834.
17386
17387         * mini.c (optimize_branches): Add an upper bound to the number of
17388         iterations to prevent infinite loops on strange loops. Fixes #53003.
17389
17390 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
17391
17392         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
17393         and ISINST. Fixes #52093.
17394
17395         * objects.cs (test_0_vector_array_cast): New tests.
17396         
17397 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
17398
17399         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
17400         checking in Array.Set ().
17401
17402         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
17403         #52590.
17404
17405         * object.cs (test_0_multi_array_cast): New regression test.
17406
17407 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
17408
17409         * exceptions-ppc.c: fix build on Linux/PPC.
17410
17411 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
17412
17413         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
17414         running under valgrind.
17415         (x86_magic_trampoline): Fix build bustage.
17416
17417         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
17418         negative values as well. This is needed for the encoding of the line number
17419         info, since sometimes the line numbers are not in increasing order.
17420
17421 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
17422
17423         * cpu-pentium.md (localloc): Increase the size of the localloc 
17424         instruction since it is a loop under Win32.
17425
17426         * debug-mini.c (record_line_number): Get rid of unneccesary memory
17427         allocation.
17428
17429 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
17430
17431         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
17432         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
17433         Max Horn (max@quendi.de). Fix file names in comments.
17434
17435 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
17436
17437         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
17438         avoid stack overflow.
17439         (replace_usage): Avoid uninitialized variable warnings.
17440
17441         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
17442         and taking the address of valuetype variables.
17443
17444 2004-01-03  Patrik Torstensson
17445
17446         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
17447         for other purposes than FP later on.
17448
17449 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
17450
17451         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
17452         of tail calls.
17453
17454 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
17455
17456         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
17457
17458 2003-12-30  Patrik Torstensson <p@rxc.se>
17459
17460         * mini-x86.h: Decreased number of availiable fp regs.
17461         Solves corner cases with FP spilling.
17462
17463 2003-12-23  Patrik Torstensson <p@rxc.se>
17464
17465         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
17466         for floating point stack tracking / spilling on x86. 
17467         Fixes bug #49012.
17468         
17469         * basic-float.cs: added float mul overflow test.
17470
17471 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
17472
17473         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
17474
17475 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17476
17477         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
17478         supports for cond branches that overflow the immediate
17479         overflow offset. mcs can compile simple programs.
17480
17481 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17482
17483         * exceptions-ppc.c: exception handling support wip:
17484         finally handlers get run on exception.
17485
17486 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
17487
17488         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
17489         profiling.
17490
17491 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17492
17493         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
17494         initial support for stack walking and unwinding.
17495
17496 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
17497
17498         * driver.c (mono_main): Make corlib-out-of-sync message more 
17499         descriptive. Also remove verify_corlib call.
17500
17501 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17502
17503         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
17504         not overlap with other call's arguments, too.
17505
17506 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
17507
17508         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
17509         move to arch-specific code the choice of arch-specific
17510         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
17511         * mini.c: ensure emulation calls will not interleave
17512         with other calls.
17513
17514 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
17515
17516         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
17517         the magic trampoline stack frame is dropped before executing
17518         the new method.
17519
17520 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
17521
17522         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
17523         and integer to fp conversions. Added support for overflowing
17524         arguments on the stack. Reserve a couple more registers as temps.
17525         Added support for aot compilation (as output still needs to be
17526         tweaked, though).
17527
17528 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17529
17530         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
17531         Don't overwrite return register in some corner cases.
17532
17533 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
17534
17535         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
17536         static constructors when AOT compiling.
17537
17538         * driver.c (mono_main): Call mono_check_corlib_version.
17539
17540 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17541
17542         * cpu-g4.md, basic.cs: fixed div target register.
17543
17544 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
17545
17546         * mini-ppc.c, basic.cs: shl_imm fix with test.
17547
17548 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17549
17550         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
17551         structures by value. Misc fixes.
17552         * objects.cs: more tests.
17553
17554 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
17555
17556         * mini-ppc.c: lconv.ovf.i implemented.
17557
17558 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17559
17560         * mini.c:
17561         (mini_init): don't error out if someone already called g_thread_init.
17562
17563 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17564
17565         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
17566         to be any type per the spec. Fix abnormal memory usage when
17567         the same object is repeatedly thrown.
17568
17569 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
17570
17571         * mini.c: check for overruns in IL code.
17572
17573 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
17574
17575         * TODO: Add/remove some todo entries.
17576
17577 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
17578
17579         * driver.c (mono_main): Call mono_verify_corlib.
17580
17581 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
17582
17583         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
17584         This has been moved to mini.c
17585         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
17586         type being casted is marshalbyref it could be a proxy, so instead of
17587         emitting the type check code, emit a call to a runtime method that will
17588         perform the check by calling CanCastTo if needed.
17589
17590 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
17591
17592         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
17593         methods with large stack frames under Win32.
17594
17595 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
17596
17597         * Makefile.am: Distribute regression tests.
17598
17599         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
17600         at the end instead of inserting each variable into the sorted list.
17601
17602         * linear-scan.c (mono_varlist_sort): New helper function.
17603         
17604 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17605
17606         * mini.c: ensure arguments and locals are within bounds.
17607
17608 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17609
17610         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
17611         related fixes.
17612
17613 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
17614
17615         * mini.c (mono_cprop_copy_values): Fix crash.
17616
17617         * aot.c: Set verbosity back to 0.
17618         
17619 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17620
17621         * regalloc.c: complete memory leak fix by Laurent Morichetti
17622         (l_m@pacbell.net).
17623
17624 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
17625
17626         * driver.c (main_thread_handler): Revert the previous patch.
17627
17628         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
17629         under valgrind.
17630
17631         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
17632         memory from the memory pool.
17633
17634         * driver.c (main_thread_handler): Turn on all optimizations when
17635         --aot is used.
17636
17637         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
17638         an array for better performance.
17639
17640         * regalloc.c (mono_regstate_assign): Fix memory leak.
17641
17642         * debug-mini.c (mono_debug_serialize_debug_info): New function to
17643         serialize the debug info.
17644
17645         * debug-mini.c (mono_debug_add_aot_method): New function to load the
17646         debug info from the serialized representation.
17647
17648         * aot.c: Save debug info into the generated file and load it when 
17649         loading a method.
17650
17651         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
17652
17653 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17654
17655         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
17656         More FP-related fixes.
17657
17658 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
17659
17660         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
17661         and register allocation buglet. Hello world now runs.
17662
17663 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17664
17665         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
17666         * tramp-ppc.c: fixed class init trampoline.
17667         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
17668
17669 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17670
17671         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
17672         mini.c: more ppc changes/fixes.
17673
17674 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
17675
17676         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
17677         Also optimize the case when the arguments are the same in the caller 
17678         and in the callee.
17679
17680         * iltests.il: Add tests for tail calls with valuetype arguments.
17681
17682 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17683
17684         * mini-ppc.c: fixes for struct return type.
17685
17686 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
17687
17688         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
17689         mono_spillvar_offset() to arch-specific code.
17690
17691 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
17692
17693         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
17694
17695 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
17696
17697         * exceptions-x86.c: Fix stack space leaks.
17698         
17699         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
17700         registers from the lmf if the method has save_lmf set.
17701
17702 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
17703
17704         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
17705         of icall wrappers into InvokeInDomain, since these are now per-domain.
17706
17707 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
17708
17709         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
17710         make some opcode emulation and intrinsic ops enabled/disabled 
17711         according to the architecture. More fixes.
17712
17713 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17714
17715         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
17716
17717 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17718
17719         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
17720         arch-specific handling for 'this' and struct return type to
17721         arch-specific code.
17722
17723 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17724
17725         * aot.c: prevent divide by zero error when reporting (it happened with
17726         Accessibility.dll).
17727
17728 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
17729
17730         * mini.h (inst_switch): Remove unused macro.
17731
17732 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17733
17734         * aot.c:
17735         (load_aot_module): free 'info->methods' and 'info' properly. No more
17736         "free(): invalid pointer blah" messages when you have an old aot
17737         compiled assembly.
17738
17739 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
17740
17741         * jit-icalls.c, mini.c: Added support for context static fields.
17742
17743 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
17744
17745         * mini.c (mono_method_blittable): Methods which set LastError are not 
17746         blittable either. Fixes #51108.
17747         
17748 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17749
17750         * mini.c: flush icache.
17751         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
17752
17753 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
17754
17755         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
17756
17757 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
17758
17759         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
17760         safe on IA32.
17761
17762         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
17763         vararg calls.
17764
17765         * inssel.brg (CEE_MKREFANY): Fix AOT case.
17766
17767 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
17768
17769         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
17770         instruction when the result is discarded.
17771
17772         * iltests.il (test_0_div_regalloc): New regression test.
17773
17774         * arrays.cs: Fix compilation error.
17775
17776 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
17777
17778         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
17779         float rules to inssel-x86.brg: sane architectures with FP registers
17780         don't need to implement these rules.
17781
17782 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17783
17784         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
17785
17786 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17787
17788         * mini.h, inssel-long32.brg: fixed endianess issues in int64
17789         implementation of 32 bit systems.
17790
17791 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17792
17793         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
17794         (Jeroen Zwartepoorte).
17795
17796 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
17797
17798         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
17799         the caller and the callee matches.
17800         
17801         * mini.c (mono_method_to_ir): Add comment.
17802
17803         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
17804         signbit is missing on some platforms.
17805
17806 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
17807
17808         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
17809
17810         * mini.c (setup_jit_tls_data): Call the new function.
17811         
17812         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
17813
17814         * mini-x86.c: Add experimental support for fast access to the lmf
17815         structure under NPTL/Linux 2.6.x.
17816
17817 2003-11-06  Martin Baulig  <martin@ximian.com>
17818
17819         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
17820         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
17821         the debugger.
17822
17823 2003-11-02  Martin Baulig  <martin@ximian.com>
17824
17825         * mini.c (inflate_generic_field): New static method.
17826         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
17827         generic instance and the field is declared in a generic type, call
17828         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
17829
17830 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
17831
17832         * mini.h mini.c (mono_method_same_domain): New function to return
17833         whenever the caller and the callee are in the same domain.
17834
17835         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
17836
17837 2003-10-30  Martin Baulig  <martin@ximian.com>
17838
17839         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
17840         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
17841         method parameters.
17842         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
17843         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
17844
17845 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
17846
17847         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
17848         propagation.
17849
17850         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
17851         object here, so it is in the correct appdomain etc.
17852
17853 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
17854
17855         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
17856         already done.
17857         (mono_method_to_ir): Avoid freeing the type created returned from
17858         mono_type_create_from_typespec, since it is put into an internal cache
17859         by the function. Fixes pointer.exe.
17860
17861         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
17862         trampolines for icalls and pinvokes as well. Fixes #33569.
17863
17864 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
17865
17866         * mini.c: Update after appdomain changes.
17867
17868         * mini.c (mono_jit_compile_method_inner): Allways compile native
17869         method wrappers in the root domain, since there can only be one
17870         instance of them, whose address is stored in method->info.
17871
17872 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
17873
17874         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
17875         environment variable. Instead detect automatically whenever running
17876         under valgrind using the magic macro RUNNING_ON_VALGRIND from
17877         valgrind.h.
17878
17879 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
17880
17881         * trace.c, trace.h: New files that implement the new trace option
17882         parsing. 
17883
17884         * driver.c: Document new --trace options.
17885
17886         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
17887         mini-x86.c: Apply:
17888
17889         -       if (mono_jit_trace_calls)
17890         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
17891
17892         * mini.h: prototypes.
17893         
17894 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
17895
17896         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
17897
17898         * mini.c inssel.brg: Implement typedefbyref opcodes.
17899
17900         * mini.c (mono_jit_compile_method): Remove unused local variable.
17901
17902         * mini.c (mono_jit_compile_method_inner): Ditto.
17903         
17904 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
17905
17906         * tramp-x86.c (x86_class_init_trampoline): Fix build.
17907         
17908         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
17909
17910 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
17911
17912         * mini.c (mono_no_aot): Remove unused global variable.
17913
17914         * mini.c: Thread safety fixes.
17915
17916 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
17917
17918         * mini.c (mono_create_class_init_trampoline): Add a lock around
17919         class_init_hash_addr.
17920
17921         * arrays.cs (test_0_newarr_emulation): Add new regression test for
17922         #30073.
17923
17924         * mini.c: Decompose the NEWARR instruction before decomposing its
17925         arguments. Fixes #30073.
17926
17927 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
17928
17929         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
17930         convention.
17931
17932 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
17933
17934         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
17935
17936         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
17937
17938         * driver.c: Add support for compiling icall wrappers to --compile.
17939
17940 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
17941
17942         * inssel.brg: The empty value in class->interface_offsets is -1, not
17943         0. Fixes #49287.
17944
17945 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
17946
17947         * objects.cs: New test for 'is' operator on an array of interfaces.
17948
17949 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17950
17951         * tramp-ppc.c: update trampoline code to support jumps
17952         and class initialization.
17953
17954 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
17955
17956         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
17957
17958         * inssel.brg (OP_UNBOXCAST): Fix #46027.
17959
17960         * inssel.brg (OP_UNBOX): Remove unused rule.
17961
17962         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
17963         region instead of one for each method. Fixes #47813.
17964
17965 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
17966
17967         * exceptions.cs (test_0_nested_finally): New regression test for
17968         nested exception handlers.
17969
17970         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
17971
17972         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
17973
17974         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
17975         inlining.
17976
17977         * mini.c (mono_method_check_inlining): Make the inlining limit 
17978         configurable by an environment variable.
17979         
17980         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
17981
17982         * mini.h: Bump AOT file version.
17983
17984         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
17985         token, store the image along with the token, since the token might not 
17986         refer to the same image as the method containing the relocation, 
17987         because of inlining.
17988
17989 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
17990
17991         * mini.c (mono_precompile_assemblies): New function to compile
17992         all methods in all loaded assemblies.
17993
17994         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
17995
17996         * regalloc.h regalloc.c (MonoRegState): Change the type of 
17997         iassign and fassign to int*, since they can contain large negative
17998         values if the register is spilled. Also added some comments. Fixes
17999         #45817.
18000
18001         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
18002         under Win32. Fixes #42964.
18003
18004 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
18005
18006         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
18007
18008         * aot.c: Added support for AOT compiling methods which contain calls
18009         to wrappers. Currently, only remoting-invoke-with-check wrappers are
18010         handled.
18011         
18012         * driver.c (compile_all_methods): Run the compilation in a thread
18013         managed by mono. Fixes #44023.
18014
18015         * mini.c (mono_codegen): Print full method name in verbose output.
18016
18017         * mini-x86.c (mono_arch_patch_code): Fix warning.
18018         
18019         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
18020         jumps, since the method we are jumping to might be domain-specific.
18021
18022         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
18023
18024 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18025
18026         * inssel.brg: string chars are unsigned.
18027
18028 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
18029
18030         * TODO: New todo item.
18031
18032         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
18033         which calls mono_runtime_class_init and patches the call site to
18034         avoid further calls.
18035         (mono_arch_create_class_init_trampoline): New arch specific function 
18036         to create a class init trampoline.
18037         (create_trampoline_code): Generalized so it can create
18038         class init trampolines as well.
18039
18040         * mini.c (helper_sig_class_init_trampoline): New helper variable.
18041         (mono_create_class_init_trampoline): New function to create and cache
18042         class init trampolines.
18043         (mono_find_class_init_trampoline_by_addr): New function to lookup the
18044         vtable given the address of a class init trampoline. Used by the
18045         patching process.
18046         (mono_codegen): Generate a call to a trampoline instead of
18047         mono_runtime_class_init in LDSFLD[A].
18048         (mono_codegen): Add relocations for the new trampoline.
18049         
18050         * mini.h mini-x86.c aot.c: Added a new relocation type: 
18051         MONO_PATCH_INFO_CLASS_INIT.
18052
18053         * mini.h: Bump AOT version number.
18054
18055         * aot.c: Create a copy of the loaded code instead of using the original
18056         so methods which call each other will be close in memory, improving
18057         cache behaviour.
18058         
18059         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
18060         patch since it breaks the regression tests.
18061         
18062         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
18063         for the register saving instruction sequence since the 
18064         frame_state_for function in glibc 2.3.2 don't seem to detect it.
18065
18066 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
18067
18068         * TODO: Fix todo item && remove another.
18069
18070 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
18071
18072         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
18073         previous checkin.
18074
18075         * aot.c: Moved the check for MONO_LASTAOT into the initialization
18076         function of the module.
18077
18078         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
18079         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
18080         --no-aot command line option.
18081
18082 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
18083
18084         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
18085         by Bernie Solomon (bernard@ugsolutions.com).
18086
18087         * inssel.brg: Refactor the interface offset table related code into
18088         its separate functions and add support for the AOT case.
18089
18090 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
18091
18092         * aot.c (mono_aot_get_method_inner): Fix memory leak.
18093         
18094         * aot.c: Added mono_aot_verbose variable and made all debugging
18095         output depend on the value of this variable.
18096
18097         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
18098         method_label and info_label.
18099
18100         * mini.h mini-x86.c aot.c: Added a new relocation type 
18101         MONO_PATCH_INFO_IID for klass->interface_id.
18102
18103         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
18104         the MonoJitInfo structure.
18105
18106         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
18107         a non-root appdomain in shared mode.
18108
18109 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18110
18111         * aot.c: make aot loader less verbose. Remove free of unused variable.
18112
18113 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
18114
18115         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
18116
18117         * .cvsignore: Added *.dll.
18118
18119         * mini.c (mono_print_tree_nl): New function callable while debugging.
18120
18121         * mini.c (mono_print_code): Export this.
18122
18123         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
18124         patched code.
18125
18126 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
18127
18128         * mini.h (MonoCompile): Added 'jit_info' field.
18129
18130         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
18131         the cfg structure, since it is needed by the AOT compiler.
18132
18133         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
18134
18135         * aot.c: A major rewrite. Changes include:
18136         - save exception tables for methods which have them.
18137         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
18138         to g_module_symbol.
18139         - reworked the file format so it is now much smaller and needs
18140         fewer relocation entries.
18141         
18142 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
18143
18144         * aot.c (load_aot_module): Fix build bustage on platforms without
18145         Boehm GC.
18146
18147 2003-09-04  Martin Baulig  <martin@ximian.com>
18148
18149         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
18150
18151 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
18152
18153         * TODO: Some new optimization ideas.
18154
18155         * aot.c: Move AOT module loading logic here from mono_assembly_open.
18156
18157         * aot.c: Save the optimization flags used to compile the code into
18158         the AOT module.
18159
18160         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
18161         support emitting domain specific code.
18162         
18163         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
18164         no longer domain neutral. It can be made domain neutral by compiling 
18165         with --optimize=shared.
18166
18167         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
18168         between appdomains.
18169
18170         * driver.c mini.h mini.c: New --no-aot debugging option which disables
18171         loading of AOT code.
18172
18173         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
18174         
18175         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
18176         if there is no domain neutrality information.
18177
18178 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
18179
18180         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
18181         format version into the generated library.
18182
18183         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
18184         callee method into the caller since one of them could be shared.
18185
18186         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
18187         system exceptions from AOT code now works.
18188
18189         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
18190         method if it is domain neutral and the callee is not.
18191
18192         * graph.c (cfg_emit_one_loop_level): Fix warning.
18193
18194 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
18195
18196         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
18197         last checkin.
18198
18199 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
18200
18201         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
18202         is needed  by code which is executed before mono_runtime_init ().
18203         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
18204         
18205         * mini.c (mono_thread_abort): Fix warning.
18206         (mono_jit_compile_method): Call static constructor in the AOT case too.
18207
18208         * aot.c (mono_compile_assembly): Fix warning.
18209
18210 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18211
18212         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
18213
18214 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
18215
18216         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
18217
18218         * cpu-pentium.md: Fix the length of call opcodes so they include the
18219         ESP restoring instruction. Fixes #47968.
18220
18221 2003-08-28  Martin Baulig  <martin@ximian.com>
18222
18223         * mini-x86.c (mono_arch_call_opcode): Added support for
18224         MONO_TYPE_GENERICINST.
18225
18226         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
18227
18228 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
18229
18230         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
18231         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
18232
18233         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
18234         metadata_section.
18235
18236 2003-08-26  Martin Baulig  <martin@ximian.com>
18237
18238         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
18239         when reporting an error, set this to the actual error location.
18240         (mono_method_to_ir): Report the correct error location if
18241         get_basic_blocks() returned an error.
18242
18243 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
18244
18245         * mini.c (mono_type_blittable): OBJECT is not blittable.
18246         (mono_method_blittable): Methods which have marshalling descriptors
18247         are not blittable either. Fixes #47842.
18248
18249 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
18250
18251         * driver.c mini.c: Use an environment variable instead of a global 
18252         variable. Also fix the build.
18253
18254         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
18255         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
18256         reporting this. 
18257
18258         * driver.c mini.c: Added --with-valgrind option to turn off some
18259         code which prevents mono from running under valgrind.
18260
18261         * mini.c (mono_emit_call_args): Fixed warning.
18262
18263         * mini.c (mono_emulate_opcode): Fixed warning.
18264
18265 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18266
18267         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
18268         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
18269         regalloc.c, regalloc.h: specify available registers in arch-specific
18270         code and support floats in the regallocator (patch by Laurent Morichetti 
18271         <l_m@pacbell.net>)
18272
18273 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18274
18275         * mini.c: mono_thread_current() can be called only after
18276         mono_runtime_init(): rearrange code to not call it early on.
18277
18278 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18279
18280         * mini.c: allocate jump tables in the code mempools.
18281
18282 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18283
18284         * mini.c, mini.h: make sure per-thread data allocated by the jit is
18285         freed.
18286
18287 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
18288
18289         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
18290         12 to 16.  This fixes bug #47453.
18291
18292
18293 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
18294
18295         * mini-ppc.c: fixed indexed load and unsigned compares.
18296
18297 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
18298
18299         * mini.c: reenabled installation of handler for
18300           thread abort signal.
18301
18302 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18303
18304         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
18305         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
18306         until it's fixed and actually useful.
18307
18308 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18309
18310         * inssel-long32.brg: couple more opcodes implemented.
18311
18312 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18313         
18314         * mini-sparc.c: Even more opcodes implemeted.
18315
18316 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
18317
18318         * mini-sparc.c: More opcodes implemented.
18319
18320 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
18321
18322         * mini-sparc.c: More opcodes implemented.
18323
18324 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18325
18326         * inssel-sparc.brg: Add some needed rules.  Direct
18327         copy from PPC.
18328         * Makefile.am: Use inssel-sparc.brg
18329         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
18330         an assert happy for now.
18331
18332 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
18333
18334         * mini-sparc.c: Fixed compile errors.
18335         * exceptions-sparc.c: Same.  We now produce a mono binary 
18336         on sparc-linux.  Yea.
18337
18338 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
18339
18340         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
18341         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
18342         They compile, but do not work.
18343
18344 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18345
18346         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
18347         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
18348         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
18349         (ct@gentoo.org).
18350
18351 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18352
18353         * mini.c: more opcodes implemented and better support for generics.
18354
18355 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18356
18357         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
18358         * mini.c, mini.h: first cut at generics support: some new instructions 
18359         added and changed the behaviour of some of the existing ones.
18360
18361 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
18362
18363         * mini.c: Removed definition of metadata_shared mutex here.
18364
18365 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18366
18367         * mini-x86.c: make vararg calls work for instance methods.
18368
18369 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18370
18371         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
18372         returns the arguments in a separte list, now.
18373
18374 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18375
18376         * aot.c, mini.c: updates for array type representation changes.
18377
18378 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
18379
18380         * mini.c: register function to perform jit shutdown.
18381
18382 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18383
18384         * mini.c: use a faster allocator if possible.
18385
18386 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18387
18388         * aot.c: some cleanups and portability changes.
18389
18390 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18391
18392         * mini.c: use faster allocation for CEE_BOX if possible.
18393
18394 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18395
18396         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
18397         Moved inlined mempcy code to its own function so that is can be
18398         reused. Added an inline memset function as well (optimized initobj).
18399         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
18400
18401 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18402
18403         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
18404
18405 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18406
18407         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
18408         arch code can setup the cpu for CLR execution, if needed.
18409         We use it on x86 to set the precision of FP operations.
18410
18411 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18412
18413         * mini.c: disable some optimizations if we can guess they'll cost too
18414         much for a given method.
18415
18416 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18417
18418         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
18419         
18420 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18421         * mini.h mini.c mini-x86.c: Added instruction level coverage 
18422         info collection support.
18423
18424 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18425
18426         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
18427         is now implemented in the profiling API. Get rid of a couple of
18428         unnecessary global variables.
18429
18430 2003-06-15  Nick Drochak <ndrochak@gol.com>
18431
18432         * basic-long.cs: tests for negative values for bigmul, and unsigned.
18433         * cpu-g4.md: add op_bigmul and op_bigmul_un
18434         * cpu_pentium.md: add op_bigmul_un
18435         * inssel-long32.brg: add rule for unsigned bigmul
18436         * mini-ops.h: define OP_BIGMUL_UN
18437         * mini-x86.c: THE BUG: handle (un)signed properly
18438         * mini.c: choose unsigned opcode if needed.
18439         This set of patches fixes bug #44291
18440
18441 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
18442
18443         * mini.c (optimize_branches): improved to handle all kinds of
18444         conditional branches.
18445
18446 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18447
18448         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
18449         don't raise exceptions.
18450
18451 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18452
18453         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
18454         to arch-specific files.
18455
18456 2003-06-09  Martin Baulig  <martin@ximian.com>
18457
18458         * Makefile.am (libs): Added $(LIBGC_LIBS).
18459
18460 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
18461
18462         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
18463         and OP_ATAN (fixes bug#44293).
18464
18465 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
18466
18467         * Makefile.am, mini-x86.c: rename cpu description array to
18468         pentium_desc, since some compilers define the 'pentium' preprocessor
18469         symbol.
18470
18471 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
18472
18473         * mini.c (mini_select_instructions): add explicit branch if the
18474         following block is not the false target of a conditional branch -
18475         we need this with any optimization that reorder or remove bblocks
18476
18477         * mini.c (optimize_branches): bug fixes
18478
18479 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
18480
18481         * mini.c (mono_method_to_ir): inline static readonly fields
18482
18483         * ssa.c (fold_tree): start cfold support for long (very simple
18484         cases only)
18485
18486         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
18487
18488 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18489
18490         * inssel.brg: fixed memcpy (bug #44219).
18491
18492 2003-06-05  Dick Porter  <dick@ximian.com>
18493
18494         * driver.c: Set the glib log levels to not abort if g_message
18495         recurses.
18496
18497         g_set_prgname() has to happen before mini_init() so that the
18498         process handle gets the info.
18499         
18500 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18501
18502         * driver.c: add intrins to the default optimizations to get wider
18503         exposure.
18504
18505 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18506
18507         * mini.h: some large basic blocks will overflow a 16-bit
18508         integers for symbolic registers.
18509
18510 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
18511
18512         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
18513         (mono_arch_output_basic_block): fix bug 43499 
18514
18515 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18516
18517         * mini.c: kill duplicated definition of mono_debug_format.
18518
18519 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18520
18521         * mini-x86.c, arrays.cs: fixed register allocation bug.
18522
18523 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
18524
18525         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
18526
18527         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
18528
18529 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18530
18531         * mini.c:
18532         (print_method_from_ip): also print source location information if
18533         available.
18534
18535 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
18536
18537         * mini.c (mono_find_block_region): bug fix in region code
18538         (mini_method_compile): enable removing unreachable code again, but
18539         only in methods without exception clauses.
18540
18541 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18542
18543         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
18544         Implemented arglist opcode and handling of TypedReference type.
18545         Fixed x86 call convention when a structure is returned.
18546         Minimal support for calling static vararg methods.
18547
18548 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
18549
18550         * mini.c (mini_method_compile):  always remove unreachable code,
18551         because the code in them may be inconsistent  (access to dead
18552         variables for example).
18553
18554 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18555
18556         * driver.c, debug-mini.c: warning fixes.
18557
18558 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
18559
18560         * Makefile.am, jit.h, mini.h: install header for embedding mono.
18561
18562 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
18563
18564         * mini.c: thread-static fields are registered in mono_class_vtable(),
18565         so ensure the function is called before checking for them.
18566
18567 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
18568
18569         * mini.c (optimize_branches): fix for bug 43586
18570
18571         * jit-icalls.c (mono_llmult_ovf): added an additional check for
18572         overflow (fixes Bug #43639)
18573
18574 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18575
18576         * mini.c, objects.cs: allow the use of stobj for primitive types.
18577
18578 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18579
18580         * mini.c: be less strict about argument checking until we support
18581         running the verifier.
18582
18583 2003-05-27  Nick Drochak <ndrochak@gol.com>
18584
18585         * basic-long.cs: tests for (ulong)int * (ulong)int also
18586         * mini.c: use the same trick for (ulong)int * (ulong)int
18587
18588 2003-05-27  Nick Drochak <ndrochak@gol.com>
18589
18590         * basic-long.cs: add regression test for (long)int * (long)int
18591         * cpu-pentium.md: add op_bigmul specification
18592         * inssel-long32.brg: add OP_BIGMUL rule
18593         * mini-ops.h: add OP_BIGMUL
18594         * mini-x86.c: register allocator: handle case where src1 needs to be
18595         in EAX.
18596         * mini.c: substitute special BIGMUL opcode in the tree for 
18597         (long)int * (long)int
18598
18599 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18600
18601         * jit-icalls.c: call the type ctor on field access if needed.
18602
18603 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18604
18605         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
18606         to a method (including results of ldelema, bug#43207).
18607
18608 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
18609
18610         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
18611         colors to show exception handler blocks.
18612
18613         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
18614         (fix for pinvoke7.cs).
18615
18616 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18617
18618         * mini.h, mini.c: ensure correct initialization order for types that
18619         require it. Prepare for lazy compilation of jit icall wrappers.
18620         Provide a name for opcode emulation to reduce unneeded mallocing.
18621
18622 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
18623
18624         * mini-x86.c: better register restoring code and profiling
18625         support for tail calls.
18626
18627 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18628
18629         * mini.h, driver.c: prepare for leaf methods optimization.
18630
18631 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18632
18633         * mini.c: get targets of branches before converting a method.
18634
18635 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
18636
18637         * mini.c (optimize_branches): added some experimental code (disbaled) 
18638
18639 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
18640
18641         * mini.c (optimize_branches): fix branch to branch optimization 
18642
18643         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
18644
18645         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
18646
18647         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
18648
18649         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
18650         if needed.
18651
18652 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
18653
18654         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
18655         enable use of interface variables again.
18656
18657         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
18658         I1 to registers because there is no simply way to sign extend 8bit
18659         quantities in caller saved registers on x86.
18660
18661         * inssel-float.brg: set costs of some rules to 2 so
18662         that monobure always select the arch. specific ones if supplied,
18663         regardless of the order we pass the files to monoburg.
18664
18665 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18666
18667         * mini.c, mini-x86.c: since the magic trampoline for jumps
18668         can't patch the code directly, we do it as soon as the
18669         method gets compiled.
18670
18671 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18672
18673         * mini-x86.c, mini.h: introduce a new patching method
18674         to support CEE_JMP and tail calls.
18675         * mini.c: obey tail.call. Don't precompile methods target
18676         of CEE_JMP.
18677         * tramp-x86.c: new trampoline code to handle methods
18678         reached through a jump.
18679
18680 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
18681
18682         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
18683         bit values to registers
18684
18685 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
18686
18687         * mini.c (mono_compile_get_interface_var): share interface
18688         variables if possible.
18689
18690 2003-05-16  Martin Baulig  <martin@ximian.com>
18691
18692         * debug-mini.c (mono_init_debugger): New function to initialize
18693         the debugger.  This is not in the debugger since it needs to
18694         access some of mini's internals.
18695
18696 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
18697
18698         * mini.c (mono_method_to_ir): inlining fixes/cleanups
18699
18700 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
18701
18702         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
18703         for value type handling.
18704
18705 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
18706
18707         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
18708         (mono_method_check_inlining): enable inlining of all kinds of wrappers
18709
18710 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
18711
18712         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
18713           the constructor through a proxy.
18714
18715 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18716
18717         * jit-icalls.c, inssel.brg: fixes to array element address
18718         calculations.
18719
18720 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
18721
18722         * mini-x86.c (is_regsize_var): allocate pointer to registers
18723
18724 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18725
18726         * driver.c: fixed typo, added intrins to the set of optimizations
18727         tested with regressions.
18728
18729 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18730
18731         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
18732         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
18733         test case.
18734
18735 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
18736
18737         * inssel.brg: remove some common pop instructions without side effects
18738
18739 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18740
18741         * inssel-x86.brg: fixed thinko in int to double conversions.
18742
18743 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18744
18745         * mini.c, jit-icalls.c: added runtime thread-static variable support.
18746
18747 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18748
18749         * inssel-long32.brg: two more missing instructions.
18750
18751 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
18752
18753         * mini.c (mono_emit_call_args): set the cil_code for all arguments
18754         if not already set.
18755
18756 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
18757
18758         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
18759         correctly.
18760
18761         * basic-float.cs: Added tests for negative zero.
18762
18763 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18764
18765         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
18766         a couple of missing operations for long casts, with test cases.
18767
18768 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18769
18770         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
18771
18772 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
18773
18774         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
18775         code size estimation.
18776
18777 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
18778
18779         * mini.c (mono_jit_create_remoting_trampoline): make it work with
18780         abstract methods (fix bug 42542)
18781
18782         * aot.c: add ability to handle array types
18783         
18784 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
18785
18786         * mini.c: Call the _specific versions of the object allocation
18787         functions if possible.
18788
18789 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18790
18791         * driver.c: call setlocale ().
18792
18793 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18794
18795         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
18796         windows build.
18797
18798 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
18799
18800         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
18801
18802         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
18803         wrappers (fix bug 42122)
18804
18805 2003-05-04  Martin Baulig  <martin@ximian.com>
18806
18807         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
18808
18809         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
18810         s/mini_set_defaults/mono_set_defaults/g.
18811
18812 2003-05-04  Martin Baulig  <martin@ximian.com>
18813
18814         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
18815
18816 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18817
18818         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
18819         (reported by Don Roberts).
18820
18821 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18822
18823         * mini.c: temporarily work around two bugs for this release.
18824
18825 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18826
18827         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
18828         that contains -export-dynamic and it makes using the ld script
18829         useless.
18830         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
18831
18832 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18833
18834         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
18835         specific cpu.
18836
18837 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18838
18839         * mini.c: make sure leave calls all the needed finally blocks,
18840         even when the target jumps out of multiple exception clauses.
18841
18842 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18843
18844         * ldscript, Makefile.am: add linker script to reduce the number of
18845         exported symbols (should also fix the issues with libwine defining
18846         some of the same symbols in io-layer).
18847
18848 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
18849
18850         * driver.c (mini_main): Avoid assertion when no file name is given on 
18851         the command line.
18852
18853 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
18854
18855         * driver.c: added --version/-V command line option.
18856         Added the inline optimization in the regression tests.
18857
18858 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18859
18860         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
18861         to the type in the method signature (fixes bug#42134).
18862
18863 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
18864
18865         * mini.c: when inlining, check this is not null only when needed (bug #42135).
18866
18867 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
18868
18869         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
18870
18871 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18872
18873         * driver.c: fixed bug #42100.
18874
18875 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
18876
18877         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
18878
18879 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18880
18881         * mini.c: moved most of the code required to do inlining to its own
18882         function so it can be reused. Inline also ctors if appropriate.
18883
18884 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
18885
18886         * Makefile.am: Link with -export-dynamic so shared libs loaded by
18887         the runtime can call mono API functions.
18888
18889 2003-04-27  Martin Baulig  <martin@ximian.com>
18890
18891         * debug-mini.c (mono_debug_init_method): Added
18892         `guint32 breakpoint_id' argument; if the method has a breakpoint,
18893         send a notification to the debugger.
18894
18895         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
18896         running in the Mono Debugger, just pass the breakpoint number to
18897         mono_debug_init_method().
18898
18899         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
18900
18901 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
18902
18903         * mini.c: allow some more unsafe compares.
18904
18905 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18906
18907         * mini-x86.c, Makefile.am: make distcheck works (partially from
18908         a patch by Richard Lee <r.h.lee@attbi.com>).
18909         * regset.c, regset.h: removed, they are unused.
18910
18911 2003-04-25  Dick Porter  <dick@ximian.com>
18912
18913         * driver.c: Usage reports the name as 'mono' not 'mini'
18914         * exceptions-x86.c: Build and run on freebsd
18915
18916 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
18917
18918         * Makefile.am: install the program with the 'mono' name and
18919         the library as libmono instead of mini and libmini.
18920
18921 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18922
18923         * driver.c: provide the APIs for the embedding interface of the old jit.
18924
18925 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
18926
18927         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
18928
18929 2003-04-23  Martin Baulig  <martin@ximian.com>
18930
18931         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
18932
18933         * driver.c: Added `--debug' command line argument to enable
18934         debugging support.
18935
18936 2003-04-23  Martin Baulig  <martin@ximian.com>
18937
18938         * debug.[ch]: Removed.  The code is now in
18939         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
18940
18941         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
18942         last six months.
18943
18944 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
18945
18946         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
18947
18948 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18949
18950         * mini.c:
18951         (mini_cleanup): moved mono_runtime_cleanup call after the call to
18952         mono_domain_finalize.
18953         (mini_method_compile): use mono_method_profile* if the the option is
18954         enabled.
18955
18956 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
18957
18958         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18959         methods with their wrapper.
18960
18961         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18962         methods with their wrapper.
18963
18964         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
18965         their wrapper.
18966
18967         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
18968         wrapper.
18969
18970         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
18971         methods.
18972
18973 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
18974
18975         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
18976
18977 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
18978
18979         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
18980         of the mempool. This is slightly faster and uses less memory
18981
18982 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18983
18984         * mini.c: avoid O(n) allocation for variables.
18985
18986 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18987
18988         * mini.c: handle items on the stack after inlining methods.
18989
18990 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18991
18992         * mini.c: make the method->opcode optimization dependent
18993         on MONO_OPT_INSTRINS and do it lazily.
18994
18995 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18996
18997         * driver.c: print overall results at the end of regression run.
18998
18999 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
19000
19001         * inssel.brg: don't overwrite symbolic registers.
19002
19003 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
19004
19005         * inssel-x86.brg: fix conversion from long to float.
19006
19007 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
19008
19009         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
19010
19011 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
19012
19013         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
19014
19015         * driver.c: Added --print-vtable option as in the old JIT.
19016
19017 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
19018
19019         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
19020
19021 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
19022
19023         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
19024
19025 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
19026
19027         * mini.c regalloc.c regalloc.h: Fix memory leak.
19028
19029 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
19030
19031         * aot.c (mono_aot_get_method): register all used strings
19032
19033 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
19034
19035         * mini.c: always intern strings references with ldstr at compile time.
19036
19037 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
19038
19039         * Makefile.am: add BUILT_SOURCES.
19040
19041 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
19042
19043         * driver.c: give a better error message when the assembly to execute
19044         doesn't have an entry point.
19045
19046 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
19047
19048         * Makefile.am: added hack for automake
19049
19050         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
19051         correct sematics.
19052
19053         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
19054
19055 22003-04-07  Martin Baulig  <martin@ximian.com>
19056
19057         * Makefile.am: Added Makefile.am.
19058
19059         * debugger-main.c: Removed, this is now in the debugger where it
19060         belongs.
19061
19062         * mini.pc.in: Call this package `mini' for the moment.
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077