2009-02-04 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
2
3         * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
4         strange crashes.
5
6 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
7
8         * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
9
10         * aot-compiler.c (emit_line_number_info): Fix line number emission when
11         the line diff is 0.
12
13         * aot-compiler.c: Add xdebug support on x86.
14
15         * unwind.c: Add x86 support.
16         
17         * aot-compiler.c (emit_exception_debug_info): Control the emission of
18         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
19
20         * mini.c (mini_method_compile): Ditto.
21         
22         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
23         the variable index.
24
25         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
26         which mimic .push_section/.pop_section in GAS.
27         
28         * aot-compiler.c: Emit precise live range information for variables.
29
30         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
31
32         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
33         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
34         them.
35
36         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
37         the live ranges of variables.
38
39         * mini.h (struct MonoMethodVar): Add two fields containing the live range
40         of the variable in terms of native offsets.
41
42 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
43
44         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
45         
46 2009-02-02  Mark Probst  <mark.probst@gmail.com>
47
48         Contributed under the terms of the MIT/X11 license by Steven
49         Munroe <munroesj@us.ibm.com>.
50
51         * exceptions-ppc.c (restore_regs_from_context): Correct operand
52         order (offset then base reg) for ppc_load_multiple_regs.
53         (emit_save_saved_regs) Correct operand order for
54         ppc_store_multiple_regs.
55         (mono_arch_get_call_filter): Correct operand order for
56         ppc_load_multiple_regs.
57
58         * mini-ppc.c (emit_memcpy): Fix operand order for
59         ppc_load_reg_update and ppc_store_reg_update.
60         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
61         (mono_arch_emit_epilog): Correct operand order for
62         ppc_load_multiple_regs.
63
64         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
65         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
66
67 2009-02-02  Mark Probst  <mark.probst@gmail.com>
68
69         * cpu-ppc64.md: Fixed storer4_memindex length.
70
71 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
72
73         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
74         line number info.
75         
76         * aot-compiler.c (emit_line_number_info): Optimize this.
77
78 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
79
80         * aot-compiler.c: Disassemble tokens in the IL disassembly.
81         
82         * aot-compiler.c: Add debug info for methods without debug info by
83         emitting an IL file and having the line number info referencing that file.
84
85         * aot-compiler.c: Optimize the size of the generated line number info.
86
87         * aot-compiler.c: Emit line number info in xdebug mode.
88
89         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
90         million arguments.
91
92 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
93
94         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
95
96         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
97         is used.
98
99 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
100
101         * basic-calls.cs: Test for the weird crash found on arm.
102         
103 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
104
105         * cpu-arm.md: Increase the size of storer8_membase_reg and
106         loadr8_membase_reg to 24 bytes to accomodate the extra add.
107
108         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
109         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
110         reg to LR otherwise we'll be loading/storing from just the offset.
111
112 2009-01-30  Miguel de Icaza  <miguel@novell.com>
113
114         Question: if we are storing gint32's inside the "*native_offset",
115         should we change the signature to "gint32 *native_offset" to
116         ensure that we do not have type definition problems?
117         
118         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
119         an int * as this is what the other function expects, causes
120         problems with Freescale's compiler that defined int32_t to be a
121         long and makes int incompatible 
122
123 2009-01-30  Miguel de Icaza  <miguel@novell.com>
124
125         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
126         filename conflict with bjam.
127
128 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
129
130         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
131         as it might use decomposed ops.
132
133 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
134
135         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
136
137         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
138         is defined.
139
140         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
141
142         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
143         offsets.
144
145         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
146         way registers are stored in MonoContext on arm.
147
148         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
149         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
150
151         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
152
153         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
154
155         * mini.c (mini_init): Register mono_isfinite.
156
157         * jit-icalls.c (mono_isfinite): New jit icall.
158
159         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
160         
161         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
162         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
163         the parent frame.
164
165 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
166
167         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
168         separate frame and stack pointers, so we must use FP to find the register
169         spill area.
170         The FP reg is retrieved from the MonoContext::regs array.
171
172 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
173
174         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
175         as FPA requires it.
176
177 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
178
179         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
180         return R4 and R8 when not running under softfloat.
181
182         Fixes basic-calls.exe
183
184 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
185
186         * mini-arm.c: Implement some overflow opcodes.
187
188 2009-01-29  Miguel de Icaza  <miguel@novell.com>
189
190         * ssa.c: handle another alloca.h
191
192         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
193         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
194         MONO_ARCH_USE_SIGACTION. 
195
196         * aot-runtime.c, mini-exceptions.c: Replace platform define with
197         capability defines.
198
199         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
200
201         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
202         PPC targets as sigaction does not exist on all platforms, define
203         this on a per-platform basis.
204
205         Instead of erroring out if the platform is not defined, include
206         mini-ppc-os.h, and expect that the OS specific setting provides
207         the required information.   
208
209 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
210
211         * aot-compiler.c: Fix --enable-minimal=aot.
212
213 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
214
215         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
216         previous change.
217
218 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
219
220         * exceptions-arm.c: Fix warnings.
221
222         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
223         ARM.
224
225         * mini-x86.c: Fix --enable-minimal=jit build.
226
227         * mini.c: Really fix --enable-minimal=jit build.
228         
229         * mini.c (construct_object_context_for_method): Move this outside
230         the DISABLE_JIT block to fix the --enable-minimal=jit build.
231
232         "Backported" of r124984 from 2.0 branch.
233         
234         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
235
236         "Backport" of r124977 + r124978 from 2.0 branch.
237         
238         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
239         to avoid calling mono_exception_from_token () from the throw trampoline.
240         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
241         for throwing corlib exceptions, this fixes full-aot support for corlib
242         exceptions.
243
244         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
245
246 2009-01-29  Miguel de Icaza  <miguel@novell.com>
247
248         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
249         part of the changes to split the code in mini into operating
250         system specific files.
251
252         This patch was done by copying mini.c to the respective files to
253         preserve SVN history.
254
255 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
256
257         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
258
259 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
260
261         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
262         remoting-invoke-with-check wrappers of shared methods.
263
264         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
265
266 2009-01-27  Mark Probst  <mark.probst@gmail.com>
267
268         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
269         optimization if the top of stack is the last instruction in the
270         bblock.  Otherwise it might have been used after its definition.
271         Fixes #469742.
272
273 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
274
275         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
276         method as well when get_vcall_slot () fails to match a code sequence.
277
278         * mini-arm.c: Fix the android build, which doesn't have
279         __aeabi_read_tp.
280
281 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
282
283         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
284         the s390x build.
285
286 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
287
288         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
289
290 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
291
292         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
293         and put its id into jinfo->used_regs. This is only used on amd64,
294         which is currently the only platform generating unwind info.
295
296         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
297         the dwarf unwinder. This is required to correctly handle async exceptions
298         like thread abort and stack overflows, which can happen while a method
299         is in the middle of its prolog or epilog.
300         
301         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
302         the unwind info belonging to an AOTed method.
303
304         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
305         into cfg->unwind_ops.
306         
307         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
308
309         * mini.c (mini_init): Call mono_unwind_init ().
310         (mini_cleanup): Call mono_unwind_cleanup ().
311
312         * unwind.c: Add functions for managing a set of unwind info entries, allowing
313         unwind info to be shared between methods.
314
315         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
316         saved in the LMF.
317
318         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
319         get_throw_pending_exception () to avoid initialization races.
320
321         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
322         mono_arch_exceptions_init () function.
323
324         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
325
326 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
327
328         * mini.c (mono_get_domain_intrinsic): New helper function.
329         (mono_get_thread_intrinsic): Ditto.
330
331         * mini-arm.c mini-ia64.c: Use the new helper functions.
332         
333         * method-to-ir.c (mono_method_to_ir): Fix the comment for
334         the last constrained_call change, since it is needed in the non-AOT
335         case as well.
336
337         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
338         
339         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
340         mono_get_lmf_addr () on arm eabi linux.
341
342 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
343
344         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
345         code sequence which matches a non-virtual call.
346
347 2009-01-23  Mark Probst  <mark.probst@gmail.com>
348
349         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
350         stack pointer (r1).
351
352 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
353
354         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
355         runtime-invoke wrappers, since they are also shared based on signature.
356
357 2009-01-22  Mark Probst  <mark.probst@gmail.com>
358
359         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
360         info from the (correct) context.
361
362 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
363
364         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
365         
366         * unwind.c (mono_unwind_frame): New function to unwind through a frame
367         using dwarf unwinding info. Not yet used.
368
369         * mini.c (mini_init): When using xdebug, disable freeing of domains.
370
371 2009-01-21  Mark Probst  <mark.probst@gmail.com>
372
373         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
374         descriptors.
375
376         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
377         special case and handle mono_arch_delegate_invoke_impl() returning
378         function descriptors.
379
380         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
381         trampolines return function descriptors, too.
382
383 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
384
385         * method-to-ir.c (handle_alloc): Avoid generic instances in the
386         out_of_line optimization.
387
388 2009-01-21  Martin Baulig  <martin@ximian.com>
389
390         * mini.h
391         (MonoCompile): Added `disable_deadce_vars' to disable removing
392         unused variables.
393
394         * mini.c
395         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
396         inside the debugger.
397
398         * liveness.c (mono_analyze_liveness): Don't remove any unused
399         variables if `cfg->disable_deadce_vars' is set.
400
401 2009-01-21  Mark Probst  <mark.probst@gmail.com>
402
403         * method-to-ir.c: Only apply exception constructor optimization if
404         the the method actually belongs to an exception class.  Fixes
405         #467456.
406
407 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
408
409         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
410         change inside a #ifdef __mono_ppc64__.
411
412         * aot-compiler.c (compile_method): Remove the previous limitation.
413
414         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
415         on type variables in AOTed code.
416         
417         * aot-compiler.c (compile_method): Skip generic methods having type 
418         constraints on their generic parameters.
419
420         * aot-compiler.c (compile_method): Check for methods which cannot be
421         encoded inside RGCTX_FETCH patches as well.
422
423         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
424         build.
425
426 2009-01-20  Mark Probst  <mark.probst@gmail.com>
427
428         * method-to-ir.c: Force the vtable variable in shared generic code
429         for the case that they might show up on a stack trace where they
430         are needed.
431
432         * mini-exceptions.c: Save and use generic sharing info as well as
433         IP in stack traces to resolve shared generic instantiations.
434
435 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
436
437         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
438         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
439
440 2009-01-20  Mark Probst  <mark.probst@gmail.com>
441
442         * method-to-ir.c: Do generic sharing for array constructors.
443
444 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
445
446         * mini-exceptions.c (mono_print_thread_dump): Add information
447         about the thread state using wapi_current_thread_desc.
448
449 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
450
451         * basic-simd.cs: Tests for the new constructors. 
452
453 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
454
455         * mini-ops.h: Added OP_EXPAND_*
456
457         * cpu-x86.md: Same.
458
459         * mini-x86.c (mono_arch_output_basic_block): Same.
460         
461         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
462
463 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
464
465         * iltests.il.in: Add a test for #467385.
466
467 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
468
469         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
470         thread been cleaned up is not the same currently in execution.
471
472         Fixes appdomain-unload crashes on windows, osx and linux variants
473         without the __thread keyword.
474
475 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
476
477         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
478         (koush@koushikdutta.com). Implement this for android.
479
480         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
481         begins with a digit.
482
483         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
484         mono_marshal_get_write_barrier ().
485
486 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
487
488         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
489         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
490         that pass them on a register pair.
491
492         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
493         test was crashing due to that.
494
495 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
496
497         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
498         trampoline code. Include ucontext.h only if available.
499
500 2009-01-15  Mark Probst  <mark.probst@gmail.com>
501
502         * mini.c: mono_domain_lookup_shared_generic() takes an open method
503         and doesn't check whether it's sharable, like it was before
504         removing the shared generics hash.  This brings IronPython
505         performance back to what it was before that change.
506
507 2009-01-14  Mark Probst  <mark.probst@gmail.com>
508
509         * method-to-ir.c: Handle delegate invocation optimization earlier,
510         otherwise it would be handled (much more slowly) by the
511         final/sealed optimization.
512
513 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
514
515         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
516         domain is not set. Fixes #465864.
517
518 2009-01-12  Mark Probst  <mark.probst@gmail.com>
519
520         * method-to-ir.c: Don't stop sharing of generic methods with catch
521         clauses - we already handle those.
522
523 2009-01-12  Mark Probst  <mark.probst@gmail.com>
524
525         * mini.c, mini.h: lookup_generic_method() is now
526         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
527         making the shared_generics_hash obsolete.
528
529 2009-01-12  Mark Probst  <mark.probst@gmail.com>
530
531         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
532         use the red zone.  Make room on the stack first and then use it,
533         not the other way around.
534
535 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
536
537         * mini.c (mini_init): Call mono_xdebug_init ().
538
539         * aot-compiler.c (mono_xdebug_init): Make this non-static.
540
541 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
542
543         * TestDriver.cs: Add an --iter argument to run tests multiple times.
544
545         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
546         trampolines.
547
548         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
549         debug+unwind info for trampolines.
550
551         * mini.c (mono_create_unwind_op): New helper function.
552
553         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
554
555 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
556
557         * aot-compiler.c: Fix the build.
558
559 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
560
561         * Makefile.am: Update dtrace-prelink.sh location.
562
563 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
564
565         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
566         optimization. Fixes #464520.
567
568 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
569
570         * mini-amd64.c : Adding code to save/restore non-volatile registers
571            on Winx64.
572
573         * exceptions-amd64.c : Adding code to save/restore non-volatile 
574           registers on Winx64.
575
576         Contributed under MIT/X11 license.
577
578 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
579
580         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
581         __GNUC_MINOR__ which can break when the major version changes.
582
583 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
584
585         * basic-simd.cs: Add tests for usage of the sizeof opcode.
586
587 2009-01-07  Geoff Norton  <gnorton@novell.com>
588
589         * helpers.c:  Allow mono -v -v -v to work on darwin.
590
591 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
592
593         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
594           pattern. 
595
596         Contributed under MIT/X11 license.
597
598 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
599
600         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
601         instead of directly accessing type->data.klass. Fixes #462016.
602         (mono_allocate_stack_slots_full): Ditto.
603
604         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
605         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
606
607         * aot-compiler.c (emit_plt): Fix ARM build.
608
609 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
610
611         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
612         
613         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
614         change.
615
616         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
617         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
618         #463357.
619
620         * iltests.il.in: Add a regression test.
621
622 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
623
624         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
625
626 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
627
628         * basic-simd.cs: Add a regression test for #462457.
629
630 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
631
632         * mini-ops.h: Add a definition of XPHI.
633
634         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
635
636         * ssa.c (op_phi_to_move): Handle XPHI.
637
638         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
639
640         Fixes #462457
641
642 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
643
644         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
645
646 2008-12-31  Geoff Norton  <gnorton@novell.com>
647
648         * mini-ppc.c: The prolog size allocated can be too small for darwin
649         ppc32 under certain circumstances.  Also fix a small logic bug.
650
651 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
652
653         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
654         while loading AOT methods.
655
656         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
657         since only the former is nulled out after a successful cast. This prevents
658         crashes with rethrown exceptions when using --debug=casts.
659
660 2008-12-24  Mark Probst  <mark.probst@gmail.com>
661
662         * mini.h: New macro for checking whether a method is final,
663         i.e. whether the method or its class is marked final.
664
665         * method-to-ir.c: Use the new macro for all final-checks
666         consistently.  Fixes the crash in the System.ServiceModel tests.
667
668 2008-12-23  Mark Probst  <mark.probst@gmail.com>
669
670         * mini-exceptions.c (get_exception_catch_class): Corrected another
671         overly strict assertion.
672
673 2008-12-23  Mark Probst  <mark.probst@gmail.com>
674
675         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
676         Clobbering it is not allowed because the caller might use it as
677         the vtable register in the interface call.
678
679 2008-12-19  Mark Probst  <mark.probst@gmail.com>
680
681         * mini-exceptions.c (get_exception_catch_class): Corrected an
682         overly strict assertion.
683
684 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
685         
686         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
687
688         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
689
690         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
691
692         * cpu-mips.md: correct lengths for certain long_ opcodes.
693
694         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
695
696         * 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().
697         
698 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
699
700         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
701         
702 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
703         
704         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
705         
706 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
707
708         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
709         next basic block.
710         
711 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
712
713         * 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
714
715         * 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)
716         
717 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
718         
719         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
720         
721 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
722
723         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
724         gshared code. Fixes #458947.
725
726         * generics.cs: Add a test.
727
728 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
729         
730         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
731         
732         * mini-mips.c: first pass n32 code generation.
733
734         * mini-mips.h: datatypes and defines for n32 support.
735
736         * exceptions-mips.c: first pass n32 code generation.
737         
738         * tramp-mips.c: first pass n32 code generation.
739         
740         * cpu-mips.md: add long_ opcodes.
741         
742 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
743
744         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
745
746         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
747         
748         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
749         
750         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
751
752         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
753
754         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
755
756         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
757
758         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
759
760         * helpers.c: for mips/n32, don't pass -mips32 to objdump
761
762 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
763
764         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
765
766 2008-12-12  Andrés G. Aragoneses  <aaragoneses@novell.com>
767
768         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
769
770 2008-12-12  Mark Probst  <mark.probst@gmail.com>
771
772         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
773         descriptors for helper functions directly in front of the code.
774
775 2008-12-11  Mark Probst  <mark.probst@gmail.com>
776
777         * method-to-ir.c: Removed an unnecessary assertion.
778
779 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
780
781         * method-to-ir.c: Merge SGEN changes from the old JIT.
782
783 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
784
785         * driver.c (compile_all_methods_thread_main): Handle failure of
786         mono_get_method ().
787
788 2008-12-10  Mark Probst  <mark.probst@gmail.com>
789
790         * mini-ppc.c: Merged with mini-ppc64.c.
791
792         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
793
794         * Makefile.am: Use the same sources for PPC and PPC64.
795
796         * mini-ppc64.c: Removed.
797
798 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
799
800         * branch-opts.c (remove_block_if_useless): Extract fall through detection
801         code to mono_bb_is_fall_through.
802         
803         * branch-opts.c (mono_remove_critical_edges): Same.
804
805 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
806
807         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
808         expect that an OP_BR_REG will be there.
809
810 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
811
812         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
813         for the many branch ops. The original check miss OP_BR_REG.
814
815         Fixes #457574.
816         
817 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
818
819         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
820
821 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
822
823         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
824         while holding the aot lock.
825
826 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
827
828         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
829         
830 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
831
832         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
833           to release all runtime callable wrappers held by the runtime.
834
835         Contributed under MIT/X11 license.
836
837 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
838
839         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
840           for Winx64.
841
842         Contributed under MIT/X11 license.
843
844 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
845
846         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
847         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
848
849 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
850
851         * cpu-mips.md: fix ckfinite length
852
853         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
854         (mono_arch_lowering_pass): cleanup, rearrange for clarity
855         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
856         
857 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
858
859         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
860         
861 2008-12-08  Geoff Norton  <gnorton@novell.com>
862
863         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
864         size by 8 bytes as well.
865
866 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
867
868         * basic-simd.cs: Fix method names for Vector16b.
869         
870 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
871
872         * basic-simd.cs: Fix method names for Vector16sb.
873
874 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
875
876         * basic-simd.cs: Fix method names for Vector8us.
877         
878 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
879
880         * basic-simd.cs: Fix method names for Vector8s.
881         
882 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
883
884         * basic-simd.cs: Fix method names for Vector4ui.
885
886 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
887
888         * basic-simd.cs: Fix method names for Vector2l.
889
890 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
891
892         * basic-simd.cs: Fix method names for Vector2d.
893
894 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
895
896         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
897         that are extension methods.
898
899 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
900
901         * basic-simd.cs: Fix method names for Vector4f.
902
903 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
904
905         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
906         as such. Fixes #456669.
907
908 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
909
910         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
911         
912 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
913
914         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
915         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
916         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
917         (mips_adjust_stackframe): handle FP spills
918                 
919         * mini-ops.h: add mips_mtc1_s2
920         
921         * cpu-mips.md: add mips_mtc1_s2
922         
923 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
924
925         * unwind.c: New file, move the unwind info encoding functions here from
926         aot-compiler.c, so they could be used at runtime too.
927
928 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
929
930         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
931         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
932         
933 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
934
935         * mini-mips.c: cleanup warnings
936         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
937         (mips_adjust_stackframe): handle case of taking the address of stack locals
938         
939 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
940
941         * aot-compiler.c: Implement a few functions missing from the asm writer.
942         (emit_method_code): Only write symbols for methods when using the bin
943         writer, since the assembler can't deal with the characters in our method
944         names.
945
946         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
947
948         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
949         call.
950
951         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
952         a bit to also restore %rax.
953
954 2008-12-05  Mark Probst  <mark.probst@gmail.com>
955
956         * mini-ppc.c: Some simple merges from mini-ppc64.c.
957
958 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
959
960         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
961         arguments.
962
963 2008-12-05  Mark Probst  <mark.probst@gmail.com>
964
965         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
966
967         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
968         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
969
970         * exceptions-ppc64.c: Removed.
971
972         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
973
974 2008-12-05  Mark Probst  <mark.probst@gmail.com>
975
976         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
977         tramp-ppc64.c.
978
979         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
980
981         * tramp-ppc64.c: Removed.
982
983 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
984
985         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
986         the TYPESPEC table.
987
988 2008-12-05  Mark Probst  <mark.probst@gmail.com>
989
990         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
991
992         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
993         mini-ppc.h instead of mini-ppc64.h.
994
995         * mini-ppc64.h: Removed.
996
997 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
998
999         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
1000         
1001         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
1002         
1003 2008-12-05  Mark Probst  <mark.probst@gmail.com>
1004
1005         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
1006         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
1007         code easier.
1008
1009 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1010
1011         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
1012
1013 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1014
1015         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
1016
1017 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1018
1019         * basic-simd.cs: Tests for operator == and != on Vector4f.
1020
1021 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1022
1023         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
1024
1025         * simd-intrinsics.c: Kill useless enum.
1026
1027 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1028
1029         * cpu-mips.md: add long_conv_to_ovf_i4_2
1030         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
1031
1032 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1033
1034         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
1035         
1036         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
1037
1038 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1039
1040         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
1041         
1042 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1043
1044         * basic-simd.cs: Add tests for new methods.
1045
1046 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1047
1048         * simd-intrinsics.c: Add support for operator == and !=
1049         on Vector4(u)i.
1050
1051         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
1052
1053 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1054
1055         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
1056
1057 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
1058
1059         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
1060
1061         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
1062         MONO_PATCH_INFO_ICALL_ADDR.
1063
1064         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
1065
1066         * aot-compiler.c: Resurrect full-aot support.
1067
1068 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1069
1070         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
1071         
1072 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1073
1074         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
1075         
1076 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
1077
1078         * basic-simd.cs: Fix tests to work under ppc.
1079         Remove tests for methods that will be removed.
1080
1081 2008-12-03  Mark Probst  <mark.probst@gmail.com>
1082
1083         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
1084         generic type (via a typedef or typeref) correctly.
1085
1086 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
1087
1088         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
1089         diagnose an assertion failure.
1090
1091 2008-12-02  Mark Probst  <mark.probst@gmail.com>
1092
1093         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
1094         Fix trampoline size.
1095
1096         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
1097         conversion opcodes are implemented natively instead via emulation.
1098
1099 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1100
1101         * cpu-mips.md: remove mips_xori
1102
1103         * mini-ops.h:  remove mips_xori
1104
1105         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
1106
1107         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
1108         
1109         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
1110         
1111 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1112
1113         * cpu-mips.md: fix instruction lengths.
1114
1115         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
1116
1117         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
1118
1119         * mini-ops.h: fix slti / sltiu op profiles.
1120         
1121 2008-12-02  Martin Baulig  <martin@ximian.com>
1122
1123         * method-to-ir.c (mono_method_to_ir): Disable debugging
1124         information for the init locals block to make the debugger stop
1125         after all locals have been initalized.
1126
1127 2008-12-02  Martin Baulig  <martin@ximian.com>
1128
1129         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
1130         running inside the debugger.
1131
1132 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
1133
1134         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
1135         is enabled.
1136
1137         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
1138         alu->alu imm optimization which only shows if deadce is disabled.
1139
1140         * aot-compiler.c: Rename the function names for the binary and asm writers
1141         so they can coexist in the same process. Rework the xdebug code to use the
1142         asm writer. This avoids the need to call into the runtime to dump the
1143         debugging info. Add more debugging info for types.
1144
1145         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
1146
1147         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
1148         cpu description tables, they can't occur in cpu-<ARCH>.md.
1149
1150         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
1151         the stack in CEE_LDFLDA. Fixes #450542.
1152
1153         * generics.cs: Add a new test.
1154
1155 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1156
1157         * mini-ops.h: updated MIPS opcodes
1158         * mini-mips.c: decompose long opts
1159         * mini-mips.h: decompose long opts
1160         
1161 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
1162
1163         * cpu-mips.md: fix length on int_rem_un
1164         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
1165         
1166 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
1167
1168         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
1169
1170         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
1171
1172 2008-11-29  Martin Baulig  <martin@ximian.com>
1173
1174         * mini-exceptions.c (mono_handle_native_sigsegv): Check
1175         mono_debug_using_mono_debugger() in addition to the
1176         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
1177
1178 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1179
1180         * mini-ops.h: updated more MIPS opcodes
1181         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
1182         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
1183         
1184 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1185
1186         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
1187
1188 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1189
1190         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
1191         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
1192         * mini-ops.h: correct selected mips opcode entries
1193         
1194 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1195
1196         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
1197         make them work.
1198
1199 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1200
1201         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
1202
1203 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1204
1205         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
1206         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
1207         * mini-mips.h: disable IMT
1208         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
1209         
1210 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1211
1212         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
1213
1214 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1215
1216         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
1217
1218 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
1219
1220         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
1221         consistency.
1222
1223 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1224
1225         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1226         for Set/GetVector aligned versions.
1227
1228 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1229
1230         * basic-simd.cs: Add tests for Get/SetVector.
1231
1232 2008-11-27  Mark Probst  <mark.probst@gmail.com>
1233
1234         * mini.c: Removed g_slist_append_mempool().  Now in
1235         metadata/mempool.c.
1236
1237 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1238
1239         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
1240         size properly and make the bounds check optional.
1241
1242         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1243         for SetVector and IsAligned.
1244
1245 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
1246
1247         * mini.c: Remove unused mono_normalize_opcodes () function.
1248
1249 2008-11-26  Mark Probst  <mark.probst@gmail.com>
1250
1251         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
1252         using the new atomic add ops now.
1253
1254         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
1255         add.
1256
1257 2008-11-26  Mark Probst  <mark.probst@gmail.com>
1258
1259         * mini-ppc64.c: Several fixes.
1260
1261 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1262
1263         * cpu-mips.md: added jump_table
1264         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
1265
1266 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1267
1268         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
1269
1270 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1271
1272         * mini-ops.h: corrected a handful of MIPS opcodes.
1273
1274 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1275
1276         * aot-compiler.c: MIPS to use ELF writer
1277
1278 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1279
1280         * mini-codegen.c: remove MIPS specific assert.
1281
1282 2008-11-25  Mark Probst  <mark.probst@gmail.com>
1283
1284         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
1285         fixes.  PPC64 now passes most of the runtime regressions.
1286
1287 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
1288
1289         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
1290         volatile intervals a bit.
1291
1292 2008-11-24  Mark Probst  <mark.probst@gmail.com>
1293
1294         * basic-long.cs: New test case.
1295
1296 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
1297
1298         * mini.c (mini_method_compile): Disable globalra for large methods for 
1299         now.
1300
1301         * regalloc2.c (order_moves): Add fp support.
1302
1303         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
1304         source bblock ends with an OP_BR_REG.
1305
1306         * ratests.cs: Add a new test.
1307
1308 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1309
1310         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
1311         sharing.  PPC64 now passes generics.exe.
1312
1313 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1314
1315         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
1316
1317 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
1318
1319         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
1320         memory when mono_jit_info_table_find () can't find the method in the
1321         LMF case.
1322
1323         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
1324         AOTed code too.
1325         
1326         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
1327         writer too.
1328
1329 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1330
1331         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
1332         Several fixes.  PPC64 now runs exceptions.exe and
1333         devirtualization.exe.
1334
1335 2008-11-22  Mark Probst  <mark.probst@gmail.com>
1336
1337         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
1338         arrays.exe and basic-math.exe.
1339
1340 2008-11-22  Mark Probst  <mark.probst@gmail.com>
1341
1342         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
1343         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
1344
1345 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1346
1347         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
1348
1349 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1350
1351         * method-to-ir.c: Move bounds checking macros to ir-emit.h
1352
1353         * ir-emit.h: Move macros from method-to-ir.c to here.
1354
1355 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1356
1357         * mini-ops.h: Correct the long simd ops to use LREG.
1358
1359 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
1360
1361         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
1362         
1363         * mini-ops.h: Correct the dreg type of a few long opcodes.
1364
1365         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
1366         Add netbsd support.
1367
1368 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
1369
1370         * mini-ppc.c: remove negative stack references in epilog
1371         for platforms that don't support the red zone.
1372
1373 2008-11-21  Mark Probst  <mark.probst@gmail.com>
1374
1375         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
1376         point regs.  Now PPC64 passes basic-calls.exe.
1377
1378 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1379
1380         * basic-simd.cs: Add tests for accessors of Vector2l.
1381
1382 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1383
1384         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
1385
1386         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
1387         
1388         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
1389
1390 2008-11-21  Mark Probst  <mark.probst@gmail.com>
1391
1392         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
1393         PPC64 passes basic-long.exe.
1394
1395 2008-11-20  Mark Probst  <mark.probst@gmail.com>
1396
1397         * decompose.c: Decompose carry and overflow add on PPC64 like on
1398         other 64 bit archs.  Don't decompose sub at all on PPC64.
1399
1400         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
1401         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
1402         basic-long.exe.
1403
1404 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1405
1406         * basic-simd.cs: Add tests for accessors of Vector2d.
1407
1408 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1409
1410         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
1411
1412         * cpu-x86.md: Same.
1413
1414         * mini-x86.c (mono_arch_output_basic_block): Same.
1415         
1416         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
1417
1418 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1419
1420         * basic-simd.cs: Add tests for accessors of Vector4f.
1421
1422 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1423
1424         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
1425
1426         * cpu-x86.md: Same.
1427
1428         * mini-x86.c (mono_arch_output_basic_block): Same.
1429         
1430         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
1431
1432 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1433
1434         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
1435
1436 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1437
1438         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
1439
1440         * cpu-x86.md: Same.
1441
1442         * mini-x86.c (mono_arch_output_basic_block): Same.
1443         
1444         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
1445
1446 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1447
1448         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
1449
1450 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1451
1452         * simd-intrinsics.c: Enable setters for Vector16sb.
1453
1454 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1455
1456         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
1457
1458         * cpu-x86.md: Same.
1459
1460         * mini-x86.c (mono_arch_output_basic_block): Same.
1461         
1462         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
1463
1464 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
1465
1466         * simd-intrinsics.c: Implement setter for Vector8us.
1467
1468 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
1469
1470         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
1471         for dead variables.
1472
1473 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
1474
1475         * mini-ppc.c: remove references to the red zone in the prolog
1476         (for systems that don't support it).
1477
1478 2008-11-19  Mark Probst  <mark.probst@gmail.com>
1479
1480         * cpu-ppc64.md: Fixed a few instruction lengths.
1481
1482         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
1483         now.
1484
1485 2008-11-19  Mark Probst  <mark.probst@gmail.com>
1486
1487         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
1488         basic.exe now.
1489
1490 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
1491
1492         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
1493
1494 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
1495
1496         * mini-ops.h: Added OP_INSERT_I2.
1497
1498         * cpu-x86.md: Same.
1499
1500         * mini-x86.c (mono_arch_output_basic_block): Same.
1501         
1502         * simd-intrinsics.c: Implement setter for Vector8s.
1503
1504         * simd-methods.h: Add the names of get setters of Vector8s.
1505
1506 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
1507
1508         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
1509         
1510         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
1511         parameters.
1512
1513         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1514
1515 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1516
1517         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
1518         for PPC64.  An empty program runs now.
1519
1520 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
1521
1522         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1523
1524         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
1525         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
1526         info for JITted code is emitted into a shared library, loadable into gdb.
1527
1528 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1529
1530         * Makefile.am: Changes to build PPC64.
1531
1532         * mini-arch.h: Include mini-ppc64.h on PPC64.
1533
1534 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1535
1536         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
1537         in PPC code up to r119147.
1538
1539 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1540
1541         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1542         cpu-ppc64.md: Changes for PPC64.
1543
1544         Based on code submitted by andreas.faerber@web.de at
1545         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
1546         X11/MIT license.
1547
1548 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1549
1550         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1551         cpu-ppc64.md: Copied from the corresponding PPC files from
1552         r118846.
1553
1554 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
1555
1556         * mini-ops.h: Added OP_ROUND.
1557
1558         * cpu-x86.md: Added round.
1559
1560         * mini-x86.c: Added support for intrinsicing Math.Round (double).
1561
1562         * basic-math.cs: Added test_0_round to test rounding.
1563
1564         Contributed under MIT/X11 license.
1565
1566 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
1567
1568         * aot-compiler.c : Fix the Winx64 build.
1569
1570         Contributed under MIT/X11 license.
1571
1572 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
1573
1574         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
1575         in OP_EXTRACT_R8 to avoid possible stack corruption.
1576
1577 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
1578
1579         * mini-ops.h: Added OP_EXTRACT_R8/I8.
1580
1581         * cpu-x86.md: Added extract_r8.
1582
1583         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
1584         
1585         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
1586         a couple of OP_EXTRACT_I4.
1587
1588         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
1589
1590         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
1591
1592 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
1593
1594         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
1595         and not 4.1. 
1596
1597 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
1598
1599         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
1600         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
1601
1602         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
1603         are not needed any more.
1604
1605         * mini.h: Remove the unused INS_LIST macros.
1606
1607         * mini.c (mini_method_compile): Remove a disable globalra case which is no
1608         longer needed.
1609
1610         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
1611         ir-emit.h.
1612
1613         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
1614         mono_alloc_ireg () instead.
1615
1616         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
1617         macros.
1618
1619         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
1620         on amd64.
1621
1622         * aot-runtime.c (load_aot_module): Disable AOT when running under
1623         CAS.
1624
1625         * mini-amd64.h: Change the monitor fastpath defines to check for
1626         !PLATFORM_WIN32 so they work on *bsd too.
1627
1628         * mini.h mini.c mini-hhpa.c: Remove more unused code.
1629
1630         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
1631
1632         * mini.h (MonoCompile): Remove new_ir flag.
1633
1634         * regalloc.h regalloc.c: Remove unused code.
1635
1636         * cpu-*.md: Remove more unused opcodes.
1637
1638         * simple-cee-ops.h simple-mini-ops.h: Removed.
1639
1640         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
1641         
1642 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
1643
1644         * aliasing.h: Removed.
1645
1646         * *.c: Remove references to aliasing.h and inssel.h.
1647
1648         * mini.c: Remove additional unused functions.
1649
1650         * mini-ops.h cpu-*.md: Remove unused opcodes.
1651
1652 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
1653
1654         Remove the old JIT code.
1655
1656         * inssel*.brg: Removed.
1657
1658         * ssa.c abcremoval.c aliasing.c: Removed.
1659
1660         * ssa2.c: Renamed to ssa.c.
1661
1662         * abcremoval2.c: Renamed to abcremoval.c.
1663
1664         * *.c: Removed all !cfg->new_ir code.
1665
1666         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
1667         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
1668
1669         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
1670         
1671 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
1672
1673         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
1674         to simplify the code and cut back on the number of global symbols in the AOT
1675         file.
1676         
1677         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
1678
1679 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
1680
1681         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
1682         with the got/got_info tables.
1683
1684         * mini.h: Bump AOT file format version.
1685         
1686         * unwind.h: New file, contains definitions for stack unwinding.
1687
1688         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
1689         to cfg->unwind_ops.
1690         
1691         * aot-compiler.c: Generalize the emitting of unwind information to use the
1692         information in cfg->unwind_ops.
1693
1694         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
1695
1696         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
1697         AOT method frames. Enable writing symbols for methods by default.
1698
1699 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
1700
1701         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
1702         and make it work with vectors of element sizes 1, 2 and 4.
1703
1704         * simd-intrinsics.c: Enable getter for all vectors with element size
1705         1, 2 or 4.
1706
1707         * simd-methods.h: Add the names of other getters.
1708
1709         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
1710
1711         * cpu-x86.md: Same.
1712
1713         * mini-x86.c: Same.
1714
1715 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
1716
1717         * mini-ppc.h: portability fix.
1718
1719 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
1720
1721         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
1722         buggy and will overwrite it.
1723
1724 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
1725
1726         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
1727         Use it to emit local symbols for all methods so AOTed methods show up with
1728         their full name in gdb/valgrind output.
1729
1730 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
1731
1732         * mini-ppc.c: portability fixes.
1733
1734 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
1735
1736         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
1737         entries out of the if (!generic_shared...) code so it is always done.
1738         (mono_class_init_trampoline): Do the patching when running under valgrind
1739         too, newer versions of valgrind have no problems with it.
1740
1741 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
1742
1743         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
1744         further sections.
1745
1746 2008-11-13  Mark Probst  <mark.probst@gmail.com>
1747
1748         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
1749         filters.
1750
1751 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1752
1753         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
1754
1755 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1756
1757         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
1758
1759         * cpu-x86.md: Same.
1760
1761         * mini-x86.c: Same.
1762
1763         * simd-intrinsics.c: Same.
1764
1765 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1766
1767         * simd-intrinsics.c: Enable constructor intrinsics for all types.
1768
1769 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1770
1771         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
1772         to work with more Vector types.
1773
1774 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1775
1776         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
1777         store the elemens directly instead of using and intermediate.
1778
1779 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
1780
1781         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
1782
1783         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
1784         to preserve %eax for aot plt trampolines.
1785
1786         * aot-compiler.c (compile_method): Don't skip synchronized methods.
1787         (encode_method_ref): Flag synchronized methods so they won't go through
1788         the AOT trampoline.
1789
1790         * aot-compiler.c: Additional work to support AOTing synchronized methods/
1791         wrappers.
1792
1793         * cpu-ia64.md (jmp): Increase max length.
1794
1795 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
1796
1797         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
1798         open generic classes.
1799
1800         * aot-compiler.c: Enable the ELF writer on ELF platforms.
1801
1802         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
1803         box+brtrue optimization since it causes test failures on x86.
1804
1805 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
1806
1807         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
1808
1809         * cpu-x86.md: Same.
1810
1811         * mini-x86.c: Same.
1812
1813         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
1814         for simd ctor values. 
1815
1816         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
1817         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
1818
1819 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
1820
1821         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
1822         LogicalRightShift.
1823
1824         * simd-instrincs.c: Same.
1825
1826         * basic-simd.cs: Same.
1827
1828 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
1829
1830         * ratests.cs: Add more tests.
1831
1832         * regalloc2.c (add_spill_code): Handle more corner cases.
1833
1834 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
1835
1836         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
1837         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
1838         both the source an destination of an instruction.
1839
1840 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
1841
1842         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
1843         wapihandles.c: more portability changes.
1844
1845 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
1846
1847         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
1848         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
1849         safe to execute in a signal handler and the kernel provides better
1850         the info in /proc/self/smaps. Avoid the assert on sigaction during
1851         cleanup.
1852
1853 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
1854
1855         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
1856         do the bblock linking hack if it is actually needed.
1857
1858         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
1859         up linking.
1860
1861         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
1862         crash problem is fixed.
1863
1864         * branch-opts.c (mono_remove_critical_edges): Link up newly added
1865         bblocks.
1866
1867         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
1868         for catch clauses.
1869         (mini_method_compile): Set the starting value of next_vreg to 
1870         MAX_IREGS + MAX_FREGS when using globalra.
1871
1872         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
1873         filter clauses with BB_EXCEPTION_HANDLER.
1874
1875         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
1876
1877 2008-11-10  Mark Probst  <mark.probst@gmail.com>
1878
1879         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
1880         space for stdcall.  Fixes regressions on Win32.
1881
1882 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
1883
1884         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
1885         bblocks.
1886         (linear_scan): Remove an assert which doesn't seem to be needed.
1887
1888         * local-propagation.c (mono_local_deadce): Avoid a call to
1889         MONO_DELETE_INS which would screw up the instruction linking.
1890
1891         * mini.c (mono_decompose_op_imm): Make this work with globalra.
1892
1893         * regalloc2.c: Upgrade to work the current JIT code.
1894
1895 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
1896
1897         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
1898         case.
1899
1900         * aot-runtime.c: Remove some dead code.
1901
1902         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
1903         consistency.
1904         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
1905
1906         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
1907         trampolines using sscanf since atoi doesn't work on large unsigned values.
1908
1909         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
1910         Initialize code_size.
1911
1912 2008-11-08  Mark Probst  <mark.probst@gmail.com>
1913
1914         * method-to-ir.c (mini_emit_inst_for_method): Make
1915         Interlocked.CompareExchange work for Int arguments on 32 bit
1916         archs, as well.
1917
1918 2008-11-07  Mark Probst  <mark.probst@gmail.com>
1919
1920         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
1921
1922 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
1923
1924         * main.c Fix MSVC build.
1925
1926         Contributed under MIT/X11 license.
1927
1928 2008-11-06  Mark Probst  <mark.probst@gmail.com>
1929
1930         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
1931         alignment larger than 8 bytes are aligned correctly, too.
1932
1933         * mini.c: Honor the min_align field of MonoClass when laying out
1934         the stack.
1935
1936 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
1937
1938         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
1939
1940         * aot-compiler.c (emit_plt): Fix a warning.
1941         
1942         * aot-compiler.c: Implement ARM support in the binary writer.
1943
1944 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
1945
1946         * basic-simd.cs: Add test for getter with byref arg.
1947         Fix the naming of a few tests.
1948         Add missing checks to a test.
1949
1950 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
1951
1952         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
1953
1954         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
1955         most of the full-aot support for monitor enter/exit trampolines.
1956
1957         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
1958         enter/exit trampoline creation functions.
1959
1960         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
1961         make dist.
1962
1963 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
1964
1965         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
1966         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
1967         implement the needed functionality without adding crap to the runtime.
1968
1969 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
1970
1971         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
1972         non-x86 builds.
1973
1974         * mini.c (mono_build_date): New global version holding the build date in
1975         string format.
1976         
1977         * Makefile.am (buildver.c): Generate a file containing the build date.
1978
1979         * main.c: Set the build date from the generated file.
1980
1981         * mini.c (mono_get_runtime_build_info): New helper function returning build
1982         information in a string format.
1983         
1984         * driver.c (mono_main): Print the build date in --version.
1985
1986         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
1987         file when the bind-to-runtime-version option is used.
1988
1989 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
1990
1991         * simd-intrinsics.c: Fix bug when using getters and byref args. 
1992
1993 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
1994
1995         * simd-methods.h: Rename prefetch methods.
1996
1997         * simd-intrinsics.c: Same.      
1998
1999 2008-11-05  Mark Probst  <mark.probst@gmail.com>
2000
2001         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
2002         sizes.
2003
2004 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2005
2006         * aot-compiler.c: Use the bundled elf header files instead of depending on
2007         the system one.
2008         
2009         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
2010         mempool.
2011
2012         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
2013         on every call.
2014
2015 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
2016
2017         * cpu-x86.md: Add store nta ops.
2018
2019         * mini-ops.h: Same.
2020
2021         * mini-x86.c: Same.
2022
2023         * mini.h: Add an enum for simd prefetch modes.
2024
2025         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
2026         of store. Use the changed code to support store nta.
2027
2028         * simd-intrinsics.c: Add prefetch ops for all vector types.
2029
2030 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2031
2032         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
2033         threads.
2034         
2035         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
2036         names.
2037
2038         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
2039         trampolines.
2040
2041 2008-11-04  Mark Probst  <mark.probst@gmail.com>
2042
2043         * mini-x86.c: Fixed commit.
2044
2045 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2046
2047         * aot-compiler.c (emit_plt): Align the plt section only on x86.
2048
2049 2008-11-04  Mark Probst  <mark.probst@gmail.com>
2050
2051         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
2052         and MONITOR_EXIT, for the ASM fastpaths.
2053
2054         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
2055         available.
2056
2057         * mini.c, patch-info.h: Signature and patch infos for
2058         Monitor.Enter/Exit trampolines.
2059
2060         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
2061
2062         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
2063         Monitor.Enter/Exit ASM fastpath for Linux.
2064
2065 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2066
2067         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
2068
2069         * objects.cs: Add a new test.
2070         
2071         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
2072
2073         * aot-runtime.c (load_method): Run class initialization in the PLT case even
2074         if MONO_LOG_LEVEL is set.
2075
2076         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
2077
2078         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
2079
2080         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
2081         
2082         * aot-compiler.c: Change the relocation code to use virtual addresses instead
2083         of file offsets. Align the sections belonging to the data segment to 
2084         PAGESIZE.
2085
2086 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
2087
2088         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
2089         elf.h. Port it to amd64.
2090
2091 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2092
2093         * driver.c: Enable SIMD by default.
2094
2095 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2096
2097         * cpu-x86.md: Add prefetch op.
2098
2099         * mini-ops.h: Same.
2100
2101         * mini-x86.c: Same.
2102
2103         * mini.h: Add an enum for simd prefetch modes.
2104
2105         * simd-methods.h: Add prefetch function names.
2106
2107         * simd-intrinsics.c: Add prefetch ops for all vector types.
2108
2109 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
2110
2111         * aot-compiler.c (emit_bytes): Speed this up a little.
2112
2113 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
2114
2115         * aot-compiler.c: Add JIT time etc. statistics.
2116         
2117         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
2118
2119         * mini.h (MonoCompile): Add 'got_offset' field.
2120
2121         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
2122         method_got_offsets array.
2123
2124         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
2125         wrappers.
2126
2127         * aot-compiler.c (compile_method): Add generic method instances referenced
2128         by the method to the list of methods to be compiled, this is required so if
2129         A<T> references B<T>, and another assembly references A<int>, then it will
2130         also get a copy of B<int>.
2131
2132         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
2133         when checking for monitor enter/exit.
2134
2135 2008-10-30  Mark Probst  <mark.probst@gmail.com>
2136
2137         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
2138         for Monitor.Enter and Monitor.Exit if enabled.
2139
2140         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
2141         Solaris.
2142
2143 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
2144
2145         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
2146         of an OP_MOVE. Fixes #440046.
2147
2148         * basic-long.cs: Add a new test.
2149
2150 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
2151
2152         * mini.h: Add synchronization note for the managed counter-part.
2153
2154         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
2155         returns the simd caps of the current cpu.
2156
2157 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
2158
2159         * basic-simd.cs: Remove Console.WriteLine.
2160
2161 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2162
2163         * basic-simd.cs: New tests for Vector2ul.
2164
2165 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2166
2167         * simd-intrinsics.c: Add new vector type Vector2ul.
2168
2169 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2170
2171         * basic-simd.cs: New tests for Vector2l.
2172
2173 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2174
2175         * cpu-x86.md: Add long version of most packed int ops.
2176
2177         * mini-ops.h: Same.
2178
2179         * mini-x86.h: Same.
2180
2181         * simd-intrinsics.c: Add new vector type Vector2l.
2182
2183 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2184
2185         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
2186
2187         * simd-methods.h: Remove SN_op_BitwiseXor.
2188
2189 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
2190
2191         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
2192         alignment.
2193
2194 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2195
2196         * basic-simd.cs: Test for Vector2d.
2197
2198         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
2199         value.
2200
2201 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2202
2203         * cpu-x86.md: Add double version of all packed float ops.
2204
2205         * mini-ops.h: Same.
2206
2207         * mini-x86.h: Same.
2208
2209         * simd-intrinsics.c: Add new vector type Vector2d.
2210
2211         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
2212
2213         * simd-methods.h: Add Duplicate.
2214
2215 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2216
2217         * basic-simd.cs: Test for packing with signed saturation.
2218
2219 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
2220
2221         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
2222         found in the TYPESPEC table.
2223
2224 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
2225
2226         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
2227         too.
2228
2229         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2230
2231         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
2232         instead of the RVA, since the RVA can be changed by tools like the cil 
2233         stripper.
2234
2235         * method-to-ir.c (mono_method_to_ir2): Ditto.
2236
2237         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
2238         (deserialize_variable): Ditto.
2239
2240 2008-10-25  Martin Baulig  <martin@ximian.com>
2241
2242         * debug-mini.c (write_variable): Use
2243         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
2244
2245 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2246
2247         * cpu-x86.md: Add unsigned variants of packd and packw.
2248
2249         * mini-ops.h: Same.
2250
2251         * mini-x86.h: Emit the right instruction for packd and packw.
2252         Add unsigned variants of packd and packw.
2253
2254         * simd-intrinsics.c: Packd and packw were used in place of their
2255         unsigned variants. Change that.
2256         Add intrinsics for (Signed)PackWithSignedSaturation.
2257
2258         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
2259
2260 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2261
2262         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
2263
2264 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2265
2266         * mini-ops.h: Remove dword packed add/sub with saturation ops.
2267
2268         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
2269
2270         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
2271         sse instructions.
2272
2273         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
2274
2275 2008-10-24  Mark Probst  <mark.probst@gmail.com>
2276
2277         * method-to-ir.c, mini.c: Special casing for the synchronized
2278         wrapper for the ldtoken+GetTypeFromHandle case.
2279
2280 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
2281
2282         * mini.c (mono_replace_ins): Move this to branch-opts.c.
2283
2284         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
2285         created/split bblocks.
2286
2287 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2288
2289         * mini-ops.h: Add packed signed mul high.
2290         
2291         * cpu-x86.md: Same.
2292
2293         * mini-x86.c (mono_arch_output_basic_block): Same.
2294
2295         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
2296
2297         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
2298
2299 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2300
2301         * basic-simd.cs: Tests for Vector16sb.
2302
2303 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
2304
2305         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
2306
2307 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
2308
2309         * mini-ops.h: Add packed signed min, max and compare greater.
2310         
2311         * cpu-x86.md: Same.
2312
2313         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
2314         saturation.
2315
2316         * simd-methods.h: Add CompareGreaterThan.
2317
2318         * simd-methods.h: Remove CompareEquals.
2319
2320         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
2321
2322         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
2323
2324         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
2325         CompareEqual.
2326
2327 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
2328
2329         * basic-simd.cs: Fix tests due to change in the API.
2330
2331 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2332
2333         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
2334
2335 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2336
2337         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
2338
2339         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
2340         inst_offset as this has invalid values for LDADDR.
2341
2342 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2343
2344         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2345
2346         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
2347
2348 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2349
2350         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
2351         for accessing field->data.
2352
2353 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2354
2355         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2356
2357 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2358
2359         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
2360
2361         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
2362
2363 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2364
2365         * dominators.c (mono_compute_natural_loops): Allocate GList enties
2366         from the cfg mempool.
2367
2368 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
2369
2370         * basic-simd.cs: Tests for new methods in Vector8us.
2371
2372 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
2373
2374         * mini-ops.h: Add multiply and store high.
2375         
2376         * cpu-x86.md: Same.
2377
2378         * mini-x86.c (mono_arch_output_basic_block): Same.
2379
2380         * simd-methods.h: Same.
2381
2382         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
2383         and CompareEqual.
2384
2385 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
2386
2387         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
2388         mono_class_setup_vtable ().
2389
2390         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
2391         mono_class_get_vtable_entry () for accessing klass->vtable.
2392
2393         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
2394
2395         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
2396         found.
2397
2398         * method-to-ir.c (mono_save_token_info): Don't save references made from
2399         wrappers.
2400
2401         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
2402         of generic instances.
2403
2404         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
2405
2406 2008-10-19  Mark Probst  <mark.probst@gmail.com>
2407
2408         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
2409         OP_JMP depends on the method signature.  Calculate it properly.
2410
2411 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
2412         
2413         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
2414         called directly.
2415
2416         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
2417         instances.
2418         (emit_extra_methods): Add another table mapping method indexes to 
2419         offsets in the extra_method_info table.
2420
2421         * mini.h: Bump AOT file format version.
2422         
2423         * aot-runtime.c: Merge most of the code from mono_aot_get_method
2424         and mono_aot_get_method_from_token () into one function.
2425
2426 2008-10-19  Mark Probst  <mark.probst@gmail.com>
2427
2428         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
2429         separate counter.
2430
2431 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
2432
2433         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
2434         methods.
2435
2436         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
2437         disable_aot.
2438
2439         * mini.c (mono_patch_info_equal): Compare the generic context as well.
2440
2441         * mini.h: Bump aot file format version.
2442
2443         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
2444         AOT file can contain native code for methods which are not in the METHOD
2445         table. Generate code for non-sharable generic instances of generic methods
2446         found in the METHODSPEC table.
2447         
2448         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
2449         encoding generic type handles.
2450
2451         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
2452         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
2453
2454         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
2455         macros + MONO_ADD_INS.
2456
2457         * mini.c (mono_jump_info_token_new2): New function which takes a generic
2458         context as well.
2459
2460         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
2461
2462         * mini.h: Bump aot file format version.
2463
2464         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
2465
2466 2008-10-17  Mark Probst  <mark.probst@gmail.com>
2467
2468         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
2469         platforms, with definable stack alignment value.  Set to 16 now
2470         for all platforms.
2471
2472         * mini.c, mini.h, driver.c: Command line option for disabling
2473         stack alignment.
2474
2475 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
2476
2477         * basic-simd.cs: Tests for new methods in Vector4ui.
2478
2479 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
2480
2481         * mini-ops.h: Add packed int shuffle.
2482         
2483         * cpu-x86.md: Same.
2484
2485         * mini-x86.c (mono_arch_output_basic_block): Same.
2486
2487         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
2488         extract mask, max, min, shuffle.
2489
2490         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
2491
2492 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
2493
2494         * basic-simd.cs: Tests for new methods in Vector8us.
2495
2496 2008-10-17  Mark Probst  <mark.probst@gmail.com>
2497
2498         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
2499         RuntimeTypeHandle, not a TypedReference.
2500
2501 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
2502
2503         * simd-intrinsics.c: remove relocations.
2504
2505 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
2506
2507         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
2508         optimizations from the x86 backend.
2509
2510 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
2511
2512         * simd-methods.h, simd-intrinsics.c: debloat method names and
2513         prepare for no relocations.
2514
2515 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2516
2517         * mini-ops.h: Add packed min/equal and sum of absolute differences.
2518         
2519         * cpu-x86.md: Same.
2520
2521         * mini-x86.c (mono_arch_output_basic_block): Same.
2522
2523         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
2524         extract mask, max, min and sum of absolute differences.
2525
2526         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
2527         method name.
2528
2529 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2530
2531         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
2532         Renamed one test for consistency.
2533
2534 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2535
2536         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
2537         fix to the code that deal with other blocks.
2538
2539 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2540
2541         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
2542
2543 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2544
2545         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
2546         that deals with vreg interference. Explicitly check for OP_LDADDR to be
2547         able to process the source reg.
2548
2549 2008-10-16  Martin Baulig  <martin@ximian.com>
2550
2551         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
2552
2553         * inssel.brg: Add `OP_HARD_NOP'.
2554
2555         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
2556
2557         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
2558         `OP_HARD_NOP' instruction when running inside the debugger.
2559
2560         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
2561         `OP_HARD_NOP' instruction when running inside the debugger.
2562
2563 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2564
2565         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
2566         now works. The issue with the regalloc tripping up no longer
2567         happens.
2568
2569         * simd-intrinsics.c (load_simd_vreg): Same.
2570
2571 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2572         
2573         * basic-simd.cs: Tests for new Vector8ui methods.
2574
2575 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2576
2577         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
2578         only for type. This fixes crashes where MonoInst::klass is checked
2579         for ops of type != VTYPE or OBJ.
2580
2581         * simd-intrinsics.c (load_simd_vreg): Same.
2582
2583 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2584
2585         * mini-ops.h: Add ops for packed shuffle/max/avg and
2586         extract mask.
2587         
2588         * cpu-x86.md: Same.
2589
2590         * mini-x86.c (mono_arch_output_basic_block): Same.
2591
2592         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
2593         extract mask.
2594
2595         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
2596         to emit extract mask op.
2597
2598         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
2599         to emit word shuffles.
2600
2601 2008-10-15  Mark Probst  <mark.probst@gmail.com>
2602
2603         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
2604         the largest alignment needed by a variable, but at least
2605         sizeof(gpointer).
2606
2607 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2608
2609         * basic-simd.cs: Tests for the fixes in the last commit.
2610
2611 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2612
2613         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
2614         no longer handles STACK_PTR input.
2615
2616         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
2617
2618         * simd-intrinsics.c (load_simd_vreg): New function that works like 
2619         get_simd_vreg   but handles STACK_PTR input.
2620
2621         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
2622         as the input can be an arbitrary pointer.
2623
2624         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
2625         LDADDR local optimization directly otherwise use a store op.
2626
2627 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2628
2629         * basic-simd.cs: Tests for dup low and dup high.
2630
2631 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2632
2633         * mini-ops.h: Add dup low and dup high ops.
2634         
2635         * cpu-x86.md: Same.
2636
2637         * mini-x86.c (mono_arch_output_basic_block): Same.
2638
2639         * simd-intrinsics.c (vector4f_intrinsics): Same.
2640
2641 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
2642
2643         * basic-simd.cs: Tests for recently added functionality.
2644
2645 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
2646
2647         * mini-ops.h: Add remaining sse1 fp ops.
2648         
2649         * cpu-x86.md: Add remaining sse1 fp ops.
2650
2651         * mini-x86.c (mono_arch_output_basic_block): Same.
2652
2653         * mini.h: Add enum for simd FP compare conditions.
2654
2655         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
2656
2657         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
2658         so the backed can generate the appropriate op.
2659
2660 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
2661         This patch squeese one more byte from the SimdIntrinsc struct.
2662
2663         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
2664         a a shift amount intead of simply or'ing it.
2665
2666         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
2667
2668         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
2669         byte so we can have an aditional flags field without increasing struct size.
2670
2671         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
2672         against the simd_supported_versions bitmask.
2673
2674         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
2675
2676 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
2677
2678         * mini.c: remove rawbuffer code (the only use here is unsafe because
2679         it takes locks during signal handling and the kernel now provides much
2680         better info in proc/pid/smaps these days).
2681
2682 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
2683
2684         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
2685         OP_X86_PUSH_OBJ. Fixes #434620.
2686
2687         * objects.cs: Add a test.
2688         
2689 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
2690
2691         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
2692         that the packuswb/packusdw don't work with unsigned numbers for what
2693         would be negative numbers in signed format.
2694
2695         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
2696         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
2697
2698         * mini-ops.h: Add doubleword forms of many ops and packing ones.
2699
2700         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
2701
2702         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
2703
2704         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
2705
2706         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
2707         add more ops.
2708
2709         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
2710         version as the enum in mini.h.
2711
2712         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
2713         for sse3 ops, check the simd_version field if present. This way the code
2714         works with all versions of sse.
2715
2716 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2717
2718         * simd-intrinsics.c: Fixed intrinsic name typo.
2719
2720         * mini.h: Added missing simd exported function.
2721
2722         * basic-simd.cs: Added tests for Vector4ui.
2723         Fixed broken test for Vector16b.
2724
2725 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
2726
2727         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
2728         the max length to 64.
2729
2730 2008-10-10  Mark Probst  <mark.probst@gmail.com>
2731
2732         * method-to-ir.c: Only do the fast virtual generic method call for
2733         non-wrapper methods.
2734
2735         * mini.h, mini-trampolines.c: The new generic virtual remoting
2736         trampoline handles virtual method calls via the vtable (as done by
2737         the fast virtual generic method calls) to remoting proxies.
2738
2739         * mini.c (mono_jit_create_remoting_trampoline): For generic
2740         methods reate a generic virtual remoting trampoline.
2741
2742         * mini-amd64.h: Enable fast virtual generic method calls again.
2743
2744 2008-10-10  Mark Probst  <mark.probst@gmail.com>
2745
2746         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
2747         restore registers when doing tail calls.
2748
2749 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2750
2751         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
2752         Vector4ui.
2753
2754 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2755
2756         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
2757
2758 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2759
2760         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
2761
2762 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2763
2764         * basic-simd.cs: Retrofit for API changes.
2765
2766 2008-10-10  Mark Probst  <mark.probst@gmail.com>
2767
2768         * mini-ppc.c: Handle integer stack arguments for tail calls.
2769
2770 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2771
2772         * optflags-def.h: Removed sse3 optimization.
2773
2774         * driver.c: Same.
2775
2776         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
2777         sse3.
2778
2779         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
2780
2781         * mini.h: Added enumeration with simd versions.
2782
2783         * simd-intrinsics.c (emit_intrinsics): Use the new static var
2784         for detecting SSE3.
2785
2786         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
2787
2788         * mini.c (mini_init): Call mono_simd_intrinsics_init.
2789
2790 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
2791
2792         * basic-simd.cs: Added tests for Vector8u and Vector16u.
2793
2794         * basic-simd.cs: Fixed test naming.
2795
2796 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
2797
2798         * mini-ops.h: Added ops for packed and saturated math, shifts
2799         and packing/unpacking.
2800
2801         * cpu-x86.md: Added descriptors for the above ops.
2802
2803         * mini-x86.c: Added code to emmit the above ops.
2804
2805         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
2806
2807 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
2808
2809         * aot-compiler.c (compile_method): Enable AOT for generic code.
2810
2811         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
2812
2813 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
2814
2815         * mini.c: add a workaround for a common screwup that ends up blamed
2816         to mono (other processes blocking signal delivery).
2817
2818 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
2819
2820         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
2821         in the LDFLD/STFLD opcodes. Fixes #432673.
2822
2823         * iltests.il.in: Add a new test.
2824
2825 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
2826
2827         * mini-arm.c: attach the thread in unmanaged->managed transitions
2828         using delegates (bug #433148).
2829
2830 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
2831
2832        * basic-simd.cs: Use new ShuffleSel constants.
2833
2834 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
2835
2836         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
2837
2838         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
2839         only disable simd intrinsics if no sse2 is detected.
2840
2841         * optflags-def.h: Added sse3.
2842
2843         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
2844         is disabled.
2845
2846 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
2847
2848         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
2849         when adding delegate-invoke wrappers.
2850
2851 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
2852
2853         * Makefile.am: Reenable the simd tests.
2854
2855 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
2856
2857         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
2858           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
2859           other vreg is allocated to that hreg.
2860
2861         Contributed under MIT/X11 license.
2862
2863 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
2864
2865         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
2866         yet checked in.
2867
2868 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
2869
2870         * basic-simd.cs: New test suite for SIMD intrinsics.
2871
2872         * Makefile.am: Added new tests.
2873
2874 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
2875
2876         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
2877
2878         * mini-ops.h: Same.
2879
2880         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
2881
2882         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
2883         using SSE2 aware opcodes.
2884
2885         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
2886         is enabled, this code path is only reachable if conversion ops are emmited after
2887         mono_method_to_ir.
2888
2889         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
2890
2891         This optimization saves 6 bytes per conversion against the old version.
2892
2893 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
2894
2895         * aot-compiler.c (compile_method): Don't skip methods referencing 
2896         generic methods without a corresponding entry in token_info_hash, since
2897         encode_method_ref () can handle all generic methods now.
2898
2899         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
2900         generic context is set.
2901         
2902         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
2903         generic sharing of LDTOKEN.
2904
2905 2008-10-06  Mark Probst  <mark.probst@gmail.com>
2906
2907         * mini-amd64.h: Temporarily disabled fast virtual generic method
2908         calls because it breaks the System.Runtime.Remoting tests.
2909
2910 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
2911
2912         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
2913
2914         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
2915         so inlining actually works.
2916         (check_inline_caller_method_name_limit): Ditto.
2917
2918 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
2919
2920         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
2921         64 bit safety (from Olaf Hering and Andreas Färber).
2922
2923 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
2924         
2925         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
2926         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
2927         unused virtual call support code.
2928
2929         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
2930         
2931         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
2932         which can't use aot trampolines.
2933         (decode_patch): Don't create aot trampolines for methods which can't use
2934         them.
2935
2936         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
2937         use aot trampolines.
2938
2939         * mini.h: Bump AOT image format version.
2940         
2941 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
2942
2943         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
2944         to save_token_info () since cmethod is inflated for constrained calls.
2945
2946         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
2947
2948 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
2949
2950         * Makefile.am: Add build rules for ppc64.
2951         This avoids the build failing at pedump with unresolved symbols
2952         due to lack of arch_sources. Instead it will now fail earlier
2953         due to lack of cpu-ppc64.md.
2954
2955         Contributed under MIT/X11 license.
2956
2957 2008-10-04  Mark Probst  <mark.probst@gmail.com>
2958
2959         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
2960         tail calls.
2961
2962         * iltests.il.in: Add test case for tail call with many arguments.
2963
2964 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
2965
2966         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
2967         to the fast virtual generic method code until the aot case is fixed.
2968
2969 2008-10-03  Mark Probst  <mark.probst@gmail.com>
2970
2971         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
2972
2973 2008-10-03  Mark Probst  <mark.probst@gmail.com>
2974
2975         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
2976         thunks.
2977
2978 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
2979         
2980         * simd-intrinsics.c: Forgot to add this one.
2981
2982         * mini-codegen.c: Fix macro in case SIMD is not supported.
2983
2984 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
2985         
2986         This patch land initial JIT support for simd intrinsics.
2987
2988         * mini-x86.h: Added new define to make --enable_minimal work on x86.
2989
2990         * Makefile.am: Added simd-intrinsics.c
2991
2992         * simd-intrinsics.c: New file with simd instrinsic related
2993         code.
2994
2995         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
2996
2997         * cpu-x86.md: Add simd related instructions.
2998
2999         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
3000
3001         * driver.c: Added two new --regression variants.
3002
3003         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
3004
3005         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
3006
3007         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
3008         extract some complicated logic to helper functions.
3009
3010         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
3011
3012         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
3013
3014         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
3015         the specialized simplification pass.
3016
3017         * method-to-ir.c (mono_spill_global_vars): Use new macro.
3018
3019         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
3020
3021         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
3022         table.
3023
3024         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
3025         if MONO_ARCH_NEED_SIMD_BANK is defined.
3026
3027         * mini-ops.h: Added the new simd ops.
3028
3029         * mini-x86.c: Added mono_arch_xregname.
3030
3031         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
3032
3033         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
3034
3035         * mini-x86.h: Define simd related MONO_ARCH macros.
3036
3037         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
3038
3039         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
3040
3041         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
3042         MONO_CLASS_IS_SIMD to deal with simd related IR.
3043
3044         * mini.h (MonoInst): Added spill_var to the backend union.
3045
3046         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
3047
3048         * mini.h: Added forward declarations of the new simd fuctions.
3049
3050         * optflags-def.h: Added new optimization names SIMD.
3051
3052         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
3053
3054         * regalloc.h: Added support for working with 3 register banks.
3055
3056         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
3057
3058         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
3059
3060 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
3061
3062         * mini-exceptions.c: remove 64 bit related ifdef clutter.
3063
3064 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
3065
3066         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
3067         instead of one on 64 bit systems.
3068
3069         * method-to-ir.c: Remove unused includes.
3070
3071 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
3072
3073         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
3074         cfg->used_int_regs, since the two are different on arm.
3075
3076 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3077
3078         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
3079         mono_method_get_vtable_index() to get the vtable index.
3080
3081 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3082
3083         * method-to-ir.c (mono_method_to_ir2): Don't create native
3084         wrappers for array methods, because they're never called (and if
3085         they were called they wouldn't work).
3086
3087 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3088
3089         * method-to-ir.c (mono_method_to_ir2): Array methods are
3090         special-cased and must not be invoked indirectly via the (M)RGCTX
3091         when generic sharing is turned on.  Fixes #431413.
3092
3093 2008-10-01  Mark Probst  <mark.probst@gmail.com>
3094
3095         * method-to-ir.c: When generic sharing is active, call
3096         non-interface virtual generic methods via the standard trampoline.
3097
3098         * mini-trampolines.c: Handle virtual generic shared methods.
3099
3100         * mini.h, mini-x86.c, mini-x86.h: New argument for
3101         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
3102         method thunks and which is the trampoline to call if the lookup
3103         fails.  Enable the virtual generic method thunk for x86.
3104
3105         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
3106         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
3107         argument but assert that it's NULL, because these archs don't yet
3108         implement the virtual generic method thunk.  Changes in the IMT
3109         thunk data structures.
3110
3111 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
3112
3113         * aot-compiler.c (emit_globals): Avoid invalid characters in
3114         the static linking symbol.
3115
3116         * objects.cs: Add a test for the range check optimization. Fix warnings.
3117
3118         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
3119         optimization from the current JIT.
3120
3121         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
3122         later in decompose_array_access_opts () to allow more optimizations.
3123
3124         * method-to-ir.c (mono_handle_soft_float): Rename this to 
3125         mono_decompose_soft_float () for consistency.
3126
3127         * mini-ops.h: Fix arguments of OP_STRLEN.
3128
3129         * method-to-ir.c (save_cast_details): Extract the cast details saving code
3130         into a separate function.
3131         (reset_cast_details): Ditto.
3132         (handle_unbox): Save cast details. Fixes #431254.
3133
3134         * method-to-ir.c: Remove some obsolete FIXMEs.
3135
3136 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3137
3138         * ir-emit.h (alloc_dreg): Write a warning before crashing.
3139
3140 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3141
3142         * mini-codegen.c: More work on macros to make them
3143         ready for multiple regbanks.
3144
3145 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3146
3147         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
3148
3149         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
3150
3151 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3152
3153         * mini-codegen.c (mono_spillvar_offset): Proper support for
3154         multiple regbanks.
3155
3156 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
3157
3158         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
3159         the stack overflow changes.
3160
3161 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3162
3163         * mini-codegen.c: Make all bank macros depend on reg_bank.
3164
3165         * mini-codegen.c (mono_local_regalloc): Make free mask
3166         initialization regbank aware.
3167
3168 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3169
3170         * mini-codegen.c (mono_local_regalloc): Extract callee
3171         mask selection to a function and make it regbank aware.
3172
3173 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3174
3175         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
3176         code to deal with many regbanks.
3177
3178 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
3179
3180         * mini-codegen.c: More fp->regbank changes.
3181
3182 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
3183
3184         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
3185         of a hardcoded constant.
3186
3187 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
3188
3189         * method-to-ir.c (type_from_stack_type): Fix typo.
3190
3191 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
3192
3193         * mini-ia64.c (emit_move_return_value): Convert float return values to
3194         double.
3195
3196         * objects.cs: Add a new test.
3197         
3198         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
3199         VARARG methods to fix an assert later.
3200
3201         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
3202         end so it at least compiles.
3203
3204 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
3205
3206         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
3207
3208 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
3209
3210         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
3211         optimization to a new function (emit_optimized_ldloca_ir) and enable
3212         it for both ldloca and ldloca_s.
3213
3214 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
3215
3216         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
3217         gshared CASTCLASS code.
3218
3219         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
3220         amd64, where the libc stack unwinder encounters stack frames referring to
3221         native code in unmapped memory.
3222
3223         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
3224         sharing.
3225
3226         * generics.cs: Add new test.
3227
3228 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
3229
3230         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
3231         add a check that one of the ARM_FPU_ constants is defined.
3232
3233         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
3234         
3235         * mini-exceptions.c: Fix build on non-altstack platforms.
3236
3237         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
3238         sharing of vtypes.
3239
3240         * ir-emit.h: Add a comment to NEW_PCONST.
3241
3242         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
3243
3244         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
3245
3246         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
3247         after the changes to MonoJitDomainInfo.
3248
3249 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3250
3251         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
3252
3253 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3254
3255         * mini-ppc.c: Compiler warning fixes.
3256
3257 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3258
3259         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
3260         for pinvokes.
3261
3262 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3263
3264         * exceptions-ppc.c, mini-ppc.h: Compile
3265         mono_arch_handle_altstack_exception() on Darwin, too.
3266
3267 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3268
3269         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
3270         work on archs which don't have generic sharing implemented, only
3271         without the vtable_arg.
3272
3273 2008-09-26  Mark Probst  <mark.probst@gmail.com>
3274
3275         * mini.c: Added comment explaining why delegate ctor icall
3276         wrappers are compiled.
3277
3278 2008-09-26  Mark Probst  <mark.probst@gmail.com>
3279
3280         * mini.c: Don't produce trampolines to delegate ctor icall
3281         wrappers but compile them upfront.
3282
3283 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
3284
3285         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
3286         runtime-set function when going back to managed code. Currently this
3287         is used to set back the protection on the soft ovf pages and/or to
3288         throw the stack overflow exception that happened in unmanaged code.
3289
3290 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
3291
3292         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
3293         runtime-set function when going back to managed code. Currently this
3294         is used to set back the protection on the soft ovf pages and/or to
3295         throw the stack overflow exception that happened in unmanaged code.
3296
3297 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
3298
3299         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
3300         the support code for restoring stack protection after stack overflows
3301         that happen in unmanaged code. Don't set the exec permission on the
3302         soft overflow area.
3303
3304 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
3305
3306         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
3307         delegate->method_ptr is set. Fixes #428054.
3308
3309 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
3310
3311         * tests.cs: Rename to ratests.cs.
3312
3313         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
3314         emit_get_rgctx_... functions.
3315
3316 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3317
3318         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
3319
3320 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3321
3322         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
3323         before asserting that method is sharable.
3324
3325 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3326
3327         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
3328         whether method needs a static RGCTX wrapper used instead of
3329         complex conditions.
3330
3331         * generic-sharing.c, mini.h: A few functions moved to
3332         metadata/generic-sharing.c.
3333
3334 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3335
3336         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
3337         Generic code sharing for value types, which essentially means
3338         treating value type methods like static methods.  The RGCTX is
3339         passed in the same way.
3340
3341 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
3342
3343         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
3344         opcode when creating multi-dimensional arrays of open types.
3345
3346         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
3347         open generic types.
3348
3349         * generics.cs: Add a test.
3350
3351         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
3352
3353 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
3354
3355         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
3356
3357         * mini.c (mini_method_compile): Set it when running under the debugger. 
3358
3359         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
3360         vreg optimization if the flag is set.
3361
3362         * driver.c (mono_main): Add --attach= option to pass options to
3363         the attach agent.
3364
3365         * mini.c (sigquit_signal_handler): Start the attach agent.
3366
3367         * ssapre.c: Disable this to save space since it is not yet ported to
3368         linear IR.
3369
3370         * regalloc2.c: Disable this to save space.
3371
3372         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
3373
3374 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
3375
3376         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
3377         the -v option useful again.
3378
3379 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
3380
3381         * mini-amd64.c (mono_arch_output_basic_block): Add support for
3382         --break-at-bb.
3383
3384         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
3385         arrays of arrays. Fixes #428406.
3386
3387         * method-to-ir.c (mini_emit_castclass): Ditto.
3388
3389         * objects.cs: Add new test.
3390         
3391 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
3392
3393         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
3394         was wrong at it choked against target_type_is_incompatible for byref types.
3395
3396 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
3397
3398         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
3399         places.
3400
3401 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
3402
3403         * mini-exceptions.c: update a few more exceptions-related counters.
3404
3405 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
3406
3407         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
3408         new functions to allocate from persistent mempools.
3409
3410 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
3411
3412         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
3413         multiple register banks in the future.
3414
3415         * mini-codegen.c (mono_local_regalloc): Fix a warning.
3416
3417 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
3418
3419         * mini.c (type_to_eval_stack_type): Remove duplicated function.
3420
3421         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
3422
3423         * mini.h: Export type_to_eval_stack_type.
3424
3425         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
3426         is only ins->klass of byref types.
3427
3428 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
3429
3430         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
3431         (mini_emit_memcpy2): Ditto.
3432
3433         * mini-amd64.c: Fix a warning.
3434
3435 2008-09-21  Mark Probst  <mark.probst@gmail.com>
3436
3437         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
3438         linking.
3439
3440 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
3441
3442         * method-to-ir.c: Extract stloc micro-optimization to a
3443         function and apply it to all cases.
3444
3445 2008-09-19  Mark Probst  <mark.probst@gmail.com>
3446
3447         * method-to-ir.c: Don't fail generic code sharing in cases we
3448         already support.
3449
3450 2008-09-18  Mark Probst  <mark.probst@gmail.com>
3451
3452         * mini-ppc.c: Handle structs in tailcalls on Darwin.
3453
3454 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
3455
3456         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
3457         implementation.
3458
3459 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
3460
3461         * trace.c: make tracing more useful and correct, with per-thread
3462         id and indent info.
3463
3464 2008-09-15  Mark Probst  <mark.probst@gmail.com>
3465
3466         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
3467         doing a method call and the argument is an R4.
3468
3469 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
3470
3471         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
3472         generic methods.
3473
3474 2008-09-13  Mark Probst  <mark.probst@gmail.com>
3475
3476         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
3477
3478 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
3479
3480         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
3481         (MONO_JUMP_TABLE_FROM_INS): Ditto.
3482
3483 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
3484
3485         * driver.c: Add a --agent argument (not supported yet) to load managed
3486         agent assemblies before loading the main assembly, similarly to how the
3487         Java VM handles agents.
3488
3489 2008-09-11  Mark Probst  <mark.probst@gmail.com>
3490
3491         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
3492         function to do stack layout of local variables.
3493
3494 2008-09-11  Mark Probst  <mark.probst@gmail.com>
3495
3496         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
3497         calculation.
3498
3499 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
3500
3501         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
3502         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
3503         JIT if DISABLE_JIT is defined.
3504
3505         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
3506         defined.
3507
3508 2008-09-10  Mark Probst  <mark.probst@gmail.com>
3509
3510         * iltests.il.in: Disable the fconv test on PPC (the result is
3511         undefined according to ECMA).
3512
3513 2008-09-10  Mark Probst  <mark.probst@gmail.com>
3514
3515         * iltests.il.in: Enable tail call tests for PPC.
3516
3517         * mini.h: Add variable for storing incoming valuetype argument
3518         addresses for tail calls.
3519
3520         * mini-ppc.c: Implement valuetype arguments and return values for
3521         tailcalls on Linux.
3522
3523 2008-09-09  Mark Probst  <mark.probst@gmail.com>
3524
3525         * mini-ppc.c: Partially implement tail calls (struct arguments and
3526         return values not supported).
3527
3528         * method-to-ir.c: Enable tail calls on PPC.
3529
3530 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
3531
3532         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
3533         runtime-invoke wrappers to work around the problem of them getting
3534         assigned to a random class.
3535
3536         * aot-runtime.c (mono_aot_get_method): Ditto.
3537         
3538 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
3539
3540         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
3541         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
3542
3543 2008-09-07  Mark Probst  <mark.probst@gmail.com>
3544
3545         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
3546         until they're implemented properly.
3547
3548         * exceptions-ppc.c: Use arch-independent exception-handling code
3549         instead of custom one.
3550
3551         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
3552         for Linear IR.
3553
3554         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
3555
3556         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
3557         applies when __powerpc__ is defined.
3558
3559 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
3560
3561         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
3562         methods to their code to avoid computing the full name of wrappers and
3563         doing a lookup in a string hash table.
3564
3565 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
3566
3567         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
3568         we identify bblocks before method_to_ir () is ran.
3569
3570         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
3571         Also avoid optimizing branches pointing to themselves.
3572
3573         * mini.c (mini_method_compile): Ditto. Fixes #422947.
3574
3575 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
3576
3577         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
3578
3579 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
3580
3581         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
3582         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
3583         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
3584         'buf'.
3585
3586         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
3587         jumped to the same entry in plt_jump_table.
3588
3589 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
3590
3591         * method-to-ir.c (initialize_array_data): Handle field with RVA from
3592         dynamic images.
3593
3594 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
3595
3596         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
3597         other assignment can be if converted. Saves 1.5% on corlib size and fixes
3598         #421807.
3599
3600 2008-08-29  Geoff Norton  <gnorton@novell.com>
3601
3602         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
3603         segment, and doesn't properly handle .space as .text.  Fixes
3604         AOT Mach/ARM
3605
3606 2008-08-29  Geoff Norton  <gnorton@novell.com>
3607
3608         * mini.c: Disable the mach exception handler when running on 
3609         ARM
3610
3611 2008-08-29  Geoff Norton  <gnorton@novell.com>
3612
3613         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
3614         globals on Darwin/ARM
3615
3616 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
3617
3618         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
3619         since too many things depend on it. Instead, call 
3620         mono_runtime_set_no_exec ().
3621         
3622         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
3623         the new JIT.
3624
3625         * aot-compiler.c: Add an 'asm-only' AOT option.
3626
3627         * mini.c: Avoid initializing the runtime when doing AOT compilation.
3628                 
3629         * aot-compiler.c (compile_method): Disable gshared support for now as it
3630         doesn't yet work.
3631
3632 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
3633
3634         * mini-amd64.h : Fix a compiler warning.
3635
3636         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
3637           Changed to use a callback function to retrieve the unwind info.
3638           This avoids problems observed when code blocks were removed by
3639           unloading an app domain.
3640
3641         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
3642           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
3643           to work properly.
3644
3645         Contributed under MIT/X11 license.
3646
3647 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
3648
3649         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
3650           case to keep the stack aligned to 8.
3651
3652         Contributed under MIT/X11 license.
3653
3654 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
3655
3656         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
3657         avoid repeated linear searches.
3658
3659 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
3660
3661         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
3662         methods it can't handle.
3663         
3664         * aot-compiler.c (add_method): Avoid adding a method twice.
3665         (add_wrappers): Add runtime invoke wrappers for all methods.
3666
3667         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
3668         function to create an aot-compatible version of this trampoline.
3669
3670         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
3671
3672 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
3673
3674         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
3675
3676         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
3677         with a generic sharing failure.
3678
3679         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
3680
3681         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
3682         CEE_RETHROW. Fixes #419634.
3683
3684         * mini.c (mono_method_to_ir): Ditto.
3685
3686         * exceptions.cs: Add a new test.
3687         
3688         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
3689         to mono_type_stack_size_internal () since some callers might not pass in
3690         an rgctx.
3691
3692         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
3693         instrument_prolog. Fixes #419878.
3694
3695         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
3696         doubles in soft float mode volatile.
3697
3698 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
3699
3700         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
3701
3702         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
3703         to handle soft float correctly.
3704
3705         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
3706         the fast path.
3707
3708         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
3709
3710         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
3711         to sp, since the generics catch code requires it.
3712
3713         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
3714         copying.
3715
3716         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
3717         mono_arch_emit_imt_argument ().
3718
3719         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
3720
3721         * mini-arm.c tramp-arm.c: Generic sharing updates.
3722
3723 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
3724
3725         * mini-arm.c: Fix the arm build.
3726
3727         * generic-sharing.c (mini_type_get_underlying_type): New helper function
3728         handling enums, generic instances and generic sharing.
3729         (mini_type_stack_size_full): Ditto.
3730
3731         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
3732         
3733         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
3734
3735         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
3736
3737         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
3738         trampolines.
3739
3740         * mini-arm.c: Various small generic sharing changes.
3741
3742         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
3743         this for x86.
3744         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
3745         custom code.
3746
3747         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
3748         helper function to return a generic class init trampoline.
3749
3750         * method-to-ir.c mini.c: Use it.
3751         
3752         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
3753         arch-specfic function to return a generic class init trampoline.
3754
3755         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
3756         the GENERIC_CLASS_INIT custom code.
3757
3758         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
3759         a fatal error, not a sharing failure.
3760
3761         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
3762         needed.
3763
3764         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
3765         trampoline argument from MONO_ARCH_VTABLE_REG.
3766
3767         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3768         order of the arguments to the C trampoline: pass 'slot' as the trampoline
3769         argument, and pass the vtable in VTABLE_REG.
3770
3771         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3772         order of the arguments to the C trampoline: pass 'slot' as the trampoline
3773         argument, and pass the vtable in VTABLE_REG.
3774         (mono_arch_create_trampoline_code_full): Remove some special casing for
3775         the rgctx fetch trampoline.
3776
3777         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
3778         Fixes #419273.
3779
3780         * iltests.il: Add a test for it.
3781
3782 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
3783
3784         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
3785
3786         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
3787         no longer needed.
3788
3789         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
3790         use mono_jit_info_table_find () to avoid recursion.
3791         (mono_delegate_trampoline): Add a sync wrapper here.
3792
3793         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
3794         here.
3795
3796         * mini.c (mono_method_to_ir): Ditto.
3797         
3798         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
3799         add_sync_wrapper argument. Don't add a sync wrapper here.
3800         (mono_create_jump_trampoline): Don't add a sync wrapper here.
3801
3802         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
3803         
3804 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
3805
3806         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
3807           of nonvolatile registers back from MonoContext to CONTEXT.
3808
3809         Contributed under MIT/X11 license.
3810
3811 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
3812
3813         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
3814           arguments on Winx64 there are only 4 argument registers.  For this
3815           logic to work the last argument must be pulled from the stack.  
3816
3817         Contributed under MIT/X11 license.
3818
3819 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
3820
3821         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3822
3823         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
3824         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
3825         encode/decode_method_ref ().
3826
3827         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
3828
3829         * aot-runtime.c (decode_patch): Ditto.  
3830
3831         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
3832         MONO_PATCH_INFO_METHOD.
3833
3834         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
3835         MonoGenericJitInfo.
3836
3837         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
3838         MonoGenericJitInfo.
3839
3840         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
3841
3842         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
3843         one from the caller.
3844
3845         * aot-runtime.c (decode_generic_inst): New function to decode and
3846         return a interned generic inst.
3847         (decode_klass_ref): Use it.
3848         (decode_method_ref): Ditto.
3849
3850         * aot-compiler.c (emit_exception_debug_info): Save 
3851         jinfo->has_generic_jit_info too.
3852
3853 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
3854
3855         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
3856
3857         * iltests.il.in: Add a test for fconv_to_i.
3858
3859         * liveness.c: Disable the liveness2 pass for now to save space.
3860
3861         * regalloc2.c: Include mempool-internals.h to fix warnings.
3862
3863         * aot-compiler.c (encode_method_ref): Encode the context of generic
3864         instance methods.
3865
3866         * aot-runtime.c (decode_method_ref): Inflate generic methods using
3867         the context saved in the aot file.
3868
3869         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3870
3871         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
3872
3873         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
3874         volatile so they won't be optimized away.
3875
3876 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
3877
3878         * ssa.c:
3879         * ssa2.c:
3880         * mini.c:
3881         * regalloc2.c:
3882         * dominators.c: Remove duplicated functions that now are in
3883         mempool-internals.h.
3884
3885 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
3886
3887         * aot-compiler.c: Fix warnings.
3888
3889         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
3890
3891         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
3892
3893         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
3894         as the patch type.
3895
3896         * mini.c (mono_resolve_patch_target): Ditto.
3897         
3898         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
3899         (encode_klass_ref): Add support for encoding VARs/MVARs.
3900
3901         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
3902
3903         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
3904         the handling of the got entries into a separate 'decode_got_entry' function.
3905         Add support for RGCTX_FETCH.
3906
3907         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
3908         clobbered by the trampoline code.
3909
3910         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
3911         not clobbered by the indirect calling code.
3912
3913 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
3914
3915         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
3916         to fix the build.
3917
3918 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
3919
3920         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
3921         signature using the compilation mempool otherwise we would leak it.
3922
3923 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
3924
3925         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
3926         mono_emit_abs_call ().
3927
3928         * patch-info.h: Add GENERIC_CLASS_INIT.
3929
3930         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
3931
3932         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
3933         as their target as a near call.
3934
3935         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
3936         ABS handling code.
3937         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
3938
3939         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
3940         call to a runtime function described by a patch.
3941
3942         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
3943         mono_emit_abs_call, this has the advantage that the ABS handling code in
3944         mono_codegen () can handle them both, and can handle other stuff in the
3945         future without additional code.
3946
3947         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
3948         entry.
3949         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
3950         abs addresses.
3951
3952         * mini.h: Add missing bblock related prototypes.
3953
3954         * mini.h (MonoCompile): Remove unused reverse_inst_list and
3955         reverse_inst_list_len fields.
3956
3957         * mini.c: Refactor this file a bit by moving branch optimizations to 
3958         branch-opts.c.
3959
3960         * method-to-ir.c: Merge generic sharing changes missed earlier.
3961
3962         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
3963
3964         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
3965         shared patches. Process METHODCONST as a shared patch.
3966
3967         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
3968         as it crashes on the 2.0 mscorlib.
3969
3970         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
3971         to cause crashes.
3972         
3973         * aot-compiler.c: Use is_plt_patch () in a few additional places.
3974         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
3975         by IMT.
3976
3977         * aot-compiler.c: Reorganize the got handling code to be a bit more
3978         understandable.
3979
3980 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
3981
3982         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
3983         mono_patch_info_equals/hash, and use it to massively simplify
3984         get_plt_index ().
3985
3986         * mini.c (mono_patch_info_hash): Simplify this and add support for
3987         more patch types.
3988
3989         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
3990
3991         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
3992         handling code, since an offset is not enough to identify a trampoline.
3993
3994         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
3995
3996 2008-08-17  Mark Probst  <mark.probst@gmail.com>
3997
3998         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
3999
4000         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
4001
4002         * mini-ops.h: Argument and result types for OVF_CARRY ops.
4003
4004         * decompose.c: PPC decompositions for various ops.
4005
4006         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
4007
4008 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
4009
4010         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
4011         call the generic trampoline code using a call, instead of a jump, to
4012         remove some special casing from the generic trampoline code.
4013
4014         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
4015         (mono_codegen): Ditto.
4016
4017         * aot-compiler.c aot-runtime.c: Ditto.
4018
4019         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
4020
4021         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
4022         helper function to find the offset corresponding to a lazy fetch trampoline.
4023
4024         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
4025         when doing generic sharing.
4026
4027         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
4028         places.
4029         
4030         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
4031         mini-trampolines.c to be with the other trampoline creation functions.
4032
4033         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
4034         as it is equal to method->signature in most cases, add a 
4035         mono_emit_method_call_full variant which takes a signature and an imt
4036         argument as well.
4037
4038 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
4039
4040         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
4041         to this function, since it could be computed easily from the method 
4042         argument.
4043         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
4044         more.
4045
4046         * method-to-ir.c mini.c: Remove references to 
4047         compile_generic_method_wo_context.
4048
4049         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
4050         generic method calls.
4051         
4052         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
4053         dimensional non-szarrays.
4054
4055         * mini.c (mini_init): Register mono_array_new_1.
4056
4057         * jit-icalls.c (mono_array_new_1): New jit icall.
4058
4059         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
4060         pointing to the method.
4061
4062         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
4063         method addresses belonging to METHOD_JUMP patches in the 
4064         jump_target_got_slot_hash.
4065         (mono_aot_load_method): Ditto.
4066
4067         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
4068         METHOD_JUMP patches.
4069
4070         * mini.c (mini_create_jit_domain_info): New helper function which 
4071         initializes/frees domain->runtime_info.
4072         (mini_free_jit_domain_info): Ditto.
4073         (mini_init): Install the domain hook functions with the runtime.
4074
4075         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
4076         information maintained by the JIT.
4077
4078         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
4079         insertion into jump_table_hash into mono_codegen (), also implement proper
4080         locking.
4081
4082         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
4083         tail calls, it is already done by the aot code.
4084         
4085         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
4086         mechanism on amd64.
4087
4088         * iltests.il.in: Make the jmp test a bit more complex.
4089
4090         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
4091         generic instances which doesn't have a token.
4092
4093         * aot-runtime.c (decode_method_ref): Ditto.
4094         
4095         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
4096         can handle this case now.
4097         (handle_box): Ditto.
4098
4099 2008-08-15  Geoff Norton  <gnorton@novell.com>
4100
4101         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
4102         debugging check.
4103
4104 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
4105
4106         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
4107         calling generic methods.
4108
4109         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
4110
4111         * aot-runtime.c (decode_patch_info): Ditto.
4112
4113         * mini.c (mono_resolve_patch_target): Ditto.
4114         
4115         * patch-info.h: Add METHOD_RGCTX.
4116
4117         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
4118
4119 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
4120
4121         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
4122         arguments in registers.
4123
4124         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
4125         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
4126
4127         * mini.c (mini_method_compile): Abort aot compilation for generic
4128         methods if generic sharing is disabled.
4129         
4130         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
4131         an mrgctx.
4132
4133         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
4134         requiring an mrgctx.
4135
4136         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
4137         store instructions when converting a vcall to a normal call.
4138
4139         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
4140         mono_arch_find_jit_info.
4141
4142 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
4143
4144         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
4145         avoid calling mono_method_full_name () for every method even if the
4146         env var is not set.
4147         (check_inline_caller_method_name_limit): Ditto.
4148
4149 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
4150
4151         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
4152         assemblies in one run.
4153
4154         * aot-compiler.c (mono_compile_assembly): Only print out a count of
4155         skipped methods if it is not 0.
4156
4157         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
4158
4159 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
4160
4161         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
4162           MONO_ARCH_HAVE_UNWIND_TABLE.
4163
4164         Contributed under MIT/X11 license.
4165
4166 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
4167
4168         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
4169           from default optimizaton list on Winx64.
4170
4171         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
4172
4173         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
4174           the LMF from the MonoJitTlsData structure.
4175
4176         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
4177
4178         Contributed under MIT/X11 license.
4179
4180 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
4181
4182         * mini.c (sigsegv_signal_handler): Fix the build.
4183
4184         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
4185         assembly->aot_module.
4186
4187         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
4188         hash table. This simplifies and speeds up a lot of code, and fixes support
4189         for .netmodules.
4190
4191         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
4192         with the runtime.
4193
4194         * mini-exceptions.c: Ditto.
4195         
4196         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
4197         'native_offset' argument, since these are computed in the 
4198         mono_find_jit_info () function.
4199
4200         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
4201         is used by exceptions-ppc.c.
4202
4203         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
4204         mono_arch_find_jit_info ().
4205         
4206         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
4207         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
4208         generic code in mini-exceptions.c.
4209
4210 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
4211
4212         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
4213
4214         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
4215         
4216         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
4217         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
4218         called while holding the loader lock. Fixes #415608.
4219         (mono_aot_get_method_from_token_inner): Ditto.
4220
4221 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
4222
4223         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
4224         to reduce differences between this and the generic implementation in
4225         mini-exceptions.c.
4226         (ves_icall_get_frame_info): Ditto.
4227
4228         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
4229
4230         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
4231         longer neccesarry.
4232
4233         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
4234         mono_arch_get_call_filter () and make it non-static, for consistency with the
4235         other architectures.
4236
4237 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
4238
4239         * mini.c:
4240         * local-propagation.c:
4241         * mini-x86.c: Correct the name of arch defines.
4242
4243 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
4244
4245         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
4246         NO_EMULATE_LONG_SHIFT_OPS define.
4247
4248 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
4249
4250         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
4251         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
4252
4253         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
4254         MACH fixes. Merged from the 2.0 branch.
4255
4256         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
4257
4258         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
4259         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
4260
4261         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
4262
4263         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
4264         mono_marshal_get_native_wrapper () signature changes.
4265
4266 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
4267
4268         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
4269         conversion bug under arm.
4270
4271 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
4272
4273         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
4274
4275         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
4276         with overflow checking.
4277
4278 2008-08-05  Marek Habersack  <mhabersack@novell.com>
4279
4280         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
4281         to the genmdesc.pl file
4282
4283 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
4284
4285         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
4286         arg_array in the soft-float versions of the LOAD/STORE macros.
4287
4288         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
4289         implementation.
4290
4291         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
4292
4293 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
4294
4295         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
4296         a float HFA. Fixes #413621.
4297
4298 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
4299
4300         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
4301         frame_size to args_size. Fixes build.
4302
4303 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
4304
4305         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
4306         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
4307
4308         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
4309         the stack are not unaligned. Fixes #413247.
4310         
4311 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
4312
4313         * mini.c: update jitted methods performance counters.
4314
4315 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
4316
4317         * mini-exceptions.c: increase the exceptions thrown performance
4318         counter in mono_handle_exception ().
4319
4320 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
4321
4322         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
4323         can work with netmodules.
4324
4325 2008-07-28  Geoff Norton  <gnorton@novell.com>
4326
4327         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
4328         regression tests.
4329
4330 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
4331
4332         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
4333         correct place.
4334
4335 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
4336
4337         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4338           The float param registers and other param registers must be the 
4339           same index on Windows x64.
4340
4341         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
4342           ArgValuetypeAddrInIReg argument case.  Setting the argument
4343           op to OP_VTARG_ADDR (OP_REGOFFSET)).
4344
4345         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
4346           variable computed above as the copy length for arguments of storage
4347           type ArgValuetypeAddrInIReg.
4348
4349         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
4350           ArgValuetypeAddrInIReg argument case.  This case will rely on
4351           mono_arch_emit_outarg_vt to emit the correct code later in the process.
4352
4353         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
4354           a 32 byte stack allocation for all calls.  We will omit the adjustment for
4355           jump and tail call instructoins as they do not follow the typical call behavior.
4356
4357         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
4358           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
4359           local variable and pass the local variable by reference to the called method.
4360
4361         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
4362           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
4363           of a struct is passed in a register it must be saved with the other
4364           volatile argument on the stack.
4365
4366         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
4367           frame pointer the stack adjustment value must be saved to the unwind 
4368           info structure.
4369
4370         Contributed under MIT/X11 license.
4371
4372 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
4373
4374         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
4375         which got lost in the merge.
4376
4377 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
4378
4379         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
4380         build.
4381
4382         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
4383         
4384         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
4385         icalls, since they won't be patched.
4386
4387         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
4388         different code sequence when running under valgrind to prevent some valgrind
4389         errors.
4390
4391         * iltests.il.in: Add new regression test.
4392
4393         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
4394         end with a throw.
4395
4396         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
4397         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
4398
4399         * iltests.il.in: Add new test.
4400
4401         * aot-compiler.c: Fix some warnings.
4402
4403         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
4404         Fixes #412494.
4405
4406 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
4407
4408         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
4409         (mini_usage_jitdeveloper): Add a missing --wapi option.
4410
4411 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
4412
4413         * mini-codegen.c: Simplify the is_fp macros.
4414         (free_up_ireg): Remove, use free_up_reg instead.
4415         (free_up_reg): Fix the fp case.
4416
4417 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
4418
4419         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
4420         lowered earlier.
4421
4422         * exceptions-x86.c: Merge some changes which seemed to have got lost
4423         in the linear-ir merge.
4424
4425         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
4426
4427         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
4428         long vreg volatile even if the variable was already created.
4429
4430         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
4431         volatile variables.
4432
4433 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
4434
4435         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
4436
4437         * mini.c (mono_jit_compile_method_inner): Add support for 
4438         MONO_EXCEPTION_BAD_IMAGE.
4439
4440         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
4441         mini_method_get_context () returns NULL. Fixes #356531.
4442
4443         * mini.c (mono_method_to_ir): Ditto.
4444         
4445         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
4446         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
4447
4448 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
4449
4450         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
4451         in the LDFTN implementation.
4452
4453 2008-07-25  Mark Probst  <mark.probst@gmail.com>
4454
4455         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
4456         code, patch calls to icalls, too, even if they're not in the
4457         shared generic code hash.  Fixes #411962.
4458
4459 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
4460
4461         * cpu-x86.md: Increase the length of the fcall opcodes.
4462
4463         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
4464         calls returning floats.
4465
4466         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
4467         on NEWARR.
4468         
4469         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
4470         missed earlier.
4471
4472         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
4473         into the domain->method_code_hash.
4474
4475         * aot-compiler.c: Fix win32 build.
4476
4477         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
4478         
4479         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
4480         gshared NEWARR implementation.
4481
4482         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
4483
4484         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
4485         can be used outside of method_to_ir.
4486
4487         * mini.h (MonoCompile): Add arg_types field.
4488
4489         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
4490         
4491         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
4492         the values of the local arg_array and param_types array.
4493
4494 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
4495
4496         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
4497         got accesses might only get generated later when NEWOBJ is decomposed.
4498         
4499         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
4500         looking up the native code of the target method when a delegate is called
4501         for the first time.
4502
4503         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
4504         optimization.
4505
4506         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
4507
4508         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
4509         AOT work on platforms without a working dlsym implementation.
4510
4511         * mini.h: Bump AOT image format version.
4512         
4513 2008-07-24  Mark Probst  <mark.probst@gmail.com>
4514
4515         * mini-exceptions.c: Free a MonoType with
4516         mono_metadata_free_type() instead of g_free().
4517
4518         * aot-runtime.c: Free a MonoType.
4519
4520 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
4521
4522         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
4523         optimization.
4524
4525         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
4526         fp stack on x86.
4527
4528 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
4529         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
4530         profiler hook.
4531
4532 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
4533
4534         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
4535         NEWOBJ calls on valuetypes.
4536
4537         * iltests.il.in: Add new test.
4538
4539         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
4540
4541 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
4542
4543         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
4544         is no longer needed.
4545
4546         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
4547         non register sized integer arguments.
4548         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
4549         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
4550         emit_memcpy2 ().
4551
4552         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
4553         CEE_MONO_RETOBJ.
4554         
4555         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
4556         two a binop with different sized arguments is emitted.
4557
4558         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
4559         instruction in the ins==NULL case.
4560
4561 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
4562
4563         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
4564
4565         * mini-x86.c: Fix osx build.
4566
4567         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
4568         opcodes as well.
4569
4570         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
4571         instruction for non int sized variables.
4572
4573         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
4574         implementation.
4575
4576 2008-07-23  Robert Jordan  <robertj@gmx.net>
4577
4578         * method-to-ir.c: Fix MSVC build.
4579
4580 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
4581
4582         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
4583         a non int sized type, widen it to an int since newer versions of gcc seem to
4584         generate code which needs this.
4585
4586         * ssa2.c abcremoval2.c: Fix warnings.
4587
4588         * *: Merge the Linear IR branch.
4589
4590         The original branch is at trunk/branches/vargaz/mini-linear-il, and
4591         the ChangeLog file there describes all the changes done over the years. 
4592         Further documentation can be found at www.mono-project.com/Linear_IL.
4593
4594 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
4595
4596         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4597           The float param registers and other param registers must be the 
4598           same index on Windows x64.
4599
4600         Contributed under MIT/X11 license.
4601
4602 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
4603
4604         * mini.c: Make the previous fix GC safe.
4605
4606 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
4607
4608         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
4609
4610 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
4611
4612         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
4613           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
4614           ArgValuetypeAddrInIReg instead.
4615
4616         Contributed under MIT/X11 license.
4617
4618 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
4619
4620         * mini-codegen.c (get_register_spilling): Fix a warning.
4621
4622 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
4623
4624         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
4625         for types which the initialization fails. Raises the provided exception
4626         at the right stop after cleanup.
4627
4628 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
4629
4630         * aot-compiler.c: Free most of the memory allocated during compilation.
4631
4632         * mini.c (mini_parse_debug_options): Fix a leak.
4633         
4634         * mini.c (mini_method_compile): Don't add the method to the jit info tables
4635         during aot compilation.
4636
4637 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
4638
4639         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
4640         it has too much register pressure.
4641
4642 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
4643
4644         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
4645
4646 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
4647
4648         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4649         on x86.
4650
4651         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4652         on amd64 similar to the way it is done on arm.
4653
4654         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4655
4656         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
4657         consistency, normalize error messages, avoid loading aot-only modules in
4658         normal mode.
4659
4660         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
4661         for consistency.
4662
4663         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
4664
4665 2008-07-11  Martin Baulig  <martin@ximian.com>
4666
4667         * debug-debugger.h
4668         (MonoDebuggerInfo): Add `interruption_request'.
4669
4670 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
4671
4672         * aot-compiler.c (emit_plt): Remove some dead code.
4673
4674         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
4675
4676         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
4677         return the plt info offset belonging to a given plt entry.
4678
4679         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
4680         mono_aot_get_plt_info_offset.
4681         
4682         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
4683         similar to the amd64 code by makeing jumps through a separate jump table 
4684         instead of embedding the jump addresses into the code.
4685
4686 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
4687
4688         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
4689         method.
4690
4691 2008-07-10  Martin Baulig  <martin@ximian.com>
4692
4693         * mini.c (mini_method_compile): Disable generics sharing when
4694         running in the debugger.
4695
4696 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
4697
4698         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
4699
4700         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
4701         the local register allocator from running out of registers on x86 when 
4702         using aot.
4703
4704 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
4705
4706         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
4707         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
4708         C4146.
4709
4710         Contributed under MIT/X11 license.
4711
4712 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
4713
4714         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
4715         speed up the assembler.
4716
4717 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
4718
4719         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
4720         support.
4721
4722         * mini.c: Move the soft float handling macros a bit earlier, add 
4723         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
4724         place.
4725
4726         * mini.h: Add prototype for mono_arch_fixup_jinfo.
4727
4728         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
4729         read-only to help catch code allocation requests.
4730         
4731         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
4732         and turn it off when using --aot-only or when compiling with --aot=full.
4733
4734         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
4735         jump table for switches from the normal domain mempool, not the code
4736         manager.
4737
4738         * mini-trampolines.c (get_unbox_trampoline): New function to return an
4739         unbox trampoline which handles aot-only mode too.
4740
4741         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
4742         an AOTed unbox trampoline.
4743
4744         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
4745
4746 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
4747
4748         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
4749         ""
4750
4751         Contributed under MIT/X11 license.
4752
4753 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
4754
4755         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
4756           the unwind information for the method at the end of the allocated block.
4757           
4758         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
4759           MonoCompileArch to hold the unwind info for SEH on Winx64
4760         
4761         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
4762           frame pointer info for the method being compiled.
4763           
4764         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
4765           the call to mono_exception_from_token.
4766           
4767         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
4768           storing the method prolog information in a format that the Winx64 SEH can understand.  This
4769           information is stored a the end of the method block because it is all 32-bit offset based.
4770
4771         Contributed under MIT/X11 license.
4772
4773 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
4774
4775         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
4776
4777         * wapihandles.c: Fix warnings.
4778
4779         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
4780         mode.
4781
4782         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
4783         mono_jit_compile_method in aot-only mode since that calls the type 
4784         initializer.
4785         
4786         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
4787         get_delegate_invoke_impl in aot-only mode.
4788
4789         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
4790
4791 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
4792
4793         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
4794
4795         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
4796         is on by default.
4797
4798         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
4799
4800         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
4801         init trampoline from the AOT file as well.
4802
4803         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
4804         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
4805         code.
4806
4807         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
4808         mono_init.
4809
4810         * exceptions-amd64.c: Add _full variants for the remaining exception code
4811         creation functions as well, allow emission of relocatable code, remove
4812         caching since that is now done by the caller.
4813
4814         * mini-exceptions.c: Add _full variants for the remaining exception code
4815         creation functions as well, add aot-only support.
4816
4817         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
4818         if we can determine a proper token for them.
4819         (add_wrappers): Add a few more wrappers.
4820         (emit_method_code): Remove some dead code.
4821         (emit_trampolines): Emit exception code too.
4822
4823         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
4824
4825         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
4826         mono_array_new_va which avoids varargs.
4827
4828         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
4829
4830         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
4831         mono_arch_create_specific_trampoline () in all places.
4832
4833         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
4834         a bit so it can be used for other things as well.
4835         
4836         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
4837         on demand as well.
4838
4839         * exceptions-amd64.c: Rename the caching from the exception code creation
4840         functions, it is done by the caller instead.
4841         
4842         * exceptions-amd64.c: Change the signature of the exception code creation 
4843         functions to allow the creation of relocatable code later.
4844
4845         * mini-exceptions.c: Add a set of functions to query the various 
4846         runtime-generated exception functions.
4847
4848         * mini.c mini-exceptions.c: Use the newly added functions instead of the
4849         mono_arch_.. () functions.
4850         
4851 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
4852
4853         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
4854
4855         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
4856
4857         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
4858         (mini_get_vtable_trampoline): Ditto.
4859
4860         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
4861         code in the AOT case by returning the code size and a list of relocations to
4862         the caller.
4863
4864         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
4865
4866 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
4867
4868         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
4869           clean the stack.
4870
4871         Contributed under MIT/X11 license.
4872
4873 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
4874
4875         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
4876         so the buffer size can be computed correctly. Fixes #404735.
4877
4878         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
4879         normally as cfg->debug_info is already freed.
4880
4881 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
4882
4883         * mini-amd64.c: For calls returning vtypes in registers, don't store
4884         the return address on the stack, instead allocate a separate local for
4885         it. Fixes #404729.
4886
4887 2008-07-05  Mark Probst  <mark.probst@gmail.com>
4888
4889         * mini-trampolines.c, mini.h: Add an argument to
4890         mono_create_jit_trampoline_in_domain() for turning off the adding
4891         of the sync wrapper.
4892
4893         * mini.c: Use the JIT trampoline without sync instead of
4894         ldftn_nosync in static RGCTX invoke wrappers so that the call can
4895         be patched.
4896
4897 2008-07-04  Mark Probst  <mark.probst@gmail.com>
4898
4899         * driver.c: Turn on GSHARED optimization by default.
4900
4901 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
4902
4903         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
4904         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
4905
4906         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
4907         create a variant of the generic trampoline code callable from AOTed trampolines.
4908
4909         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
4910         trampoline code callable from AOTed trampolines.
4911
4912         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
4913
4914 2008-07-04  Mark Probst  <mark.probst@gmail.com>
4915
4916         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
4917         pass-through manner.
4918
4919         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
4920         and don't fail sharing for them anymore.
4921
4922         * mini-exceptions.c: Handle exceptions in shared generic methods.
4923
4924         * generic-sharing.c: When checking the context of a generic
4925         method, also check its class's context.  Don't treat wrappers as
4926         sharable.
4927
4928         * mini-trampolines.c: Some code factored out to
4929         metadata/generic-sharing.c.  Handle the MRGCTX case.
4930
4931         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
4932         we must deal with the method being of another instantiation of the
4933         class.  Add static rgctx invoke wrappers to generic methods.
4934
4935 2008-07-04  Mark Probst  <mark.probst@gmail.com>
4936
4937         * mini.c: Provide all jit infos of generic shared methods with a
4938         generic jit info.
4939
4940         * mini-exceptions.c: Handle the new situation that a generic info
4941         might be available, but not info about the this/vtable/mrgctx
4942         variable.
4943
4944 2008-07-03  Mark Probst  <mark.probst@gmail.com>
4945
4946         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
4947         generic methods.
4948
4949 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
4950
4951         * dominators.c (check_dominance_frontier): Fix a warning.
4952
4953         * mini.h: Add some missing prototypes.
4954
4955         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
4956
4957         * driver.c (mono_jit_init_version): Correct the comments since the first
4958         argument should be the name of the root domain, not a filename.
4959
4960         * aot-runtime.c (make_writable): Error out if this is called while running
4961         with --aot-only.
4962         (load_aot_module): Ditto.
4963
4964         * aot-compiler.c: Really fix the computation of method indexes.
4965
4966         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
4967         optimizations as this is no longer called frequently.
4968
4969         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
4970         method and the invoke impl code and pass it to the delegate trampoline instead of
4971         just the delegate class.
4972
4973 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
4974
4975         * aot-compiler.c: Fixup the computation of method indexes.
4976         (add_wrappers): Create the base methods of the runtime invoke wrappers using
4977         the method builder infrastructure.
4978
4979         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
4980         has no header.
4981
4982         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
4983         mode, load the method right away instead of creating a trampoline.
4984
4985         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
4986
4987         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
4988         some checks a bit.
4989
4990 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
4991
4992         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
4993         (mono_aot_load_method): Use method_index instead of method->token.
4994
4995         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
4996         can handle icalls etc. properly.
4997
4998         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4999
5000         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
5001
5002         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
5003         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
5004         JIT_ICALL_ADDR patch type.
5005
5006         * patch-info.h: Add JIT_ICALL_ADDR patch type.
5007
5008         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
5009         request flag.
5010         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
5011
5012         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
5013
5014 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
5015
5016         * mini.c: Use domain->jit_code_hash_lock for controlling access to
5017         domain->jit_code_hash.
5018
5019 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
5020
5021         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
5022
5023 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
5024
5025         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
5026         get_this_arg_from_call, let it compute it when needed.
5027
5028         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
5029         gsctx from code only when needed.
5030
5031         * mini-trampolines.c (get_generic_context): Rename this to 
5032         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
5033         it can be called by the arch backends.
5034
5035         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
5036
5037 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
5038
5039         * driver.c (mono_main): Add experimental --aot-only command line option.
5040
5041         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
5042         set.
5043
5044 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
5045
5046         * driver.c (DllMain): Remove mono_module_handle.
5047
5048         Contributed under MIT/X11 license.
5049
5050 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
5051
5052         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
5053         for emitting methods which are not in the source assembly. Detect and report
5054         failure of assembling+linking.
5055         
5056         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
5057
5058         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
5059
5060 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
5061
5062         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
5063
5064 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
5065
5066         * mini.h: Remove some obsolete prototypes.
5067
5068         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
5069
5070 2008-06-24  Mark Probst  <mark.probst@gmail.com>
5071
5072         * mini.c (get_object_generic_inst): Variable-sized arrays are not
5073         supported by Visual Studio, so use alloca().
5074
5075 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
5076
5077         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
5078         Fixes #402585.
5079
5080 2008-06-23  Mark Probst  <mark.probst@gmail.com>
5081
5082         * mini.c: Fail sharing of a generic method if it contains an open
5083         catch clause (because we don't pass MRGCTXs yet).
5084
5085 2008-06-23  Mark Probst  <mark.probst@gmail.com>
5086
5087         * mini.c: When compiling a method with generic sharing, insert the
5088         method instantiated with an all-Object generic context into the
5089         jit info table, instead of the context of the first instantiation
5090         of the method we happen to compile.
5091
5092 2008-06-18  Martin Baulig  <martin@ximian.com>
5093
5094         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
5095         `major_version' and `minor_version'.
5096
5097 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5098
5099         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
5100         mono_method_is_generic_sharable_impl() takes an additional
5101         argument specifying whether to treat type variables as reference
5102         types.
5103
5104 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5105
5106         * mini.h: Removed obsolete prototypes.
5107
5108 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5109
5110         * mini.c: Don't fail generic sharing for initobj and sizeof - we
5111         already handle them.
5112
5113 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5114
5115         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
5116         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
5117         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
5118         tramp-x86.c: Added a MonoGenericContext* argument to
5119         mono_arch_get_unbox_trampoline() so that it can call other
5120         functions which require it.
5121
5122 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5123
5124         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
5125         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
5126         mono_arch_get_this_arg_from_call() takes a
5127         MonoGenericSharingContext* as well.
5128
5129 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5130
5131         * mini.c: Factor out code for emitting unbox into emit_unbox() and
5132         implement generic sharing of unbox.
5133
5134 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5135
5136         * mini.c: Don't compute the vtable to determine whether a field is
5137         special static, because it might not work for open types.
5138
5139 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5140
5141         * mini.c: Removed the unused token_type and token_source arguments
5142         from get_runtime_generic_context_ptr().
5143
5144 2008-06-17  Marek Habersack  <mhabersack@novell.com>
5145
5146         * mini.c (ADD_BINOP): fix the build
5147
5148 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
5149
5150         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
5151         a widening op.
5152
5153 2008-06-16  Mark Probst  <mark.probst@gmail.com>
5154
5155         * mini.h: Removed class relations enum that's not used anymore.
5156
5157 2008-06-16  Mark Probst  <mark.probst@gmail.com>
5158
5159         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
5160
5161         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
5162         the lazy fetch trampoline access code.
5163
5164 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
5165
5166         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
5167
5168 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
5169
5170         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
5171
5172         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
5173
5174         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
5175
5176 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5177
5178         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
5179         intrinsics.
5180
5181         * mini-ops.h: Add MIN/MAX_UN opcodes.
5182
5183         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
5184         intrinsics.
5185
5186         * basic-math.cs: Add more min/max tests.
5187
5188         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5189
5190 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5191
5192         * mini.c: Small fix in the prologue of emit_castclass.
5193
5194 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5195
5196         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5197
5198         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
5199         do not work even for unsigned types. Fixes #400014.
5200
5201         * basic-math.cs: Add regression tests for unsigned Min/Max.
5202
5203 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5204
5205         * mini.c: Added additional context_used argument to several
5206         functions, which will be needed for sharing generic methods.  Use
5207         GET_RGCTX macro wherever appropriate.  Declare only one
5208         context_used in mono_method_to_ir().
5209
5210 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5211
5212         * mini.c, generic-sharing.c: Removed generic class relations.
5213
5214         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
5215         functions due to MRGCTX changes.
5216
5217 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5218
5219         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
5220         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
5221         with calculated IMT.
5222
5223         * mini.c: Generic sharing of calls via generic interfaces.
5224
5225         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
5226         generic method with non-constant MonoGenericContext*.  Instead,
5227         the context is taken out of the method itself.
5228
5229 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5230
5231         * mini.c: Generic sharing of ldvirtftn.
5232
5233 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5234
5235         * mini.c: Generic sharing of ldftn.
5236
5237 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5238
5239         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
5240
5241 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5242
5243         * mini.c: Generic sharing of the special case of ldtoken followed
5244         by a call to GetTypeFromHandle.
5245
5246 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5247
5248         * mini.c: Generic sharing of box for nullable types.
5249
5250 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5251
5252         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
5253         are passed on the stack. Fixes #324807.
5254
5255 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
5256
5257         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
5258         for the ArgValuetypeAddrInIReg case.
5259
5260         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
5261         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
5262
5263         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
5264         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
5265         local variable and pass the local variable by reference to the called method.
5266           
5267         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
5268         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
5269
5270         Contributed under MIT/X11 license.
5271
5272 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
5273
5274         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
5275
5276         * debug-mini.c (mono_debug_print_vars): Release memory after printing
5277         everything.
5278
5279 2008-06-10  Martin Baulig  <martin@ximian.com>
5280
5281         * debug-mini.c
5282         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
5283
5284 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
5285
5286         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
5287         possible error when no arguments are passed.
5288
5289         Contributed under MIT/X11 license.
5290
5291 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
5292
5293         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
5294         where the file name is NULL.
5295
5296 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
5297
5298         * mini.c: Fix s390 build.
5299
5300 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
5301
5302         * trace.c (mono_trace_parse_options): Fix warnings.
5303
5304         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
5305
5306 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
5307
5308         * mini.c (remove_block_if_useless): Avoid printing the method name.
5309         
5310         * mini.c: Remove needless setting of ins->cil_code which is now done by 
5311         MONO_INST_NEW.
5312
5313         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
5314         LMF. Not yet used.
5315
5316         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
5317         translated code after it has been patched.
5318
5319 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
5320
5321         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
5322         avoid problems during code patching on SMP systems.
5323         (emit_call): Avoid adding a patch info which is already added by 
5324         emit_call_body.
5325         (mono_arch_emit_exceptions): Ditto.
5326
5327 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
5328
5329         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
5330         MONO_TYPE_ISSTRUCT already checks for it.
5331
5332 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
5333
5334         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
5335           structs with floats on Winx64 the float registers are not used.  
5336           The integer registers are always used..
5337         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
5338           only one register will be used and only if the size of the struct 
5339           is 1,2,4, or 8 bytes.
5340
5341         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
5342           to work for Winx64.
5343
5344         Contributed under MIT/X11 license.
5345
5346 2008-06-05  Martin Baulig  <martin@ximian.com>
5347
5348         * debug-debugger.c (debugger_lookup_class): Also call
5349         mono_class_setup_methods() here; we're only called from RTI.
5350
5351 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
5352
5353         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
5354         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
5355         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
5356         Post-process object files and add dtrace-generated object, if necessary.
5357
5358         Contributed under MIT/X11 license.
5359
5360 2008-06-04  Mark Probst  <mark.probst@gmail.com>
5361
5362         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
5363         element class.
5364
5365         * mini.c: Generic sharing for unbox.any and castclass.
5366
5367 2008-06-04  Mark Probst  <mark.probst@gmail.com>
5368
5369         * mini.c: Ignore tailcall prefix in shared generic code and when
5370         doing calls which require a vtable/rgctx argument.
5371
5372 2008-06-04  Mark Probst  <mark.probst@gmail.com>
5373
5374         * mini.c: Don't free the JIT info.
5375
5376         * driver.c: Changes in the JIT info table testing code.
5377
5378 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
5379
5380         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
5381         interruption. Fix some warnings.
5382
5383         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
5384         interruption_checkpoint.
5385
5386 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
5387
5388         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
5389         from embedding applications.
5390
5391 2008-06-02  William Holmes  <billholmes54@gmail.com>
5392
5393         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
5394           reserving 32 bytes on the stack when making calls. 
5395
5396         Contributed under MIT/X11 license.
5397
5398 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
5399
5400         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
5401         the linear IL branch.
5402
5403         * driver.c: Print out more information for --version on arm.
5404
5405 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
5406
5407         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
5408         bb_exit instead, since out of line bblocks might not actually be emitted
5409         out-of-line.
5410         
5411         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
5412         maximum epilog size for out of line bblocks if tracing is enabled.
5413
5414         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
5415
5416 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
5417
5418         * arrays.cs: Regression tests for allocating arrays with negative sizes.
5419
5420 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
5421
5422         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
5423         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
5424         opcodes.
5425
5426 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
5427
5428         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
5429         the 'value' to store is a constant.
5430
5431         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
5432
5433         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
5434         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
5435
5436 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
5437
5438         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
5439         for accessing method->generic_container.
5440
5441 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
5442
5443         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
5444         
5445         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
5446
5447         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
5448
5449         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
5450         fails.
5451
5452 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
5453
5454         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
5455
5456         * mini.c: Handle the case when mono_class_vtable () fails.
5457
5458 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
5459         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
5460         the stat profiler.
5461
5462 2008-05-22  Mark Probst  <mark.probst@gmail.com>
5463
5464         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
5465         together with domain sharing.
5466
5467 2008-05-22  Mark Probst  <mark.probst@gmail.com>
5468
5469         * mini.c: Treat callvirts to final methods like non-virtual calls
5470         when doing generic sharing, i.e. look them up in the runtime
5471         generic context.
5472
5473 2008-05-22  Mark Probst  <mark.probst@gmail.com>
5474
5475         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
5476         with computed types (for generic sharing).
5477
5478         * mini.c: Generic sharing for mkrefany and refanyval.
5479
5480 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
5481
5482         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
5483         possible.
5484
5485         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
5486         the generic sharing code.
5487         
5488         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
5489         when needed.
5490
5491 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
5492
5493         * mini.h: Remove the declaration of mono_aot_init_vtable ().
5494
5495 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
5496
5497         * driver.c: updated copyright date
5498
5499 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
5500
5501         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
5502         needed.
5503
5504 2008-05-19  Martin Baulig  <martin@ximian.com>
5505
5506         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
5507         pointing to the new `_mono_debug_using_mono_debugger' variable.
5508
5509         * driver.c
5510         (mono_main): Check mono_debug_using_mono_debugger() rather than
5511         the `MONO_INSIDE_MDB' environment variable to check whether we're
5512         inside the debugger.
5513
5514 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
5515
5516         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
5517         argument.
5518
5519 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
5520
5521         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
5522
5523         * mini.c: Added mini_assembly_can_skip_verification. This
5524         function checks if the assembly requested to skip verification. 
5525         Fixes part of #387274.
5526
5527 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
5528
5529         * mini.c (mini_get_method): Disable the check for open generic classes when
5530         using generic sharing.
5531
5532         * generics.cs: Add a test for #387034.
5533
5534         * mini.c (mini_get_method): Check whenever the method class is an open generic
5535         type, and return NULL in that case, causing a verification error. Fixes
5536         #384123.
5537
5538 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
5539
5540         * driver.c (mono_main): Revert r102623. The right
5541         thing to do is to enable the verifier under verifiable
5542         unless a --security flag was passed.
5543
5544         We need this non-trivial behavior for --verify-all otherwise
5545         mcs-compileall won't be able to use it. As it needs everything to
5546         be verified under validil.
5547
5548 2008-05-06  Martin Baulig  <martin@ximian.com>
5549
5550         Fix #383749.
5551
5552         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
5553         (mono_debugger_thread_cleanup): Likewise.
5554         (mono_debugger_extended_notification): Likewise.
5555
5556 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
5557
5558         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
5559         against both inflated and non-inflated methods. We need to check against the
5560         generic definition for cases where the instantiated method is not visible.
5561         We need to check against the inflated types for cases where the instantiation
5562         changes any super type. This fixes #382986.
5563
5564         Note that this doesn't need to be applied to other parts of mono_method_to_ir
5565         that check for visibiliy as generic params only appears as the type subject
5566         of tokens on call opcodes. Field manipulation and ldftn must always
5567         target an exact type.
5568
5569 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
5570
5571         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
5572         if no related --security flag is passed.
5573
5574 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
5575
5576         * mini-arch.h: Prepare support for ppc64.
5577
5578         Contributed under MIT/X11 license.
5579
5580 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
5581
5582         * aot-runtime.c: Prepare support for ppc64.
5583
5584         Contributed under MIT/X11 license.
5585
5586 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
5587
5588         * mini-ops.h: Prepare support for ppc64.
5589
5590         Contributed under MIT/X11 license.
5591
5592 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
5593
5594         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
5595
5596         Contributed under MIT/X11 license.
5597
5598 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
5599
5600         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
5601         assemblies, since aot_name is not a full path, causing us to load MS.NET 
5602         assemblies on windows.
5603
5604 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
5605
5606         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
5607         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
5608         * main.c: Use UTF-8 encoded command line instead of Windows default code
5609         page on Windows to support Unicode.
5610         * driver.c (DllMain): New function for mixed-mode assembly support.
5611         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
5612         export __stdcall functions without decoration.
5613
5614         Contributed under MIT/X11 license.
5615
5616 2008-04-28  Mark Probst  <mark.probst@gmail.com>
5617
5618         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
5619         saving it very early.
5620
5621 2008-04-28  Mark Probst  <mark.probst@gmail.com>
5622
5623         * mini.h, mini.c: Lots of code for accessing the old RGCTX
5624         deleted.  The only way to access the new RGCTX is via the
5625         trampline.
5626
5627         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
5628         vtable instead of the RGCTX to static methods.
5629
5630         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
5631         accessing the new RGCTX.
5632
5633         * generic-sharing.c: There is no separation between self, type
5634         arguments and other types in the RGCTX anymore.
5635
5636 2008-04-25  Jonathan Chambers <joncham@gmail.com>
5637
5638         * mini-amd64.c (add_general): Remove previous stack adjustment.
5639         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
5640         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
5641         for 32 bytes of stack space reserved for all calls.
5642         
5643         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
5644         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
5645         adjustment.
5646         
5647         Code contributed under MIT/X11 license.
5648
5649 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
5650
5651         * mini.c (mini_method_verify): Only verify non-inflated methods, check
5652         against the root definition, peeling out method and type instantiations.
5653         Cache verify success results, code that fails verification is still
5654         checked multiple times.
5655
5656 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
5657
5658         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
5659
5660 2008-04-23  Jonathan Chambers <joncham@gmail.com>
5661
5662         * mini-amd64.c (add_general): Always increment stack on Win64.
5663         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
5664         on Win64.
5665         
5666         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
5667         stack based argument handling on Win64.
5668         
5669         Code contributed under MIT/X11 license.
5670
5671 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
5672
5673         * Makefile.am (version.h): Add support for git-svn.
5674
5675 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
5676
5677         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
5678         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
5679         avoiding allocations and libc functions which might deadlock.
5680         
5681         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
5682         'no-gdb-backtrace' option is set.
5683
5684         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
5685
5686         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
5687
5688 2008-04-21  Martin Baulig  <martin@ximian.com>
5689
5690         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
5691         and `get_lmf_addr'; `notification_address' is no longer a pointer.
5692
5693 2008-04-21  Martin Baulig  <martin@ximian.com>
5694
5695         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
5696         `thread_vtable', `event_handler_ptr' and `event_handler'.
5697
5698 2008-04-21  Martin Baulig  <martin@ximian.com>
5699
5700         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
5701         allows delayed initialization of the `executable_code_buffer' when
5702         attaching.
5703
5704 2008-04-21  Martin Baulig  <martin@ximian.com>
5705
5706         * mini.h (mono_debugger_create_notification_function): Removed.
5707         * tramp-*.c (mono_debugger_create_notification_function): Removed.
5708
5709         * mdb-debug-info64.s
5710         (MONO_DEBUGGER__notification_function): Added this in the .text section.
5711
5712         * mdb-debug-info32.s
5713         (MONO_DEBUGGER__notification_function): Added this in the .text section.
5714
5715         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
5716         currently only works on x86 and x86_64, so don't create it on ppc.
5717
5718 2008-04-21  Martin Baulig  <martin@ximian.com>
5719
5720         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
5721
5722         * mini.c
5723         (mini_method_compile): In the fp elimination check, check
5724         `debug_options.mdb_optimizations' in addition to
5725         mono_debug_using_mono_debugger().       
5726
5727         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
5728         disable some JIT optimizations which are only disabled when
5729         running inside the debugger.
5730         Added `--help-debug' option to describe the debugging options.
5731         (parse_debug_options): New static function to parse the `--debug'
5732         options, so we can easily add more stuff in future.
5733
5734 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
5735
5736         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
5737         the method has no body.
5738
5739 2008-04-19  Jonathan Chambers <joncham@gmail.com>
5740
5741         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
5742         assembly is not allowed in MSVC 64-bit compiler. 
5743         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
5744         as we get floating point exceptions everywhere.
5745         
5746         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
5747         correctly align arguments for call to throw_exception.
5748         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
5749         
5750         Code contributed under MIT/X11 license.
5751
5752 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
5753
5754         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
5755
5756 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
5757
5758         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
5759
5760         * mini-amd64.c (NEW_INS): Set cil_code.
5761
5762         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
5763         from mini-amd64.c so all debugger related logic is in one place.
5764
5765         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
5766         later won't have a random ip assigned to them.
5767
5768 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
5769
5770         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
5771         the arch specific function initializes code_size.
5772         (mono_create_delegate_trampoline): Ditto.
5773
5774         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
5775         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
5776         platforms.
5777
5778         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
5779         running under the debugger.
5780
5781         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
5782         debugger.
5783
5784         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
5785         debugger. Also move the disabling of optimizations here from driver.c.
5786         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
5787         debugger.
5788
5789         * mini.h (MonoCompile): Add a few new flags.
5790
5791 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
5792
5793         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
5794         so the cil_code field of created MonoInst's is properly set.
5795         (mini_select_instructions): Ditto.
5796
5797         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
5798         (MONO_INST_NEW_CALL): Ditto.
5799
5800         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
5801         in many places so the ins->cil_code field is properly initialized.
5802
5803         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
5804         place.
5805
5806 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
5807
5808         * mini.c (mini_method_compile): Print a different message when compiling a 
5809         shared method.
5810         
5811         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
5812         > 1.
5813
5814 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
5815
5816         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
5817         SSE2 instructions.
5818
5819         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
5820         
5821 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
5822
5823         * mini.c (handle_stack_args): Make this return void since its return value was
5824         never used. Also set cfg->unverifiable for invalid IL instead of calling
5825         G_BREAKPOINT ().
5826
5827 2008-04-10  Mark Probst  <mark.probst@gmail.com>
5828
5829         * mini.c: Make sure "this" is live in catch clauses with type
5830         variables in shared generic code.
5831
5832 2008-04-08  Mark Probst  <mark.probst@gmail.com>
5833
5834         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
5835         generic_class_is_reference_type() to ensure the proper behaviour
5836         when sharing generic code and the type in question is a type
5837         argument.
5838
5839 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
5840
5841         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
5842         race conditions when printing thread dumps. Fixes #377738.
5843
5844 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
5845         
5846         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
5847         shows up when both MonoInst arguments can cause aliasig.
5848         There is likely no way in the current JIT to trigger this problem, but
5849         it showed up in the development of generics sharing, when in a new
5850         opcode both args of an OP_GROUP can be aliases (addresses of a local).
5851         When the generics sharing code will be committed, its tests will be
5852         valid also for this bug.
5853
5854 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
5855
5856         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
5857         PATCH_INFO_METHOD.
5858
5859         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
5860         NULL.
5861
5862 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
5863
5864         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
5865         use a more detailed exception message for InvalidCastException.
5866
5867         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
5868
5869         * driver.c (mono_main): Add --debug=casts option to turn on better 
5870         InvalidCastException message details.
5871
5872         * mini.c (mini_get_debug_options): New helper function to return the address of
5873         the debug_options variable.
5874
5875         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
5876         the jit_tls TLS variable.
5877
5878         * mini.c (mono_jit_tls): New TLS variable.
5879
5880         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
5881         option is used.
5882
5883 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
5884
5885         * mini.h: Removed verifer related stuff. This code was moved to verify.c
5886
5887         * mini.c: Removed verifer related stuff, code moved to verify.c.
5888
5889         * driver.c: Using code from verify.c instead of mini.c.
5890
5891 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
5892
5893         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
5894         longer valid.
5895
5896 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
5897
5898         * mini.c (check_for_method_verify): Enabling verification of
5899         corlib if mono_verify_all is set. Bugs in the verifier preventing that
5900         have been fixed.
5901
5902 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
5903
5904         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
5905         caller saved registers as well.
5906         
5907         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
5908         saved registers as well.
5909
5910 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
5911
5912         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
5913
5914         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
5915         code.
5916
5917 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
5918
5919         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
5920         to get_call_info.
5921         (get_call_info): Take a gsctx argument instead of 'cfg'.
5922
5923 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
5924
5925         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
5926         mono_verify_all is set.
5927
5928         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
5929
5930         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
5931
5932 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
5933
5934         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
5935         an exception.
5936
5937         * driver.c mini.c mini.h: Add a --verify-all development option to test the
5938         verifier and the code generated by the compiler.
5939
5940 2008-03-25  Mark Probst  <mark.probst@gmail.com>
5941
5942         * mini.c: Generic sharing of the non-nullable case of the box
5943         instruction.
5944
5945 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
5946
5947         * inssel.brg: Fix the build.
5948
5949         * iltests.il.in: Add a test for lconv.ovf.u8.un.
5950
5951 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
5952
5953         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
5954         Array:Address. Fixes #372410.
5955
5956         * iltests.il.in: New tests for readonly prefix.
5957
5958 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
5959
5960         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
5961         mini-trampolines.c.
5962
5963         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
5964         mini-exceptions.c.
5965
5966         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
5967         
5968         * mini.c (mono_decompose_op_imm): New helper function.
5969
5970         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
5971         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
5972         return value.
5973
5974         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
5975         mono_arch_output_basic_block. Fix warnings.
5976
5977         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
5978         for now.
5979
5980 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
5981
5982         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
5983         since the extra frame is now detected automatically inside the loop.
5984
5985         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
5986         opts which are now in mono_peephole_ins ().
5987         
5988         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
5989
5990         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
5991         frames and skip duplicate managed-to-native frames. Fixes #367665.
5992
5993         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
5994         opts which are now in mono_peephole_ins ().
5995         (mono_arch_peephole_pass_2): Ditto.
5996
5997         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
5998
5999         * mini-codegen.c (mono_peephole_ins): New helper function containing the
6000         arch independent peephole optimizations.
6001
6002         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
6003         opts which are now in mono_peephole_ins ().
6004
6005         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
6006         
6007         * mini-s390.c (mono_arch_output_basic_block): Fix build.
6008
6009         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
6010         pattern.
6011
6012         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
6013         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
6014         opcode. 
6015
6016 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
6017
6018         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
6019         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
6020         return value.
6021
6022         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
6023         mono_arch_output_basic_block. Fix warnings.
6024
6025 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
6026
6027         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6028         conv.ovf.u.un.
6029
6030 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
6031
6032         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6033         conv.ovf.u.un.
6034
6035         * iltests.il: Add new tests.
6036
6037 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
6038
6039         * mini.c: Removed Windows version macros.
6040
6041 2008-03-20  Mark Probst  <mark.probst@gmail.com>
6042
6043         * generic-sharing.c: Put reflection types in the extensible part
6044         of the runtime generic context.
6045
6046         * mini.c: Generic sharing of the GetTypeHandle special case of the
6047         ldtoken instruction.
6048
6049 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
6050
6051         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
6052
6053         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
6054         
6055         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
6056         consistency with the other version on the linear IR branch.
6057
6058         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
6059
6060         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
6061
6062         * iltests.il.in: Add new tests.
6063
6064 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
6065
6066         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
6067
6068         * iltests.il.in: Add new tests.
6069
6070 2008-03-19  Mark Probst  <mark.probst@gmail.com>
6071
6072         * mini.c: Two variables with the same name were declared in
6073         nesting contexts and one wasn't initialized.  Fixed.
6074
6075 2008-03-19  Mark Probst  <mark.probst@gmail.com>
6076
6077         * mini.c: Generic sharing of the initobj instruction.
6078
6079 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
6080
6081         * mini.c: make the test to optimize ldtoken from typeof() more
6082         precise.
6083
6084 2008-03-18  Mark Probst  <mark.probst@gmail.com>
6085
6086         * mini.c: Generic sharing of the initobj instruction for reference
6087         types.
6088
6089 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
6090
6091         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
6092         the mono_breakpoint_clean_code() code to perform bound checks.
6093
6094 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
6095
6096         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
6097         mono_arch_patch_callsite() to include the start of the managed method
6098         to be able to perform bound checks.
6099
6100 2008-03-17  Mark Probst  <mark.probst@gmail.com>
6101
6102         * mini.c: Generic sharing for the isinst instruction.
6103
6104 2008-03-17  Mark Probst  <mark.probst@gmail.com>
6105
6106         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6107         inssel-long32-mips.brg: Added opcodes for doing indirect calls
6108         with the runtime generic context argument.
6109
6110         * mini.c: Share calls to several types of unsharable methods by
6111         putting the address of the method code in the runtime generic
6112         context and doing an indirect call.
6113
6114         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6115         to switches.
6116
6117 2008-03-16  Mark Probst  <mark.probst@gmail.com>
6118
6119         * generic-sharing.c: Change due to a change in the runtime genric
6120         context API.
6121
6122 2008-03-15  Martin Baulig  <martin@ximian.com>
6123
6124         * tramp-x86.c
6125         (mono_arch_nullify_class_init_trampoline): Add call to
6126         mono_breakpoint_clean_code() to make things work when running
6127         inside the debugger.
6128
6129         * tramp-amd64.c
6130         (mono_arch_nullify_class_init_trampoline): Add call to
6131         mono_breakpoint_clean_code() to make things work when running
6132         inside the debugger.
6133
6134 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
6135
6136         * inssel-long.brg (reg): Fix 64 bit build.
6137
6138 2008-03-14  Mark Probst  <mark.probst@gmail.com>
6139
6140         * mini.c, mini.h: Share static generic code by passing it an
6141         implicit argument pointing to the runtime generic context.
6142
6143         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6144         inssel-long32-mips.brg: New opcodes for calling shared static,
6145         which need to be passed the runtime generic context.
6146
6147         * mini-amd64.c, mini-x86.c: Save the runtime generic context
6148         argument on the stack in the prologue if needed.  New function for
6149         finding the runtime generic context argument from the registers
6150         saved by the trampoline.
6151
6152         * mini-amd64.h, mini-x86.h: Specify which register to use for the
6153         runtime generic context argument.
6154
6155         * tramp-amd64.c: Also restore the register used for the runtime
6156         generic context argument.
6157
6158         * mini-trampoline.c: Resolve shared static calls by consulting the
6159         runtime generic context via the new argument.
6160
6161         * generic-sharing.c: Add an argument to sharability-checking
6162         functions that specifies whether type variables should be treated
6163         as sharable type arguments.
6164
6165         * inssel-x86.brg: Removed a superfluous, buggy rule.
6166
6167         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6168         to switches.
6169
6170 2008-03-14  Martin Baulig  <martin@ximian.com>
6171
6172         * debug-debugger.c (main_thread_handler): Call
6173         mono_runtime_run_main() without sending any notifications.
6174
6175         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
6176
6177 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
6178
6179         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
6180
6181 2008-03-14  Mark Probst  <mark.probst@gmail.com>
6182
6183         * tramp-x86.c: Fixed register restore offsets in the trampoline
6184         code for ECX and EDX.
6185
6186 2008-03-12  Geoff Norton  <gnorton@novell.com>
6187
6188         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
6189         different ucontext_t implementations.
6190         * exceptions-arm.c: Use the above defines to get exceptions working on 
6191         iPhone (based on a patch by Luke Howard lukeh@padl.com)
6192         * mini-arm.c: Implement iPhone icache support (based on a patch by
6193         Luke Howard lukeh@padl.com)
6194
6195 2008-03-12  Mark Probst  <mark.probst@gmail.com>
6196
6197         * mini.c: Enable generic sharing of calls to non-static
6198         non-interface non-generic non-value-type methods.
6199
6200         * mini-trampolines.c: Resolve calls from shared generic code.
6201
6202 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
6203
6204         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
6205
6206         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
6207
6208 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
6209
6210         * mini.c: some fixes for the AOT compiler.
6211
6212 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
6213
6214         * cpu-amd64.md: Add clob:1 to some float opcodes.
6215
6216 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
6217
6218         * mini.h: Added MiniVerifierMode enumeration.
6219
6220         * mini.c: Added mini_verifier_set_mode to control
6221         the usage of the new verifier.
6222
6223         * mini.c (mono_method): Integrated the new verifier.
6224
6225         * driver.c: Extended --security option with validil and
6226         verifiable options to activate the new verifier.
6227
6228 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
6229
6230         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
6231         optimization to ctors taking 0 or 2 arguments too.
6232
6233         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
6234         a bit.
6235
6236         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
6237
6238         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
6239
6240 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
6241
6242         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
6243         non-aot case as well.
6244
6245         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
6246
6247         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
6248         changes.
6249
6250         * aot-compiler.c (encode_patch): Ditto.
6251
6252         * mini.h (G_MININT32): Fix the definition of this.
6253
6254 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
6255
6256         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
6257
6258         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
6259
6260 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
6261
6262         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
6263         methods returning vtypes in registers.
6264         (mono_arch_allocate_vars): Ditto.
6265
6266         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
6267
6268         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
6269
6270         * generics.cs: Add a test from the linear IR branch.
6271
6272         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
6273
6274         * mini.c (inline_method): Cache failed inline attempts.
6275
6276 2008-03-04  Mark Probst  <mark.probst@gmail.com>
6277
6278         * mini.c: For shared methods of generic classes put the location
6279         of "this" into the MonoGenericJitInfo.
6280
6281         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
6282         register out of a MonoContext by register number.  Add the generic
6283         sharing context as an argument to mono_arch_find_this_argument().
6284
6285         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
6286         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
6287         for new arch function.
6288
6289         * mini-exception.c: Handle open exception clauses in shared
6290         generic code.
6291
6292         * mini-trampolines.c: Supply additional argument to
6293         mono_arch_find_this_argument().
6294
6295 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
6296
6297         * Makefile.am (regtests): Run the bench.exe tests last.
6298
6299 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
6300
6301         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
6302         a bit.
6303
6304 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
6305
6306         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
6307         with MS.
6308
6309         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
6310         
6311         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
6312
6313         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
6314         whose class has no cctor.
6315
6316         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
6317
6318 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
6319
6320         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
6321         unverified.
6322
6323 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
6324
6325         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
6326         to be in sync with the code on the linear IR branch.
6327
6328         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
6329
6330         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
6331
6332 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
6333
6334         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
6335
6336         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
6337
6338         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
6339
6340         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
6341
6342         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
6343         
6344         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
6345         body.
6346
6347 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
6348
6349         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
6350         OP_LOADR4_MEMBASE emission.
6351
6352         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
6353         (mono_spillvar_offset_float): Ditto.
6354
6355         * mini-mips.c (mono_arch_emit_prolog): Ditto.
6356
6357         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
6358         emission.
6359
6360         * basic-long.cs: Add regression tests for them.
6361
6362         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
6363         use.
6364         (mono_arch_allocate_vars): Fix representation of single-precision float
6365         argument.
6366         (mono_arch_output_basic_block): Ditto.
6367
6368         * inssel-mips.brg: Ditto, remove duplicate items.
6369
6370         * mini-mips.c (emit_load_volatile_arguments): New function to handle
6371         arguments of tail calls as on other platforms.
6372         (mono_arch_output_basic_block): Handle tail calls.
6373
6374         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
6375         register.
6376
6377         * objects.cs (test_5_pass_static_struct): Add test for it.
6378
6379         Contributed under MIT/X11 license.
6380
6381 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
6382
6383         * Makefile.am: Use gmcs for compiling the regression tests.
6384
6385         * *.2.cs *.2.il: Rename to *.cs and *.il.
6386
6387 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
6388
6389         * regalloc.h: Make the vassign array smaller.
6390
6391         * mini.c (mini_method_compile): Remove an unused field in cfg.
6392
6393         * mini-codegen.c: Add a bunch of micro optimizations.
6394
6395 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
6396
6397         * regalloc.h: Remove some unused fields.
6398
6399 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
6400
6401         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
6402
6403         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
6404
6405 2008-02-22  Mark Probst  <mark.probst@gmail.com>
6406
6407         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
6408
6409         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
6410         trampoline: Fetch an entry from the runtime generic context.  If
6411         it's NULL, jump to the actual trampoline to fill the runtime
6412         generic context.  Otherwise, return it.
6413
6414         * mini.c: Call the lazy fetch trampoline to get entries out of the
6415         runtime generic context.
6416
6417         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
6418         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
6419         tramp-sparc.c: Stubs for the lazy fetch trampoline.
6420
6421 2008-02-21  Mark Probst  <mark.probst@gmail.com>
6422
6423         * mini.c: Fetch data out of the extensible part of the runtime
6424         generic context instead of calling a helper function.
6425
6426         * generic-sharing.c: Some functions moved into
6427         metadata/generic-sharing.c.  Helper function for fetching other
6428         types now checks and asserts against extensible rgctx (just for
6429         debugging purposes - the helper function isn't called anymore
6430         unless for debugging).
6431
6432 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
6433
6434         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
6435         for tail calls up to the point that the tests in iltests.exe run. Also add a
6436         dummy CKFINITE implementation.
6437         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
6438         needed for trampoline LMF frames.
6439
6440         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
6441         trampoline LMF frames.
6442
6443 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
6444
6445         * mini.c (inline_method): clean any pending loader error when inlining fail.
6446         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
6447
6448 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
6449
6450         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
6451
6452         * aot-runtime.c (decode_patch_info): Ditto.
6453
6454         * mini.c (mono_resolve_patch_target): Ditto.
6455         
6456         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
6457         icall wrappers.
6458
6459         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
6460         
6461         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
6462         if it references an icall address.
6463
6464 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
6465
6466         * cpu-s390x.md: Remove some more unused opcodes.
6467         
6468         * cpu-s390x.md: Remove some unused opcodes.
6469
6470         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
6471         mono_op_imm_to_op ().
6472
6473         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
6474         instead of a switch statement.
6475         
6476         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
6477         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
6478
6479         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
6480         
6481         * mini-codegen.c: Remove unused mono_regstate2_... functions.
6482
6483         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
6484         -1.
6485
6486 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
6487
6488         * driver.c (mono_main): Improve error reporting when an assembly cannot be
6489         opened. Fixes #362607.
6490
6491         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
6492
6493         * iltests.il.in: Add a test for static methods in interfaces.
6494
6495 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
6496
6497         * genmdesc.c (build_table): Fix a crash on older glib versions.
6498
6499         * cpu-sparc.md: Remove some unused opcodes.
6500         
6501         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
6502         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
6503
6504         * cpu-amd64.md: Remove some unused opcodes.
6505
6506         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
6507         like the other opcodes.
6508
6509 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
6510
6511         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
6512
6513         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
6514
6515         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
6516         variables 'cfg' instead of 'm' for consistency.
6517
6518         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
6519
6520         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
6521         argument holding the vtype return address, to avoid the ambigious use of
6522         cfg->ret for this purpose.
6523
6524         * mini.c (NEW_RETLOADA): Use vret_addr if set.
6525
6526         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
6527         
6528         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
6529         new mono_print_ins () function which only takes one argument.
6530
6531 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
6532
6533         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
6534         macro arguments.
6535
6536 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
6537
6538         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
6539
6540         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
6541
6542         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
6543         opcodes and other small changes.
6544
6545         * mini-ops.h: Add some new opcodes from the linear IR branch.
6546
6547         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
6548
6549         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
6550         opcodes, use the REG_MEMBASE opcodes instead.
6551         
6552         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
6553         opcodes, use the REG_MEMBASE opcodes instead.
6554         
6555         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
6556         linear IR branch.
6557
6558         * mini.c (mono_op_imm_to_op): New helper function.
6559
6560         * mini-ops.h: Add some opcodes from linear IR branch.
6561
6562 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
6563
6564         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
6565         <tsv@solvo.ru>.
6566
6567 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
6568
6569         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
6570         OP_ICONV_TO_R4/R8.
6571
6572         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
6573
6574 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
6575
6576         * aot-compiler.c (emit_method_code): Add an assert.
6577
6578         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
6579         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
6580         methods.
6581
6582 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
6583
6584         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
6585         some load/store opcodes so they are consistent. 
6586         (mono_arch_emit_prolog): Simplify some code.
6587
6588         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
6589
6590         * objects.cs: Add tests for large argument offsets on ARM.
6591
6592         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
6593         stack offsets. Fixes #359651.
6594
6595         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
6596
6597         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
6598
6599         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
6600
6601         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
6602
6603         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
6604
6605         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
6606         rid of CEE_CONV_R_UN.
6607
6608         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
6609
6610 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
6611
6612         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
6613
6614         * mini.c (mono_normalize_opcodes): Add some more opcodes.
6615
6616         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
6617
6618         * cpu-amd64.md: Remove some unused opcodes.
6619
6620         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
6621
6622         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
6623
6624         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
6625         arch specific functions for its parts. Call the peephole pass after local
6626         regalloc so the prolog can compute a more accurate max_offset.
6627         
6628         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
6629         the corresponding OP_I/OP_L opcodes.
6630
6631         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
6632
6633         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
6634
6635 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
6636
6637         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
6638         as they are handled in mini.c.
6639
6640         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
6641         
6642         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
6643         case since it is handled in mini.c.
6644
6645         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
6646
6647         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
6648
6649         * *.c: Use the new opcodes in the IR and back end code.
6650
6651         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
6652
6653         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
6654
6655 2008-02-06  Mark Probst  <mark.probst@gmail.com>
6656
6657         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
6658         an assert because it has a race condition.
6659
6660 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
6661
6662         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
6663
6664         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
6665
6666         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
6667
6668         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
6669         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
6670
6671 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
6672
6673         * cpu-amd64.md (move): Correct the maximum size of move.
6674
6675 2008-02-05  Mark Probst  <mark.probst@gmail.com>
6676
6677         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
6678         the generic class init trampoline to return quickly if the class
6679         is already inited.
6680
6681 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
6682
6683         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
6684         issues where an 32 bit callsite cannot be patched by a 64 bit address.
6685
6686 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
6687
6688         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
6689         branch.
6690
6691 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
6692
6693         * objects.cs: Add some soft-float tests.
6694
6695         * mini.c: Fix a couple more soft-float issues.
6696
6697         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
6698
6699         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
6700         avoid a REX prefix.
6701
6702 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
6703
6704         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
6705         exception happens while compiling a virtual method.
6706
6707 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
6708
6709         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
6710         
6711         * mini-sparc.c: Fix build.
6712
6713         * mini-sparc.c (get_call_info): Add support for generic sharing.
6714
6715         * mini-exceptions.c: Add a FIXME.
6716
6717 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
6718
6719         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
6720         altstack handling code.
6721
6722         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
6723         
6724         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
6725
6726         * mini-s390.c: Add support for generic sharing.
6727
6728         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
6729         Fix CAS on s390.
6730         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6731
6732         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
6733
6734         * mini-s390x.c: Add support for generic sharing.
6735         
6736         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
6737         Fix CAS on ia64.
6738         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6739
6740         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
6741         can be used since it takes a 16 bit signed immediate.
6742
6743         * inssel-s390x.brg: Fix OP_SETRET.
6744
6745         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
6746
6747         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
6748
6749         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
6750
6751         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
6752
6753         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
6754         in one place.
6755
6756         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
6757         stuff.
6758
6759         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
6760         of the unused mono_arch_patch_delegate_trampoline stuff.
6761
6762 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
6763
6764         * basic-long.cs: Move the fp related tests to basic-float.cs.
6765
6766         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
6767
6768         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
6769
6770         * basic-calls.cs: Add a test for proper float argument passing.
6771
6772         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
6773         if the context corresponds to an exception received through a signal.
6774
6775         * exceptions.cs: Add a test for nullref handling at the start of a try
6776         clause.
6777
6778         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
6779
6780         * jit-icalls.c (mono_break): New JIT icall.
6781
6782         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
6783
6784         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
6785
6786 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
6787
6788         * cpu-*.md: Get rid of unused opcodes.
6789
6790         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
6791
6792         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
6793         by all platforms.
6794
6795         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
6796         define.
6797
6798         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
6799         the arch independent trampoline code in mini-trampolines.c.
6800
6801         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
6802
6803         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
6804
6805         * mini-s390.h: Remove an unused define.
6806         
6807         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
6808         the arch independent trampoline code in mini-trampolines.c.
6809
6810         * mini-arm.c (mono_arch_emit_prolog): Fix build.
6811
6812 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
6813
6814         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
6815
6816         * mini-s390.c (mono_arch_emit_prolog): Fix build.
6817
6818         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
6819
6820         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
6821
6822         * cpu-amd64.md: Use smaller sizes for int opcodes.
6823
6824         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
6825
6826         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
6827         objects.cs.
6828
6829         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
6830         debugging.
6831
6832         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
6833         instead of though a pointer to save an indirection when accessing elements of
6834         the array.
6835
6836         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
6837         some typos.
6838         (NOT_IMPLEMENTED): New helper macro.
6839         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
6840         of a bb.
6841
6842         * *.c: Use the new helper macro.
6843
6844 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
6845
6846         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
6847
6848 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
6849
6850         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
6851         stack slots.
6852
6853 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
6854
6855         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
6856         profiling is enabled.
6857         
6858         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
6859         the end.
6860         (mono_arch_emit_prolog): Add more first bblock optimizations.
6861
6862         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
6863         in order if possible.
6864         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
6865         bblock, since the arguments are still in their original registers.
6866
6867         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
6868
6869 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
6870
6871         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
6872         as well.
6873
6874         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
6875         offset 0.
6876
6877         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
6878
6879         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
6880         process async exceptions received while in unmanaged code.
6881
6882         * mini.c (mini_init): Install a callback with the runtime which will be called
6883         when a thread receives an async exception while in unmanaged code.
6884
6885         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
6886
6887         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
6888
6889 2008-01-16  Wade Berrier  <wberrier@novell.com>
6890
6891         * cpu-g4.md:
6892         * cpu-arm.md:
6893         * cpu-s390x.md:
6894         fix build
6895
6896 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
6897
6898         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
6899         compilation with sun cc.
6900
6901         * cpu-*.md: Fix the build.
6902
6903         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
6904
6905         * mini-amd64.h: Add some comments to the MonoLMF structure.
6906
6907         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
6908         
6909         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
6910         in the LMF structure if possible. This saves two instructions in the
6911         managed->native wrappers.
6912
6913         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
6914
6915 2008-01-16  Mark Probst  <mark.probst@gmail.com>
6916
6917         * generic-sharing.c: New type argument lookup code which uses the
6918         runtime generic context template.
6919
6920 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
6921
6922         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
6923
6924         * mini-arm.c (add_general): Fix arm eabi parameter passing.
6925         (mono_arch_output_basic_block): Fix localloc implementation.
6926
6927         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
6928
6929         * mini-ia64.c (peephole_pass): Fix ia64 build.
6930
6931         * mini-amd64.c (peephole_pass): Fix a warning.
6932         
6933         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
6934         at a constant offset from sp/fp.
6935
6936         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
6937         instead of obtaining it from *lmf in the managed method case.
6938
6939 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
6940
6941         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
6942
6943 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
6944
6945         * mini.h (MonoInstList): New type.
6946         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
6947         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
6948         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
6949         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
6950         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
6951         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
6952         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
6953         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
6954         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
6955         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
6956         MONO_INST_LIST_FOR_EACH_ENTRY,
6957         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
6958         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
6959         mono_inst_list_first, mono_inst_list_last,
6960         mono_inst_list_next, mono_inst_list_prev): New instruction
6961         list handling interfaces.
6962         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
6963         list head 'ins_list'.
6964         (MonoInst): Replace next pointer with list head 'node'.
6965         (MonoCallInst): Make 'out_args' a MonoInstList.
6966         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
6967         (MonoCompile): Delete reverse_inst_list and
6968         reverse_inst_list_len.
6969         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
6970         mono_arch_lowering_pass, mono_arch_local_regalloc,
6971         mono_arch_output_basic_block, mono_arch_emit_prolog):
6972         Convert to new instruction lists.
6973         (insert_after_ins): Delete.
6974         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
6975         instruction lists.
6976         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
6977         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
6978         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
6979         mono_emulate_opcode, mono_emit_load_got_addr,
6980         inline_method, mono_method_to_ir, mono_print_bb_code,
6981         print_dfn, decompose_pass, nullify_basic_block,
6982         replace_out_block_in_code, remove_block_if_useless,
6983         merge_basic_blocks, move_basic_block_to_end,
6984         try_unsigned_compare, optimize_branches, mono_print_code,
6985         mini_select_instructions, remove_critical_edges): Likewise.
6986         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
6987         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
6988         mono_arch_output_basic_block, mono_arch_emit_prolog):
6989         Likewise.
6990         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
6991         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
6992         mono_arch_output_basic_block): Likewise.
6993         (inst_list_prepend, insert_after_ins): Delete.
6994         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
6995         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
6996         instruction lists.
6997         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
6998         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
6999         mono_arch_emit_prolog): Likewise.
7000         * cfold.c (mono_constant_fold): Likewise.
7001         * liveness.c (visit_bb, mono_analyze_liveness,
7002         optimize_initlocals): Likewise.
7003         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
7004         * graph.c (mono_draw_code_cfg): Likewise.
7005         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
7006         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
7007         mono_ssa_cprop): Likewise.
7008         * abcremoval (get_relations_from_previous_bb, process_block):
7009         Likewise.
7010         * local-propagation (mono_cprop_invalidate_values,
7011         mono_local_cprop_bb): Likewise.
7012         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
7013         peephole_pass, mono_arch_output_basic_block,
7014         mono_arch_emit_prolog): Likewise.
7015         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
7016         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7017         mono_arch_emit_prolog): Likewise.
7018         (insert_after_ins): Delete.
7019         * aliasing.c (print_code_with_aliasing_information,
7020         mono_build_aliasing_information, mono_aliasing_deadce):
7021         Convert to new instruction lists.
7022         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
7023         peephole_pass, NEW_INS, mono_arch_lowering_pass,
7024         mono_arch_local_regalloc, mono_arch_output_basic_block):
7025         Likewise.
7026         (insert_after_ins): Delete.
7027         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
7028         peephole_pass, mono_arch_output_basic_block): Convert to
7029         new instruction lists.
7030         * mini-codegen (InstList, inst_list_prepend,
7031         insert_after_ins): Delete.
7032         (insert_before_ins, get_register_force_spilling,
7033         get_register_spilling, free_up_ireg, free_up_reg,
7034         create_copy_ins, create_spilled_store, alloc_int_reg,
7035         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
7036         to new instruction lists.
7037         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
7038         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7039         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
7040         (insert_after_ins): Delete.
7041         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
7042         mono_arch_local_regalloc, mono_arch_output_basic_block,
7043         mono_arch_call_opcode): Convert to new instruction lists.
7044         (insert_after_ins): Delete.
7045         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
7046         peephole_pass, mono_arch_output_basic_block,
7047         mono_arch_emit_prolog): Convert to new instruction lists.
7048
7049 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
7050
7051         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
7052
7053         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
7054         Fixes #353182.
7055
7056         * Makefile.am (version.h): Make this work with non-bash shells.
7057
7058 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
7059
7060         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
7061
7062 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
7063
7064         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
7065         the InitializeArray optimization.
7066
7067 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
7068
7069         * mini.c driver.c: Don't include os/gc_wrapper.h.
7070
7071 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
7072
7073         * mini.c (print_jit_stats): Print GC statistics if available.
7074
7075 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
7076
7077         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
7078
7079 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
7080
7081         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
7082
7083 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
7084
7085         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
7086         
7087         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
7088
7089         * driver.c (mono_main): Ditto.
7090
7091 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
7092
7093         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
7094
7095         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
7096         in the vtable can't be encoded.
7097         (compile_method): Ditto.
7098
7099 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
7100
7101         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
7102         defined.
7103
7104         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
7105         lmf->rbp.
7106
7107         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
7108         the top LMF entry belongs to the current method.
7109
7110         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
7111
7112 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
7113
7114         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
7115         
7116         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
7117
7118         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
7119
7120         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
7121
7122         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
7123
7124         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
7125         implementation.
7126
7127         * basic-float.cs: Add an ulong->double cast test.
7128
7129 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
7130
7131         * mini.c (mono_method_to_ir): Fix a warning.
7132
7133 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
7134
7135         * mini-ops.h: Add OP_SWITCH.
7136
7137         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
7138         CEE_SWITCH in back-end code, use OP_SWITCH instead.
7139
7140 2007-12-11  Geoff Norton  <gnorton@novell.com>
7141
7142         * mini-s390x.c: Minor change to the MAX() define to allow
7143         it to compile with other gcc versions.
7144
7145 2007-12-11  Geoff Norton  <gnorton@novell.com>
7146
7147         * cpu-s390x.md:
7148         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
7149
7150 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
7151
7152         exceptions-arm.c (mono_arch_get_restore_context): Restore
7153         the frame pointer.
7154
7155         exceptions-arm.c (throw_exception): Save the frame pointer.
7156         This is a partial fix for #323747. Only the client side is
7157         fixed.
7158
7159 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
7160
7161         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
7162         was using an unrelated variable to log the class which
7163         needed the cctor to be called. This was crashing on arm.
7164
7165 2007-12-09  Robert Jordan  <robertj@gmx.net>
7166
7167         * mini-x86.c (mono_arch_emit_epilog):
7168         Consider all kinds of 64-bit types. Fixes #323114.
7169
7170 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
7171
7172         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
7173
7174 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7175
7176         * mini-amd64.c (peephole_pass): Add a missing instruction check.
7177
7178 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7179
7180         * mini.c: run type ctor before allocating an object, not only
7181         when running it's constructor method (fixes at least part of bug #342507).
7182
7183 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7184         
7185         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
7186         
7187         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
7188         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
7189         function.
7190
7191         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
7192         mono_generic_class_init_trampoline () the same as it is done with the other
7193         trampolines.
7194
7195         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
7196         aot-runtime.c aot-compiler.c: Implement AOT support.    
7197
7198 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7199
7200         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
7201         build for archs which don't have the vtable trampoline defined
7202         yet.
7203
7204 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7205
7206         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
7207
7208         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
7209
7210         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
7211
7212         * tramp-<ARCH>.c: Use the new helper function.
7213
7214 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7215
7216         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
7217         trampoline call, which takes a vtable argument.
7218
7219         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
7220         OP_TRAMPCALL_VTABLEs like other calls.
7221
7222         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
7223         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
7224         call.  Implemented a support function which fetches the vtable
7225         from a register set.
7226
7227         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
7228         Implemented a generic class init trampoline, using the
7229         OP_TRAMPCALL_VTABLE opcode.
7230
7231         * mini.c: Implemented static field access when sharing generic
7232         code.  This implies initing the class using the new
7233         OP_TRAMPCALL_VTABLE call.
7234
7235 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7236
7237         * mini.c: Don't compile methods with sharing enabled if their
7238         classes are disabled for sharing.
7239
7240 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
7241
7242         * inssel.brg: Add a missing sign extension to the GETCHR and array access
7243         opcodes. Fixes #346563.
7244
7245         * objects.cs: Add a new test.
7246
7247         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
7248
7249         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
7250         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
7251
7252 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
7253
7254         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
7255
7256 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
7257
7258         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
7259         code stream.
7260
7261 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
7262
7263         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
7264
7265         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
7266         optimization in the AOT case.
7267         
7268 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
7269
7270         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
7271         
7272         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
7273
7274         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
7275
7276         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
7277
7278         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
7279         is created by the inlined delegate ctor.
7280
7281         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
7282
7283         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
7284
7285 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
7286
7287         * cpu-x86.md: Fix the length of ckfinite.
7288
7289 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
7290
7291         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
7292         
7293         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
7294         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
7295
7296         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
7297
7298         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
7299         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
7300
7301 2007-11-28  Martin Baulig  <martin@ximian.com>
7302
7303         * mini-x86.c
7304         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
7305         after creating the trampoline.
7306
7307 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
7308
7309         * aot-runtime.c (load_aot_module): Check runtime version if needed.
7310
7311         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
7312         the same version.
7313
7314         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
7315         instead of the calling method to help AOT.
7316
7317         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
7318
7319 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
7320
7321         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
7322         is defined.
7323
7324 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
7325
7326         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
7327         
7328         * aot-compiler.c (compile_method): Correct check for generic method definitions.
7329         (encode_method_ref): No need to handle generic method definitions specially.
7330
7331         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
7332
7333         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
7334         decode_klass_info.
7335
7336         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
7337         encode_klass_info.
7338         (compile_method): Enable generic sharing.
7339
7340 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
7341
7342         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
7343         (mini_method_compile): Add preliminary support for AOTing shared generic code.
7344
7345         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
7346         generic code.
7347
7348         * mini-trampolines.c: Fix a warning.
7349
7350         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
7351         NEW_PCONST.
7352         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
7353         (generic_class_is_reference_type): Remove unused function.
7354
7355         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
7356         in the generic vtable trampoline case.
7357
7358         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
7359         
7360         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
7361         return an AOT method based on a vtable slot.
7362
7363         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
7364
7365         * mini.c (mini_get_vtable_trampoline): Export this.
7366
7367 2007-11-22  Martin Baulig  <martin@ximian.com>
7368
7369         * debug-debugger.h
7370         (MonoDebuggerInfo): Move `debugger_version' up.
7371
7372 2007-11-22  Martin Baulig  <martin@ximian.com>
7373
7374         * mini-amd64.c
7375         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
7376
7377         * mini-trampolines.c
7378         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
7379         after compiling the method.
7380
7381 2007-11-20  Martin Baulig  <martin@ximian.com>
7382
7383         * debug-mini.c
7384         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
7385         (mono_debugger_remove_breakpoint): Likewise.
7386         (mono_debugger_check_breakpoints): Likewise.
7387
7388         * debug-debugger.c: Implement the new breakpoint interface here.
7389
7390 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
7391
7392         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
7393         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
7394
7395         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
7396
7397 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
7398
7399         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
7400
7401         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
7402         mini.c.
7403
7404         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
7405         mini.c.
7406
7407         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
7408         returning a vtype in a register.
7409
7410         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
7411         here from the arch specific code.
7412
7413         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
7414         mini.c.
7415
7416         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
7417         (mono_arch_emit_prolog): Increment maximum prolog size.
7418
7419         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
7420         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
7421
7422         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
7423         MonoGenericSharingContext.
7424
7425         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
7426         MonoGenericSharingContext. Allocate memory from the cfg mempool.
7427
7428 2007-11-15  Mark Probst  <mark.probst@gmail.com>
7429
7430         * mini.c, mini.h, generic-sharing.c: Functions for producing code
7431         which extract fields out of the runtime generic context.  Full
7432         sharing of the NEWARR opcode.
7433
7434 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
7435
7436         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
7437         --enable-minimal=ssa.
7438
7439 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
7440
7441         * mini-trampolines.c (mono_delegate_trampoline): Update after 
7442         mono_marshal_get_delegate_invoke () signature change.
7443
7444 2007-11-13  Mark Probst  <mark.probst@gmail.com>
7445
7446         * mini.c: Removed the shared context in favor of the generic
7447         sharing context.  Allocate the MonoJitInfo structure with room for
7448         the generic sharing context if it's needed.
7449
7450         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
7451         domain-internals.h now.
7452
7453         * mini-x86.c: Pass the generic sharing context to get_call_info ().
7454
7455         * generic-sharing.c: Several changes for working without a shared
7456         context and instead operating on open types instead.
7457
7458 2007-11-12  David S. Miller  <davem@davemloft.net>
7459
7460        * inssel-sparc.brg: Fix double instruction emit.
7461
7462 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
7463
7464         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
7465         Get/Set/Address methods.
7466         
7467         * mini.c debug-debugger.c mini-trampolines.c: Update after 
7468         mono_marshal_get_delegate_invoke signature change.
7469
7470 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
7471
7472         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
7473         This can happens with dynamic methods. Fixes the other bug in #322722.
7474
7475 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
7476
7477         * tramp-arm.c (mono_arch_patch_callsite): Support patching
7478         BX call sequence.
7479
7480         * mini-arm.c (arm_patch): Implement patching of BX call
7481         sequence. Fixes one of the bugs in #322722.
7482
7483 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
7484
7485        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
7486        under Linux.  We only need to flush every 32-byte cache line.    
7487
7488 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
7489
7490         * mini.c:
7491         move_basic_block_to_end: Add branches when needed, eventually creating
7492         a new BB.
7493         optimize_branches: added a parameter that tells if it's ok to create
7494         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
7495         and avoid calling move_basic_block_to_end when it's not ok.
7496         Fixes bug 318677.
7497
7498 2007-11-07  Mark Probst  <mark.probst@gmail.com>
7499
7500         * mini.c: Abort inlining call to InitializeArray if something
7501         looks wrong.  Let the icall handle it, which now has proper safety
7502         checks.
7503
7504 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
7505
7506         * mini.c (mono_spill_call): add support for soft-float.
7507
7508         * mini.c (mono_method_to_ir): add support for soft-float
7509         to inlined functions that return float.
7510
7511         * mini.c (mono_method_to_ir): add support for soft-float
7512         to cee_stsfld opcode on float fields.
7513
7514 2007-11-05  Geoff Norton  <gnorton@novell.com>
7515
7516         * mini-x86.h: Fix the structure access for X86 Leopard.
7517
7518
7519 2007-11-05  Martin Baulig  <martin@ximian.com>
7520
7521         * mini-trampolines.c
7522         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
7523         after compiling the method to notify the debugger.
7524
7525 2007-11-05  Martin Baulig  <martin@ximian.com>
7526
7527         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
7528
7529 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
7530
7531         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
7532         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
7533
7534 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
7535
7536         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
7537         native-to-managed wrappers.
7538         
7539 2007-11-01  Geoff Norton  <gnorton@novell.com>
7540
7541         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
7542         members.
7543
7544 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7545
7546         * mini.c, mini-x86.c: when getting back from unmanaged code
7547         to managed via a marshaled delegate we also need to set the
7548         right domain.
7549
7550 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7551
7552         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
7553         for amd64.
7554
7555 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
7556
7557         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
7558         let the debugger or other external agents to tell the JIT when
7559         a sw breakpoint has been inserted in the code that the JIT needs
7560         to be able to inspect.
7561
7562 2007-10-31  Martin Baulig  <martin@ximian.com>
7563
7564         * debug-debugger.h
7565         (MonoDebuggerInfo): Remove `runtime_class_init'.
7566
7567 2007-10-30  Martin Baulig  <martin@ximian.com>
7568
7569         * debug-mini.h
7570         (mono_debugger_thread_created): Added `MonoThread *' argument.
7571         (mono_debugger_extended_notification): New public method.
7572         (mono_debugger_trampoline_compiled): New public method.
7573
7574         * debug-mini.c
7575         (MonoDebuggerThreadInfo): Added `thread' and
7576         `extended_notifications' fields.
7577
7578         * debug-debugger.c
7579         (debugger_executable_code_buffer): New static variable.
7580
7581         * debug-debugger.h
7582         (MonoDebuggerInfo): Added `executable_code_buffer',
7583         `executable_code_buffer_size', `breakpoint_info_area',
7584         `breakpoint_table' and `breakpoint_table_size'.
7585
7586 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
7587
7588         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
7589         that IP  either is an unused value or the vtable pointer. IMT 
7590         calls use vtable + offset now. Reduced by almost half the size
7591         of IMT entries.
7592
7593 2007-10-26  Jonathan Chambers <joncham@gmail.com>
7594
7595         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
7596         defines to access param registers. Replace long usage with
7597         gsize as sizeof(long) != sizeof(void*) on Win64.
7598
7599         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
7600         on Win64. Fix intrinsic, use _AddressOfReturnAddress
7601         instead of non-existant _GetAddressOfReturnAddress.
7602
7603         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
7604         param registers. Save/restore %rdi and %rsi in MonoLMF.
7605
7606         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
7607         param registers. Modify (throw_exception) signature to take 
7608         %rdi and %rsi on Win64. 
7609
7610         Code is contributed under MIT/X11 license.
7611
7612 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7613
7614         * helpers.c: unlink debugging output files.
7615
7616 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
7617
7618         * mini.c: Move mono_create_ftnptr () to object.c.
7619
7620 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
7621
7622         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
7623         optional. This function can now be used to disassemble code generated
7624         outside the JIT such as trampolines and IMT thunks.
7625
7626         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
7627
7628         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
7629         vtable pointer from a ldr instruction.
7630
7631         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
7632         new IMT call sequence.
7633
7634         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
7635         call sequence for interface invocations.
7636
7637         * mini-arm.c (mono_arch_emit_imt_argument): added, required
7638         for imt support. This function is empty since IMT on ARM requires no
7639         special handling on the IR side.
7640
7641         * mini-arm.c (mono_arch_find_imt_method): added, required for
7642         imt support.
7643
7644         * mini-arm.c (mono_arch_find_this_argument): added, required
7645         for imt support.
7646
7647         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
7648         a ldr instruction to load a value stored in the code stream.
7649
7650         * mini-arm.c (mono_arch_build_imt_thunk):added, required
7651         for imt support.
7652
7653
7654 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
7655
7656         * mini.c (mini_init): Install the jump trampoline callback.
7657
7658 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7659
7660         * mini-trampolines.c: handle synchronized methods with the common
7661         vtable trampoline (bug #335601).
7662
7663 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
7664
7665         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
7666
7667         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
7668         64 bit platforms.
7669
7670         * mini-ia64.h mini-ia64.c: Add support for IMT.
7671
7672         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
7673         prolog. Fixes #331958.
7674
7675 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
7676
7677         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
7678
7679 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7680
7681         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
7682         trampoline.
7683
7684 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7685
7686         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
7687         trampoline.
7688
7689 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
7690
7691         * mini-x86.c, mini-x86.h: x86 support for the common vtable
7692         trampoline.
7693
7694 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
7695
7696         * mini-trampolines.c: changed the magic rampoline to understand
7697         the common vtable trampoline method: the method to invoke is
7698         determined by the vtable displacement of the call.
7699
7700 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7701
7702         * mini.c, mini.h: register the common vtable trampoline if the
7703         architecture supports it.
7704
7705 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7706
7707         * cpu-amd64.md: use the correct max length for tls_get.
7708
7709 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
7710
7711         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
7712         CEE_STELEM_ANY. Fixes #333696.
7713
7714 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
7715
7716         * exceptions-x86.c: provide more graceful handling of the case where
7717         we followed a bogus function pointer from managed code (bug #332866).
7718
7719 2007-10-11  Mark Probst  <mark.probst@gmail.com>
7720
7721         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
7722         replaces the generic_shared flag and will carry more information
7723         in the future.
7724
7725         * generic-sharing.c: Added mini_type_stack_size() which allows
7726         allows open types if given a generic sharing context.
7727         mini_get_basic_type_from_generic() takes a
7728         MonoGenericSharingContext* instead of a MonoCompile* now.
7729
7730         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
7731         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
7732         mini-sparc.c, mini-x86.c: Trivial changes required by the two
7733         changes above.  Just passing arguments through to the right
7734         places.
7735
7736 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7737
7738         * mini-arm.c: unify the call emission to emit_code_seq().
7739
7740 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
7741
7742         * tramp-arm.c: reduced the trampoline size.
7743
7744 2007-10-10  Mark Probst  <mark.probst@gmail.com>
7745
7746         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
7747         variable handling out of arch-specific code.
7748
7749 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7750
7751         * mini-arm.c: implemented fast delegate dispatch.
7752
7753 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
7754
7755         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
7756         that fp elimination is turned off if the space required by locals is too
7757         big. Fixes #331958.
7758
7759 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7760
7761         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
7762         ARM to the new style trampoline.
7763
7764 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
7765
7766         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
7767
7768         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
7769
7770 2007-10-09  Martin Baulig  <martin@ximian.com>
7771
7772         * debug-debugger.h
7773         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
7774         `field_info_offset_offset'.     
7775
7776 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
7777
7778         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
7779         removed more internal usage of the r11 register and made it available
7780         to the register allocator.
7781
7782 2007-10-08  Mark Probst  <mark.probst@gmail.com>
7783
7784         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
7785         when sharing generics and treat type variables as references.
7786
7787 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7788
7789         * mini-ppc.c: started removing the internal uses of register r11
7790         to eventually allow the register allocator to manage it as an
7791         additional available register.
7792
7793 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
7794
7795         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
7796
7797 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
7798
7799         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
7800         specific trampolines as they are not performance critical as a jump
7801         target (maybe align as before only for AOT code?). This saves about
7802         200 KB of native code on x86 for monodevelop startup.
7803
7804 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
7805
7806         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
7807         monodevelop startup.
7808
7809 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
7810
7811         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
7812
7813         * mini-sparc.h mini-sparc.c: Implement IMT support.
7814
7815         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
7816         its smaller and doesn't clobber sparc_g1.
7817
7818         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
7819
7820 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7821
7822         * mini-ppc.c: optimized the size of the IMT thunks a bit.
7823
7824 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
7825
7826         * mini-ppc.c: implemented fast delegate invocation.
7827
7828 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
7829
7830         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
7831
7832 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7833
7834         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
7835         code to the new style trampoline in preparation for IMT support.
7836
7837 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
7838
7839         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
7840         systems already. This also reduces the specific trampiline sizes and
7841         prepares for the use of r12 as the IMT identifier register.
7842
7843 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7844
7845         * mini-mips.h: endianess fix (simplified from a patch by
7846         Thomas Kunze <thommy@tabao.de>, bug #323737).
7847
7848 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7849
7850         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
7851         to access ucontext fields and enable netbsd support
7852         (partially from Magnus Henoch <mange@freemail.hu>).
7853
7854 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7855
7856         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
7857         use the preprocessor from the CPP env var if it is set.
7858
7859 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7860
7861         * mini-trampolines.c: fixed an assertion and moved it earlier in the
7862         code, before interface_offset gets used.
7863
7864 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
7865
7866         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
7867         mono_class_setup_vtable () before accessing klass->vtable.
7868
7869 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
7870
7871         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
7872         hackish.
7873
7874 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7875
7876         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
7877         IMT slots (this saves hundreds of KB of memory in programs like
7878         IronPython and Monodevelop).
7879
7880 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
7881
7882         * mini.c: print the delegate counter.
7883
7884 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
7885
7886         * mini-x86.c: make it easier to enable the debugging code for IMT
7887         slots.
7888
7889 2007-09-28  Martin Baulig  <martin@ximian.com>
7890
7891         * debug-debugger.h
7892         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
7893         `mono_method_klass_offset' and `mono_method_token_offset'.
7894
7895 2007-09-20  Mark Probst  <mark.probst@gmail.com>
7896
7897         * mini.c: First generics sharing implementation.  Can only share
7898         in very simple cases.  If sharing doesn't work it falls back to
7899         dedicated compilation.
7900
7901         * mini.h: Flag in MonoCompile to specify whether generic
7902         compilation is shared.  Flags enum for marking which generic inst
7903         of a context is used.  Prototypes for helper functions.
7904
7905         * generic-sharing.c: Helper functions for generic method sharing.
7906
7907         * optflags-def.h: Optimization flag (gshared) for enabling generic
7908         method sharing added.
7909
7910         * Makefile.am: generic-sharing.c added.
7911
7912 2007-09-19 Daniel Nauck <dna@mono-project.de>
7913
7914         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
7915
7916 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
7917         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
7918         fixes bug 325507.
7919
7920 2007-09-19  Martin Baulig  <martin@ximian.com>
7921
7922         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
7923         mono_debug_cleanup() is now part of mono_cleanup().
7924
7925 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
7926
7927         * driver.c (mono_main): Fix a warning.
7928
7929 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
7930
7931         * aot-compiler.c: Optimize various parts when processing large assemblies.
7932         Fixes ##325568.
7933
7934         * mini.c (mono_patch_info_hash): Improve hash function.
7935
7936 2007-09-14  Jonathan Chambers <joncham@gmail.com>
7937
7938         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
7939         
7940         Code is contributed under MIT/X11 license.
7941
7942 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
7943
7944         * mini.c (mini_init): Fix a leak.
7945
7946         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
7947
7948 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
7949
7950         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
7951
7952 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
7953
7954         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
7955
7956 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
7957
7958         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
7959         variance tests.
7960
7961         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
7962
7963         * mini.c (handle_alloc): Enable managed allocators in AOT code.
7964
7965         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
7966
7967         * aot-runtime.c (decode_patch_info): Ditto.
7968
7969 2007-09-12  Jonathan Chambers <joncham@gmail.com>
7970
7971         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
7972         static case. Cache delegates in architecture specific code, 
7973         based on number of parameters.
7974         
7975         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
7976         in architecture specific code, based on number of parameters.
7977         
7978         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
7979         caching happen in architecture specific code now.
7980         
7981         Code is contributed under MIT/X11 license.
7982
7983 2007-09-12  Jonathan Chambers <joncham@gmail.com>
7984
7985         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
7986         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
7987         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
7988
7989         Code is contributed under MIT/X11 license.
7990
7991 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
7992         * mini.c: (mono_thread_abort) Fixed bug #82416.
7993
7994 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
7995
7996         * mini.: hook the new managed GC allocation feature into the JIT.
7997
7998 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
7999
8000         * mini.c: implementation for the new runtime tls opcode.
8001
8002 2007-09-11  Martin Baulig  <martin@ximian.com>
8003
8004         * debug-debugger.h
8005         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
8006         `mono_method_inflated_offset'.
8007
8008 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
8009
8010         * driver.c mini.h mini.c: Add a new devel command line option for injecting
8011         async exceptions into a method.
8012
8013         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
8014         purpose of testing whenever the unwinder works at every instruction.
8015
8016 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
8017
8018         * mini.c: check accessibility of method used in ldftn (fixes
8019         bug #82635).
8020
8021 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
8022
8023         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
8024
8025         * inssel.brg: Fix a warning.
8026
8027 2007-09-03  Martin Baulig  <martin@ximian.com>
8028
8029         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
8030         now takes the `main_method' as argument.
8031
8032 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
8033
8034         * cpu-sparc.md (endfilter): Add missing src1:i argument.
8035
8036 2007-08-30  Jonathan Chambers <joncham@gmail.com>
8037
8038         * driver.c: include the cil-coff.h header on Windows.
8039         
8040         Code is contributed under MIT/X11 license.
8041
8042 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8043
8044         * mini.c, driver.c: don't include the cil-coff.h header.
8045
8046 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
8047
8048         * mini.c: flag places that needs fixes fo soft-float support.
8049
8050 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
8051
8052         * mini.h, inssel-float.brg: fix soft-float constant loads on big
8053         endian systems (partially from Dean Jenkins, bug #81924).
8054
8055 2007-08-28  Mark Probst  <mark.probst@gmail.com>
8056
8057         * mini.c (check_linkdemand): Remove embedded reference object in
8058         call to LinkDemandSecurityException.
8059         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
8060         with an IntPtr instead of a reference object.
8061
8062 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
8063
8064         * mini.c (handle_initobj): Handle alignment properly.
8065
8066         * inssel.brg (mini_emit_memset): Ditto. 
8067
8068         * inssel.brg (mini_emit_memcpy): Ditto. 
8069
8070         * inssel-sparc.brg: Ditto.              
8071
8072         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
8073
8074 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
8075
8076         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
8077         exceptions raised in unmanaged code. Fixes part of #82594.
8078
8079 2007-08-24  Mark Probst  <mark.probst@gmail.com>
8080
8081         * mini.c (mono_method_to_ir), declsec.c
8082         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
8083
8084 2007-08-22  Martin Baulig  <martin@ximian.com>
8085
8086         * debug-mini.h
8087         (MonoDebuggerThreadInfo): New typedef.
8088         (mono_debugger_thread_table): New global variable.
8089         (mono_debugger_thread_created): New public function.
8090         (mono_debugger_thread_cleanup): New public function.
8091
8092         * debug-debugger.h
8093         (MonoDebuggerInfo):
8094         - removed `get_current_thread' and `lookup_assembly'.
8095         - removed `data_table'.
8096         - added `thread_table'.
8097
8098         * mini.c
8099         (mono_thread_start_cb): Call mono_debugger_thread_created().
8100         (mono_thread_attach_cb): Likewise.
8101         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
8102         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
8103         initial domain.
8104
8105         * driver.c (mono_main): Move mono_debug_init() up, before calling
8106         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
8107
8108 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8109
8110         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
8111         together when passing several arguments of type double (gives a small
8112         speedup and saves a few bytes of generated code).
8113
8114 2007-08-20  Jb Evain  <jbevain@novell.com>
8115
8116         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
8117
8118 2007-08-20  Jb Evain  <jbevain@novell.com>
8119
8120         * mini.c (mono_method_to_ir): throw MethodAccessException
8121         and FieldAccessException instead of InvalidProgramException.
8122
8123 2007-08-20  Mark Probst  <mark.probst@gmail.com>
8124
8125         * mini.c: CoreCLR security checks.
8126
8127         * mini.h: Removed MonoSecurityMode (moved to
8128         metadata/security-manager.h) and mono_security_mode global var
8129         (replaced by set/get functions in security-manager.h).
8130
8131         * driver.c: Added "core-clr-test" security mode for testing.  Used
8132         set-function for setting security mode.
8133
8134 2007-08-17  Mark Probst  <mark.probst@gmail.com>
8135
8136         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
8137         the new jit_info_table.
8138
8139         * driver.c: Test code for the new jit_info_table (enabled by the
8140         define MONO_JIT_INFO_TABLE_TEST).
8141
8142 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
8143
8144         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
8145         detection of call <REG> instruction sequence. Fixes build on freebsd.
8146
8147 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
8148
8149         * mini-exceptions.c: Fix a warning.
8150
8151 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
8152
8153         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
8154         stack overflow handling code on amd64 too.
8155
8156         * mini-exceptions.c (mono_setup_altstack): Make this use 
8157         mono_thread_get_stack_bounds ().
8158
8159         * mini-x86.h: Disable sigaltstack on solaris x86.
8160
8161 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
8162
8163         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
8164
8165 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
8166
8167         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
8168
8169 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
8170
8171         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
8172
8173         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
8174
8175 2007-08-03  Neale Ferguson <neale@sinenomine.net>
8176
8177         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
8178         due to alignment.
8179
8180 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8181
8182         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
8183         to be emitted (bug #82281).
8184
8185 2007-08-01  Martin Baulig  <martin@ximian.com>
8186
8187         Merged the `debugger-dublin' branch.
8188
8189         * debug-debugger.h (MonoDebuggerInfo):
8190         Removed the `old_*' compatibility entries.
8191         Added `debugger_version' and `data_table'.
8192         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
8193         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
8194
8195         * debug-mini.c
8196         (MiniDebugMethodBreakpointInfo): Add `address_list'.
8197         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
8198         instead of a `gconstpointer'.
8199         (mono_debugger_insert_method_breakpoint): Return a
8200         `MonoDebugMethodAddressList *'.
8201
8202 2007-06-28  Martin Baulig  <martin@ximian.com>
8203
8204         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8205
8206 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
8207
8208         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
8209         __builtin_frame_address () since it is broken on older gcc versions.
8210
8211 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
8212
8213         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
8214         on the stack overflow handling and made the managed stack overflows
8215         catchable in most cases using soft guard pages.
8216         * exceptions-x86.c: added code to restore the protection in the soft
8217         guard pages at the end of exception handling.
8218
8219 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
8220
8221         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
8222
8223 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8224
8225         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
8226         exception handling.
8227
8228 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8229
8230         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
8231         signal handling support until it has been ported to the new mechanism.
8232         * mini.c: fixed stack overflow detection and use the new
8233         architecture code  to handle signals on the altstack.
8234
8235 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
8236
8237         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
8238         stack overflows on the alt stack.
8239
8240 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
8241
8242         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
8243         stack overflows on the alt stack.
8244
8245 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
8246
8247         * exceptions-ppc.c: cleanup preparing for altstack support.
8248
8249 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8250
8251         * exceptions-arm.c: cleanup preparing for altstack support.
8252
8253 2007-07-27  Mark Probst  <mark.probst@gmail.com>
8254
8255         * mini.c (print_jit_stats): Output hazard pointer stats.
8256
8257 2007-07-26  Mark Probst  <mark.probst@gmail.com>
8258
8259         * driver.c, mini.c: Replaced security mode flags with a single
8260         enum variable.
8261
8262 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8263
8264         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
8265
8266 2007-07-25  Mark Probst  <mark.probst@gmail.com>
8267
8268         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
8269         (which doesn't do anything yet) for activating Core CLR
8270         (Silverlight) security.
8271
8272 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
8273
8274         * mini-codegen.c: work around a possible gcc bug on arm.
8275
8276 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
8277
8278         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
8279         message for platforms that don't support AOT compilation.
8280
8281 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
8282
8283         * mini.h, mini.c, driver.c: temporary smcs hack.
8284
8285 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
8286
8287         * mini-arm.h, mini-arm.c: arm EABI fixes.
8288
8289 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
8290
8291         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
8292         case.
8293
8294         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
8295         trampolines taking a method argument.
8296
8297         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
8298
8299         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
8300         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
8301
8302         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
8303         JIT compilation throws an exception. Fixes #82050.
8304
8305 2007-07-19  Mark Probst  <mark.probst@gmail.com>
8306
8307         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
8308         with the MONO_EXCEPTION_ defines.
8309
8310 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
8311
8312         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
8313         #82117.
8314         
8315         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
8316         the cause of an assertion.
8317
8318 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
8319
8320         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
8321         removed.
8322
8323 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
8324
8325         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
8326         assert. Should fix #82103.
8327
8328 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
8329
8330         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
8331         here too. Fixes #82095.
8332
8333         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
8334         addresses.
8335
8336         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
8337
8338         * mini-amd64.h: Enable IMT for amd64.
8339         
8340         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
8341
8342 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
8343
8344         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
8345
8346 2007-07-12  Mark Probst  <mark.probst@gmail.com>
8347
8348         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
8349         as soon as check_linkdemand sets an exception_type.
8350
8351 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8352
8353         * mini-x86.c: fixed offsets for IMT call sequence.
8354         * mini-x86.h: enable IMT again.
8355
8356 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
8357
8358         * trace.c (mono_trace_enter_method): Decode MonoType too.
8359
8360         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
8361
8362         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
8363
8364         * mini-amd64.c: Add preliminary IMT implementation.
8365         
8366 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
8367
8368         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
8369         understand the new IMT-base interface invocation (thanks to
8370         Daniel Nauck for the report and the remote debugging session).
8371
8372 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
8373
8374         * mini-x86.c: size and speed optimizations for the IMT bsearch.
8375
8376 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
8377
8378         * Makefile.am (aotcheck): Make this actually use the AOTed code.
8379
8380 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
8381
8382         * mini-trampolines.c: implement AOT IMT support.
8383         * mini-x86.h: enable IMT support for wider testing.
8384
8385 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
8386
8387         * inssel.brg (emit_imt_argument): Add aot support here.
8388
8389         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
8390
8391 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
8392
8393         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
8394         of the IMT implementation, partially from massi, with my
8395         implementation of the bsearch sequence. Disabled by default until
8396         the AOT code is implemented.
8397
8398 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
8399
8400         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
8401
8402         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
8403
8404 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8405
8406         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
8407         arch-independent IMT JIT code from Massimiliano
8408         Mantione (massi@ximian.com) with small cleanups from me.
8409
8410 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8411
8412         * Makefile.am: fix svn invocation to get the svn revision to be
8413         independent of the local language (build fix).
8414
8415 2007-07-09  Mark Probst  <mark.probst@gmail.com>
8416
8417         * mini.c (inline_method): Reset cfg->exception_type if the
8418         inlining is aborted.  Fixes: 82049.
8419
8420 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
8421
8422         * mini.c: remove assert from exception handling code when exception_ptr
8423         is not set.
8424
8425 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
8426
8427         * mini.c (mono_codegen): Add an assert.
8428
8429         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
8430         enter and leave code.
8431         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
8432
8433 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8434
8435         * mini-ppc.c: fixed memory corruption for localloc(0)
8436         (bug #81852).
8437
8438 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
8439         
8440         * mini.c: Fix warnings.
8441
8442 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
8443
8444         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
8445         to emit better double->int conversions.
8446
8447 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8448
8449         * mini.c: the provided Min/Max optimizations are valid for unisgned
8450         ints.
8451
8452 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
8453
8454         * 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
8455
8456 2007-06-28  Miguel de Icaza  <miguel@novell.com>
8457
8458         * mini.c (mono_running_on_valgrind): Add support for reporting the
8459         method and  its boundaries to valgrind.
8460
8461 2007-06-28  Martin Baulig  <martin@ximian.com>
8462
8463         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8464
8465 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
8466
8467         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
8468
8469         * generic.2.cs: Add new test case.
8470
8471 2007-06-25  Martin Baulig  <martin@ximian.com>
8472
8473         Merged the `debugger-dublin' branch.
8474
8475         * debug-mini.c
8476         (mono_debugger_insert_method_breakpoint): New public method.
8477         (mono_debugger_remove_method_breakpoint): Likewise.
8478         (mono_debugger_check_breakpoints): New static method.
8479         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
8480
8481         * debug-debugger.h (MonoDebuggerInfo):
8482         Renamed (to keep backward compatibility in the vtable):
8483         `insert_breakpoint' -> `old_insert_breakpoint'.
8484         `remove_breakpoint' -> `old_remove_breakpoint'.
8485         `create_string' -> `old_create_string'.
8486         `lookup_class' -> `old_lookup_class'.
8487         `lookup_type' -> removed; changed into a dummy field.
8488         `lookup_assembly' -> `old_lookup_assembly'.
8489         Added (same functionality, but different signature):
8490         `create_string', `lookup_class', `lookup_assembly'
8491         Added new:
8492         `get_method_addr_or_bpt', `remove_method_breakpoint',
8493         `runtime_class_init'.
8494
8495         * debug-debugger.c: Merged the `debugger-dublin' branch.
8496
8497 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
8498
8499         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
8500         well.
8501         (peephole_pass): Likewise.
8502
8503 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
8504
8505         * driver.c: hopefully make setaffinity work also for ancient
8506         versions of linux.
8507
8508 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
8509
8510         * driver.c : win32 build fix.
8511
8512 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
8513
8514         * driver.c: check for the MONO_NO_SMP env var and bind to a single
8515         processor if it is set.
8516
8517 2007-06-21  Martin Baulig  <martin@ximian.com>
8518
8519         * debug-mini.h: New file.
8520
8521         * debug-mini.c
8522         (mono_debugger_insert_breakpoint_full): Moved here from
8523         ../metadata/mono-debug-debugger.c.
8524         (mono_debugger_remove_breakpoint): Likewise.
8525         (mono_debugger_breakpoint_callback): Likewise.
8526
8527 2007-06-15  Raja R Harinath  <rharinath@novell.com>
8528
8529         * jit-icalls.c (mono_helper_compile_generic_method): Update to
8530         changes in MonoGenericClass.
8531
8532 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
8533
8534         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
8535
8536 2007-06-14  Raja R Harinath  <rharinath@novell.com>
8537
8538         * jit-icalls.c (mono_helper_compile_generic_method): Update to
8539         removal of MonoGenericMethod.
8540
8541 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8542
8543         * mini-exceptions.c: hooks for the exception events profiling API.
8544
8545 2007-06-14  Randolph Chung  <tausq@debian.org>
8546
8547         * Makefile.ma: Add hppa target.
8548         * mini-arch.h: Include mini-hppa.h
8549         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
8550         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
8551         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8552
8553 2007-06-14  Randolph Chung  <tausq@debian.org>
8554
8555         * inssel.brg: Add rules for "chained" compare-branch operations so that
8556         a single compare op can affect multiple branches.  Adjust cost for
8557         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
8558         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
8559         cost for some rules so that they can more easily be overridden by
8560         per-arch rules (with fixes from lupus).
8561         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8562
8563 2007-06-13  Randolph Chung  <tausq@debian.org>
8564
8565         * mini-ops.h: Reorder branch ops so that they match the order of the
8566         corresponding CEE_* ops.  The code expects them this way.
8567         Add new ops for HPPA target.
8568         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8569
8570 2007-06-13  Randolph Chung  <tausq@debian.org>
8571
8572         * mini-exceptions.c: Handle cases where the stack grows towards
8573         larger addresses.
8574         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8575
8576 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8577
8578         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
8579         counter.
8580         * driver.c: explain where a non-matching corlib is found.
8581
8582 2007-06-13  Mark Probst  <mark.probst@gmail.com>
8583
8584         * mini.c (print_jit_stats): Output dynamic code allocation stats.
8585
8586 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
8587
8588         * mini-exceptions.c: Generate a method profile leave event during
8589         an exception to ensure that the profiler gets notified.
8590
8591 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
8592
8593         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
8594         branch.
8595
8596         * cpu-amd64.md: Add long_and/or/xor opcodes.
8597
8598 2007-06-06  Wade Berrier  <wberrier@novell.com>
8599
8600         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
8601         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
8602         length of instruction shr_imm (expected 8, got 10)
8603
8604 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
8605
8606         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
8607
8608 2007-06-06  Mark Probst  <mark.probst@gmail.com>
8609
8610         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8611         MonoInternalHashTable again (fixed bug in the internal hash table
8612         code).
8613
8614 2007-06-06  Mark Probst  <mark.probst@gmail.com>
8615
8616         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
8617         Have to figure out what makes it crash the SWF regression.
8618
8619 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
8620
8621         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
8622
8623 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8624
8625         * mini.c: optimize out the type check when storing null in a
8626         reference array.
8627
8628 2007-06-04  Mark Probst  <mark.probst@gmail.com>
8629
8630         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8631         MonoInternalHashTable.
8632
8633 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
8634
8635         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
8636         signed integer methods.
8637
8638 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
8639
8640         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
8641         permanently since the current approach doesn't work.
8642
8643 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
8644
8645         * inssel.brg (stmt): Only call delegate->invoke_impl if 
8646         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
8647
8648 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
8649
8650         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
8651         the sreg2==rdx case.
8652         
8653         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
8654         account if it contains a rex prefix.
8655         (peephole_pass): Handle OP_FMOVE as well.
8656
8657 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
8658
8659         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
8660         as it causes regressions.
8661
8662 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
8663
8664         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
8665         static case as well.
8666
8667         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
8668
8669         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8670         (mono_arch_get_this_arg_from_call): Ditto.
8671
8672         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
8673
8674         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
8675         invoke_impl field.
8676
8677         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8678         (mono_arch_get_this_arg_from_call): Ditto.
8679
8680         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
8681         
8682         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
8683         try to create optimized invoke code and use that for further invocations. 
8684         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
8685
8686         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
8687
8688 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
8689
8690         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
8691         sealed classes or methods.
8692         *devirtualization.cs: tests for the new optimization
8693
8694 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
8695
8696         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
8697         by the update_volatile () function.
8698
8699 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
8700
8701         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
8702         require it.
8703
8704         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
8705
8706 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
8707
8708         * mini.c: Add configure checks for header files.
8709         * mini-x86.c: Add configure checks for header files.
8710         * trace.c: Add configure checks for header files.
8711         * aot-runtime.c: Add configure checks for header files.
8712         * aot-compiler.c: Add configure checks for header files.
8713         * driver.c: Add configure checks for header files.
8714         * mini-codegen.c: Add configure checks for header files.
8715         
8716         Code is contributed under MIT/X11 license.
8717
8718 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
8719
8720         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
8721         icompare_imm -128 + op_iclt. Fixes #81703.
8722
8723 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
8724
8725         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
8726
8727 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
8728
8729         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
8730         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
8731         so that all isinst checks now use "interface_bitmap".
8732
8733 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
8734
8735         * cpu-amd64.md (jmp): Fix a warning.
8736
8737         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
8738
8739         * basic.cs: Add new regression test.
8740
8741         * basic.cs: Remove test which is now in basic-long.cs.
8742
8743         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
8744
8745         * basic-long.cs: Add new test.
8746         
8747 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
8748
8749         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
8750
8751 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
8752
8753         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
8754
8755         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
8756         places.
8757         
8758         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
8759         throwing code a bit.
8760
8761         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
8762         the exception throwing code a bit.
8763
8764         * mini-x86.c (get_call_info): Allocate result from a mempool.
8765
8766 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
8767
8768         * aot-compiler.c (find_typespec_for_class): Fix the assert.
8769
8770         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
8771
8772         * mini.h (MonoCompile): Add 'token_info_hash' field.
8773
8774         * mini.c: Save token->method associations during compilation so the AOT 
8775         compiler can use it.
8776         
8777         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
8778         which reference generic classes and methods.
8779
8780 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
8781
8782         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
8783
8784         * aot-compiler.c (compile_method): Fix a typo in a comment.
8785
8786         * aot-runtime.c (decode_cached_class_info): Skip generic types.
8787
8788         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
8789         everything generic.
8790
8791         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
8792
8793 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
8794
8795         * mini.h (MonoCompile): Add 'args' field.
8796
8797         * mini.c (mono_compile_create_vars): Store variables representing the arguments
8798         into cfg->args.
8799
8800         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
8801
8802 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
8803
8804         * mini.c (mono_compile_get_interface_var): Remove this unused function.
8805
8806         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
8807
8808         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
8809         opcodes for some opcodes.
8810
8811         * mini.h *.brg *.c: Use the new opcodes.
8812
8813 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
8814
8815         * mini.h: Bumped aot revision.
8816
8817         * inssel.brg: modified code generation of type checks for interfaces
8818         to use the new "MonoClass.interface_bitmap" instead of the old
8819         "MonoClass.interface_offsets".
8820
8821 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
8822
8823         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
8824
8825 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
8826
8827         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
8828         64 bit platforms.
8829
8830 2007-04-27  Neale Ferguson <neale@sinenomine.net>
8831
8832         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
8833
8834 2007-04-27  Wade Berrier  <wberrier@novell.com>
8835
8836         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
8837         mini.h) to fix build.
8838
8839 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
8840
8841         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
8842         
8843         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
8844         causes the corlib unit tests to fail.
8845
8846 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
8847
8848         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
8849
8850         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
8851
8852         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
8853         opcodes to the comparison relations.
8854
8855         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
8856         opcodes to their types.
8857         
8858         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
8859
8860         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
8861         it in cfg->arch.cinfo.
8862
8863         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
8864
8865         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
8866         cfg->cil_offset_to_bb.
8867
8868 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
8869
8870         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
8871         created becase of initlocals.
8872
8873 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
8874
8875         * mini-alpha.c cpu-alpha.md: More alpha port work from 
8876         Sergey Tikhonov <tsv@solvo.ru>.
8877
8878 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
8879
8880         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
8881
8882 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
8883
8884         * cpu-s390.md (break): Correct the length of break instruction.
8885
8886 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8887
8888         * mini.c: fix a couple of soft-float issues and comments.
8889
8890 2007-04-15  Miguel de Icaza  <miguel@novell.com>
8891
8892         * trace.c (is_filenamechar): - is also a filename char.
8893
8894 2007-04-15  Neale Ferguson <neale@sinenomine.net>
8895
8896         * mini-s390.c: Correct checking for enum type in return value processing.
8897
8898 2007-04-14  Raja R Harinath  <rharinath@novell.com>
8899
8900         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
8901         (version.h): Makefile is in the build directory.
8902
8903 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
8904
8905         * mini-amd64.h: fix for assertion failure on Solaris/amd64
8906
8907 2007-04-11  Martin Baulig  <martin@ximian.com>
8908
8909         * mini.c (can_access_member): Fix handling of generic classes;
8910         fixes #81259.
8911
8912 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
8913
8914         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
8915
8916 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
8917
8918         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
8919
8920 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
8921
8922         * mini-codegen.c: make sure the right spill amount is
8923         used for fp or integer registers (fixes the float_sub_spill() on ppc).
8924
8925 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
8926
8927         * mini-ppc.c: fixes for the fp_branch_nan test.
8928
8929 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
8930
8931         * basic.cs: Comment out new test which still fails on ia64.
8932
8933 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
8934
8935         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
8936
8937 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
8938
8939         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
8940
8941 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
8942
8943         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
8944         on 64 bit machines. Fixes part of #80738.
8945
8946         * basic.cs: Add regression test.
8947
8948 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
8949
8950         * inssel.brg basic.cs: Revert previous change to fix build.
8951
8952         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
8953         platforms.
8954         
8955         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
8956
8957         * basic.cs: Add new regression test.
8958
8959 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
8960
8961         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
8962         many arguments.
8963
8964 2007-03-16  Neale Ferguson <neale@sinenomine.net>
8965
8966         * cpu-s390x.md: Correct length of break instruction.
8967
8968 2007-03-16  Neale Ferguson <neale@sinenomine.net>
8969
8970         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
8971         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
8972
8973 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
8974
8975         * *.c: Begin WIN64 port.
8976         * mini.c:  Use correct register in profiler.
8977         * mini-amd64.c: No inline assembly on Win64.
8978         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
8979         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
8980         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
8981         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
8982         mono_arch_ip_from_context for Win64.
8983         
8984         Contributed under MIT/X11 license.
8985
8986 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
8987
8988         * exceptions-amd64.c (seh_handler): Ditto.
8989
8990         * exceptions-x86.c (seh_handler): Fix a memory leak.
8991
8992 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
8993
8994         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
8995         mini-s390x.c: fixed peephole optimizations to deal
8996         correctly with 1 and 2 byte reload avoidance.
8997
8998 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
8999
9000         * cpu-s390.md, cpu-s390x.md: update localloc length.
9001
9002 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9003
9004         * cpu-g4.md: added missing descriptions.
9005
9006 2007-03-14  Miguel de Icaza  <miguel@novell.com>
9007
9008         *  Makefile.am: Add support so the tail tests are not executed on
9009         PowerPC as that is a known limitation of the PowerPC port.
9010
9011 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
9012
9013         * runmdesc.bat:  Move to msvc directory.
9014         
9015 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
9016
9017         * runmdesc.bat:  Run executable that was produced by the current
9018         target and sent via an argument.
9019         
9020 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
9021
9022         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
9023         #81102.
9024
9025         * generics.2.cs: Add regression test.
9026
9027 2007-03-09  Wade berrier  <wberrier@novell.com>
9028
9029         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
9030
9031 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
9032
9033         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
9034         AOT code depends on this.
9035
9036 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9037
9038         * mini.c: more precise tracking of types in the eval stack
9039         (part of fix for bug #81044).
9040
9041 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
9042
9043         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
9044
9045         * aot-compiler.c (encode_patch): Remove an obsolete comment.
9046
9047 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
9048
9049         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
9050
9051         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
9052
9053 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
9054
9055         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
9056         a pointer on 64 bit systems. Fixes #80190.
9057
9058         * iltests.il: Add new regression test.
9059
9060 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9061
9062         * mini.c: inline a constant for Environment.IsRunningOnWindows.
9063
9064 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
9065
9066         * trace.c: Remove an erroneous alignemnt check when tracing.
9067           Fixes --trace on OSX86.
9068
9069 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9070
9071         * mini-$(arch).h: initialize SP in context for all the archs.
9072
9073 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
9074
9075         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
9076         regressions in the thread tests.
9077
9078 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
9079
9080         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
9081         - fixed implementation of LOCALLOC opcode
9082         - implemented non-un compare for floats
9083         - code cleanup
9084         - implementation of FDIV and CKFINITE opcodes
9085         - fixes for latest mono updates
9086         - additional arch opcodes
9087
9088 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9089
9090         * Makefile.am: simplify and merge rules for cross-compilation.
9091
9092 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
9093
9094         * local-propagation.c: Actually *apply* the fix for bug 80591...
9095
9096 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9097
9098         * mini-exceptions.c: backuot part of the last change
9099         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
9100
9101 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
9102         * inssel.brg: Fix bug 59286.
9103
9104
9105 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
9106
9107         * mini-exceptions.c: patch from Zoltan to correctly check for
9108         stack boundaries (using the stack register, not the frame register),
9109         fixes bugs #80724, #79717.
9110
9111 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
9112
9113         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
9114         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
9115
9116         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
9117         presence of frame pointer elimination.
9118
9119 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
9120         
9121         * mini-x86.h: NetBSD UCONTEX_REG defines.
9122
9123 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
9124
9125         * inssel-amd64.brg: Fix amd64 build.
9126
9127 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
9128
9129         * mini.h: remove extern to workaround what looks likes gcc bug 26905
9130         on amd64.
9131
9132 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
9133
9134         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
9135         ends.
9136
9137         * mini-<ARCH>.c: Use mono_is_regsize_var ().
9138
9139 2007-01-30 Mark Mason <mason@broadcom.com>
9140
9141            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
9142            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
9143            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
9144            beginning support for CEE_JMP [not quite working yet]
9145            * tramp-mips.c: LMF handling now works
9146         
9147 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
9148
9149         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
9150
9151         * mini.h (NULLIFY_INS): New macro.
9152
9153 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9154
9155         * mini.c: statistical profiler fix for windows, patch
9156         from Tor Lillqvist (tml@novell.com).
9157
9158 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
9159         * local-propagation.c: Fix bug 80591.
9160
9161 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9162
9163         * Makefile.am: put back the --export-dynamic option as with
9164         the previous gmodule flags (thanks to Robert Jordan).
9165
9166 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
9167
9168         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
9169
9170         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
9171         simplify and speed up the local register allocator. Also rename some fields
9172         like iassign->vassign.
9173         
9174         * regalloc.c: Remove some functions which are no longer used since their
9175         inlined version is in mini-codegen.c.
9176         
9177         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
9178
9179         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
9180
9181 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
9182
9183         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
9184         narrowing. Fixes #80622.
9185
9186         * iltests.il: Add new regresssion test. 
9187
9188 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9189
9190         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
9191         debug-debugger.c, debug-debugger.h: warning fixes.
9192         * driver.c: updated copyright year and made it fit in one line.
9193
9194 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
9195
9196         * aot-runtime.c: updated to use mono-dl instead of gmodule.
9197
9198 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
9199
9200         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
9201
9202         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
9203
9204         * iltests.il: Add new test for bug #80507.
9205
9206 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9207
9208         * mini-arm.h: use soft-float also on vfp for now.
9209
9210 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9211
9212         * mini.c: fix some more soft-float issues.
9213
9214 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
9215
9216         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
9217
9218 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
9219         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
9220         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
9221         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
9222
9223 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
9224
9225         * mini-arm.c: typo fix.
9226
9227 2007-01-23  Neale Ferguson <neale@sinenomine.net>
9228
9229         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
9230
9231 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
9232
9233         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
9234         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
9235
9236         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
9237
9238         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
9239
9240         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
9241         
9242         * inssel.brg: Fix a warning.
9243
9244         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
9245
9246         * abcremoval.c ssa.c ssapre.c: Update after this change.
9247         
9248         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
9249
9250         * dominators.c (df_set): Use mono_bitset_union_fast.    
9251
9252 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9253
9254         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
9255         mini-codegen.c: reduce relocations and memory usage for the cpu
9256         description.
9257
9258 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
9259
9260         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
9261
9262         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
9263         to reduce their size.
9264
9265 2007-01-19 Mark Mason <mason@broadcom.com>
9266
9267         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
9268         * mini-mips.c: more configuration macros, support long conditional branches, additional
9269         asserts, fix epilog instrumentation.
9270         * mini-mips.h: use standard stack walk
9271         * cpu-mips.md: increase size of div, rem and conditional branches
9272         
9273 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
9274
9275         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
9276         to cpu spec data.
9277
9278 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
9279
9280         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
9281         (compile_method): Ditto.
9282
9283         * aot-runtime.c (decode_klass_info): Ditto.
9284
9285         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
9286         needed by the code generated by inssel.brg. Also fix a warning.
9287
9288 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
9289
9290         * mini.c: deal with enums that become genericinsts by
9291         being nested in a generic class (bug #79956).
9292
9293 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9294
9295         * mini.c: match the generic definition to check for
9296         private access with generic types (bug #78431).
9297
9298 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9299
9300         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
9301         to make life easier for people cross-compiling that insist on not
9302         using scratchbox.
9303
9304 2007-01-17 Mark Mason <mason@broadcom.com>
9305
9306         * inssel-long.brg: patch to deal with mips missing flags
9307         * inssel-long32-mips.brg: implement overflow checks
9308         * insset-mips.brg: implement overflow checks
9309         * mini-mips.h: implement conditional exception handling
9310         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
9311           Remove unused code, minor cleanups.
9312         * exceptions-mips.c: minor cleanups
9313         * mini-ops.h: add mips conditional exception ops
9314         * cpu-mips.md: add mips conditional exception ops
9315
9316         
9317 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9318
9319         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
9320         to deal with mips missing of flags.
9321
9322 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9323
9324         * exceptions-ppc.c: execute fault handlers.
9325
9326 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
9327
9328         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
9329
9330 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9331
9332         * mini.c: handle also floating point values in initialize_array.
9333
9334 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9335
9336         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
9337         array initialization and make it conditional on the intrins option.
9338
9339 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9340
9341         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
9342         relocations and put the patch info names close to the enum definition.
9343
9344 2007-01-15 Mark Mason <mason@broadcom.com>
9345
9346         * basic.cs, exceptions.cs: break up large tests to increase debugability.
9347
9348 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
9349
9350         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
9351
9352 2007-01-12  Raja R Harinath  <rharinath@novell.com>
9353
9354         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
9355
9356 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
9357
9358         * Makefile.am: distribute the mips sources.
9359
9360 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9361
9362         * mini-codegen.h: handle bug #80489 here, by excluding ecx
9363         directly.
9364
9365 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
9366
9367         * cpu-x86.md: back out for now as this triggers other regressions.
9368
9369 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9370
9371         * cpu-x86.md: force src1 and dest regpair for long shift instructions
9372         to eax:edx, so ecx can't get allocated to them (bug #80489).
9373
9374 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
9375
9376         * mini.c, mini-exceptions.c: enabled running fault handlers
9377         (bug #80469).
9378
9379 2007-01-03  Miguel de Icaza  <miguel@novell.com>
9380
9381         * driver.c: If nothing fail, do not use the string "failed",
9382         because it makes it very annoying to view test result logs on the
9383         web. 
9384
9385 2006-12-30  Miguel de Icaza  <miguel@novell.com>
9386
9387         * debug-debugger.c (mono_debugger_main): Rename "main" to
9388         "main_method" to prevent a warning.
9389
9390         Remove a warning for unused field.
9391
9392 2006-12-28  Martin Baulig  <martin@ximian.com>
9393
9394         * debug-debugger.c
9395         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
9396
9397 2006-12-22  Martin Baulig  <martin@ximian.com>
9398
9399         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
9400         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
9401         seperate `.mdb_debug_info' section, so we can access it from the
9402         debugger even if the binary is stripped.
9403
9404         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
9405         from the `.mdb_debug_info' here to prevent the linker from
9406         removing that section.
9407
9408         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
9409         mdb-debug-info64.s.
9410
9411 2006-12-19  Robert Jordan  <robertj@gmx.net>
9412
9413         * mini-x86: enable the code to return small structures in
9414         registers for FreeBSD as well. Fixes bug #80278.
9415         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
9416
9417 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9418
9419         * mini-x86.c: align the stack when calling the profiler
9420         function instrumenting the prolog (on OSX).
9421
9422 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
9423
9424         * mini.c: emit a break opcode where Debugger.Break () is called.
9425
9426 2006-12-13  Miguel de Icaza  <miguel@novell.com>
9427
9428         * mini.c (mono_method_to_ir): Provide useful information on this
9429         assert, to prevent others from debugging like I did.
9430
9431 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9432
9433         * mini.c: enable code which was incorrectly commented
9434         (bug #80235).
9435
9436 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9437
9438         * mini-x86.c: enable on OSX, too, the code to return small
9439         structures in registers.
9440
9441 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9442
9443         * mini-x86.c: remove the use of the dynamic code manager here, too.
9444
9445 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9446
9447         * mini.h, debug-debugger.c, tramp-*.c: fixed 
9448         mono_debugger_create_notification_function() to use
9449         mono_global_codeman_reserve () instead of a dynamic code manager.
9450
9451 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
9452
9453         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
9454         ves_array_element_address() jit icall and use a generated
9455         managed method instead (which is about 4 times faster for a rank 3
9456         array access).
9457
9458 2006-11-29  Mark Mason  <mason@broadcom.com>
9459
9460         * basic-calls.cs: additional tests for passing
9461         structures as function arguments.
9462
9463 2006-11-29  Mark Mason  <mason@broadcom.com>
9464
9465         * mini-mips.h: disable custom exception handling
9466         * mini-mips.c: throw/rethrow should use jalr to call
9467         exception stubs.  Fixed bug with passing structures
9468         by value. More support for tracing floating point
9469         functions.
9470
9471 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9472
9473         * mini.c: fixed typo in the soft-float ldind.r4 handling
9474         (bug #80086).
9475
9476 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9477
9478         * mini.c, mini.h, driver.c: added --runtime command line
9479         option to select a different runtime than the autodetected one.
9480         * jit.h: added API for embedders to initialize with a specific
9481         runtime version.
9482
9483 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9484
9485         * mini.c: handle also boxing of r4 values (bug #80024).
9486
9487 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9488
9489         * mini-ppc.c: force indirect calls until we reserve
9490         enough address space for all the generated code.
9491
9492 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
9493
9494         * exceptions-arm.c: workaround bugs in the libc definition
9495         of struct ucontext.
9496
9497 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9498
9499         * inssel.brg: fixes from me and Mark Mason.
9500
9501 2006-11-23  Dick Porter  <dick@ximian.com>
9502
9503         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
9504         semaphore display now we've fixed the initial value
9505
9506 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9507
9508         * inssel.brg: partially revert the last change to fix the build.
9509
9510 2006-11-21  Mark Mason  <mason@broadcom.com>
9511
9512         * inssel.brg: Add and use compare-and-branch macros to support
9513         architectures that do not have condition code registers (ie. MIPS).
9514         * *-mips.{c,brg,md}: Fix copyright statements
9515
9516 2006-11-20  Mark Mason  <mason@broadcom.com>
9517
9518         * Makefile.am: remove mini-codegen.c from list of MIPS sources
9519         * mini.c: Allow GET_CONTEXT to be specified by the arch port
9520         * mini.h: Added declaration for mono_print_ins()
9521         * mini-codegen.c: added ins_spec initializer for MIPS
9522         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
9523         vreg to be virtual and hreg to be non-virtual.
9524         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
9525         is not yet working/implemented correctly.
9526         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
9527         non-static, fixup calls to print_ins() from other parts in the file.
9528
9529 2006-11-20  Mark Mason  <mason@broadcom.com>
9530
9531         * basic-calls.cs: added tests for passing structures as arguments
9532         to calls.
9533
9534 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9535
9536         * inssel-long32.brg: optimize signed division by power of two.
9537
9538 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
9539
9540         * mini-arm.c: added support for interworking with thumb code
9541         (mono must be still be built using the ARM instruction encoding).
9542
9543 2006-11-19  Miguel de Icaza  <miguel@novell.com>
9544
9545         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
9546         verifier has different rules for it.   Fixes a few verifier issues
9547         in the test suite.
9548
9549         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
9550         at the end, so people know what happened.
9551
9552 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9553
9554         * brach-opts.c: in optimize_exception_target() make sure we
9555         are in a catch clause (fixes bug #79871).
9556
9557 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9558
9559         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
9560         more soft-float support fixes.
9561
9562 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
9563
9564         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
9565         that are passed half on the stack and half in registers.
9566
9567 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
9568
9569         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
9570         more mips integration work from Mark E Mason 
9571         <mark.e.mason@broadcom.com>.
9572
9573 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9574
9575         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
9576         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
9577         tramp-mips.c: added sources for the mips port, not
9578         integrated in the build yet. Contributed by
9579         Mark E Mason <mark.e.mason@broadcom.com>.
9580
9581 2006-11-14  Neale Ferguson <neale@sinenomine.net>
9582
9583         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
9584
9585 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9586
9587         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
9588         put the soft-float rules in its own file since it seems to
9589         break s390 compilation.
9590
9591 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9592
9593         * mini-arm.c: fixed wrnings.
9594
9595 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
9596
9597         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
9598         inssel-arm.brg: ARM support for soft-float.
9599
9600 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9601
9602         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
9603         loads and stores of 32 bit fp values.
9604
9605 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
9606
9607         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
9608
9609         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
9610         works. Fixes #79852 and #79463.
9611
9612 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9613
9614         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
9615         more soft-float support WIP and fixes.
9616
9617 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
9618
9619         * mini-arm.c: some VFP updates.
9620
9621 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9622
9623         * mini-exceptions.c: 0 is a valid local var offset in some
9624         architectures, don't assert (bug #78508).
9625
9626 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
9627
9628         * exceptions-arm.c: fixed off by one error in stack walk code.
9629
9630 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
9631
9632         * mini.h, mini.c: more precise tracking of type load exceptions.
9633
9634 2006-11-03  Robert Jordan  <robertj@gmx.net>
9635
9636         * Makefile.am: [WIN32] Add monow.exe target.
9637         * driver.c: [WIN32] Don't detach the console when debugging.
9638         Fixes bug #79797.
9639         
9640 2006-10-30  Miguel de Icaza  <miguel@novell.com>
9641
9642         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
9643
9644 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
9645
9646         * aot-compiler.c (emit_method_info): Add a case missed earlier.
9647
9648         * driver.c (mini_regression): Fix --regression with AOT.
9649
9650         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
9651
9652 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
9653
9654         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
9655
9656         * mini-sparc.h: Don't use sigaction on sparc/linux.
9657
9658         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
9659
9660         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
9661
9662         * mini-exceptions.c: Add proper include files for getpid ().
9663
9664 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
9665
9666         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
9667         address instead of a MonoJitInfo* to avoid decoding the exception info for the
9668         method.
9669
9670         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
9671         name cache to reduce its size.
9672
9673         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
9674
9675 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
9676
9677         * mini-x86.c: Save/restore the current LMF structure more efficiently using
9678         the mono_lmf TLS variable.
9679
9680         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
9681         trampoline lmf frames.  
9682
9683         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
9684
9685 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
9686
9687         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
9688         the mono_lmf TLS variable.
9689
9690         * mini-exceptions.c: Access the LMF structure through accessors.
9691
9692         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
9693         variable instead of in jit_tls->lmf.
9694
9695         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
9696         
9697         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
9698         trampoline lmf frames.
9699
9700         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
9701
9702 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
9703
9704        * mini.c trace.c mini-x86.c: Revert these too.
9705         
9706        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
9707        signature change.
9708
9709 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
9710
9711         * genmdesc.c: removed now dead code.
9712
9713 2006-10-09  Robert Jordan <robertj@gmx.net>
9714
9715         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
9716
9717 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
9718
9719         * mini.h: do not leave gaps in the opcode values.
9720
9721 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
9722
9723         * jit-icalls.h: flag functions as internal here, too.
9724
9725 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
9726
9727         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
9728         functions with the internal attribute.
9729
9730 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
9731
9732         * aot-compiler.c: fclose the file descriptor in the profile read loop.
9733
9734 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
9735
9736         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
9737         for soft-float.
9738
9739 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
9740
9741         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
9742         tail calls as on other platforms.
9743
9744         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
9745
9746         * iltests.il: Add a few tailcall tests.
9747
9748 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9749
9750         * driver.c: fix loop for old compilers (bug #79521).
9751
9752 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
9753
9754         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
9755
9756         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
9757
9758         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
9759         metadata without any code.
9760
9761         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
9762         more precise debugging information using gdb.
9763
9764 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
9765
9766         * inssel-ia64.brg: Make the helper methods static.
9767
9768 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9769
9770         * inssel-x86.brg: make the helper methods static.
9771
9772 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
9773
9774         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
9775
9776 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9777
9778         * mini.c: updates for monoburg changes.
9779         * inssel.brg: make a few helper functions static as they should.
9780
9781 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
9782
9783         * Makefile.am: Move mini-codegen.c to common_sources.
9784
9785 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9786
9787         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
9788         instructions.
9789         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
9790         mini-ppc.h: port to use the common local register allocator.
9791
9792 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
9793
9794         * mini.h: Remove the comment too then.
9795
9796 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
9797
9798         * mini.h: put back backend.data which is to be used shortly and
9799         doesn't increase the size of MonoInst. If any 64 bit arch aligned
9800         pointers on 4 byte boundaries it'd have much bigger issues running
9801         and you can ifdef it out anyway.
9802
9803 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
9804
9805         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
9806         MonoInst size by 4 bytes on 64 bit machines.
9807
9808 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
9809
9810         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
9811         replacement with more meaningful field names. Arch maintainers, please
9812         check the assigned names are good enough for your arch.
9813
9814 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
9815
9816         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
9817         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
9818
9819 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
9820
9821         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
9822         relocations and memory requirements, put the optimization flags
9823         definitions in their own file.
9824
9825 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
9826
9827         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
9828
9829         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
9830
9831 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
9832
9833         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
9834
9835 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
9836
9837         * inssel.brg: use the correct function to get the size of an item
9838         in an array, given an element class.
9839         * aot-compiler.c: do not access class->class_size directly.
9840
9841 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
9842
9843         * mini.h, debug-mini.c: added a debugging function to print
9844         info about local variables and arguments in a jitted method.
9845
9846 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
9847
9848         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
9849
9850         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
9851
9852 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
9853
9854         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
9855         inner and outer loops when passing vtypes.
9856
9857 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
9858
9859         * mini-ppc.c: take into account the cpu errata for cache flushing
9860         which caused some random errors (bug #79381).
9861
9862 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
9863
9864         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
9865         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
9866
9867 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
9868
9869         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
9870         loaded.
9871
9872         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
9873         freebsd ports tree.
9874
9875         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
9876         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
9877
9878         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
9879         displacement.
9880
9881 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
9882
9883         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
9884
9885 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
9886
9887         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
9888         macro does not have to be changed during debugging.
9889
9890         * 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>.
9891
9892         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
9893
9894         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
9895         
9896         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
9897         MONO_ARCH_NO_EMULATE_MUL is defined.
9898
9899         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
9900
9901         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
9902
9903         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
9904
9905         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
9906         
9907 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
9908
9909         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
9910         stuff to mini-exceptions.c where it is used.
9911
9912         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
9913         setup code, the real one is in mini-exceptions.c.
9914
9915         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
9916         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
9917         some changes from the freebsd ports tree.
9918
9919         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
9920         constants.
9921         
9922         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
9923
9924 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
9925
9926         * mini.c: on Linux, check for /proc to be mounted
9927         (bug# 79351, novell bug#201204).
9928
9929 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
9930
9931         * mini.c: handle cases where pthread_attr_getstack() behaves
9932         incorrectly (bug #78096).
9933
9934 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
9935
9936         * mini-arm.c: support larger stack frames (bug #79272).
9937
9938 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
9939
9940         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
9941
9942         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
9943         tokens.
9944
9945         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
9946         mono_class_from_name () to find a class from its name.
9947
9948         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
9949
9950 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
9951
9952         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
9953
9954 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
9955
9956         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
9957
9958 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
9959
9960         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
9961         callinfo->trampoline.
9962
9963         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
9964         fixes #79271.
9965         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
9966         future.
9967
9968 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
9969
9970         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
9971
9972 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
9973
9974         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
9975         stats.method_trampolines, it is already done by the generic trampoline code.
9976
9977         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
9978         
9979 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
9980
9981         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
9982
9983         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
9984
9985         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
9986
9987         * mini.c (print_jit_stats): Print mscorlib mempool size too.
9988         
9989         * mini.c (print_jit_stats): Print new stats.
9990
9991         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
9992
9993 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
9994
9995         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
9996         Address on two dimensional arrays. Fixes #78729.
9997
9998         * mini.h (MonoCompile): Add a 'skip_visibility' field.
9999
10000         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
10001         a method.
10002
10003         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
10004
10005         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
10006         #79130.
10007         
10008         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
10009         a race condition.
10010         (mini_get_ldelema_ins): Ditto.
10011
10012 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
10013
10014         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
10015         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
10016         Fixes #79213.
10017
10018 2006-08-29 Neale Ferguson <neale@sinenomine.net>
10019
10020         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
10021         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
10022
10023         * exceptions-s390x.c: Cosmetic change.
10024
10025         * tramp-s390.c: Fix warning.
10026
10027         * cpu-s390.md: Correct length of mul_imm.
10028
10029 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
10030
10031         * aot-compiler.c: added binary writer with ELF backend
10032         implementation (only on Linux/x86 for now).
10033
10034 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
10035
10036         * Makefile.am: Don't run net 2.0 AOT tests.
10037
10038         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
10039         (mono_compile_assembly): Skip net 2.0 assemblies as well.
10040
10041         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
10042
10043 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10044
10045         * aot-compiler.c: simplified and refactored the asm-writing code
10046         to allow different backends.
10047
10048 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
10049
10050         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
10051
10052         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
10053         little. Share patches of type TYPE_FROM_HANDLE as well.
10054
10055         * mini.c (mono_patch_info_equal): New helper function.
10056         (mono_patch_info_hash): Ditto.
10057
10058         * aot-compiler.c (emit_method_code): Fix s390 build.
10059
10060         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
10061         is not handled because it is stored as a flag and not as a type ctor. Fixes
10062         #79016.
10063
10064 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
10065
10066         * aot-compiler.c: Fix computation of GOT slot statistics.
10067         
10068         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
10069         Also remove support for not PIC AOT.
10070
10071         * mini.h: Bump AOT file format version.
10072
10073         * objects.cs: Add a test for #78990.
10074
10075         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
10076         (peter.dettman@iinet.net.au). Fixes #79087.
10077
10078         * basic-long.cs: Add a test for the above.
10079
10080 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
10081
10082         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
10083         
10084         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
10085         code somewhat.
10086
10087 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
10088
10089         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
10090         exceptions.
10091
10092 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
10093
10094         * mini.c: Don't verify COM proxy invoke calls
10095         
10096
10097 2006-08-10  Dick Porter  <dick@ximian.com>
10098
10099         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
10100         which process is holding semaphores locked.
10101
10102 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
10103
10104         * mini-ia64.c mini-amd64.c: Fix #79027.
10105
10106         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
10107
10108         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
10109
10110         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
10111         implicit arguments in a vararg call. Fixes #79027.
10112
10113 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
10114
10115         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
10116         (mono_get_array_new_va_signature): Ditto.
10117
10118 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
10119
10120         * aot-runtime.c: Call init_plt lazily.
10121
10122         * inssel-long.brg: Fix unsigned long->int conversion.
10123
10124         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
10125
10126         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
10127         that most data is now in the .rss/.data section.
10128
10129 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
10130
10131         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
10132
10133         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
10134
10135         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
10136
10137         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
10138
10139         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
10140         virtual call. Fixes #79010.
10141
10142         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
10143         and use the result as the this argument in the real call.
10144
10145         * generics.2.cs: Add a new test for #79010.
10146         
10147 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
10148
10149         * mini-x86.c: Fix a warning.
10150
10151         * aot-compiler.c: Add a bunch of statistics.
10152
10153         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
10154
10155 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
10156
10157         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
10158
10159 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
10160
10161         * 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>.
10162
10163 2006-07-13  Miguel de Icaza  <miguel@novell.com>
10164
10165         * mini.c (mono_method_to_ir): Obtain the original method in the
10166         CIL stream and use this to perform validation.
10167
10168         Fixed: #78816
10169
10170 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
10171
10172         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
10173         (mono_arch_call_opcode): Ditto.
10174
10175         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
10176         #78826.
10177
10178         * mini.c (mono_patch_info_dup_mp): New helper function.
10179         
10180         * aot-compiler.c (compile_method): Fix some of the memory allocated during
10181         compilation. Fixes #78827.
10182
10183 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
10184
10185         * declsec.c: Use original security informations for
10186           MONO_WRAPPER_MANAGED_TO_MANAGED.
10187
10188 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
10189
10190         * mini.c: Allow Com Interop methods/classes and
10191         don't verify COM wrapper calls
10192         
10193
10194 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
10195
10196         * inssel-long32.brg: Fix long->i4 checked conversion.
10197
10198         * exceptions.cs: Add a test for the above.
10199
10200 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
10201
10202         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
10203
10204         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
10205         leaks.
10206
10207         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
10208         #78775.
10209
10210 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
10211
10212         * mini.c: Fix solaris/x86 exception handling.
10213
10214         * Makefile.am: Get rid of $(ICU_LIBS).
10215
10216 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
10217
10218         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
10219         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
10220         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
10221
10222         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
10223
10224         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
10225         this function causes a SIGSEGV.
10226
10227 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
10228
10229         * mini.c: Remove unused solaris/x86 includes.
10230
10231 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
10232
10233         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
10234
10235 2006-06-20  Jb Evain  <jbevain@gmail.com>
10236
10237         * cpu-g4.md: fix max length of start_handler instruction.
10238
10239 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
10240         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
10241
10242 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
10243         * ssa.c: Fixed bug 78653 for SSA based deadce.
10244         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
10245         MonoInst.flags, used in SSA based deadce.
10246         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
10247         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
10248
10249 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
10250
10251         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
10252         it can end up using non executable memory on ppc64 systems
10253         running ppc32 userspace (fix from Johannes Berg).
10254
10255 2006-06-14  Dick Porter  <dick@ximian.com>
10256
10257         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
10258         4.1.1
10259
10260 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
10261         * mini.c: Made so that inline is locally disabled if it would
10262         trigger a .cctor, because too many apps depend on this behavior
10263         (which seems to be also the one of the MS CLR).
10264
10265 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
10266
10267         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
10268         No idea why this worked before.
10269
10270         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
10271         which branch to outer exception clauses since they could skip the
10272         inner finally clauses. Fixes #78633.
10273
10274         * exceptions.cs: Add a test for the above.
10275
10276         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
10277         Fixes #78629.
10278
10279         * iltests.il: Add a test for the above.
10280
10281 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
10282
10283         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
10284         after the end of a try bblock, to prevent asserts in mini_method_compile ().
10285
10286         * iltests.il: Add a test for the above.
10287
10288 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
10289
10290         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
10291         
10292         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
10293         methods as instrinsics.
10294
10295 2006-06-09  Wade Berrier <wberrier@novell.com>
10296
10297         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
10298         (simple-cee-ops.h ssapre-mini-ops.h)
10299
10300 2006-06-09  Neale Ferguson <neale@sinenomine.net>
10301
10302         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
10303         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
10304         instruction).
10305         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
10306         * cpu-s390x.md: Fix max. length values for a couple of instructions.
10307
10308 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
10309
10310         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
10311
10312 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
10313
10314         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
10315         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
10316         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
10317         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
10318         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
10319         of opcodes, so that bug 78549 should not happen again.
10320         * ssapre.c: Updated to use the renamed files.
10321
10322 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
10323
10324         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
10325         in OP_ATOMIC_EXCHANGE_I4.
10326
10327 2006-06-07  Wade Berrier <wberrier@novell.com>
10328
10329         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
10330         in mono_debugger_create_notification_function)
10331
10332 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
10333
10334         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
10335         
10336         * mini.c (type_from_stack_type): Disable some changes which do not
10337         seem to work.
10338
10339         * driver.c: Reenable opts.
10340
10341         * mini.h (MonoStackSlot): New structure to keep track of the verification state
10342         of the evaluation stack.
10343         
10344         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
10345         evaluation stack trace at entry to the bblock.
10346
10347         * mini.c (merge_stacks): New function to perform verification of stack merges.
10348         Turned off by default.
10349
10350         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
10351         STACK_MP.
10352         
10353 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
10354
10355         * local-propagation.c: Fixed bug 78549.
10356
10357 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
10358
10359         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
10360
10361 2006-06-02  Miguel de Icaza  <miguel@novell.com>
10362
10363         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
10364         tramp-arm.c, tramp-ia64.c
10365         (mono_debugger_create_notification_function): Update signature to
10366         new signature and use new protocol for creating the notification
10367         function.  
10368
10369         Should fix the build.
10370
10371 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
10372
10373         * exceptions-ppc.c (mono_jit_walk_stack)
10374         (ves_icall_get_frame_info): Fix the build
10375
10376 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
10377
10378         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
10379
10380 2006-05-31  Raja R Harinath  <rharinath@novell.com>
10381
10382         * il2tests.2.il: New file for generics CIL tests.  Add test for
10383         #78019.
10384         * Makefile.am: Update.
10385
10386         Fix #78019
10387         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
10388         to nullable types.
10389
10390 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
10391
10392         * aliasing.c: Fixed bug 78311.
10393
10394 2006-05-29  Martin Baulig  <martin@ximian.com>
10395
10396         * mini-exceptions.c (mono_find_jit_info): When computing the
10397         native offset, check whether we're actually inside the method's
10398         code; call mono_debug_print_stack_frame() to format the frame.
10399         (ves_icall_System_Exception_get_trace): Call
10400         mono_debug_print_stack_frame() to format the stack frame.
10401         (ves_icall_get_trace): Update to the new debugging API.
10402         (mono_jit_walk_stack_from_ctx): Likewise.
10403         (ves_icall_get_frame_info): Likewise.
10404
10405         * mini.c (get_method_from_ip): Use the new debugging API.
10406         (mono_print_method_from_ip): Likewise.
10407
10408         * exceptions-ppc.c
10409         (mono_jit_walk_stack): Use the new debugging API.
10410         (ves_icall_get_frame_info): Likewise.   
10411
10412 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
10413
10414         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
10415
10416 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
10417
10418         * mini.c: Added "limitator" to inline for debugging.
10419
10420 2006-05-24  Martin Baulig  <martin@ximian.com>
10421
10422         * debug-debugger.c (mono_debugger_init): Create a private,
10423         malloc()-based code manager for the notification function and
10424         intentionally leak it on exit.  This fixes the crash-on-exit race
10425         condition.
10426
10427         * tramp-amd64.c
10428         (mono_debugger_create_notification_function): Added
10429         `MonoCodeManager *' argument.
10430
10431         * tramp-x86.c
10432         (mono_debugger_create_notification_function): Added
10433         `MonoCodeManager *' argument.
10434
10435 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
10436
10437         * aliasing.c: Fixed 64 bit issue.
10438         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10439         default since all known bugs are fixed (one more time!).
10440
10441 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10442
10443         * mini.c: write barrier support.
10444
10445 2006-05-23  Martin Baulig  <martin@ximian.com>
10446
10447         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
10448         check at the top of the file.
10449
10450 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
10451
10452         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
10453         reverting changes without reason and without changelog entries.
10454
10455 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
10456
10457         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
10458         to a few opcodes. Fixes #78439.
10459
10460         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
10461         consistency with other archs.
10462
10463         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
10464
10465 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10466
10467         * debug-debugger.c: fix the build.
10468
10469 2006-05-17  Martin Baulig  <martin@ximian.com>
10470
10471         * debug-debugger.c
10472         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
10473         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
10474         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
10475         (debugger_attach): Call GC_mono_debugger_add_all_threads().
10476
10477 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
10478
10479         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
10480
10481 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
10482
10483         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
10484         MONO_TYPE_GENERICINST.
10485         
10486         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
10487         MONO_TYPE_GENERICINST.
10488
10489 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
10490
10491         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
10492         #78325.
10493
10494 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
10495
10496         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
10497         mempool.
10498         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
10499
10500 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
10501
10502         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
10503         mono_trace_cleanup ().
10504
10505         * iltests.il: Fix problem with the newly added test.
10506
10507         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
10508         due to register constraints, free up the previous hreg. Fixes #78314.
10509
10510         * iltests.il: Add new test for #78314.  
10511
10512         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
10513         Interlocked.Add. Fixes #78312.
10514
10515         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
10516         
10517 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
10518
10519         * inssel.brg (mini_emit_virtual_call): Fix a warning.
10520
10521 2006-05-05  Martin Baulig  <martin@ximian.com>
10522
10523         * debug-mini.c (mono_debug_open_block): New method.
10524
10525         * mini-amd64.c
10526         (mono_arch_output_basic_block): Call mono_debug_open_block() at
10527         the beginning of each basic block.
10528
10529         * mini-x86.c
10530         (mono_arch_output_basic_block): Call mono_debug_open_block() at
10531         the beginning of each basic block.
10532
10533 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
10534
10535         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10536         default until I understand why they break the build on amd64.
10537
10538 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
10539
10540         * mini.c (mini_cleanup): Call mono_cleanup ().
10541
10542         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
10543         errors.
10544
10545 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
10546
10547         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
10548         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10549         default since all known bugs are fixed, and I cannot reproduce bug
10550         77944... I'm asking Matt Hargett to test again after this commit.
10551
10552 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
10553
10554         * mini-codegen.c: Fixed typo that thrashed inline.
10555
10556 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
10557
10558         * dominators.c (compute_dominators): Avoid using a worklist since
10559         it is not correct in some cases. Instead, iterate over all bblocks as
10560         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
10561
10562 2006-04-28  Miguel de Icaza  <miguel@novell.com>
10563
10564         * mini.c (mono_jit_compile_method_inner): Use
10565         mono_prepare_exception_from_error that resets the value
10566         internally.
10567
10568 2006-04-27  Miguel de Icaza  <miguel@novell.com>
10569
10570         * mini.c: Move the mini_loader_error_to_exception to metadata. 
10571         
10572 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
10573
10574         * aliasing.c: Fixed bug 78210.
10575
10576 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
10577
10578         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10579         default until all their problems (or the ones they trigger) are fixed.
10580
10581 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
10582
10583         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
10584         
10585         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
10586         as loaded only after resolving patches since that could invoke the same method.
10587
10588         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
10589
10590         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
10591         functions.
10592
10593         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
10594         AOT loader.
10595
10596         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
10597         stack.
10598
10599         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
10600         made from AOT code through the PLT table.
10601
10602         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
10603         holding the plt offset when a call is made to the aot plt trampoline.
10604         
10605 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
10606
10607         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
10608         amd64 AOT support.
10609
10610         * Makefile.am (common_sources): Fix build breakage.
10611
10612         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
10613         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
10614         intra-assembly calls if possible.
10615         
10616         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
10617
10618         * mini-trampolines.c: Handle PLT entries.
10619
10620         * mini.c: Avoid creating a GOT var for calls.
10621
10622         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
10623         from mscorlib code.
10624
10625         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
10626         from mscorlib code.
10627
10628         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
10629         AOT code.       
10630
10631         * mini.h: Bump AOT file format version.
10632         
10633         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
10634         covers more cases.
10635
10636 2006-04-25  Martin Baulig  <martin@ximian.com>
10637
10638         * driver.c: Disable copyprop, consprop and inline when running
10639         inside the debugger.
10640
10641 2006-04-25  Martin Baulig  <martin@ximian.com>
10642
10643         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
10644         with `get_current_thread' and added `detach'.
10645         (MonoDebuggerMetadataInfo): Added `thread_size',
10646         `thread_tid_offset', `thread_stack_ptr_offset' and
10647         `thread_end_stack_offset'.
10648
10649 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
10650
10651         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
10652         aot-runtime.c.
10653
10654         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
10655         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
10656
10657         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
10658
10659         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
10660
10661         * aot.c: Add support for ADJUSTED_IID.  
10662
10663 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
10664
10665         * aot.c (emit_method_order): Don't align method_order_end.
10666
10667         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
10668         the interface ID changes.
10669
10670 2006-04-21  Dick Porter  <dick@ximian.com>
10671
10672         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
10673         cleaning up a thread.  Fixes the new part of bug 77470.
10674
10675 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
10676
10677         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
10678         to managed wrapper.
10679                      
10680 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
10681
10682         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
10683         
10684         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
10685         SIGSEGV. Fixes #78072.
10686
10687         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
10688         unregister our SIGABRT handler.
10689
10690 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
10691
10692         * mini.c: Disabled inline where it can alter the call stack in a
10693         way visible from managed code.
10694         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
10695         default.
10696
10697 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
10698
10699         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
10700         on other platforms. Fixes #78089.
10701
10702 2006-04-13  Martin Baulig  <martin@ximian.com>
10703
10704         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
10705         determine whether we're inside the debugger.
10706
10707         * debug-debugger.h
10708         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
10709
10710 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
10711
10712         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
10713         handler clauses. Fixes #78024.
10714
10715         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
10716         in the CALL_MEMBASE opcodes. Fixes #78088.
10717         (mono_arch_get_vcall_slot_addr): Ditto.
10718
10719 2006-04-10  Martin Baulig  <martin@ximian.com>
10720
10721         * debug-debugger.c: The thread handling code has now been moved
10722         into ../metadata/threads.c.
10723
10724 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
10725
10726         * driver.c (mono_main): Fix --with-gc=none build.
10727
10728         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
10729         (mono_spillvar_offset_float): Ditto.
10730         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
10731         hreg, not when its !global, since on ia64, there is a third category: stacked
10732         registers.      
10733
10734 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
10735
10736         * mini.c: set MonoInst->klass for load field address and a few other
10737         places.
10738
10739 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
10740
10741         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
10742
10743 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
10744
10745         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
10746         the branch opt changes.
10747
10748 2006-04-06  Dick Porter  <dick@ximian.com>
10749
10750         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
10751         
10752         * wapihandles.c (mini_wapi_seminfo): 
10753         * driver.c (mono_main): Add semaphore info option
10754
10755 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
10756
10757         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
10758         branch optimization changes. Fixes #78009.
10759
10760 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10761
10762         * mini.c: ignore accessibility of methods in managed->native wrappers.
10763
10764 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
10765
10766         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
10767         
10768         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
10769
10770 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
10771
10772         * mini.c: Modify the branch optimizations to preserve the invariant that
10773         the entries inside the in_bb and out_bb arrays are unique.
10774         (mono_unlink_bblock): Avoid creation of new arrays.
10775
10776 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
10777
10778         * mini.c (mono_unlink_bblock): Fix regression caused by previous
10779         change (#77992).
10780
10781 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
10782
10783         * mini.c (optimize_branches): Remove the "optimizations" in
10784         the cbranch1/cbranch2 -> branch cases which were causing several
10785         problems in the past. Fixes #77986.
10786
10787 2006-03-31  Chris Toshok  <toshok@ximian.com>
10788
10789         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
10790         default optimizations :(
10791
10792 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
10793
10794         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
10795         branch.
10796
10797 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
10798
10799         * local-propagation.c: Added comments to structs and removed
10800         "Mono" prefixes from local tree mover types.
10801
10802 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
10803
10804         * Makefile.am (arch_sources): Define this for each architecture so 
10805         libmono_la_SOURCES is defined in one place.
10806
10807 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
10808
10809         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
10810         from handles/.
10811
10812 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
10813
10814         * driver.c: print the GC name supplied by configure.
10815
10816 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
10817
10818         * local-propagation.c: Added tree mover, and moved here all the
10819         local propagation code from mini.c
10820         * mini.c: Added support for treeprop, and moved all the local
10821         propagation code to local-propagation.c
10822         * mini.h: Added support for treeprop
10823         * driver.c: Added support for treeprop, enabled consprop, copyprop,
10824         treeprop, inline and deadce by default
10825         * Makefile.am: Added local-propagation.c
10826
10827 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
10828
10829         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
10830
10831 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
10832
10833         * debug-debugger.c: make it compile without the Boehm GC.
10834
10835 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
10836
10837         * mini.c: fixed issue with mismatch when an icall is registered
10838         with multiple names but same address.
10839
10840 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
10841
10842         * declsec.c, mini-exceptions.c: use write barrier to set reference
10843         fields of managed objects.
10844
10845 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
10846
10847         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
10848         (can_access_internals): Fix a warning.
10849
10850         * mini.c (print_method_from_ip): Rename this to 
10851         mono_print_method_from_ip so it gets exported.
10852
10853         * trace.c: Deal with strings inside StringBuilder's containing garbage
10854         and fix memory leaks. Fixes #77848.
10855
10856 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
10857
10858         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
10859         fixes #77787.
10860
10861 2006-03-16 Neale Ferguson <neale@sinenomine.net>
10862         
10863         * mini-s390.c: Remove OP_X86_TEST_NULL.
10864
10865 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
10866
10867         * mini.c: use the correct GetHashCode() for the moving collector.
10868
10869 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
10870
10871         * liveness.c: Regalloc spill cost tuning.
10872
10873 2006-03-15 Neale Ferguson <neale@sinenomine.net>
10874         
10875         * mini-s390x.h: Correct S390_LONG macro.
10876
10877         * mini-s390x.c: Cleanup unused code.
10878
10879 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
10880
10881         * jit-icalls.h: New file.
10882
10883         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
10884         icalls and include that instead of including jit-icalls.c.
10885
10886         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
10887         OP_X86 opcodes.
10888
10889 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
10890
10891         * mini.c: when checking for member accessibility, also check for
10892         friend assemblies and for explicit interface implementations.
10893
10894 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
10895
10896         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
10897
10898         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
10899
10900         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
10901         common cases are done first.    
10902
10903         * mini-ops.h: Only define platform specific opcodes on the given platform.
10904
10905         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
10906         branch.
10907         
10908 2006-03-14  Martin Baulig  <martin@ximian.com>
10909
10910         Revert Paolo's change from r57348:
10911
10912         * mini.h: don't use gboolean for bitfields.
10913         * mini.c: verifier changes for fields and methods accessibility.
10914
10915 2006-03-13  Neale Ferguson <neale@sinenomine.net>
10916
10917         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
10918
10919         * mini-s390x.c: Fix conv_r_un.
10920
10921         * cpu-s390, cpu-s390x.md: Fix lengths.
10922
10923 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
10924
10925         * mini.c: nested types have access to all the nesting
10926         levels, not just the enclosing types.
10927
10928 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
10929
10930         * mini.c: added a few more verification checks.
10931
10932 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
10933
10934         * liveness.c: Merge optimizations from the linear-il branch.
10935
10936 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
10937
10938         * mini-ia64.c (emit_call): Add a comment.
10939
10940         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
10941
10942         * tramp-ia64.c: Fix some warnings.
10943
10944 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
10945
10946         * mini.h: don't use gboolean for bitfields.
10947         * mini.c: verifier changes for fields and methods accessibility.
10948
10949 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
10950
10951         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
10952         lazy icall wrapper changes.
10953
10954         * dominators.c: Replace all the dominator algorithms with faster
10955         ones from the linear-il branch.
10956
10957         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
10958         the mempool.
10959
10960         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
10961         common cases are done first.
10962
10963         * mini-amd64.c: Fix some warnings.
10964
10965         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
10966         from the mempool.
10967
10968         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
10969         added code.
10970
10971         * mini.h: Add a missing prototype.
10972
10973 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
10974
10975         * mini.c: Compile icall wrappers lazily.
10976
10977         * mini-codegen.c: Use printf instead of g_print since its much faster.
10978
10979         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
10980         function.
10981
10982         * mini.c (optimize_branches): Cache the negative result from 
10983         remove_block_if_useless ().
10984
10985         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
10986         Also fix some bblock linking issues.
10987
10988         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
10989         assembly files.
10990
10991         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
10992
10993         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
10994         accessed fields first, for better cache behavior.
10995         
10996 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
10997
10998         * mini.c: speedup IList<T> array accesses.
10999
11000 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
11001
11002         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
11003         inline_costs counter. Fixes #77190.
11004
11005 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
11006
11007         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
11008         trace messages. Fixes #77706.
11009
11010 2006-03-04  Martin Baulig  <martin@ximian.com>
11011
11012         * tramp-amd64.c, tramp-x86.c
11013         (mono_debugger_create_notification_function): Use
11014         mono_global_codeman_reserve() to allocate a buffer at runtime and
11015         return it.
11016
11017         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
11018
11019         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
11020         notification function at runtime and then call `initialize' in the
11021         `MONO_DEBUGGER__debugger_info' vtable.
11022
11023 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
11024
11025         * iltests.il: Fix a visibility problem.
11026
11027 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11028
11029         * driver.c, mini.c: add hooks for the counters API.
11030
11031 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
11032
11033         * driver.c: show disabled options.
11034
11035 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
11036
11037         * linear-scan.c: always use cost-driven selection.
11038
11039 2006-02-28  Raja R Harinath  <rharinath@novell.com>
11040
11041         * jit-icalls.c (helper_compile_generic_method): Revert change from
11042         2006-02-24.
11043
11044 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
11045
11046         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
11047
11048 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
11049
11050         * inssel.brg: style fixes, mostly to force the updated monoburg
11051         to run for people using svn.
11052
11053 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
11054
11055         * mini.c: match monoburg changes.
11056
11057 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
11058
11059         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
11060         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
11061         declaration in the header file.
11062
11063 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
11064
11065         * helpers.c: reduce relocations and mem usage.
11066
11067 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
11068
11069         * mini.h, mini-codegen.c: disable logging features if
11070         requested by configure.
11071
11072 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
11073
11074         * mini.c: tiny verifier changes.
11075
11076 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11077
11078         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
11079         cpu-pentium.md: stack alignment changes for osx/x86,
11080         partially from Geoff Norton <gnorton@customerdna.com>.
11081
11082 2006-02-24  Raja R Harinath  <harinath@gmail.com>
11083
11084         * jit-icalls.c (helper_compile_generic_method): Update to changes
11085         in metadata/class.c.
11086
11087 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
11088         
11089         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
11090         
11091         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
11092         interface calls with large offsets.
11093
11094 2006-02-23  Raja R Harinath  <rharinath@novell.com>
11095
11096         * jit-icalls.c (helper_compile_generic_method): Document the
11097         special-case we depend on so that we can inflate the method twice
11098         with the same context with no bad side-effects.
11099
11100 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
11101
11102         * mini-x86.c, mini-amd64.c: fix for case when xen support
11103         is disabled.
11104
11105 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
11106
11107         * mini-x86.c, mini-amd64.c: generate code to access tls items
11108         in a faster way for Xen systems.
11109
11110 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11111
11112         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
11113         updates and compilation fixes for the OSX/x86 port, mostly from
11114         Geoff Norton <gnorton@customerdna.com>.
11115
11116 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
11117
11118         * inssel.brg: faster interface call implementation
11119         to sync with the interface_offsets MonoVTable changes.
11120
11121 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
11122
11123         * mini.c: more verification checks.
11124
11125 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
11126
11127         * mini.c: added a few more verification checks.
11128
11129 2006-02-17      Neale Ferguson <neale@sinenomine.net>
11130
11131         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
11132         facility on the processor and use it if available.
11133
11134 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11135
11136         * driver.c, aot.c, mini.c: throw exception if the IL code is
11137         invalid or unverifiable.
11138
11139 2006-02-17  Raja R Harinath  <rharinath@novell.com>
11140
11141         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
11142         m.StructField.
11143
11144 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
11145
11146         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
11147
11148 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11149
11150         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
11151         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
11152         handling of instantiated generic valuetypes.
11153
11154 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
11155
11156         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
11157         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
11158         instead.
11159
11160         * generics.2.cs: Revert the nullable reftypes tests.
11161
11162 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
11163
11164         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
11165         using __builtin_frame_address (1) as it doesn't work in the presence
11166         of optimizations. Hopefully fixes #77273.
11167
11168         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
11169         -> generics.cs change as it doesn't work with some automake versions.
11170
11171 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
11172
11173         * mini.c: handle systems that sue a different way to
11174         retrieve the stack address of the current thread.
11175
11176 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
11177
11178         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
11179         it specially in the makefile.
11180
11181         * generics.2.cs: Add tests for nullable reference types.
11182
11183 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11184
11185         * mini.c: always handle the case when mono_jit_init()
11186         is called in a thread different from the main thread,
11187         confusing libgc (bug #77309).
11188
11189 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
11190
11191         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
11192
11193 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
11194
11195         * mini.c: change optimize_branches () to use a single loop
11196         and introduce a new optimization to simplify some range checks.
11197
11198 2006-02-03  Martin Baulig  <martin@ximian.com>
11199
11200         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
11201         and merged with debugger_thread_manager_add_thread().
11202         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
11203         inform the debugger about the main thread.
11204
11205 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
11206
11207         * basic.cs: Add test for div.un/rem.un constant folding.
11208
11209 2006-02-03  Neale Ferguson <neale@sinenomine.net>
11210
11211         * cpu-s390x.md: correct int_xor_imm length
11212
11213 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
11214
11215         * generics.2.cs: New test for #77442.
11216
11217         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
11218         #77442.
11219
11220 2006-02-02  Martin Baulig  <martin@ximian.com>
11221
11222         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
11223         <mono/metadata/mono-debug-debugger.h>   
11224
11225         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
11226
11227 2006-02-02  Martin Baulig  <martin@ximian.com>
11228
11229         * debug-debugger.h: New header file for debug-debugger.c.
11230
11231         * debug-debugger.c: Big API cleanup; don't run the managed Main()
11232         function is a separate thread anymore; add support for attaching.
11233
11234 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
11235
11236         * tramp-x86.c: Fix a warning.
11237
11238 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
11239
11240         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
11241         on very large methods.
11242
11243         * aot.c (load_patch_info): Fix a warning.
11244
11245 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
11246
11247         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
11248         mini-ops.h: alu membase optimizations.
11249
11250 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
11251
11252         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
11253         to speedup StringBuilder.
11254
11255 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
11256
11257         * dominators.c (mono_compute_natural_loops): Fix detection of
11258         loop body start blocks.
11259
11260         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
11261
11262 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
11263
11264         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
11265         #75145.
11266
11267 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
11268
11269         * aliasing.c: Fixed aliasing issue on 64 bit archs.
11270
11271 2006-01-25  Martin Baulig  <martin@ximian.com>
11272
11273         * debug-debugger.c: Moved the `MonoDebuggerManager' and
11274         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
11275         started to cleanup this file a little bit.
11276
11277 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
11278
11279         * mini.c: optimize a codepath frequently happening in generics code.
11280
11281 2006-01-23  Martin Baulig  <martin@ximian.com>
11282
11283         * Makefile.am: Only compile debug-debugger.c on supported platforms.
11284
11285         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
11286         functions directly.
11287
11288         * driver.c: debug-debugger.c is only available if
11289         `MONO_DEBUGGER_SUPPORTED' is defined.   
11290
11291 2006-01-23  Martin Baulig  <martin@ximian.com>
11292
11293         * debug-debugger.c: Only enable this on platforms where the Mono
11294         Debugger is working (x86 and x86_64).
11295
11296 2006-01-21  Martin Baulig  <martin@ximian.com>
11297
11298         The Mono Debugger is now using the normal `mono' instead of the
11299         `mono-debugger-mini-wrapper' when executing managed code.
11300
11301         * debug-debugger.c: New file; previously known as
11302         debugger/wrapper/wrapper.c.
11303
11304         * debug-mini.c (mono_init_debugger): Removed.
11305
11306         * driver.c (mono_main): Added new `--inside-mdb' command line
11307         argument which is used when running inside the debugger.
11308
11309 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
11310
11311         * liveness.c (mono_analyze_liveness): Remove some unused data
11312         structures.
11313
11314 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
11315
11316         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
11317
11318 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
11319
11320         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
11321         depends on implementation details of monobitset.
11322
11323         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
11324         Fixes #77271.
11325
11326 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
11327
11328         * liveness.c: Update after monobitset changes.
11329
11330 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
11331
11332         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
11333
11334 2006-01-11 Neale Ferguson <neale@sinenomine.net>
11335
11336         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
11337
11338         * mini-s390x.c: Remove warning messages.
11339
11340 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
11341
11342         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
11343
11344 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
11345
11346         * generics.2.cs: Add ldelem/stelem_any test.
11347
11348 2006-01-10 Neale Ferguson <neale@sinenomine.net>
11349
11350         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
11351
11352 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
11353
11354         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
11355         
11356 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
11357
11358         * generics.2.cs: Reenable vtype tests.
11359
11360         * inssel-x86.brg: Remove an icorrect valuetype rule.
11361
11362 2006-01-06 Neale Ferguson <neale@sinenomine.net>
11363
11364         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
11365         initial support for OP_ABS.
11366
11367 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11368
11369         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
11370
11371 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11372
11373         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
11374         conversion and implement LADD/LSUB.
11375
11376         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
11377         architectures.
11378
11379 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11380
11381         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
11382
11383         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
11384         architectures.
11385
11386 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11387
11388         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
11389         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
11390         (stack walk problem).
11391
11392 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
11393
11394         * aot.c (mono_aot_load_method): Fix a warning.
11395
11396 2006-01-03  Neale Ferguson <neale@sinenomine.net>
11397
11398         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
11399
11400 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
11401
11402         * iltests.il: Add test for #77148.
11403
11404         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
11405         #77148.
11406
11407 2006-01-03  Neale Ferguson <neale@sinenomine.net>
11408
11409         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
11410
11411 2006-01-03  Neale Ferguson <neale@sinenomine.net>
11412
11413         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
11414         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
11415
11416         * basic-long.cs: Add lconv-to-r4/r8 tests.
11417
11418 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
11419
11420         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
11421
11422         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
11423         here as on other archs.
11424
11425 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11426
11427         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
11428
11429 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11430
11431         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
11432         
11433         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
11434
11435         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
11436         instrument_prolog; Add memory_barrier instruction.
11437
11438 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
11439
11440         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
11441
11442 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
11443
11444         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
11445
11446         * aliasing.c inssel.brg: Fix warnings.
11447
11448         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
11449         could skip initialization of some parts of memory.
11450
11451         * mini.c mini-ia64.c: Fix warnings.
11452
11453         * inssel-sparc.brg: Add an implementation of lneg which actually works.
11454
11455 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
11456
11457         * aliasing.c (mono_build_aliasing_information): Add a workaround for
11458         a crash seen on sparc.
11459
11460         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
11461         
11462         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
11463
11464 2005-12-21 Neale Ferguson <neale@sinenomine.net>
11465
11466         * mini-ops.h: Add s390_backchain instruction
11467
11468         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
11469
11470         * cpu-s390.md: Add s390_backchain instruction
11471
11472         * mini-s390.c: Significant ABI changes
11473
11474         * mini-s390.h: Cater for zero length structures
11475
11476 2005-12-20 Neale Ferguson <neale@sinenomine.net>
11477
11478         * mini-s390.c: ABI fixes
11479
11480         * inssel-s390.brg: Remove debug statements
11481
11482         * cpu-s390.md: Fix length of ATOMIC_xx operations
11483
11484 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
11485
11486         * basic-float.cs: Add float<->long conversion tests.
11487
11488 2005-12-16 Neale Ferguson <neale@sinenomine.net>
11489
11490         * mini-s390.c: Fix LOCALLOC processing.
11491
11492         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
11493
11494 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
11495
11496         * iltests.il: Add tests for some opcodes not covered by the other
11497         tests.
11498
11499 2005-12-15 Neale Ferguson <neale@sinenomine.net>
11500
11501         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
11502         register loading for Tail processing; Correct trace output.
11503
11504         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
11505
11506         * cpu-s390.md: Correct size of jmp instruction. 
11507
11508 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11509
11510         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
11511
11512 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11513
11514         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
11515           Bring s390 up to current level.
11516
11517 2005-12-12  Zltan Varga  <vargaz@gmail.com>
11518
11519         * generics.2.cs: Disable the newly added tests as they do not work yet.
11520         
11521         * generics.2.cs: Add valuetype tests.
11522
11523 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
11524
11525         * basic-long.cs: Add i4->u8 test.
11526
11527         * objects.cs: Add tests for JIT intrinsic.
11528
11529         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
11530         optimizations lost by a mistake.
11531
11532 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
11533
11534         * basic-long.cs: Remove a test moved to objects.cs.
11535
11536         * arrays.cs: Add more array tests.
11537
11538 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
11539
11540         * arrays.cs: Add new tests for multi-dimensional arrays.
11541
11542 2005-12-06  Raja R Harinath  <rharinath@novell.com>
11543
11544         * Makefile.am (test_sources2): Add generics.2.cs.
11545         (EXTRA_DIST): Add test_sources2.
11546
11547 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
11548
11549         Support for boxing and unboxing nullable types as well as the
11550         isinst operation on nullables, per the CLI ammendment.
11551
11552         * inssel.brg (CEE_ISINST): Special case for nullable
11553
11554         * mini.c (handle_unbox_nullable): new method
11555         (handle_box): Special case for nullable types
11556         (mono_method_to_ir): Call handle_unbox_nullable in correct
11557         places.
11558
11559         * generics.2.cs: New test suite
11560
11561         * Makefile.am: Support for regression tests with generics.
11562
11563 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
11564
11565         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
11566         allocated to registers. Fixes #76800.
11567
11568 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
11569
11570         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
11571
11572 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
11573
11574         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
11575         of platforms.
11576
11577 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
11578
11579         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
11580         objects.cs.
11581
11582         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
11583         
11584         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
11585 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
11586
11587         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
11588         single precision before storing to a single precision location.
11589
11590 2005-11-28  Raja R Harinath  <rharinath@novell.com>
11591
11592         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
11593
11594 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
11595
11596         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
11597         correct files.
11598
11599         * basic.cs: Remove test_0_byte_compares test which was moved to
11600         objects.cs a long time ago.
11601
11602 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
11603
11604         * aliasing.c: Fixed aliasing issue on 64 bit archs.
11605
11606 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
11607
11608         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
11609         handlers are called.
11610
11611         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
11612         throwing code.
11613
11614          * mini-ia64.c: Add support for the throw->branch exception 
11615         optimization.   
11616
11617         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
11618
11619 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
11620
11621         * mini.c: Enabled "fastpath" deadce :-)
11622         
11623 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
11624
11625         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
11626         alias analysis pass to support it.
11627         * mini.h: Likewise.
11628         * ssa.c: Likewise.
11629         * liveness.c: Likewise (liveness computation can use aliasing
11630         information to be more accurate).
11631         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
11632         moreover made so that "--compile-all" uses the given optimization
11633         flags and not the default ones.
11634         * aliasing.c: Alias analysis (new file).
11635         * aliasing.h: Likewise.
11636         * Makefile.am: added "aliasing.c" and "aliasing.h".
11637         
11638 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
11639
11640         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
11641         OP_L opcodes.
11642
11643 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
11644
11645         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
11646         fp >= end_of_stack exit condition, as it is not needed, and it might
11647         become true for fp eliminated frames.
11648
11649 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
11650
11651         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
11652         coded offsets.
11653
11654 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
11655
11656         * mini-arm.c: fixed alignment of doubles/longs to match
11657         the C ABI (bug #76635).
11658
11659 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
11660
11661         * aot.c: fix compilation with --enable-minimal=aot.
11662
11663 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
11664
11665         * mini-arm.c: fixed compatibility with the new
11666         floating point emulator package for compares.
11667
11668 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
11669
11670         * mini.c : reverted sig->pinvoke changes (r51396-51397).
11671
11672 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
11673
11674         * mini-exceptions.c (print_stack_frame): Output to stderr.
11675         (mono_handle_native_sigsegv): Ditto.
11676
11677 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
11678
11679         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
11680         OP_LCONV_TO_OVF_I implementation.
11681
11682         * mini-amd64.c: Add support for the throw->branch exception 
11683         optimization.
11684
11685         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
11686         when the catch clause catches a more general exception, i.e. Object.
11687
11688 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
11689
11690         * cpu-ia64.md: Remove unused opcodes.
11691
11692         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
11693         specific defines for architectures defining USE_SIGACTION.
11694
11695         * mini-ia64.c: Fix some warnings.
11696
11697         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
11698         version seemed to skip a frame.
11699
11700 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
11701
11702         * mini.c: Clean up the usage of sig->pinvoke flag. Now
11703         only calls which are made to native code use this flag.
11704
11705 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
11706
11707         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
11708         varargs methods as well.
11709         
11710         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
11711         which have save_lmf set. Reorganize methods prologs a bit.
11712
11713         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
11714         debugger to the proper place.
11715
11716 2005-10-29  Martin Baulig  <martin@ximian.com>
11717
11718         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
11719         when running inside the debugger until the debugger has support
11720         for it.
11721
11722 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
11723
11724         * mini.h: Fix a warning.
11725
11726 2005-10-24  Miguel de Icaza  <miguel@novell.com>
11727
11728         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
11729         we expose publicly, this returns the string.
11730
11731 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
11732
11733         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
11734         with fp elimination.
11735
11736 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
11737
11738         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
11739         native stacktrace using the glibc 'backtrace' function if available.
11740
11741 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
11742
11743         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
11744
11745         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
11746         handle SIGSEGVs received while in native code.
11747
11748         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
11749         code, call mono_handle_native_sigsegv which will abort the runtime
11750         after printing some diagnostics, instead of converting it into a
11751         confusing NullReferenceException.
11752
11753 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
11754
11755         * cpu-pentium.md: Remove unused opcodes.
11756
11757 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
11758
11759         * mini-amd64.h (MonoLMF): Add rsp field.
11760
11761         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
11762         the lmf too.
11763
11764 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
11765
11766         * mini-codegen.c (get_register_spilling): Fix some warnings.
11767
11768 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
11769
11770         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
11771         elimination during exception handling. Enable fp elimination by
11772         default.
11773
11774         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
11775         elimination.
11776
11777 2005-10-16  Martin Baulig  <martin@ximian.com>
11778
11779         * mini-exceptions.c
11780         (mono_debugger_run_finally): New public method for the debugger.
11781
11782 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
11783
11784         * debug-mini.c (mono_debug_init_method): Fix warning.
11785
11786         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
11787         the 'exname' parameter const to fix some warnings.
11788
11789 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
11790
11791         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
11792         introduced by the previous patch.
11793
11794 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
11795
11796         * basic-float.cs: Add test for precision of float arithmetic.
11797
11798         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
11799         when loading/storing single values from/to memory.
11800
11801         * mini.c (mono_jit_compile_method_with_opt): Create the function
11802         pointers in the correct domain.
11803
11804 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
11805
11806         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
11807         introduced by previous patch.
11808         
11809         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
11810         when out_filter_idx is NULL.
11811
11812         * mini-exceptions.c: Don't run filter clauses twice during exception
11813         handling. Fixes #75755.
11814
11815 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
11816
11817         * aot.c: Add support for ldflda wrappers.
11818
11819         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
11820         #75902.
11821
11822 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
11823
11824         * mini.c, mini.h: do not consider exception handlers blocks when
11825         setting up interface variables.
11826
11827 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
11828
11829         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
11830
11831 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
11832
11833         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
11834         causes a regression.
11835
11836         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
11837
11838 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
11839
11840         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
11841         of the OP_P definitions.
11842
11843         * TODO: Add a proposal for dealing with the CEE/OP mess.
11844
11845         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
11846         optimizations from the x86 port.
11847
11848         * cpu-amd64.md: Ditto.
11849
11850         * basic.cs basic-long.cs: Add tests.
11851
11852 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
11853
11854         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
11855         Patrik Torstensson's implementation of my exception-handling
11856         optimization idea, when the exception object is not used
11857         (bug #62150).
11858
11859 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
11860
11861         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
11862         of the mul_imm optimizations from the old jit.
11863
11864 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
11865
11866         * mini.c, liveness.c: patch by Patrik Torstensson and
11867         Zoltan Varga to improve performance in methods with
11868         exception clauses.
11869
11870 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
11871
11872         * driver.c: Remove 'Globalization' entry from --version.
11873
11874 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
11875
11876         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
11877         there is a profiler interested in JIT events.
11878
11879         * aot.c: Load profile files produced by the AOT profiling module, and
11880         reorder methods based on the profiling info. Add a 'method_order' table
11881         to the AOT file to make mono_aot_find_jit_info work with the reordered
11882         methods.
11883
11884         * mini.h: Bump AOT file version info.
11885
11886 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
11887
11888         * mini-arm.h: work around what looks like a gcc bug when optimizations
11889         are enabled.
11890
11891 2005-09-28  Raja R Harinath  <rharinath@novell.com>
11892
11893         * Makefile.am (AM_CFLAGS): Don't use += to append inside
11894         conditionals.  Use ...
11895         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
11896
11897 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
11898
11899         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
11900         to determine the amount of memory to copy when passing valuetypes.
11901
11902         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
11903         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
11904
11905 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
11906
11907         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
11908         information about aot.
11909
11910 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
11911
11912         * *.c: Replace the use of {Enter,Leave}CriticalSection with
11913         macros. This will allow a deadlock debugger to easily be plugged
11914         in.
11915
11916 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
11917
11918         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
11919
11920 2005-09-27  Raja R Harinath  <rharinath@novell.com>
11921
11922         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
11923         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
11924         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
11925         ($(arch_built)) [CROSS_COMPILING]: Error out.
11926
11927 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
11928
11929         * aot.c: Add support for the no_special_static flag for classes.
11930
11931 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
11932
11933         * Reapply reverted patches.
11934
11935         * *: Revert r50174 as well.
11936
11937         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
11938
11939 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
11940
11941         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
11942
11943 2005-09-23  Miguel de Icaza  <miguel@novell.com>
11944
11945         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
11946         part of the SIG_HANDLER_SIGNATURE.  
11947
11948 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
11949
11950         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
11951         statistics.
11952
11953         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
11954         introduced by previous patch.
11955
11956 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
11957
11958         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
11959         saved registers too.
11960
11961         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
11962         upon the information returned by get_call_info ().
11963         
11964         * mini-x86.c (add_float): Fix stack size calculation.
11965         (mono_arch_call_opcode): Rewrite this so it works based up the
11966         information returned by get_call_info ().
11967         (mono_arch_get_this_vret_args): Ditto.
11968
11969 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
11970
11971         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
11972         in cinfo to determine the registers which need to be used.
11973
11974 2005-09-20  Miguel de Icaza  <miguel@novell.com>
11975
11976         * driver.c (mono_main): Add --server and --desktop flags. 
11977
11978 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
11979
11980         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
11981         registers as global registers.
11982
11983         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
11984         longer needed with the new register allocator.
11985
11986         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
11987
11988         * cpu-ia64.md: Remove unused opcodes.
11989         
11990         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
11991         
11992 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
11993
11994         * cpu-amd64.md: Remove unused opcodes.
11995
11996         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
11997         needed with the new register allocator.
11998
11999         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
12000         reg-reg moves.
12001
12002 2005-09-16  Raja R Harinath  <rharinath@novell.com>
12003
12004         * Makefile.am (check-local): Don't invoke semdel-wrapper.
12005
12006 2005-09-16  Martin Baulig  <martin@ximian.com>
12007
12008         * exceptions-amd64.c
12009         (throw_exception): Don't call mono_debugger_throw_exception() if
12010         we're a rethrow - see the FIXME in the code.
12011
12012 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
12013
12014         * mini.c (mono_init_exceptions): This only works on some architectures.
12015         
12016 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
12017
12018         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
12019         on ia64.
12020
12021         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
12022
12023         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
12024         now in mini-exceptions.c.
12025
12026 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
12027
12028         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
12029         now in mini-exceptions.c.
12030
12031 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
12032
12033         * exceptions-x86.c: Applied patch from Patrik Torstensson 
12034         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
12035
12036         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
12037         code into mini-exceptions.c. Add some assertions to it.
12038
12039 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
12040
12041         * aot.c (emit_section_change): Applied patch from "The Software Team" 
12042         (<software@solmersa.com>). Fix as errors on windows.
12043
12044 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
12045
12046         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
12047         method info into the LMF.
12048
12049 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
12050         
12051         * mini-ia64.c: Add proper unwind info for method epilogs.
12052
12053         * exceptions-ia64.c: Add some code to help debugging.
12054         
12055         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
12056
12057         * mini-exceptions.c: Fix warning.
12058
12059 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
12060
12061         * mini.c: Really fix build.
12062
12063         * mini-x86.c mini-amd64.c: Fix build.
12064
12065 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
12066
12067         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
12068
12069         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
12070         some Interlocked methods as intrinsics.
12071
12072         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
12073         for Thread methods as well.
12074
12075         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
12076
12077         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
12078
12079         * mini-ia64.c mini-x86.c mini-amd64.c 
12080         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
12081         OP_MEMORY_BARRIER.
12082         
12083         * mini.c (mono_init_exceptions): Fix build breakage.
12084
12085 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
12086
12087         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
12088         of instructions. Use the new ia64_unw_op macros for emitting unwind
12089         info.
12090
12091         * mini.c (mono_init_exceptions): Initialize exception handling
12092         related trampolines at startup.
12093
12094 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
12095
12096         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
12097
12098 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
12099
12100         * mini.c: Handle type loading errors gracefully during compilation and
12101         throw the appropriate exception.
12102
12103 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
12104
12105         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
12106         for the mono binary.
12107
12108 2005-09-09  Martin Baulig  <martin@ximian.com>
12109
12110         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
12111         the release.
12112
12113 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12114
12115         * mini-arm.h: use emulation for conv.r.un for the release.
12116
12117 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12118
12119         * mini-arm.c, objects.cs: more fixes and tests for them.
12120
12121 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12122
12123         * mini-arm.c: align structures to at least 4 bytes to be able
12124         to keep our current optimized memcpy.
12125
12126 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
12127
12128         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
12129
12130 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12131
12132         * mini.c: ignore SIGPIPE.
12133
12134 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
12135
12136         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
12137
12138         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
12139
12140 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
12141
12142         * mini.h: Add prototype for mono_allocate_stack_slots_full.
12143
12144 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12145
12146         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
12147         exception handling support.
12148         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
12149         patch by Brian Koropoff <briank@marakicorp.com>).
12150
12151 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
12152
12153         * mini.c: revert another 'optimization' which breaks when
12154         items on the eval stack need to be saved at a basic block end
12155         (bug #75940).
12156
12157 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12158
12159         * jit-icalls.c: for arrays, ensure we always provide
12160         lower bounds.
12161
12162 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
12163
12164         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
12165         
12166         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
12167
12168 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
12169
12170         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
12171         arguments in their original register.
12172
12173 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
12174
12175         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
12176         memset/memcpy.
12177
12178         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
12179         when ssapre is enabled.
12180
12181         * inssel-long.brg: Fix bug in previous patch.
12182
12183         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
12184         multiplication by a constant.
12185
12186 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
12187
12188         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
12189         icc.
12190
12191         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
12192         saving registers.
12193
12194 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
12195
12196         * inssel-arm.brg: apply changes tested by Brian Koropoff
12197         <briank@marakicorp.com>.
12198
12199 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
12200
12201         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
12202         
12203 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
12204
12205         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
12206         to the same register if dreg is just a base register.
12207         (print_ins): Improve printing of membase opcodes.
12208
12209         * inssel-x86.brg: Add optimized ldind(reg) rules.
12210
12211         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
12212
12213 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
12214
12215         * mini.c: when running under valgrind, set the stack bottom for
12216         the GC at the actual approximate stack for the app (fixes running
12217         mono with valgrind).
12218
12219 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
12220
12221         * mini.c: do no break at the first valuetype to init found
12222         (fixes bug #75791).
12223
12224 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
12225
12226         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
12227
12228 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
12229
12230         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
12231
12232 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
12233
12234         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
12235
12236 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12237
12238         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
12239
12240         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
12241         code.
12242
12243         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
12244         code.
12245
12246         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
12247         methods.
12248
12249 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
12250
12251         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
12252
12253 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12254
12255         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
12256         in the tail recursion optimization.
12257
12258         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
12259         debug info into the assembly file.
12260
12261         * iltests.il: Add test for filter regions.
12262
12263         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
12264         initial stack of filter regions. Fixes #75755.
12265
12266 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
12267
12268         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
12269         stack requirements.
12270
12271 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12272
12273         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
12274         the check for an already compiled method on non-ia64 platforms.
12275         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
12276         proper domain.
12277
12278         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
12279
12280         * inssel-x86.brg: Add some optimized call rules.
12281
12282 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
12283
12284         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
12285         method here.
12286
12287         * mini.h mini-trampolines.c: Pass the trampoline argument to 
12288         mono_arch_patch_delegate_trampoline.
12289
12290         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
12291
12292         * mini-trampolines.c: Fix build.
12293
12294         * mini-amd64.h: Add delegate trampolines.
12295
12296         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
12297
12298         * inssel-amd64.brg: Add optimized call rules.
12299         
12300         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
12301
12302         * inssel-ia64.brg: Add optimized ldind(reg) rules.
12303
12304 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
12305
12306         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
12307         change.
12308
12309         * mini-ia64.c: Remove LMF fixmes.
12310
12311         * mini-ia64.h: Remove most fields from LMF.
12312
12313         * inssel-ia64.brg (stmt): Fix unaligned access errors.
12314
12315         * mini-trampolines.c: Add support for IA64 function descriptors.
12316
12317         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
12318         for IA64 function descriptors.
12319
12320 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
12321
12322         * tramp-arm.c: patch the vtable for virtual calls. Added
12323         support code to register/unregister the LMF.
12324         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
12325         more LMF work.
12326
12327 2005-08-19  Dick Porter  <dick@ximian.com>
12328
12329         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
12330         bit value if needed.
12331
12332 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
12333
12334         * mini.c (mini_get_method): Move handling of wrapper data here.
12335
12336         * mini.c (mono_method_to_ir): Add support for dynamic methods.
12337
12338         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
12339         virtual.
12340
12341         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
12342         bblock->code does not remain empty.
12343
12344 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
12345
12346         * arrays.cs: Add regression test for #75832.
12347
12348         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
12349         rules. Fixes #75832.
12350
12351         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
12352         instruction scheduling.
12353
12354 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
12355
12356         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
12357
12358 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
12359
12360         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
12361
12362         * mini-codegen.c: Fix VC build.
12363
12364         * cpu-pentium.md: Increase length of atomic_exhange_i4.
12365
12366 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12367
12368         * mini.h: fix signature for mono_register_opcode_emulation.
12369
12370 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
12371
12372         * mini.c: Get rid of most of the helper_sig_... constants using
12373         mono_create_icall_signature ().
12374
12375 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
12376
12377         * jit-icalls.c (helper_ldstr): New helper function.
12378
12379         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
12380
12381         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
12382         throw, load the string using a helper call instead of creating a string object.
12383
12384         * aot.c: Update after LDSTR changes.
12385
12386         * mini.h: Bump AOT file version.
12387         
12388         * aot.c: Save class size info into the AOT file. Print more statistics during
12389         compilation.
12390
12391         * mini.h: Bump AOT file version.
12392
12393         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
12394         ordering of disasm cases. Fixes #74957.
12395
12396 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
12397
12398         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
12399         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
12400         the generic code needed for the ARM port.
12401
12402 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
12403
12404         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
12405         inssel-arm.brg: more ARM features and fixes.
12406
12407 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
12408
12409         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
12410         ARM port work in progress.
12411
12412 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
12413
12414         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
12415
12416         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
12417
12418         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
12419
12420         * inssel.brg (mini_emit_memset): Add support for unaligned access.
12421
12422         * *-ia64.*: Ongoing IA64 work.
12423         
12424         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
12425
12426 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
12427
12428         * TODO: Remove out-of-data todo stuff.
12429
12430         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
12431         dead code.
12432
12433         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
12434
12435         * mini.h: Bump corlib version.
12436
12437 2005-07-27  Martin Baulig  <martin@ximian.com>
12438
12439         * mini-codegen.c
12440         (create_copy_ins): Added `const unsigned char *ip' argument; set
12441         `copy->cil_code' from it.
12442
12443 2005-07-27  Martin Baulig  <martin@ximian.com>
12444
12445         * mini-exceptions.c (mono_handle_exception): Don't call
12446         mono_debugger_handle_exception() for filters.
12447
12448 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
12449
12450         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
12451         as well.
12452
12453 2005-07-26  Martin Baulig  <martin@ximian.com>
12454
12455         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
12456
12457         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
12458         helper_compile_generic_method() if the method is actually virtual
12459         and non-final.
12460
12461 2005-07-26  Martin Baulig  <martin@ximian.com>
12462
12463         * mini.c
12464         (trampoline_code): Renamed to `mono_trampoline_code' and made it
12465         public; this is now accessed directly by the debugger.
12466         (mono_generic_trampoline_code): Removed.
12467
12468         * debug-mini.c
12469         (mono_debug_init_method): Also add interncalls and wrappers.
12470
12471 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
12472
12473         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
12474
12475 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
12476
12477         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
12478
12479 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
12480
12481         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
12482
12483 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
12484
12485         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
12486         getting TLS offsets on AMD64 too.
12487
12488 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
12489
12490         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
12491
12492 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
12493
12494         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
12495         inssel-arm.brg, mini-arm.h: ARM port work in progress.
12496
12497 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
12498
12499         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
12500
12501         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
12502         to mini.c.
12503
12504         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
12505         mono_sparc_is_virtual_call ().
12506         
12507         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
12508
12509         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
12510         trampoline parameters.
12511
12512         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
12513         
12514         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
12515         to mono_arch_get_vcall_slot_addr.
12516
12517         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
12518         trampoline code.
12519
12520         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
12521
12522 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
12523
12524         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
12525
12526 2005-07-19  Martin Baulig  <martin@ximian.com>
12527
12528         * exceptions-amd64.c (throw_exception): Call
12529         mono_debugger_throw_exception() here like we're doing it on i386.
12530
12531 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
12532
12533         * mini-ia64.c: Add optimized TLS access support.
12534
12535 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
12536
12537         * mini-exceptions.c: Ongoing IA64 work.
12538
12539         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
12540
12541         * mini.c: Use the default optimization set when embedding. Fixes
12542         #75194.
12543
12544 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
12545
12546         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
12547         of trampolines to a separate file.
12548
12549         * mini-trampolines.c: New file.
12550
12551         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
12552         separate file.
12553         
12554         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
12555         amd64/ia64 code.
12556
12557         * mini-codegen.c: Fix cygwin build.
12558
12559 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
12560
12561         * mini.c: Add some minor changes needed by the IA64 port.
12562
12563         * *-ia64.*: Ongoing IA64 work.
12564
12565 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
12566
12567         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
12568         trampolines into arch-independent and arch-dependent parts.
12569
12570         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
12571
12572 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
12573
12574         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
12575
12576         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
12577         the xp-regalloc-branch for amd64.
12578
12579         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
12580         xp-regalloc-branch for x86.
12581
12582 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
12583
12584         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
12585
12586 2005-07-06  Martin Baulig  <martin@ximian.com>
12587
12588         * mini.c
12589         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
12590         (mono_jit_runtime_invoke): Likewise.
12591
12592 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
12593
12594         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
12595         on x86 too.
12596         
12597         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
12598         without loading their metadata. Reorganize the file format so exception handling+
12599         debug info is kept separate from normal method info. Create MonoJitInfo 
12600         structures for methods lazily.
12601
12602         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
12603         loading metadata.
12604         (x86_class_init_trampoline): Patch AOT class init trampolines too.
12605
12606         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
12607
12608         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
12609         in AOT code.
12610
12611         * mini.h: Bump AOT file version.
12612
12613 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
12614
12615         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12616
12617 2005-07-01  Raja R Harinath  <rharinath@novell.com>
12618
12619         * Makefile.am (check-local): Call semdel-wrapper.
12620
12621 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
12622
12623         * mini-x86.c: Revert the last change as it seems to break the build..
12624
12625 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
12626
12627         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12628         
12629         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
12630
12631 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
12632
12633         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
12634         outside of the macro, so strange stuff doesn't happen with gcc4
12635         (NEW_AOTCONST_TOKEN): Likewise.
12636
12637 2005-06-28  Martin Baulig  <martin@ximian.com>
12638
12639         * mini.c (mini_class_is_system_array): New static method; use this
12640         instead of `klass->parent == mono_defaults.array_class' everywhere
12641         since this also works for the new generic array class.
12642
12643 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
12644
12645         * inssel.brg: Remove warnings.
12646
12647 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
12648
12649         * mini-ia64.c: Ongoing IA64 work.
12650
12651         * basic-float.cs: Add float->i1 conversion test.
12652
12653         * iltests.il: Add conv.u4 test.
12654
12655 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
12656
12657         * inssel-long.brg: Fix bug caused by last change.
12658
12659 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
12660
12661         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
12662         BSDs.  Allows the x86 JIT to work on OSX86
12663
12664 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
12665
12666         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
12667         u4->i8 conversion.
12668
12669         * mini-ia64.c: Ongoing IA64 work.
12670
12671 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
12672
12673         * mini-ia64.c: Ongoing IA64 work.
12674
12675         * driver.c: Clean up jit_code_hash as well when using --regression.
12676
12677         * inssel-long.brg: Fix long->i4/u4 conversion rules.
12678
12679         * basic-long.cs: Add tests for long->u4 conversion.
12680
12681 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
12682
12683         * mini.c: Take mono_get_domainvar out of macros. This makes sure
12684         that we do not depend on undefined C behavior: the order stuff
12685         gets evaluated within an expression. Fixes mono when compiled on
12686         GCC 4.
12687
12688 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
12689
12690         * *-ia64.*: Ongoing IA64 work.
12691
12692         * aot.c: Lower memory usage while loading AOT methods.
12693
12694         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
12695
12696         * mini.h: Bump AOT file format version.
12697
12698 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
12699
12700         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
12701
12702 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
12703
12704         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
12705         not on callee assembly). Fixed some comments.
12706
12707 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
12708
12709         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
12710         it gets proper disassembly.
12711         (emit_method_info): Remove some dead code.
12712
12713         * mini.c (mini_method_compile): Allways allocate the GOT var in
12714         mono_method_to_ir for emulating opcodes.
12715
12716 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
12717
12718         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
12719         before freeing the code memory. Fixes #74990.
12720
12721         * objects.cs: Add regression test for #74992.
12722
12723         * liveness.c: Extend live ranges of arguments to the beginning of the
12724         method. Fixes #74992.
12725
12726         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
12727         so it points into the faulting instruction.
12728
12729 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
12730
12731         * jit-icalls.c (mono_imul_ovf): Add exception handling.
12732
12733         * *-ia64.*: Ongoing IA64 work.
12734
12735         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
12736
12737 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
12738
12739         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
12740
12741         * *-ia64.*: Ongoing IA64 work.
12742
12743 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
12744
12745         * basic-long.cs: Add tests for add/sub.ovf.
12746
12747         * basic.cs: Add tests for sub.ovf.
12748
12749         * *-ia64.*: Ongoing IA64 work.
12750
12751 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
12752
12753         * *-ia64.*: Ongoing IA64 work.
12754
12755         * basic.cs: Add conv.ovf.i4.un test.
12756
12757 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
12758
12759         * mini.c: (remove_block_if_useless) Fixed bug 75061.
12760         
12761 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12762
12763         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
12764
12765 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
12766
12767         * *-ia64.*: Ongoing IA64 work.
12768
12769 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12770
12771         * trace.[ch]:
12772         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
12773
12774 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
12775
12776         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
12777
12778 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
12779
12780         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
12781
12782         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
12783         of a call is callable by a near call.
12784
12785 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
12786
12787         * mini-ia64.c: Ongoing IA64 work.
12788
12789 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
12790
12791         * genmdesc.c: Make the generated array non-static.
12792
12793         * inssel-long.brg: Fix LSHR_IMM rule.
12794
12795         * *-ia64.*: Ongoing IA64 work.
12796
12797         * *-ia64.*: Ongoing IA64 work.
12798
12799 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
12800
12801         * *-ia64.*: Ongoing IA64 work.
12802
12803         * *-ia64.*: Ongoing IA64 work.
12804         
12805         * mini-ia64.c: Ongoing IA64 work.
12806
12807         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
12808
12809 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
12810
12811         * objects.cs basic-calls.cs: Move some tests to objects.cs.
12812         
12813         * objects.cs basic-long.cs: Move some tests to objects.cs.
12814
12815 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
12816
12817         * *-ia64.*: Ongoing IA64 work.
12818
12819         * iltests.il: Add a new test.
12820
12821         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
12822         newobj. Fixes #75042.
12823
12824 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
12825
12826         * *-ia64.*: Ongoing IA64 work.
12827         
12828         * *-ia64.*: Ongoing IA64 work.
12829         
12830         * *-ia64.*: Ongoing IA64 work.
12831
12832         * basic.cs objects.cs: Move tests accessing static variables as well.
12833
12834         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
12835
12836 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
12837
12838         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
12839
12840         * driver.c: Always print failed tests.
12841
12842         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
12843         frame pointer.
12844
12845         * *ia64*: Ongoing IA64 work.
12846
12847 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
12848
12849         * basic.cs: Add tests for add.ovf. Fix warnings.
12850
12851 2005-05-18  Miguel de Icaza  <miguel@novell.com>
12852
12853         * driver.c (mono_main): Avoid crash if no argument is passed to
12854         --break;  Do not use g_error, but f_printf.   And fix all other
12855         ocurrences of the same crash.
12856
12857 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
12858
12859         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
12860         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
12861         Fixes #74742.
12862
12863 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
12864
12865         * *-ia64.*: Add beginnings of IA64 backend.
12866
12867         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
12868
12869 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
12870
12871         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
12872         Fixes #74925.
12873
12874         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
12875
12876         * mini-amd64.c: Fix a warning.
12877
12878 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
12879
12880         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
12881         in float_neg. Fixes #74897.
12882
12883         * mini-amd64.c (emit_call): Fix another near call bug.
12884
12885 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
12886
12887         * declsec.c: Keep the appdomain information in the structure. Added a 
12888         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
12889         value gets overwritten).
12890         * declsec.h: Set the default MonoArray for the the stack to 6. Added
12891         an MonoAppDomain member to MonoSecurityFrame.
12892         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
12893         used in the stack walk. Now use a MonoArray which grow (double) when
12894         it gets full.
12895
12896 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
12897
12898         * mini.c: Re-enabled runtime cleanup, since running threads should
12899         now properly stop when exiting.
12900
12901 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
12902
12903         * mini-codegen.c: New file contaning the arch-independent local
12904         register allocator. Not used by any architectures yet.
12905
12906         * mini.h linear-scan.c: Merge some changes from the 
12907         mini-xp-local-regalloc branch.
12908
12909 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
12910
12911         * mini-amd64.c (emit_call): Fix calls to native functions when the
12912         runtime is compiled as a shared library. Fixes #74756.
12913
12914         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
12915         on a literal field. Fixes #74751.
12916
12917 2005-04-25  Raja R Harinath  <rharinath@novell.com>
12918
12919         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
12920
12921 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
12922
12923         * objects.cs: Add missing null casting test.
12924
12925 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
12926
12927         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
12928         in wrapper methods. Also rename 'address' variable to 'offset'.
12929
12930 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
12931
12932         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
12933         warnings.
12934         
12935         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
12936
12937         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
12938         work on windows.
12939
12940 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12941
12942         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
12943
12944 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
12945
12946         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
12947         just the last bytes.
12948
12949 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
12950
12951         * aot.c (mono_compile_assembly): Fix warning.
12952
12953         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
12954         by the _MSC_VER stuff.
12955
12956 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
12957
12958         * inssel-long.brg: Fix #74588.
12959
12960         * cpu-amd64.md: Fix #74591.
12961
12962         * iltests.il: Add new regression tests.
12963
12964 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
12965
12966         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
12967         valuetype.
12968
12969 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
12970
12971         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
12972
12973         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
12974         from Bill Middleton <flashdict@gmail.com>.
12975
12976 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
12977
12978         * arrays.cs: Add new regression test. Fix warnings.
12979
12980 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
12981
12982         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
12983         and leakage in CKFINITE.
12984
12985         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
12986         this to a null op since it is called on amd64 too.
12987
12988         * exceptions-amd64.c (get_throw_trampoline): Align stack.
12989
12990         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
12991         body since this is not used on amd64.
12992         
12993         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
12994
12995         * mini-amd64.c: Remove obsolete fixmes.
12996
12997         * mini.c (print_method_from_ip): Fix debugging support.
12998
12999 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13000
13001         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
13002         so that expressions that don't give much gain are not reduced.
13003         * ssapre.h: Likewise.
13004
13005 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
13006
13007         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
13008
13009         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
13010
13011         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
13012
13013 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
13014
13015         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
13016
13017         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
13018
13019 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
13020
13021         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
13022         stack touching.
13023
13024         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
13025
13026         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
13027
13028         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
13029
13030         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
13031         MONO_ARCH_USE_SIGACTION. Fixes #74252.
13032
13033         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
13034
13035         * mini-x86.c: Fix up stack overflow handling.   
13036
13037         * exceptions.cs: Add new regression test.
13038
13039 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
13040
13041         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
13042         mono_jit_thread_attach.
13043
13044         * mini.c (mono_method_to_ir): Verify called method is not abstract.
13045
13046 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
13047
13048         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
13049         avoid calling constructors using callvirt.
13050
13051         * inssel.brg: Fix #74073.
13052
13053 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
13054
13055         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
13056         compilation with non-GCC compilers.
13057         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
13058         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
13059
13060 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
13061
13062         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
13063         klass->interface_offsets (will likely fix bug#74073).
13064
13065 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
13066
13067         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
13068
13069 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
13070
13071         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
13072         to amd64_div_reg_size ().
13073         
13074         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
13075
13076 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
13077
13078         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
13079
13080 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
13081
13082         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
13083
13084 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
13085
13086         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
13087         
13088         * mini.c (mono_precompile_assembly): Load and precompile referenced
13089         assemblies as well. Fixes #74015.
13090
13091 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
13092
13093         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
13094
13095 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
13096
13097         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
13098         a lot of checks and (anyway) permissions cannot work until corlib is 
13099         loaded.
13100
13101 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
13102
13103         * mini-ppc.c: fixed ABI issue on sysv/ppc.
13104
13105 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
13106
13107         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
13108         calls (fixes bug#72824).
13109
13110 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13111
13112         * mini.c: fix tail recursion elimination (see test in bug#73936).
13113
13114 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
13115
13116         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
13117         some fp functions in sse2 mode.
13118
13119 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
13120
13121         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
13122
13123 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
13124
13125         * mini.h mini.c: Add mono_get_jit_tls_key ().
13126
13127         * mini-x86.c: Enable fast TLS support on windows.
13128
13129 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
13130
13131         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
13132         * mini.c: Check for p/invoke method when generating code. If a
13133         p/invoke method, or it's class, isn't decorated with [Suppress
13134         UnmanagedCodeSecurity] then generate code to call System.Security.
13135         UnmanagedDemand (only if the security manager is active).
13136
13137 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
13138
13139         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
13140         last change as it seems to cause strange crashes.
13141         
13142 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13143
13144         * *.c: handle unsafe function pointers where needed.
13145
13146 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
13147
13148         * mini.c (mono_jit_free_method): Remove the fixme too.
13149
13150 2005-03-15  Miguel de Icaza  <miguel@novell.com>
13151
13152         * mini.c: As discussed, make the code actually free the delegate
13153         thunk now, to enable the debugging of delegate problems, use
13154         MONO_DEBUG=1 when running Mono. 
13155
13156         This takes also care of parts of the leaks as seen by Joe.
13157
13158 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
13159
13160         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
13161         thread_tls_offset calculation.
13162
13163 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
13164
13165         * declsec.c: Reworked linkdemand checks for icall. The previous code
13166         was using the declaration code (untrusted) and didn't work as expected
13167         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
13168         specific case.
13169
13170 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
13171
13172         * iltests.il: Add new localloc test.
13173
13174         * mini-amd64.c: Handle large stack allocations the same way as on
13175         windows if stack overflow handling is working.
13176         
13177         * mini-amd64.c: Allocate the signal stack using mmap.
13178
13179         * mini.c (sigsegv_signal_handler): Fix reading of context.
13180
13181         * mini-exceptions.c: Fix up stack overflow handling.
13182
13183         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
13184
13185         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
13186
13187         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
13188
13189         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
13190
13191         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
13192         tramp_init functions as they are no longer needed.
13193
13194 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
13195
13196         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
13197         
13198         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
13199
13200         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
13201         
13202         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
13203         support that now.
13204
13205         * mini-ops.h: Add OP_LMUL_IMM.
13206
13207         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
13208         long mul/div opcodes as intrinsic.
13209
13210         * mini-amd64.c (emit_call): Handle the case when the callee might be
13211         an AOT method.
13212
13213 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
13214
13215         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
13216         extra safe.
13217         
13218         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
13219
13220         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
13221
13222 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
13223
13224         * mini.c (mono_codegen): Don't leak here, to help people running
13225         monogrind.
13226
13227 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
13228
13229         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
13230         conversions in sse2 mode.
13231
13232         * basic-float.cs: Add regression test.
13233         
13234         * mini-amd64.c: Reenable sse2.
13235
13236 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
13237
13238         * mini-amd64.c: Disable sse2 until some regressions are fixed.
13239
13240 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
13241
13242         * driver.c: Copyright text should include 2005.
13243         
13244 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
13245
13246         * cpu-amd64.md (load_membase): Fix more max lengths.
13247
13248 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
13249
13250         * cpu-amd64.md (load_membase): Fix max length.
13251
13252         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
13253
13254         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
13255
13256         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
13257         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
13258
13259         * basic-float.cs: Add rounding regression test.
13260
13261         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
13262
13263 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
13264
13265         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
13266         structures in registers for pinvoke wrappers.
13267
13268 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
13269
13270         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
13271
13272 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
13273
13274         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
13275         wrapper to mono_jit_thread_attach.
13276
13277         * mini.c (mini_jit_thread_attach): New jit icall.
13278
13279         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
13280         native->managed wrappers.
13281
13282         * exceptions.cs: Add new regression test.
13283
13284         * mini.c (optimize_branches): Check regions in the cbranch to throw
13285         block case as well. Fixes #73242.
13286
13287 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
13288
13289         * mini.c: thread safety fixes.
13290
13291 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
13292
13293         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
13294         patching stuff, since delegates use jump trampolines so there is
13295         no caller.
13296
13297         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
13298         jump trampolines.
13299         
13300         * tramp-amd64.c: Fix build.
13301
13302         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
13303         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
13304
13305         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
13306         Rename this to mono_arch....
13307         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
13308
13309         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
13310
13311         * mini-amd64.c (emit_call): If both the caller and the callee is
13312         guaranteed to have 32 bit addresses, emit a normal call.
13313
13314         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
13315
13316         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
13317         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
13318         method_ptr inside delegates.
13319
13320 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
13321
13322         * mini.c (mono_jit_free_method): Free the method info even if the native code is
13323         invalidated. Fixes #73001.
13324
13325         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
13326
13327         * mini-x86.c: Only use stdcall for pinvokes on windows.
13328
13329 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
13330
13331         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
13332         * mini-x86.c: remove unreliable __thread var offset detection,
13333         use the correct accessors and enable by default.
13334
13335 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
13336
13337         * mini.c (mono_jit_free_method): Fix memory leak.
13338
13339 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
13340
13341         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
13342
13343 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
13344
13345         * cpu-amd64.md: Fix lengths of atomic opcodes.
13346
13347 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
13348
13349         * driver.c: try to not imply using ICU is any good.
13350
13351 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
13352
13353         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
13354         functions as inline ops.
13355
13356         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
13357         some Interlocked functions as inline ops.
13358
13359         * mini.c (move_basic_block_to_end): Fix bug in last patch.
13360
13361         * mini.h (MonoBasicBlock): Reorganize fields a bit.
13362
13363         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
13364
13365         * mini.c: Add support for OP_NOT_TAKEN.
13366
13367         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
13368         structures in registers for pinvoke wrappers.
13369
13370         * mini-amd64.c: Fix warnings.
13371
13372 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
13373
13374         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
13375
13376         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
13377
13378         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
13379         address instead of loading the address from it.
13380
13381         * mini-x86.c: Add support for returning small structs in registers
13382         on Win32. Fixes part of #70864.
13383         
13384 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
13385
13386         * trace.c (get_token): Improve error checking.
13387
13388 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
13389
13390         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
13391
13392 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
13393  
13394         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
13395         it can be reused for MonoClass.
13396         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
13397         _LINKDEMAND.
13398
13399 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
13400
13401         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
13402         instead of a MonoReflectionMethod. The method information wasn't used
13403         when displaying SecurityException details (but will be now).
13404
13405 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
13406
13407         * Makefile.am : windows build fix.
13408
13409 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
13410
13411         * iltests.il: Add new regression test.
13412
13413         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
13414         #72522.
13415
13416 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
13417  
13418         * mini.c: Moved linkdemand check into helper function check_linkdemand
13419         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
13420         LDFTN, LDVIRTFTN).
13421
13422 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
13423
13424         * declsec.c: Added statistics counter for different kinds of 
13425         LinkDemands.
13426         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
13427         (and commented) declaration.
13428         * mini.c: Added statistics counter for security Demand code 
13429         generation. Added display of security statistics.
13430
13431 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
13432
13433         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
13434         Fix compilation errors under gcc-2.95.
13435
13436 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
13437
13438         * mini.c, driver.c: Use the new jit trampoline hashtable
13439
13440 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13441
13442         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
13443
13444 2005-02-11  Martin Baulig  <martin@ximian.com>
13445
13446         * debug-mini.c (mono_debug_close_method): Free the line number array.
13447
13448 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
13449
13450         * aot.c: Break up large methods into smaller ones. Share GOT slots for
13451         icalls.
13452
13453         * mini.h: Bump AOT file format version. 
13454
13455 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
13456
13457         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
13458         APTC and P/Invoke.
13459         * declsec.h: Added macros to get/set lazyly initialized security 
13460         informations about assemblies. Added new enum for different type of
13461         possible LinkDemand violation. Added function to check LinkDemands.
13462         * mini.h: Added a field to MonoCompile to hold any security violation
13463         detected when JITting a method (so it can be thrown later).
13464         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
13465         and CEE_CALLVIRT. Added code to throw exception at the end of
13466         mini_method_compile (note: the exception is unhandled right now).
13467
13468 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
13469
13470         * mini.c, jit-icalls.c: use the managed implementation of
13471         memset for initobj and memset, to avoid managed <-> unmanaged
13472         transitions.
13473
13474 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
13475
13476         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
13477         optimization if it would need a GOT var.
13478
13479         * basic.cs: Add tests for constant propagation and switch statements.
13480
13481         * ssa.c: Fix out-of-range constant propagation and switch statements.
13482
13483 2005-02-09    <vargaz@freemail.hu>
13484
13485         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
13486
13487 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
13488
13489         * cpu-amd64.md (load_membase): Fix max length of load_membase.
13490
13491 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13492
13493         * mini.c: update to new signature of mono_class_get_allocation_ftn().
13494
13495 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
13496
13497         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
13498         arithmetic operations.
13499
13500 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
13501
13502         * mini-ppc.c: add a workaround for broken user code that
13503         DllImports vararg functions with non-vararg signatures.
13504
13505 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
13506
13507         * mini.c (mono_jit_compile_method_inner): Add detection and a 
13508         meaningfull error message for assemblies written in Managed C++.
13509
13510         * tramp-amd64.c mini-amd64.h: Add support for 
13511         create_trampoline_from_token ().
13512
13513         * aot.c mini-x86.c abcremoval.c: Applied patch from
13514         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
13515
13516 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
13517
13518         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
13519         which takes a MonoImage/token as parameter instead of a MonoMethod.
13520
13521         * aot.c: Use the new trampoline for initializing vtables.
13522
13523         * aot.c: Add support for ldfld/stfld_remote wrappers.
13524
13525         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
13526         rules for compare <MEM>, IMM.
13527
13528         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
13529
13530         * aot.c: Handle inherited finalizers correctly.
13531
13532 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
13533
13534         * inssel.brg (stmt): Add a missing _setup_... ().
13535
13536         * aot.c: Save some parts of the class state to the AOT file and use it
13537         to recompute that state when a class is initialized.
13538
13539         * mini.c: Install AOT hooks into the runtime.
13540
13541         * mini.h: Bump AOT file format version.
13542         
13543         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
13544         Fixes #72148.
13545
13546         * iltests.il: Add new test.
13547
13548 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
13549
13550         * mini.c: fix typo.
13551
13552 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
13553
13554         * mini.c: setup the statistical profiler in the thread attach
13555         callback to cope with the new single thread code.
13556
13557 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
13558
13559         * mini-ppc.c: ensure we have enough room for the profiler
13560         calls (fixed bug#72084).
13561
13562 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
13563
13564         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
13565         it.
13566
13567 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13568
13569         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
13570
13571 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13572
13573         * ssapre.c: Fixed an issue with down safety (this allows IronPython
13574         to succesfully execute parrotbench).
13575         * ssapre.h: Likewise.
13576
13577 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13578
13579         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
13580         variable for stores to method arguments (fixes a SSAPRE issue).
13581
13582 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13583
13584         * mini.c: handle value types in dup, fixes gen-112.cs.
13585
13586 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
13587
13588         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
13589         sequence for calls in dynamic methods to avoid thunks.
13590
13591 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
13592
13593         * mini.c: correctly remove dynamic methods from the hashtable.
13594
13595 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13596
13597         * driver.c: Disabled SSAPRE until fix the bug that appears
13598         in IronPython's parrotbench.
13599
13600 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
13601
13602         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
13603
13604         * mini.c (mono_method_to_ir): Revert the previous change.
13605         
13606         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
13607         when AOT compiling.
13608
13609         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
13610         mono_jit_info_table_find () etc. when running under valgrind.
13611
13612         * inssel.brg: Fix warnings.
13613
13614         * mini-exceptions.c: Fix warnings.
13615
13616 2005-01-31  Martin Baulig  <martin@ximian.com>
13617
13618         * driver.c (compile_all_methods_thread_main): Don't try to compile
13619         generic methods or anything which has type parameters.
13620
13621 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
13622
13623         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
13624
13625         * TestDriver.cs: Add --verbose flags.
13626
13627         * graph.c ssa.c: Fix 64 bit warnings.
13628         
13629         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
13630         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
13631         Fix 64 bit warnings.
13632
13633         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
13634         variable not spotted by gcc.
13635         
13636         * mini-amd64.c inssel-amd64.brg: Applied patch from  
13637         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
13638         X86_COMPARE_MEMBASE opcodes.
13639
13640         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
13641
13642 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
13643
13644         * *: MonoMethod->signature might be NULL now. You *MUST* use
13645         mono_method_signature.
13646
13647 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
13648
13649         * driver.c (compile_all_methods_thread_main): Compile the methods
13650         without invoking cctors.
13651
13652 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13653
13654         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
13655         * basic-calls.cs: test for the above.
13656
13657 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
13658
13659         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
13660         MonoJitInfo changes.
13661
13662 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
13663
13664         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
13665         eagerly if it contains dynamic methods.
13666         
13667         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
13668
13669         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
13670         trace, it is now computed by an icall from trace_ips.
13671         
13672         * mini-exceptions.c: Fix a warning.
13673
13674 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
13675
13676         * mini-exceptions.c: don't bother getting stack trace info if
13677         it's not going to be used.
13678
13679 2005-01-27  Raja R Harinath  <rharinath@novell.com>
13680
13681         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
13682         ssapre-mini-ops.h.
13683
13684 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
13685
13686         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
13687
13688         * aot.c: Avoid calling mono_method_get_header () if not needed.
13689
13690         * mini.h: Bump AOT file format version.
13691         
13692         * mini.c (mono_emit_native_call): Allocate a GOT var here.
13693
13694         * mini.c (mono_print_tree): Print more info for calls.
13695
13696 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
13697
13698         * declsec.h: Remove warning by adding missing include for marshal.h
13699
13700 2005-01-26  Martin Baulig  <martin@ximian.com>
13701
13702         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
13703         `ip' twice.
13704
13705 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
13706
13707         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
13708         flags.
13709
13710         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
13711
13712         * aot.c (mono_compile_assembly): Fix a warning.
13713
13714 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
13715
13716         * declsec.c: Look for security attributes on the original MonoMethod 
13717         (and not the wrapped one). This fix permissions on icalls.
13718
13719 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
13720
13721         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13722
13723         * mini.c (mono_allocate_stack_slots): Add a fixme.
13724
13725         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13726
13727 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13728
13729         * inssel.brg: optimize casts of sealed types (more
13730         optimizations waiting for fixes in remoting).
13731
13732 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
13733
13734         * inssel.brg (stmt): Add another dummy rule.
13735
13736         * driver.c: Fix warnings.
13737
13738         * driver.c (mono_main): If running under valgrind, instruct glib to use
13739         the system allocation functions so valgrind can track the memory
13740         allocated by the g_... functions.
13741
13742         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
13743
13744         * mini-ops.h: Add OP_DUMMY_STORE opcode.
13745
13746         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
13747
13748         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
13749         variables in try regions.
13750
13751         * mini.c (mini_method_compile): Don't disable optimizations on large
13752         methods when AOT compiling.
13753
13754         * mini.c (mono_allocate_stack_slots): New arch independent method to 
13755         allocate stack slots. Not yet used.
13756
13757 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
13758
13759         * debug-mini.c (mono_debug_close_method): Plug some leaks.
13760
13761 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
13762
13763         * mini-ppc.c: make the branch info relative as the code
13764         buffer can be reallocated.
13765
13766 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
13767
13768         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
13769         * driver.c: Removed the AOT/security restriction. Now initialize the
13770         security manager (in metadata) if --security is used.
13771         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
13772         rather than the pointer to declarative security, when AOT is used.
13773
13774 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
13775
13776         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
13777         basic blocks, reduced intrinsic exception throwing code size.
13778
13779 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
13780
13781         * driver.c (mini_usage): Reorder the usage screen.
13782
13783 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
13784
13785         * mini.c (mono_resolve_patch_target): Fix warning.
13786
13787 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
13788
13789         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
13790         previous patch.
13791
13792         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
13793
13794         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
13795         breaks the amd64 build.
13796
13797         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
13798         register allocation. Fixes #71454.
13799
13800         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
13801
13802         * arrays.cs: Add new regression test.   
13803
13804 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13805
13806         * ssapre.c: Turned usage of snprintf to GString.
13807         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
13808         (I left it on by mistake in my previous commit).
13809
13810 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
13811
13812         * mini.c, cfold.c, basic-calls.cs: preserve side effects
13813         on cond branch optimization (fixes bug# 71515).
13814
13815 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13816
13817         * abcremoval.c: Fixed bug 71062.
13818         * abcremoval.h: Likewise.
13819
13820 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13821
13822         * mini.c: Added a new functionality to optimize_branches, the removal
13823         of useless basic blocks, and fixed some problem in the removal of
13824         critical edges; some utility functions added for both purposes.
13825         * ssapre.c: Added complex expression support, and fixed bug 70637.
13826         * ssapre.h: Likewise.
13827         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
13828         enabled in SSAPRE.
13829         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
13830         * driver.c: Re-enabled SSAPRE.
13831
13832 2005-01-19  Martin Baulig  <martin@ximian.com>
13833
13834         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
13835         the result of mono_get_method_constrained().
13836
13837 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
13838
13839         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
13840         manager.
13841
13842 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
13843
13844         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
13845         be detected.  Fixes #59296.
13846
13847 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
13848
13849         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
13850         which can happen. Fixes #71361.
13851
13852 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
13853
13854         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
13855         manager.
13856
13857 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
13858
13859         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
13860         appdomain-unload.exe to fail.
13861         
13862         * mini.c: Fix some memory leaks.
13863
13864 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
13865
13866         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
13867         Fixed bug and sped up some codepaths.
13868
13869 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
13870
13871         * mini.c: Fix some memory leaks.
13872
13873         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
13874         conversion.
13875
13876         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
13877
13878         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
13879         #71320.
13880
13881         * iltests.il: Add regression test for #71320.
13882
13883 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
13884
13885         * mini.c (mono_codegen): Fix installation of profiler hooks.
13886
13887         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
13888
13889 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
13890
13891         * mini.h, mini.c, cfold.c: optimize access to enum
13892         readonly fields, too. Eval conditional branches if possible
13893         to perform unreachable code removal in more cases.
13894
13895 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
13896
13897         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
13898
13899         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
13900         code manager.
13901
13902         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
13903         WinXP DEP. Fixes #71244.
13904
13905 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
13906
13907         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
13908
13909 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
13910
13911         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
13912
13913 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
13914
13915         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
13916         changes.
13917
13918         * mini.h: Bump AOT version.
13919
13920         * mini.h (MonoCompile): Change exvar to a hash table.
13921
13922         * mini.c: Allocate a separate exvar for each handler block.
13923
13924         * mini.c: Get rid of the computation of filter_lengths, its not needed.
13925
13926         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
13927         ex var with the pending exception and only throw if the two are equal.
13928         Fixes #68552.
13929         
13930         * exceptions.cs: Add tests for rethrow and nested catch clauses.
13931
13932         * mini-x86.c: Fix warnings.
13933
13934         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
13935         used by all the ports now.
13936
13937         * aot.c: Add write-symbols and save-temps options.
13938
13939 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
13940
13941         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
13942
13943 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
13944
13945         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
13946         operations.
13947
13948         * tramp-s390.c: Check vtable slot belongs to the domain.
13949
13950         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
13951         as per other platforms.
13952
13953         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
13954
13955 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
13956
13957         * driver.c: we don't run the Main() code in a subthread anymore.
13958
13959 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
13960
13961         * mini.c: added experimental rtc support in the statistical
13962         profiler: if the user has the permission, more accurate statistics
13963         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
13964         The MONO_RTC value must be restricted to what the linux rtc allows:
13965         power of two from 64 to 8192 Hz.
13966
13967 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
13968
13969         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
13970
13971 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
13972
13973         * mini-ppc.c: better icache flush for smp.
13974
13975 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
13976
13977         * mini-amd64.c (emit_move_return_value): Fix memory leak.
13978
13979         * mini-x86.c (get_call_info): Add the get_call_info () code from the
13980         amd64 port, not yet used.
13981
13982 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
13983
13984         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
13985         a struct type.
13986
13987 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
13988
13989         * driver.c: Added --security option to activate the security manager.
13990         Right now this will allow code generation for declarative demands and
13991         is disabled when AOT is specified.
13992         * mini.c: Add code generation for declarative security demands.
13993         * mini.h: Add mono_use_security_manager as an extern gboolean.
13994
13995 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
13996
13997         * aot.c (mono_compile_assembly): Speed up compilation a bit by
13998         emitting more dense assembly code.
13999
14000         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
14001         exception throwing stuff.
14002
14003 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
14004
14005         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
14006         dead code.
14007
14008         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
14009         left in by mistake.
14010
14011         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
14012         fixed.
14013
14014         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
14015
14016         * tramp-*.c: Only patch vtable slots if the object is in the current
14017         domain. Fixes appdomain-unload.exe.
14018
14019         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
14020         
14021         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
14022         x86 branch.
14023
14024 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
14025
14026         * mini.c (reverse_branch_op): New helper function.
14027
14028         * mini.c (optimize_branches): Run the new optimization only on 
14029         platforms which support it. Also reverse all kinds of branches.
14030
14031         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
14032
14033         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
14034         a throw statement.
14035
14036         * mini.c (optimize_branches): Reverse not-equals branches if the false
14037         bblock is a throw. This happens a lot of time with argument checking in
14038         corlib.
14039
14040         * mini.c (mono_codegen): Add support for placing basic blocks after
14041         the function epilogue.
14042
14043         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
14044         function epilogue.
14045         
14046 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
14047
14048         * mini.c (setup_stat_profiler): Only set this up if the platform
14049         supports ITIMER_PROF.
14050
14051 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
14052
14053         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
14054         previous patch.
14055
14056         * inssel.brg: Fix a warning.
14057
14058 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
14059
14060         * mini.c: added support for statistical profiler 
14061         (run with: --profile=default:stat).
14062
14063 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
14064
14065         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
14066
14067         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
14068
14069         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
14070         related to global registers from the amd64 port.
14071
14072 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
14073
14074         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
14075
14076         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
14077         with global registers.
14078         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
14079
14080         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
14081
14082 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
14083
14084         * debug-mini.c (encode_value): Fix off-by-one.
14085
14086         * aot.c (encode_value): Likewise.
14087
14088         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
14089
14090 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
14091
14092         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
14093         AOT.
14094
14095         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
14096         
14097         * aot.c (emit_method_info): Increase size of temp buffer.
14098
14099         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
14100         the AOT case.
14101
14102 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
14103
14104         * aot.c (emit_method_info): Fix build.
14105         
14106         * aot.c: Further rework of the AOT file format to reduce the size of
14107         the method info data.
14108
14109         * mini.h: Bump AOT file format version.
14110
14111 2004-12-27  Martin Baulig  <martin@ximian.com>
14112
14113         * mini.c (mini_get_method): New static method; call
14114         mono_get_method_full() and mono_get_inflated_method().
14115         (mono_method_to_ir): Use mini_get_method() instead of
14116         mono_get_method_full(). 
14117
14118 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
14119
14120         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
14121
14122 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
14123
14124         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
14125
14126         * inssel-amd64.brg: Add some optimization rules.
14127
14128 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
14129
14130         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
14131         standard not GC'd stuff is fine.
14132
14133 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
14134
14135         * aot.c: Rework the AOT file format to get rid of most of the global
14136         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
14137
14138         * mini.h: Bump AOT file format version.
14139         
14140 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
14141
14142         * mini.h: Bump AOT file format version.
14143
14144         * aot.c (mono_aot_is_got_entry): New function to determine if an 
14145         address is inside a GOT.
14146
14147         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
14148
14149         * cpu-pentium.md: Increase the maximum size of some instructions which
14150         might involve a got access.
14151         
14152         * mini.c (get_method_from_ip): Another debug helper function.
14153
14154         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
14155         when got var accesses are created during the decompose phase.
14156
14157         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
14158
14159         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
14160         argument mini_compile_method and to MonoCompile, and use this to
14161         determine whenever a given method is compiled for AOT. This allows the
14162         other methods compiled during AOT compilation to be free of AOT stuff,
14163         so the backends does not need to add special support for them by
14164         creating a fake GOT etc.
14165
14166         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
14167         longer needed.
14168
14169 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
14170
14171         * mini.c (mono_method_to_ir): It turns out that some of the
14172         x-appdomain wrappers are lax with types, so just ignore this for
14173         all wrappers.
14174
14175         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
14176         at the vtable->klass. If it is non-shared code we can just use the
14177         vtable.
14178
14179 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
14180
14181         * mini-ppc.c: access MonoDomain from tls, too.
14182
14183 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
14184
14185         * declsec.c: Removed unused variable (and related warning ;-)
14186
14187 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
14188
14189         * iltests.il: New test for LDELEMA on an array of ref types.
14190
14191         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
14192         all ldelema's on reftypes.
14193         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
14194         it was the wrong place to put it.
14195
14196         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
14197         register to pop to make this cleaner, at the request of Paolo.
14198
14199 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
14200
14201         * mini-ops.h (OP_GETHASHCODE): New op.
14202
14203         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
14204
14205         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
14206         operation.
14207
14208         For a microbenchmark, this reduces the cost of Hashtable.get_Item
14209         by 25%.
14210         
14211         * mini-x86.c (mono_arch_output_basic_block): Rather than
14212
14213         add ebp, 4
14214
14215         Emit
14216
14217         pop edx
14218
14219         The first is 3 bytes while the second is 1. This saves 36 kb on
14220         mscorlib, quite a big saving. When bootstraping mcs, I was able to
14221         see a small boost because of icache locality.
14222
14223         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
14224
14225 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
14226
14227         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
14228         started code sharing with the generic code.
14229
14230 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
14231
14232         * mini-ppc.c, cpu-g4.md: added code for direct access to
14233         tls data slots.
14234
14235 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
14236
14237         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
14238          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
14239         to OP_TLS_GET.
14240
14241 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
14242
14243         * declsec.c|h: Added functions to cache the declarative stack modifiers
14244         in MonoJitInfo and to create a security frame from a MonoJitInfo 
14245         structure.
14246         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
14247         created. Register internal calls for System.Security.SecurityFrame::
14248         _GetSecurityFrame and _GetSecurityStack.
14249         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
14250         the definitions for the new stack walk/callback mechanism.
14251         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
14252         first security frame for LinkDemands and InheritanceDemands) and
14253         GetSecurityStack for Demands. Both use the new mono_walk_stack code
14254         from lupus.
14255         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
14256         walk initialization (lupus).
14257
14258 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
14259
14260         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
14261         idiom.
14262         (handle_loaded_temps): Do not create a temporary variable for
14263         things that we know are temps. They will never be modified.
14264         (mono_spill_call): Set MONO_INST_IS_TEMP
14265         (mono_emulate_opcode): ditto
14266         (emit_tree): ditto
14267         (mono_method_to_ir.CEE_DUP): ditto
14268
14269 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
14270
14271         * mini.c (type_to_eval_stack_type): Make this handle the void type
14272         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
14273         (emit_tree): use ip_in_bb to special case some common idioms
14274         Update all callers to pass in the IP.
14275         (mono_method_to_ir): Make CEE_CALL* do the above as well.
14276
14277         This gives us a nice 2% speedup in mcs bootstrap.
14278
14279         * mini-x86.c (peephole_pass): Peephole pass to make
14280         mov  [foo], eax
14281         push [foo]
14282
14283         into
14284
14285         mov [foo], eax
14286         push eax
14287
14288         * mini.c (ip_in_bb): new method.
14289         (mono_method_to_ir): use this method rather than doing the hash
14290         lookup ourselves.
14291
14292         * linear-scan.c (mono_linear_scan): When expiring actives, you
14293         don't need to keep around variables that expire on this
14294         instruction. This makes it so that:
14295              a = b + 1
14296         will turn into:
14297              store (ebx add (ebx, 1))
14298         which will become
14299              add ebx, 1
14300
14301 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
14302
14303         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
14304         combination to avoid doing two copies. Fix up problems with previous
14305         patch.
14306
14307         * mini.c: Fix 64 bit warnings.
14308
14309         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
14310
14311 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
14312
14313         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
14314         changes from the x86 code.
14315
14316         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
14317
14318 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
14319
14320         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
14321         throwing code to reduce its size, unify the AOT and non-aot code and 
14322         get rid of relocations in the AOT case.
14323
14324         * mini-x86.h mini.c exceptions-x86.c 
14325         (mono_arch_get_throw_corlib_exception): New arch specific function to 
14326         raise corlib exceptions which doesn't require relocations in the 
14327         caller.
14328
14329         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
14330
14331 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
14332
14333         * mini.c (mono_emit_method_call): Only allocate the got var when it is
14334         needed.
14335
14336         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
14337         in the AOT case.
14338
14339 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14340
14341         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
14342         with add function when used from Inc/dec atomic 
14343         functions. Re-enabled optimization on x86.
14344         * mini-ops.h: renamed atomic_add functions to
14345         allow _add to match the Interlocked::Add and
14346         _add_next to match Interlocked::Inc/Dec.
14347
14348 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
14349
14350         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
14351         linking of BBs to the end BB, and enabled SSAPRE also with
14352         consprop and copyprop (which was prevented by that bug).
14353
14354 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14355
14356         * mini-x86.c: disabling the Interlocked optimizing code. 
14357
14358 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
14359
14360         * aot.c (load_aot_module): Move reading of got_addr after the AOT
14361         file version check.
14362         
14363 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14364
14365         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
14366         interlocked optimization due lack of support on x86, rewrote 
14367         exchange to take into account that base may be in eax.
14368         
14369         xsp works again; activated Interlocked optimizing code.
14370         
14371 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
14372
14373         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
14374
14375 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
14376
14377         * mini-ops.h: Add new opcodes.
14378
14379         * mini.h: Add new patch types. Add got_var to MonoCompile.
14380
14381         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
14382         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
14383         make it work with all kinds of patchable code.
14384
14385         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
14386         address of the GOT, and referencing entries in the GOT.
14387
14388         * mini.c: Add code to load the GOT address if needed by an opcode.
14389
14390         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
14391         independent AOT code on the x86 using an elf-style Global Offset Table.
14392
14393 2004-12-14  Raja R Harinath  <rharinath@novell.com>
14394
14395         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
14396
14397 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14398
14399         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
14400         when running xsp.
14401
14402 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
14403
14404         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
14405         of Interlocked:Increment/Decrement/Add as inline ops.
14406         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
14407
14408 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
14409
14410         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
14411         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
14412
14413 2004-12-12  Duncan Mak  <duncan@ximian.com>
14414
14415         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
14416         again. `patch_info->table_size' is no longer valid after Zoltan's
14417         commit #37636.
14418
14419 2004-12-12  Martin Baulig  <martin@ximian.com>
14420
14421         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
14422         if we are the "real" method, ie. not an inlined method inside it.
14423
14424 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
14425
14426         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
14427         before we look in the special fields table. This fixes
14428         ../tests/thread-static-init.cs.
14429
14430 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14431
14432         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
14433         for Array get_Rank and get_Length. Fixes bug #70465.
14434
14435 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
14436
14437         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
14438         separate structure to reduce the size of MonoJumpInfo.
14439
14440 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
14441
14442         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
14443
14444 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
14445
14446         * mini.c (mini_get_inst_for_method): Changed to allow ports
14447         to return a MonoInst instead of opcode 
14448         (renamed mini_get_opcode_for_method to better reflect the new functionality)
14449         
14450         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
14451         Allow ports to return a created MonoInst instead of op-code, will enable
14452         new optimizations.
14453         (renamed mini_get_opcode_for_method to better reflected the functionality)
14454
14455 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
14456
14457         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
14458
14459 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
14460
14461         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
14462         Fixes #69985.
14463
14464 2004-12-08  Martin Baulig  <martin@ximian.com>
14465
14466         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
14467         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
14468
14469 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
14470
14471         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
14472         correctly.
14473
14474         * exceptions.cs: Disable some tests which depend on properties of x86 fp
14475         arithmetic.
14476
14477 2004-12-08  Raja R Harinath  <rharinath@novell.com>
14478
14479         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
14480
14481 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
14482
14483         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
14484         bug introduced by the previous patch.
14485
14486 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14487
14488         * mini-ppc.c, objectc.cs: handle large structs passed by value
14489         (fixes bug #69972).
14490
14491 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
14492
14493         * mini-ppc.c: OP_ARGLIST implementation from
14494         Geoff Norton  <gnorton@customerdna.com>.
14495
14496 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14497
14498         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
14499         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
14500
14501 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14502
14503         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
14504
14505 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14506
14507         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
14508         support.
14509
14510 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
14511
14512         * mini-sparc.c: Zero out localled-ed memory.
14513
14514         * iltests.il: Add tests for zeroing out localloc-ed memory.
14515
14516 2004-12-04  Martin Baulig  <martin@ximian.com>
14517
14518         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
14519         mono_method_get_signature_full().       
14520
14521 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
14522
14523         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
14524         and some utility functions (always for SSAPRE), integrated SSAPRE.
14525         * mini.h: Likewise.
14526         * driver.c: Added ssapre option.
14527         * ssa.c: Small fix on OP_ARG handling.
14528         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
14529         * Makefile.am: Likewise.
14530
14531 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
14532
14533         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
14534         now in the xp code.
14535
14536         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
14537         icall.
14538
14539 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14540
14541         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
14542         
14543         * cpu-s390.md : Increase instruction length of oparglist.
14544
14545         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
14546
14547 2004-11-30  Martin Baulig  <martin@ximian.com>
14548
14549         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
14550         virtual generic methods.  We call a special helper_compile_generic_method()
14551         icall to retrieve the method from the vtable, inflate and compile
14552         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
14553
14554         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
14555
14556 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
14557
14558         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
14559
14560 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
14561
14562         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
14563         Fixes #69929.
14564
14565 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
14566
14567         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
14568         platforms with PIC aot.
14569
14570 2004-11-28  Martin Baulig  <martin@ximian.com>
14571
14572         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
14573         Fixes gen-112.cs.
14574
14575 2004-11-28  Martin Baulig  <martin@ximian.com>
14576
14577         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
14578         the result of mono_type_get_underlying_type() to check whether
14579         we're byref.
14580
14581 2004-11-26  Martin Baulig  <martin@ximian.com>
14582
14583         * mini.c
14584         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
14585         in the g_assert().
14586
14587 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
14588
14589         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
14590         the same way as the other arguments so they won't get clobbered.
14591
14592         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
14593         calls through R11 since it is clobbered by the trampoline code.
14594
14595 2004-11-26  Raja R Harinath  <rharinath@novell.com>
14596
14597         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
14598         pick up in-tree mscorlib.dll.
14599
14600 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
14601
14602         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
14603
14604         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
14605         runtime data/code are now stored in a table similar to the GOT in ELF. 
14606         This allows the code itself to be position independent.
14607
14608         * aot.c: Fix loading of referenced assemblies after the lazy assembly
14609         loading changes.
14610
14611         * aot.c: Attach ELF type (object/function) directives to all global
14612         symbols.
14613
14614         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
14615
14616         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
14617
14618         * mini-amd64.h: Turn on PIC AOT code.
14619
14620         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
14621         returning the offset within an OP_AOTCONST instruction where the GOT
14622         offset needs to be added.
14623
14624         * mini.h: Bump AOT file format version.
14625
14626 2004-11-25  Martin Baulig  <martin@ximian.com>
14627
14628         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
14629         uninflated generic methods.
14630
14631 2004-11-25  Martin Baulig  <martin@ximian.com>
14632
14633         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
14634
14635 2004-11-24  Martin Baulig  <martin@ximian.com>
14636
14637         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
14638         original klass (this only applies for generic instances).
14639
14640 2004-11-24  Martin Baulig  <martin@ximian.com>
14641
14642         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
14643         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
14644         that array).
14645
14646 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
14647
14648         * mini.c (mono_method_to_ir): Disable inlining for methods containing
14649         localloc. Fixes #69678.
14650
14651         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
14652         
14653 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
14654
14655         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
14656         used SSE registers on pinvoke calls. Fixes #69774.
14657
14658 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
14659
14660         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
14661         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
14662
14663 2004-11-23  Raja R Harinath  <rharinath@novell.com>
14664
14665         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
14666         Refer directly to the mcs/ tree.
14667
14668 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14669
14670         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
14671         Check if a trampoline for a synchronized method is required. 
14672
14673 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
14674
14675         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
14676         with localloc if needed. Throe arithmetric exception in
14677         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
14678         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
14679
14680 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
14681
14682         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
14683         types before switching on type.  Fixes #69622.
14684
14685 2004-11-19  Raja R Harinath  <rharinath@novell.com>
14686
14687         * Makefile.am (check-local): New.  Integrate into 'make check'.
14688         (MCS,RUNTIME): Define using in-tree mono and mcs.
14689         (ILASM): New.
14690         (%.exe): Use $(ILASM).
14691
14692 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
14693
14694         * mini-ppc.c: adjust initial prolog size (bug #69691).
14695
14696 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
14697
14698         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
14699         #69664.
14700
14701 2004-11-17  Raja R Harinath  <rharinath@novell.com>
14702
14703         * Makefile.am (clean-local): Rename from 'clean'.
14704
14705 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14706
14707         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
14708         to mono_arch_is_int_overflow. 
14709         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
14710         SIGFPE events.
14711
14712 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
14713
14714         * declsec.c|h: New files to support declarative security attributes.
14715         Added function to check if a method has (applicable) security.
14716         * mini.c|h: Add check for declarative security attributes in
14717         mono_method_check_inlining.
14718         * Makefile.am: Added declsec.c and declsec.h to the build.
14719
14720 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
14721
14722         * mini.c, mini.h: update to keep dynamic code info per-domain.
14723
14724 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
14725
14726         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
14727         (mini_init): Get rid of it from here too.
14728
14729 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
14730
14731         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
14732         implemented OP_RETHROW (patch by Geoff Norton
14733         <gnorton@customerdna.com>).
14734
14735 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
14736
14737         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
14738         between appdomains.  Fixes appdomain-unload on PPC.
14739
14740 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
14741
14742         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14743         mini-exceptions.c: handle the new wrapper types.
14744         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
14745         token value as a MonoClass* when compiling a wrapper.
14746         mono_jit_create_remoting_trampoline now takes an additional
14747         MonoRemotingTarget parameter.
14748         
14749 2004-11-10  Martin Baulig  <martin@localhost>
14750
14751         * mini.c (mono_method_to_ir): Use `generic_container->context'
14752         rather than creating a new one.
14753
14754 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14755
14756         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
14757
14758         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
14759
14760 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
14761
14762         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
14763         the experimental aot cache stuff.
14764
14765 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14766
14767         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14768         mini-exceptions.c: update to exception clause structure changes.
14769
14770 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
14771
14772         * exceptions-x86.c (throw_exception): Fix warnings.
14773
14774         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
14775         for OP_RETHROW.
14776
14777 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
14778
14779         * exceptions-sparc.c (get_throw_exception): Really fix this.
14780
14781 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
14782
14783         * tramp-*.c: we no longer support icalls without wrappers, so
14784         a bit of code can be removed here
14785
14786 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
14787
14788         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
14789         patch.
14790
14791         * cpu-sparc.md: Add op_rethrow.
14792
14793         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
14794
14795         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
14796
14797         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
14798         * mini-ops.h: Add OP_RETHROW.
14799
14800         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
14801
14802         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
14803
14804 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
14805         
14806         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
14807         Makes the output much easier to read
14808
14809 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
14810
14811         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
14812         prevents another huge leak when compiling with ssa. Secondly, the
14813         performance of doing this rather than freeing the lists is much
14814         better. GList does a lock every time you allocate a list link,
14815         so that it can use a memory pool. So, it is better to just use
14816         a memory pool of our own.
14817         
14818         * ssa.c, linear-scan.c: replace g_list_remove_link with
14819         g_list_delete.  The remove one does not free the GList, so we were
14820         leaking memory. On -O=all --compile-all with corlib, this cut down
14821         3 MB of allocations.
14822
14823 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
14824
14825         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
14826
14827         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
14828
14829         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
14830         into a new function mono_create_jit_trampoline ().
14831
14832 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
14833
14834         * trace.c (get_spec): Allow tracing of classes without a namespace.
14835
14836 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
14837
14838         * mini.c: Fix pointer overwrite in mini_method_compile.
14839
14840 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
14841
14842         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
14843         The darwin ABI needs some special handling for 1 and 2 byte structs
14844         Lets use lbz/lhz instead of lwz everywhere.
14845         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
14846         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
14847         Use stb/sth for the former, and put the latter always on stack instead of in
14848         argument registers.
14849
14850 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
14851
14852         * trace.c (is_filenamechar): Add '_'.
14853
14854 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
14855
14856         * mini-s390.c: Fix prolog length to allow for large trace requirements.
14857
14858         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
14859
14860 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
14861
14862         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
14863         depends on libmonogc. Fixes #68805.
14864
14865 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
14866
14867         * mini.c (mono_jit_free_method): Provide extra information for
14868         this error.  Currently this leaks, but will be turned into a
14869         developer option in the future.
14870
14871 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
14872
14873         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
14874
14875 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
14876
14877         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
14878         boundary. Fixes reading of PATCH_INFO_R4 and R8.
14879         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
14880
14881 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
14882
14883         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
14884         trampolines for AOT code.
14885
14886 2004-10-22    <vargaz@freemail.hu>
14887
14888         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
14889         constructed types. Fixes #68136.
14890
14891 2004-10-21  Martin Baulig  <martin@ximian.com>
14892
14893         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
14894         if it returns true, unwind the stack to the call instruction.
14895
14896 2004-10-21    <vargaz@freemail.hu>
14897
14898         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
14899
14900         * mini.h: Bump AOT version number.
14901
14902         * objects.cs: Add another test for unbox trampolines.
14903
14904         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
14905         valuetype methods.
14906
14907 2004-10-20    <vargaz@freemail.hu>
14908
14909         * driver.c: Add SHARED to the set of optimizations tested.
14910
14911         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
14912
14913         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
14914         used by CEE_NEWARR.
14915
14916         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
14917
14918 2004-10-20  Martin Baulig  <martin@ximian.com>
14919
14920         * mini-exceptions.c (mono_handle_exception): Call
14921         mono_debugger_handle_exception() to tell the debugger about
14922         catch/finally clauses.
14923
14924 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
14925
14926         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
14927
14928         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
14929         #68447.
14930
14931 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
14932
14933         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
14934         methods as their native size, fixed bug #57543, #57545.
14935         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
14936         This saves a temporary register and mullw call down into 1 (minor perf
14937         increase for cases like sum = sum * 5;  This use to translate into:
14938             li r11,5
14939             mullw r28,r28,r11
14940         It now translates to
14941             mulli r28,r28,5
14942
14943 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
14944
14945         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
14946         #68388.
14947
14948 2004-10-11  Martin Baulig  <martin@ximian.com>
14949
14950         * mini.c (mono_method_to_ir): If we're a generic method, get the
14951         MonoGenericContainer from our MonoMethodNormal and create a
14952         MonoGenericContext from it.
14953
14954 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
14955
14956         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
14957
14958         * basic-long.cs: Add test for checked i8->i2 cast.
14959
14960 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14961
14962         * inssel-ppc.brg: added a couple of speedup rules.
14963
14964 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
14965
14966         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
14967         to speed up rebuilds.
14968
14969 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14970
14971         * mini-s390.c: Minor fix to OP_OR_IMM.
14972
14973 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
14974
14975         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
14976         better. Fixes appdomain-unload.exe on sparc.
14977
14978 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
14979
14980         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
14981         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
14982         see bug 67324.
14983
14984 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
14985
14986         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
14987
14988 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
14989
14990         * mini.c: Always generate a field read/write wrapper for members
14991         of the class MarshalByRefObject since the actual instance could
14992         be a CBO.
14993
14994 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
14995
14996         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
14997
14998 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
14999
15000         * driver.c mini.h trace.c: Move the setting of the main assembly into
15001         a separate function called mono_trace_set_assembly () and call it after
15002         actually loading the main assembly. Fixes #66872.
15003
15004 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
15005
15006         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
15007         using the code manager.
15008
15009 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
15010
15011         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
15012
15013 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
15014
15015         * cpu-amd64.md: Fix bug in previous patch.
15016         
15017         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
15018         #66650.
15019
15020 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
15021
15022         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15023         mini-exceptions.c: updates for changed stack walk interface.
15024
15025 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15026
15027         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
15028
15029 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
15030
15031         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
15032
15033 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
15034
15035         * driver.c (mini_regression_list): Do not call mono_assembly_close 
15036         since assemblies can't be unloaded.
15037         
15038 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
15039
15040         * cpu-amd64.md: Fix more instruction lengths.
15041
15042         * cpu-amd64.md: Fix lengths of some instructions.
15043
15044 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
15045
15046         * inssel.brg: Make the array ldelema check aot friendly.
15047
15048 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
15049
15050         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
15051
15052         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
15053
15054 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
15055
15056         * mini-x86.c: Fix build.
15057
15058         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
15059         mono_type_get_underlying_type () helper function to simplify code.
15060         
15061 2004-09-09  Martin Baulig  <martin@ximian.com>
15062
15063         * mini-amd64.c: Don't access `type->data.klass' directly, call
15064         mono_class_from_mono_type() instead since the type may be a
15065         generic instance.
15066
15067 2004-09-09  Martin Baulig  <martin@ximian.com>
15068
15069         * mini-amd64.c (get_call_info): Fix support for generic instances.
15070         (add_valuetype): Use mono_class_from_mono_type() to get the class
15071         since we can be a generic instance.
15072
15073 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
15074
15075         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
15076
15077 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
15078
15079         * liveness.c: reset spill costs on each scan: bug 62107
15080
15081 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
15082
15083         * exceptions-sparc.c (mono_arch_find_jit_info): remove
15084         unnecessary line that doesn't compile
15085
15086 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
15087
15088         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
15089         trampolines, make them call an error function so people can fix their
15090         code.
15091
15092 2004-09-06  Martin Baulig  <martin@ximian.com>
15093
15094         * mini.c (mono_method_to_ir): When initializing locals, handle a
15095         generic instances like a valuetype if it's a valuetype and like a
15096         class if it's a class.
15097
15098 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
15099
15100         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
15101         stack. Fixes #64674.
15102
15103         * exceptions.cs: Add test for unwinding of call arguments.
15104
15105 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
15106
15107         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
15108         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
15109         set the carry/borrow flag). The sparc and s390 implementations
15110         can now use optimized versions (and simplify the code). ppc bugfixes.
15111
15112 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
15113
15114         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
15115
15116 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
15117
15118         * inssel-amd64.brg: Remove leftover 32 bit rule.
15119
15120         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
15121
15122 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
15123
15124         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
15125         mono_arch_find_jit_info functions into a new function. Fix a memory
15126         leak.
15127
15128         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
15129         refactored code.
15130         
15131 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
15132
15133         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
15134         as well.
15135         
15136         * exceptions.cs: Add array size tests.
15137
15138         * mini.c: Allocate a separate icall wrapper for each arity of 
15139         mono_array_new_va. Fixes #59509.
15140
15141         * exceptions.cs: Add testcase for 64578.
15142
15143         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
15144
15145         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
15146         
15147 2004-09-02  Martin Baulig  <martin@ximian.com>
15148
15149         * mini.c (mono_method_to_ir): When initializing the locals, call
15150         handle_initobj() on the generic instance itself, not its
15151         underlying type.
15152
15153 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
15154
15155         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
15156         MonoJitInfo for dynamic methods.
15157
15158         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
15159
15160         * mini.c: Add support for freeing JIT data for dynamic methods.
15161         
15162 2004-09-01  Martin Baulig  <martin@ximian.com>
15163
15164         * mini-x86.c (is_regsize_var): Added support for generic
15165         instances.
15166         (mono_arch_emit_prolog): Make this compile again, use
15167         `x86_push_imm_template (code)'.
15168
15169 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
15170
15171         * mini-x86.c: make all push_imm instructions that get
15172         patched always emit the long form
15173
15174 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
15175
15176         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
15177         in a per-domain hash.
15178
15179         * mini-amd64.c (merge_argument_class_from_type): Handle generic
15180         types.
15181
15182 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
15183
15184         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
15185         work.
15186         
15187         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
15188         work.
15189
15190         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
15191         Beginnings of SSE2 support.
15192
15193         * exceptions.cs: Add more tests for checked int<->uint casts.
15194
15195 2004-08-28  Martin Baulig  <martin@ximian.com>
15196
15197         * mini-x86.c (mono_arch_instrument_epilog): Added support for
15198         generic instances.
15199
15200         * mini.c
15201         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
15202         Handle generic instances recursively.
15203
15204 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15205
15206         * iltests.il: test for conv.u8 on a constant
15207
15208 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15209
15210         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
15211         LCONV_x4 (shrun_32 (membase)).
15212
15213 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15214
15215         * inssel-x86.brg: c&p rules for push/setret of long
15216
15217 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
15218
15219         * inssel-x86.brg: c&p rules for compare (base, regvar) and
15220         compare (regvar, base)
15221
15222         * inssel-x86.brg: more burg love
15223
15224         * inssel.brg: more cleanup
15225
15226         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
15227
15228 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
15229
15230         * basic-long.cs, basic-calls.cs: new tests for optimization.
15231
15232 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
15233
15234         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
15235         patch.
15236
15237 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
15238
15239         * mini-amd64.c (read_tls_offset_from_method): Add another case.
15240         
15241 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
15242
15243         * inssel.brg (mini_emit_memcpy): use 
15244         NO_UNALIGNED_ACCESS to disable memcpy optimization
15245
15246 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
15247
15248         * mini-amd64.c: Handle generic types in various places.
15249
15250         * mini.c (mono_method_to_ir): Handle generic types in init locals.
15251
15252 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
15253
15254         * mini.c (handle_box): Fix warning.
15255
15256         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
15257
15258         * mini-amd64.h: Enable the emit_state optimization.
15259
15260         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
15261
15262         * mini-amd64.c: Add some new 64 bit peephole opts.
15263
15264         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
15265
15266         * cpu-amd64.md: sreg1 of div instructions must be %rax.
15267
15268         * mini-amd64.c: Register allocator fixes.
15269
15270         * mini.c: Add an optimization to emit_state to avoid allocation of new
15271         registers on some platforms.
15272
15273 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
15274
15275         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
15276
15277         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
15278         allocation. Fixes #63085.
15279
15280         * basic-long.cs: Add new regression test.
15281
15282         * mini-amd64.c: Register allocator improvements.
15283
15284 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
15285
15286         * mini-amd64.c (read_tls_offset_from_method): Add another code
15287         sequence.
15288
15289         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
15290         instruction sequence for nullifying class init trampolines.
15291
15292         * objects.cs: Add new regalloc test.
15293
15294         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
15295
15296 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
15297
15298         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
15299         
15300         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
15301         arguments.
15302
15303         * driver.c: Fix profiling after TLS changes.
15304         
15305         * driver.c (mono_main): Set mono_stats.enabled if needed.
15306
15307         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
15308         CEE_BOX.
15309
15310 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
15311
15312         * mini-x86.c: use a 1 op rather than a 2 op tls access
15313         instruction -> faster.
15314
15315 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
15316
15317         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
15318         x86 backend.
15319
15320 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
15321
15322         * exceptions-sparc.c (throw_exception): fix typo
15323
15324 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
15325
15326         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
15327         set tree->dreg correctly with tls. Allow any
15328         register to be used.
15329
15330         * mini-x86.c (read_tls_offset_from_method): add new code
15331         generation pattern seen with GCC.
15332
15333
15334 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
15335
15336         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
15337         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15338         exceptions-sparc.c: fix some performance issues in exception
15339         handling and setting of the stack trace for exceptions that were
15340         already thrown.
15341
15342 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
15343
15344         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
15345         x86 backend.
15346         
15347         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
15348         registers.
15349
15350 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
15351
15352         This patch inlines tls access, when possible.
15353         
15354         * mini.h: new arch functions for TLS intrinsics.
15355         All platforms updated with a stub.
15356
15357         * mini.c: use the new intrinsics
15358
15359         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
15360         arch specific intrinsic for tls variables
15361
15362 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
15363
15364         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
15365         under windows.
15366
15367 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
15368
15369         * mini.c: thread local allocation
15370
15371 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
15372
15373         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
15374
15375         * Makefile.am: Link against the static version of libmonogc.
15376         
15377         * Makefile.am: Link the static versions of the convenience libraries
15378         into the mono executable.
15379
15380         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
15381
15382 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
15383
15384         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
15385         on integer overflow.
15386
15387         * mini-amd64.c: Reorganize function call code.
15388
15389         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
15390
15391 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
15392
15393         * inssel-x86.brg: use xor eax,eax.
15394         
15395         * basic.cs: new tests
15396
15397 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
15398
15399         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
15400         in exception throwing code.
15401         
15402 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
15403
15404         * inssel-x86.brg: use xor esi,esi.
15405
15406 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
15407
15408         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
15409         can trace methods compiled during mini_init () too.
15410
15411         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
15412         CEE_CONV_U4.
15413
15414 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
15415
15416         * Makefile.am: static link on x86 (r=zoltan)
15417
15418 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
15419
15420         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
15421         code since it causes some programs to fail.
15422
15423 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
15424
15425         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
15426
15427 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
15428
15429         * mini.c: ovfops_op_map - add STACK_OBJ case for
15430         CONV_I 
15431         * basic.cs: add test_0_pin_string as test
15432         case for above.
15433
15434 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
15435
15436         * Makefile.am: build C# if srcdir != builddir
15437
15438 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
15439
15440         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
15441         fall-through blocks.
15442
15443 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15444
15445         * driver.c: enable loop by default again and include abcrem in -O=all.
15446
15447 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
15448
15449         * iltests.il: Add some localloc tests.
15450
15451         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
15452
15453         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
15454         Fixes #62574.
15455
15456         * inssel-amd64.brg: Add some optimizations.
15457
15458         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
15459         for gcc-3.4.
15460
15461         * Makefile.am: Statically link mono against libmono on AMD64.
15462         
15463         * mini-amd64.c inssel-amd64.brg: Optimizations.
15464
15465 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
15466
15467         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
15468
15469         * tramp-amd64.c: Patch calling code in trampolines.
15470
15471 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
15472
15473         * mini-amd64.c: pinvoke struct passing fixes.
15474
15475 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
15476
15477         * mini-sparc.c: redo change, make mono_arch_cpu_init call
15478         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
15479
15480 2004-08-05  Duncan Mak  <duncan@ximian.com>
15481
15482         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
15483         CEE_LDELEM_ANY.
15484
15485 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
15486
15487         * mini-amd64.c (emit_move_return_value): Move return value for normal
15488         calls too.
15489
15490 2004-08-05  Martin Baulig  <martin@ximian.com>
15491
15492         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
15493         `type->type'; just modify `type' itself when dealing with enums
15494         and generic instances.
15495         (check_call_signature): Make `simple_type' a `MonoType *'.
15496
15497 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
15498
15499         * mini.c: Use OP_PADD to add offsets to addresses.
15500
15501         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
15502
15503 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
15504
15505         * mini-sparc.c (mono_arch_emit_epilog): fix check
15506         for folding last op into restore instruction
15507
15508 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
15509
15510         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
15511         helper methods using the code manager.
15512         
15513         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
15514
15515         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
15516
15517 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15518         
15519         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
15520           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
15521
15522         * mini-s390.c: fix tail processing
15523
15524 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
15525
15526         * mini-ppc.c: mul.ovf.un exception name fix.
15527
15528 2004-08-03  Martin Baulig  <martin@ximian.com>
15529
15530         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
15531         instances; before jumping to `handle_enum', also modify `ptype'.
15532
15533 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
15534
15535         * cpu-sparc.md: fcall maximal length too small.
15536
15537 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
15538
15539         * mini-amd64.c mini.h: Add initial support for passing/returning 
15540         structures to/from pinvoked methods.
15541
15542 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
15543
15544         * mini-ppc.c: reg allocator fix.
15545
15546 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
15547
15548         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
15549
15550         * inssel.brg: Optimize memset on 64 bit machines.
15551
15552         * mini-amd64.c: Fix some vararg cases.
15553
15554 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15555
15556         * mini-s390.c: Corrected macro in emit_float_to_int
15557
15558         * s390-abi.cs: Tests to exercise the s390 ABI
15559
15560 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
15561
15562         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
15563         caller saved regs.
15564
15565         * basic.cs: Add a test for add.ovf.un.
15566
15567 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
15568
15569         * mini-sparc.c: add case for OP_IDIV_UN
15570
15571 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
15572
15573         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
15574         
15575         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
15576
15577 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
15578
15579         * basic.cs: regression tests.
15580
15581         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
15582         regressions.
15583
15584 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
15585
15586         * basic.cs: Add a new test.
15587
15588         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
15589         and AOT. Various fixes and optimizations.
15590
15591         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
15592
15593 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
15594
15595         * mini-ppc.c: make sure temp regs are not used for global reg
15596         allocation.
15597
15598 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
15599
15600         * cpu-sparc.md: conv_i8 fix for 64bits
15601
15602         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
15603
15604 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
15605         
15606         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
15607         add opcode for cmp BYTE PTR [eax], imm.
15608
15609         * inssel.brg: Make memcpy and memset takes bases.
15610
15611 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
15612
15613         * *-amd64.*: More AMD64 work.
15614         
15615 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
15616
15617         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
15618         add a compare-not-equal opcode.
15619         
15620 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
15621
15622         * mini.c: Use mono_init_from_assembly instead of mono_init.
15623         
15624 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
15625
15626         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
15627
15628         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
15629
15630         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
15631
15632         * inssel.brg: 64 bit fixes.
15633
15634         * mini.h (MonoCallInst): Add some AMD64 specific data.
15635
15636         * mini.h: Add some OP_P opcodes.
15637
15638 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
15639
15640         * basic.cs: tests for 61797 and 61740
15641
15642 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
15643
15644         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
15645         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
15646
15647 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
15648
15649         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
15650
15651         * *-amd64*.*: Ongoing AMD64 work.
15652
15653 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
15654
15655         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
15656
15657         * *-amd64*: Ongoing AMD64 work.
15658
15659         * mini-arch.h: Add AMD64 support.
15660
15661         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
15662
15663         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
15664
15665         * mini-ops.h: Add new opcodes.
15666
15667         * Makefile.am: Add AMD64 support.
15668
15669         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
15670         rules into the inssel-long*.brg files.
15671
15672         * *-amd64.*: Add beginnings of AMD64 backend.
15673
15674 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
15675
15676         * mini.c (print_dfn): commenting out the code that prints
15677         the cil. With -O=deadce, this makes -v -v crash.
15678         
15679         * cpu-pentium.md: make checkthis have a length of 2
15680
15681 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
15682
15683         * mini-sparc.h: fix implementations of __builtin
15684         functions for Sun compiler for V9.
15685
15686 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
15687
15688         * mini.c: use the new stelem.ref wrapper
15689         * exceptions.cs, arrays.cs: new stelem.ref tests
15690
15691 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
15692
15693         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
15694         new XSP should work with these changes).
15695
15696 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
15697         
15698         * inssel-{long32,x86,}.brg: trivial optimizations.
15699         
15700 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
15701
15702         * mini.c: load value when emitting box operation in
15703         constrained calls.
15704
15705 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
15706
15707         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
15708         is one byte shorter than cmp DWORD PTR [eax], 0.
15709
15710 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
15711
15712         * inssel-ppc.brg: arguments on the stack are always
15713         relative to the stack pointer (spotted by Neale Ferguson).
15714
15715 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15716
15717         * exceptions-x86.c: delay appending the method name to the trace until
15718         after mono_jit_info_table_find is called, as this gets the real
15719         MonoMethod.
15720
15721 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
15722
15723         * aot.c: register roots
15724
15725 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
15726
15727         * aot.c : I could just use PLATFORM_WIN32 flag.
15728
15729 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
15730
15731         * aot.c : Reverting the previous fix. This time it broke linux build.
15732
15733 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
15734
15735         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
15736
15737 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
15738
15739         * mini.c (handle_stack_args): Remove some more debugging code.
15740         
15741         * mini.c (handle_stack_args): Remove debug output left in by mistake.
15742
15743         * driver.c mini.h aot.c: Allow additional options to be specified with
15744         --aot and pass them to mono_compile_assembly.
15745
15746         * aot.c: Add experimental code to AOT compile all loaded assemblies
15747         on demand and save the code into a cache in the filesystem.
15748
15749         * aot.c: Add support for more wrapper methods.
15750         
15751         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
15752         58863.
15753
15754         * cpu-*.md: Remove removed opcodes.
15755
15756         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
15757         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
15758         related icalls to marshal.c.
15759
15760 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
15761
15762         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
15763
15764         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
15765
15766         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
15767
15768 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
15769         * liveness.c: If liveness is recomputated we need to reset the information
15770         for each variable. This way, if the liveness range has been narrowed
15771         by optimizations that happened after the last computation, we can return
15772         a smaller range.
15773         
15774         For example, if you have
15775         
15776         {
15777                 int i = 0;
15778                 
15779                 // Tons of code that does not affect i
15780                 
15781                 i = foo ();
15782                 ...
15783         }
15784         
15785         i = 0 is dead code and will be removed by SSA. However, when
15786         linear scan gets to the code, i will still appear to be live
15787         throughout the entire block. This prevents good register allocation.
15788
15789 2004-07-06  Martin Baulig  <martin@ximian.com>
15790
15791         * debug-mini.c (mono_debug_init_method): Allow
15792         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
15793         (mono_debug_add_icall_wrapper): New method.
15794
15795         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
15796
15797 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
15798
15799         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
15800         optimization.
15801
15802 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
15803
15804         * aot.c (mono_aot_load_method): Fix loading of debug info.
15805
15806 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
15807
15808         * aot.c: Add logging support.
15809
15810 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
15811
15812         * mini.h: Add prototype for mono_print_method_from_ip.
15813
15814         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
15815
15816         * inssel.brg: 64 bit fixes.
15817
15818         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
15819         inssel-long32.brg.
15820
15821         * Makefile.am: Add SPARC64 support.
15822
15823 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
15824
15825         * aot.c: Fix alignment problems on 32 bit platforms.
15826
15827 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
15828
15829         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
15830         SPARC64.
15831
15832         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
15833         problems.
15834
15835         * mini.h: Bump AOT file version. Some 64 bit fixes.
15836
15837 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
15838
15839         * inssel-sparc.brg: Add new rule to avoid register moves.
15840
15841         * inssel.brg: Add ldind_to_load_membase helper function.
15842
15843 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
15844
15845         * mini.c: OffsetToStringData intrinsic.
15846         
15847 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
15848
15849         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
15850
15851         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
15852         regression tests.
15853
15854         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
15855 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
15856
15857         * mini.c: reinstated mono_compile_get_interface_var()
15858         on x86, too, since the change breaks the Gtk# build there as well.
15859
15860 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15861
15862         * driver.c: remove loop from the default optimizations: it seems to
15863         interact badly with some of the other options (see bug #60613).
15864
15865 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
15866
15867         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
15868         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
15869
15870 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
15871
15872         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
15873         vararg-using methods.
15874
15875 2004-06-21  Martin Baulig  <martin@ximian.com>
15876
15877         * mini/mini-exceptions.c
15878         (mono_handle_exception): Added `gpointer original_ip' argument.
15879         After calling mono_unhandled_exception(), call
15880         mono_debugger_unhandled_exception() and if that returns true,
15881         restore the context and return.
15882
15883 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
15884
15885         * mini-ppc.c: prefer the use of relative branches so
15886         they won't need to be patched in aot code (patch from Patrick Beard).
15887
15888 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
15889
15890         * aot.c: patch from Patrick Beard to make the output assembly
15891         more correct for the MacOSX assembler. Small tweak to
15892         generate sane images on Linux/PPC, too.
15893
15894 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15895
15896         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
15897         case until bug #59509 is fixed (shows up in #60332).
15898
15899 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15900
15901         * mini.c: make sure the needed wrappers are compiled, too, with
15902         precomp.
15903
15904 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
15905
15906         * driver.c: remove NPTL reference in --version output.
15907
15908 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15909
15910         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
15911         generate valid assembly for the Mach-O assembler.
15912
15913 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
15914
15915         * driver.c: don't include abcrem in the all optimization specifier
15916         since it slows down jit compilation too much for now.
15917
15918 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
15919
15920         * mini.c: use BIGMUL only if both operands have the same signage.
15921         * iltests.il: Test for bug 60056. (errors related to signage in
15922         BIGMUL).
15923
15924         r=lupus.
15925
15926 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
15927
15928         * mini.c, aot.c: memory leak fixes.
15929
15930 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
15931
15932         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
15933
15934 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
15935
15936         * Makefile.am: remove the -static hack completely, it links in
15937         statically glib as well.
15938
15939 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
15940
15941         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
15942         * exceptions.cs: make it compile with new mcs/csc.
15943
15944 2004-06-03 Massimiliano Mantione <massi@ximian.com>
15945         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
15946         and added relevant test case.
15947
15948 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
15949
15950         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
15951         regressions in gtk-sharp.
15952
15953 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
15954
15955         * exceptions.cs: New regression tests.
15956
15957         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
15958
15959 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
15960
15961         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
15962
15963 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
15964
15965         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
15966
15967         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
15968
15969 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
15970
15971         * mini.c (mono_jit_runtime_invoke): Init class in this
15972         method instead of trusting mono_jit_compile_method to
15973         do the work (because wrappers can be in object class)
15974
15975 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
15976
15977         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
15978
15979         * basic-long.cs: New regression test.
15980
15981 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
15982
15983         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
15984         and div/rem checks.
15985
15986 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
15987
15988         * Makefile.am: fix miguel's change to build mono statically against
15989         libmono (track build dependencies).
15990
15991 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
15992
15993         * cfold.c: Some glib versions do not have G_MININT32.
15994
15995 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
15996
15997         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
15998         with precision of tan, atan, sin and cos, and implemented related
15999         regressions tests (fixes bug 54467, but one new problem appeared and
16000         is not fixed yet).
16001
16002 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
16003
16004         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
16005
16006         * exceptions.cs: Add test for constant folding && division by zero.
16007
16008         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
16009         since driver.c is in libmono too, so the optimization was useless.
16010
16011         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
16012         variable to driver.c so the compiler can emit more efficient code to
16013         access them.
16014
16015 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16016
16017         * Makefile.am: don't distribute generated inssel.[ch] files.
16018
16019 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
16020
16021         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
16022         into the default appdomain. Fixes #58707.
16023
16024         * jit-icalls.c: Remove the broken approximation for truncl, doing
16025         no conversion is better.
16026
16027         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
16028         Fixes #58863.
16029
16030 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16031
16032         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
16033         of the mcrxr instruction which is not available on some processors
16034         even if it's documented to be. Implement add and sub overflow correctly
16035         (still not complete for long unsigned). Speed up icalls a bit.
16036
16037 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
16038
16039         * mini.c (mono_jit_compile_method_with_opt): Make sure that
16040         we run .cctor in the current domain instead of target_domain.
16041         
16042         Fixes bug #58558, .cctor not being called in -O=shared.
16043
16044 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16045
16046         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
16047
16048 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
16049
16050         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
16051         which can be done with an imm8, do it that way.
16052         (mono_arch_output_basic_block): ditto for a jmp
16053         (mono_arch_emit_prolog): Computate maximum offset of a label.
16054
16055 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
16056
16057         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
16058         now tries to allocate prefered physical reg's for virtual
16059         regs. This reduces the number of emited spills/loads with
16060         20-30% on our core assemblies.
16061
16062 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16063
16064         * jit-icalls.c: truncl() is not needed and trunc() is
16065         the correct thing to do anyway (bug #58287).
16066
16067 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
16068
16069         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
16070         if available.
16071
16072 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
16073
16074         * driver.c: enable loop optimizations by default.
16075
16076 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
16077
16078         * mini-x86.c: fix calc of max loop size when aligning loops start.
16079
16080 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
16081
16082         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
16083         the stack.
16084
16085 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
16086
16087         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
16088         should set carry.
16089
16090         * basic-long.cs: Add tests for add/subtract of immediates with carry.
16091
16092         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
16093         
16094         * mini.c (inline_method): Allways inline some wrappers even if the cost
16095         is too large. Fixes #58785.
16096
16097         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
16098         
16099 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
16100
16101         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
16102         (crichton@gimp.org). Beginning of support for sparc/linux.
16103
16104         * mini-sparc.c: Optimize retrieval of LMF address.
16105
16106 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
16107
16108         * exceptions-ppc.c:  handle alloca in methods with clauses.
16109
16110 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
16111
16112         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
16113
16114 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
16115
16116         * mini.c: Delegate most of the abort signal work to 
16117           mono_thread_request_interruption, which also handles Stop and Suspend
16118           states.
16119
16120 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
16121
16122         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
16123         supports the save/restore lmf opcodes.
16124
16125 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
16126
16127         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
16128         by gcc-3.4 as well.
16129
16130         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
16131
16132 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
16133
16134         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
16135         methods which contain array accesses.
16136
16137         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
16138         boundaries. Fixes #58537.
16139
16140         * iltests.il: Add regression test for #58537.
16141
16142 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
16143
16144         * mini-x86.c (mono_arch_local_regalloc): Last part of
16145         fix for bug #58633 (releasing register to early).
16146
16147 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
16148
16149         * basic-long.cs: Add new regression test.
16150
16151 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
16152
16153         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
16154         register too early on the chain.
16155
16156 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
16157
16158         * mini.c (create_helper_signature): Use a helper function to reduce
16159         the code which needs to be written. Also set the calling convention of
16160         icalls on windows. Fixes #57840.
16161
16162 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
16163
16164         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
16165         exceptions-ppc.c: added helper function to get the instruction address
16166         from a signal handler context.
16167
16168 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16169
16170         * helpers.c: use g_get_tmp_dir. Invokes happyness 
16171         from gonzalo.
16172
16173 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16174
16175         * helpers.c: Add new env variable to pass args to objdump.
16176         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
16177
16178 2004-05-17  Radek Doulik  <rodo@ximian.com>
16179
16180         * Makefile.am (common_sources): added abcremoval.h so it get
16181         disted and daily mono packages on go-mono.com will build again
16182
16183 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
16184
16185         * abcremoval.c: Fixed coding style, added copyright header.
16186
16187         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
16188
16189         * mini.h: Added prototype for abc removal main function.
16190
16191         * build_relations_propagation_table.pl: Added copyright header.
16192
16193 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
16194
16195         * basic-long.cs: reg test for complex ceq_long bug.
16196
16197 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
16198
16199         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
16200         reg in long and clob case (bug #58343). Fixed/added comments.
16201
16202 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
16203
16204         * mini.c (mono_jit_runtime_invoke): Follow new convention
16205         of calling the invoke method with an function pointer.
16206
16207 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
16208
16209         * ChangeLog: Fix author of memory leak patch.
16210
16211 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
16212
16213         * Makefile.am: fix make dist as well...
16214
16215
16216 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
16217
16218         * cfold.c: Made so that conversions from pointer to int4 are no-ops
16219         on archs where pointers are 4 bytes long.
16220
16221         * Makefile.am: Added abcremoval.c source file.
16222
16223         * abcremoval.c: Added abcremoval.c.
16224
16225         * abcremoval.h: Added abcremoval.h.
16226
16227         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
16228
16229         * inssel.brg: Enabled bounds check removal.
16230
16231         * mini.c: Added support for abcrem optimization.
16232
16233         * mini.h: Added abcrem optimization label.
16234
16235         * driver.c: Added support for abcrem optimization.
16236
16237         * propagated_relations_table.def: Added propagated_relations_table.def.
16238
16239 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
16240
16241         * mini.c, cfold.c: fix style.
16242
16243 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16244
16245         * mini.c: handle issue with the low-level implementation of
16246         some long opcodes (bug #54209).
16247
16248 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
16249
16250         * basic.cs: test for my new cmov stuff.
16251
16252 2004-05-13      Patrik Torstensson
16253
16254         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
16255         opt and added peephole documentation.
16256
16257 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
16258
16259         * tramp-ppc.c: rewrote the generic trampoline code.
16260
16261 2004-05-11      Patrik Torstensson
16262
16263         * mini-x86.c: optimize long shl/shr asm code (one less branch)
16264
16265 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
16266
16267         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
16268
16269         * mini.h mini.c dominators.c: Applied patch from Derek Woo
16270         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
16271
16272         * mini.c: Add new icalls for AsAny marshalling.
16273
16274 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
16275
16276         * tramp-ppc.c, mini-ppc.c: more cleanups.
16277
16278 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16279
16280         * mini.c: no warnings.
16281
16282 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16283
16284         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
16285
16286 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
16287
16288         * mini.c: In the thread abort signal handler, if the thread is in the
16289         process of being stoped, don't throw the Abort exception, just stop the
16290         thread.
16291
16292 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
16293
16294         * tramp-ppc.c: removed old code.
16295
16296 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16297
16298         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
16299         do some simple speed optimizations on ppc.
16300
16301 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
16302
16303         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
16304         and large offsets in load/store.
16305
16306 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
16307
16308         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
16309         it causes regressions.
16310
16311 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
16312
16313         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
16314         support.
16315
16316 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16317
16318         * jit-icalls.c: remove warnings.
16319         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
16320         speedups for unsafe code.
16321
16322 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
16323
16324         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
16325
16326 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
16327
16328         * basic-calls.cs: Add new regression test.
16329
16330         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
16331         more portable.
16332
16333         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
16334
16335         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
16336         is no longer used.
16337
16338 2004-05-06      Patrik Torstensson
16339
16340         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
16341         long reg allocation in any reg (not only eax:edx) and implemented 
16342         long shl/shr ops in asm instead of helpers.
16343
16344 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
16345
16346         * mini-sparc.h: Fix warnings.
16347
16348         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
16349         stack.
16350
16351         * mini-exceptions.c (mono_handle_exception): Call the filter in a
16352         separate statement for clarity.
16353
16354         * mini-sparc.c: Update status.
16355
16356 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
16357
16358         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
16359         here.
16360
16361 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16362
16363         * inssel-ppc.brg: another small pre-release workaround:
16364         we don't do overflow detection for long_sub_un.
16365
16366 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16367
16368         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
16369         (also works around a weird ppc bug: 57957).
16370
16371 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
16372
16373         * tramp-ppc.c: trampoline fixes.
16374
16375 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
16376
16377         * mini-ppc.c: fixed typos.
16378
16379 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
16380
16381         * mini-ppc.c, exceptions-ppc.c: more code saves registers
16382         at the top of the stack. Fixed typos. Use a frame registers
16383         for all the methods with exception clauses.
16384
16385 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16386
16387         * exceptions-ppc.c: restore fp registers.
16388
16389 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16390
16391         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
16392         order from the stack top (moved the stack room to save the
16393         return value for trace after the param area). Fixed corruption
16394         in restoring registers on unwind.
16395
16396 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
16397
16398         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
16399
16400 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16401
16402         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
16403         and prolog/epilog for methods that use it. Allow
16404         enough param area room for varargs methods. Fix miguel's
16405         breakage in exception handling.
16406
16407 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16408
16409         * Makefile.am: run genmdesc only on current arch.
16410
16411 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16412
16413         * exceptions-x86.c:
16414         * mini-x86.h: fix the build on windows.
16415
16416 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
16417
16418         * 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.
16419
16420         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
16421
16422         * mini-exceptions.c: New file.
16423         
16424         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
16425         Move some parts of the x86 exception handling code to an 
16426         arch-independent file so it can be shared with other ports.
16427
16428 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
16429
16430         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
16431
16432 2004-04-26  David Waite  <mass@akuma.org>
16433
16434         * driver.c: remove comma from end of enumeration declaration
16435
16436 2004-04-26  Jackson Harper  <jackson@ximian.com>
16437
16438         * driver.c: parse config file before loading first assembly. This
16439         allows the user gac to be enabled/disabled. 
16440         
16441 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
16442
16443         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
16444         simpler mechanism: we do not care what is encoded initially
16445         (branch absolute or relative), we care about the code and its
16446         target.  I kept the old code for reference for now.
16447
16448         The new code tries first to determine if the jump is anywhere in
16449         the -/+32 absolute meg range, if it succeeds, it encodes using the
16450         absolute branch;  If not, it tried to find something in the
16451         relative range, if not, it uses the handle_thunk code. 
16452
16453 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
16454
16455         * exceptions-ppc.c: use the correct ip register on macosx.
16456
16457 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
16458
16459         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
16460
16461 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
16462
16463         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
16464         Raise exception on integer divide by zero by hand since the hw
16465         doesn't support it. Handle NaNs in FP compares.
16466
16467 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
16468
16469         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
16470         code reducing duplication between the platforms and enabled
16471         signal exception handling (on linux for now).
16472
16473 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
16474
16475         * exceptions-ppc.c: more macosx support.
16476
16477 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16478
16479         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
16480
16481 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
16482
16483         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
16484
16485 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
16486
16487         * iltests.il: more tests.
16488
16489 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
16490
16491         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
16492         vars as well.
16493
16494 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
16495
16496         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
16497
16498 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
16499
16500         * liveness.c: Mark variables as volatile in all basic blocks reachable
16501         from exception clauses.
16502
16503 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
16504
16505         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
16506         inlining.
16507
16508 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
16509
16510         * iltests.il, basic.cs: more tests for regalloc.
16511
16512 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16513
16514         * iltests.il: Some tests for register allocation modifications
16515         I have locally.
16516
16517 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
16518
16519         * exceptions.cs: Add regression test for bug #56782.
16520
16521         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
16522         original stack trace if an exception is rethrown. Fixes #56782. Oh,
16523         the beauty of fixing the same thing in 5 different files...
16524
16525 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
16526
16527         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
16528         methods.
16529
16530 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
16531
16532         * mini.c: Add support for STRWLPARRAY marshalling convention.
16533
16534 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
16535
16536         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
16537         to init the context to setup the regs pointer).
16538
16539 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16540
16541         * exceptions-ppc.c: more exceptions work.
16542
16543 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16544
16545         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
16546         not allowed.
16547
16548 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
16549
16550         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
16551         can use the memory directly.
16552
16553         * cpu-pentium.md: Update documentation from a post from Zoltan. 
16554
16555         add x86_add_membase, x86_sub_membase, x86_mul_membase
16556
16557 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
16558
16559         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
16560         GENERAL_REGS they were also hardcoded for all PPC ports.
16561
16562         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
16563
16564         Remove hard-coded limit for floating point registers, use
16565         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
16566
16567         Notice that in MacOS X calling conventions you can fit a lot more
16568         floating point values in registers, so I should update the PInvoke
16569         test to excercise the passing of floating point values on the
16570         stack (currently broken).
16571         
16572 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
16573
16574         * tramp-ppc.c (create_trampoline_code): Added
16575         JUMP_TRAMPOLINE_SIZE. 
16576         (ppc_magic_trampoline): Follow the pattern from
16577         x86_magic_trampoline: if code is set to zero, return. 
16578         (create_trampoline_code): Always pass MonoMethod to the jump
16579         trampoline, before it was passing a null.
16580         (mono_arch_create_jump_trampoline): Implement the jump stub, could
16581         share the code with mono_arch_create_jit_trampoline. 
16582
16583         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
16584         implemented.
16585         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
16586         implemented.  
16587
16588         * cpu-g4.md: Added length for jmp instruction, the worst case
16589         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
16590         for save_lmf).
16591
16592 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
16593
16594         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
16595
16596 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
16597
16598         * mini.c: Only set bblock->real_offset when adding a new bblock, and
16599         before each IL instruction.
16600
16601         * mini.c (CEE_BOX): Fix warnings.
16602
16603 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16604
16605         * mini.c: removed a few unused vars and extra whitespace.
16606
16607 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
16608
16609         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
16610         checks.
16611         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
16612         index.
16613         (OP_GETCHR): use the above
16614         (CEE_LDELEMA): use the above.
16615
16616         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
16617         version of the generic impl.
16618         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
16619         (CEE_LDELEMA): use the above.
16620
16621 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
16622
16623         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
16624         Fixes #56317.
16625
16626         * iltests.il: Added new regression test for #56317.
16627
16628 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
16629
16630         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
16631         under NetBSD. Fixes #56450.
16632
16633         * liveness.c (update_gen_kill_set): Fix previous patch.
16634
16635 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16636
16637         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
16638
16639 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
16640
16641         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
16642         ldsfld and ldsflda.
16643
16644         * inssel-sparc.brg: Add more optimizations.
16645
16646         * mini-sparc.c: Replace multiply/divide with shifts if possible.
16647
16648 2004-04-01  Martin Baulig  <martin@ximian.com>
16649
16650         * mini.c (handle_box): New static function; moved the
16651         implementation of CEE_BOX here.
16652         (mono_method_to_ir): Added `constrained_call' variable.
16653         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
16654         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
16655         mono_method_get_constrained() to get the method.
16656
16657 2004-04-01  Martin Baulig  <martin@ximian.com>
16658
16659         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
16660         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
16661         (mono_method_to_ir): We don't need these macros anymore since
16662         mono_class_get_full() already takes care of it. 
16663
16664 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16665
16666         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
16667         use @function (as doesn't accept #function here) and check the return
16668         value of system and stop if fails.
16669
16670 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16671
16672         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
16673
16674 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
16675
16676         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
16677
16678         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
16679
16680         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
16681         #56223.
16682
16683         * basic-long.cs: Add test for negation of Int64.MinValue.
16684
16685 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
16686
16687         * mini-sparc.c: Update status.
16688
16689         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
16690
16691         * exceptions-sparc.c: Fix return value in filters.
16692
16693         * inssel-sparc.brg: Fix register allocation in some rules.
16694
16695 2004-03-28  Martin Baulig  <martin@ximian.com>
16696
16697         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
16698         if neccessary.  
16699
16700 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
16701
16702         * mini-x86.c (mono_arch_patch_code): Fix warnings.
16703         
16704         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
16705         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
16706         remove unused conv_u4 opcode.
16707
16708         * mini-x86.c: Remove valgrind workaround since it slows down things
16709         even when mono is not run under valgrind.
16710
16711 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
16712
16713         * mini-sparc.c: Update status.
16714
16715         * inssel-sparc.brg: Add some optimizations.
16716
16717         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
16718         future delay slot filling. Add support for varargs, tail calls and JMP.
16719
16720         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
16721         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
16722
16723         * inssel.brg: Fix register allocation in OP_ARGLIST.
16724
16725         * inssel.brg: Fix warnings.
16726
16727 2004-03-25  Martin Baulig  <martin@ximian.com>
16728
16729         * mini.c (inflate_generic_field): Removed.
16730         (mini_get_method): Removed, use mono_get_method_full(),
16731         (mini_get_class): Removed, use mono_class_get_full().
16732         (mono_method_to_ir): Pass our generic context to
16733         mono_field_from_token().        
16734
16735 2004-03-25  Martin Baulig  <martin@ximian.com>
16736
16737         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
16738         of a `MonoMethod *'.
16739         (mini_get_method): Take a `MonoGenericContext *' instead
16740         of a `MonoMethod *'.
16741         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
16742         a new local variable called `generic_context' which holds the
16743         current `MonoGenericContext *'; use it to lookup things.
16744
16745 2004-03-24  Martin Baulig  <martin@ximian.com>
16746
16747         * mini.c (mini_get_class): New static method; if we're inside a
16748         generic instance, inflate the class if neccessary.
16749         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
16750
16751 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
16752
16753         * iltests.il: New regression test for #55976.
16754
16755         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
16756         #55976.
16757
16758 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
16759
16760         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
16761         output.
16762
16763 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
16764
16765         * liveness.c: Consider SSA stores as well as loads when making vars
16766         volatile.
16767
16768         * exceptions.cs: New regression tests for register allocation.
16769         
16770 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
16771
16772         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
16773         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
16774           domain lock only to protect puntual access to data structures.
16775           Added access lock for sighash, jit_icall_hash_name, 
16776           jit_icall_hash_addr and domain->code_mp.
16777
16778 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
16779
16780         * driver.c: Print SIGSEGV handling method.
16781
16782         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
16783
16784         * mini.c (setup_jit_tls_data): Handle case when this is called
16785         multiple times for a thread.
16786
16787         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
16788         is different from fbxx_un. Fixes #54303. Also use constants instead of
16789         magic numbers in a lot of places.
16790
16791 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
16792
16793         * exceptions.cs: Fix cctor test when --regression is used.
16794
16795 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
16796
16797         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
16798         for Linux/ppc.
16799
16800 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
16801
16802         * inssel-ppc.brg: fixed register assignments for some rules.
16803
16804 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
16805
16806         * exceptions.cs: Add test for exceptions in static constructors.
16807
16808         * mini.c (mono_jit_compile_method_with_out): Move the calling of
16809         static constructors outside the domain lock. Fixes #55720.
16810
16811 2004-03-17  Martin Baulig  <martin@ximian.com>
16812
16813         * mini.c (get_generic_field_inst): Removed, this'll never happen.
16814         (inflate_generic_field): Take the `MonoMethod *' instead of the
16815         `MonoClass *' and added support for generic method.
16816         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
16817         have a `field->parent->gen_params', only inflate the field if it's
16818         an open constructed type.
16819
16820 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
16821
16822         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
16823         exception object instead of the preconstructed ones.
16824
16825 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16826
16827         * mini.c: reverted changed to sigsegv_signal_handler commited
16828         accidentally in the previous patch.
16829
16830 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16831
16832         * mini.c:
16833         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
16834         running --aot with an old assembly.
16835
16836 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
16837
16838         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
16839         point values.
16840
16841         * mini-sparc.c: Add support for v9 branches with prediction.
16842
16843 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
16844
16845         * mini.c (mini_init): #warning is GNUC only
16846
16847         * mini-sparc.h: implement __builtin_frame_address
16848         and __builtin_return_address for Sun C compiler
16849
16850 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
16851
16852         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
16853
16854 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
16855
16856         * basic-calls.cs: Add test for unaligned byref long argument passing.
16857
16858         * mini-ops.h: Add sparcv9 compare and branch instructions.
16859
16860         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
16861         v9 instructions if we have a v9 cpu.
16862
16863         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
16864         registers for global allocation.
16865
16866         * exceptions-sparc.c: Fixes.
16867         
16868 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
16869
16870         * liveness.c (mono_analyze_liveness): Optimized version.
16871
16872         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
16873
16874         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
16875         sparc work.
16876
16877         * basic-float.cs basic-calls.cs: New regression tests.
16878
16879 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
16880
16881         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
16882         sigaltstack implementation.
16883
16884         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
16885         
16886         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
16887         stuff if SIGSEGV_ON_ALTSTACK is not defined.
16888
16889 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
16890
16891         * mini.c: Fix warnings.
16892         
16893         * mini.c (mono_resolve_patch_target): New function which contains the
16894         arch independent part of the patching process.
16895
16896         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
16897         patching code to a separate function.
16898
16899 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
16900
16901         * mini.c (add_signal_handler): ifdef out on Windows
16902
16903 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
16904
16905         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
16906         cpu-sparc.md: Add exception handling support + other fixes.
16907
16908         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
16909         typed GC detection in --version.
16910
16911         * basic.cs exceptions.cs: New regression tests.
16912
16913         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
16914         the arch specific code can store data during a compilation.
16915
16916         * mini-ops.h: Add OP_SETFRET.
16917
16918         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
16919         function, register a separate icall for each arity, so the icalls can
16920         get a wrapper.
16921         
16922         * mini.c (mono_print_tree): Print negative offsets in a more readable
16923         form.
16924         
16925         * mini.c: Make signal handling work on sparc.
16926         
16927         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
16928
16929         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
16930
16931         * jit-icalls.c: Emulate truncl by aintl on solaris.
16932
16933         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
16934
16935 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
16936
16937         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
16938
16939 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
16940
16941         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
16942         a MarshalByRef type, inline a method that performs the check, taking into
16943         account that the object can be a proxy. Also implemented tow new opcodes:
16944         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
16945         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
16946         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
16947
16948 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
16949
16950         * mini-ppc.c: if a relative branch displacement is too big
16951         but it points to and area reachable with an absolute branch, 
16952         avoid the thunks.
16953
16954 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
16955
16956         * mini.c: optimize small copies in cpblk.
16957
16958 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
16959
16960         * basic-calls.cs basic-float.cs: New regression tests.
16961
16962         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
16963         negative offsets from %fp. Implement localloc. Fix local register 
16964         allocation. Fix the case when the this argument needs to be saved to
16965         the stack. Implement some missing opcodes.
16966
16967 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
16968
16969         * mini.c (mini_method_compile): Reenable global regalloc in methods
16970         with exception handlers.
16971
16972         * linear-scan.c (mono_varlist_sort): Fix warning.
16973
16974         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
16975
16976         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
16977         regalloc costs.
16978
16979         * liveness.c: Make all variables uses in exception clauses volatile, to
16980         prevent them from being allocated to registers. Fixes #42136.
16981
16982 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
16983
16984         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
16985         causes regressions.
16986
16987         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
16988         argument to mono_arch_regalloc_cost.
16989
16990         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
16991         precisely.
16992
16993 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
16994
16995         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
16996         Make the cost of allocating a variable to a register arch dependent.
16997
16998         * basic-calls.cs: Fix compilation of tests.
16999         
17000         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
17001         helper function to cut back on the number of #ifdefs needed.
17002
17003         * mini-ppc.c: Fix compilation.
17004
17005         * basic-calls.cs: New regression tests.
17006
17007         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
17008
17009         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
17010         of l0 since that is callee saved.
17011
17012         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
17013         to virtual calls.
17014
17015         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
17016         of delay instruction.
17017
17018         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
17019
17020         * mini.h (MonoCallInst): Add 'virtual' flag.
17021
17022         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
17023
17024 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
17025
17026         * *.cs: New regression tests.
17027
17028         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
17029         work.
17030
17031         * mini.c (mono_runtime_install_handlers): Fix build.
17032
17033         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
17034         'signal_stack_size' members.
17035
17036         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
17037         alternate signal stack.
17038
17039         * exceptions-x86.c: Add stack overflow handling.
17040
17041         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
17042         functions to arch independent code.
17043
17044         * mini.c (mono_print_tree): Print more detailed info for load_membase
17045         opcodes.
17046         
17047 2004-02-23  Martin Baulig  <martin@ximian.com>
17048
17049         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
17050
17051 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
17052
17053         * mini-x86.c: fixed reg allocation for div/rem.
17054
17055 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
17056
17057         * driver.c (mono_main): Report some configuratio options on --version.
17058
17059 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
17060
17061         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
17062         low in the address space. Correctly flush memory in thunks where we
17063         output native code.
17064
17065 2004-02-20  Martin Baulig  <martin@ximian.com>
17066
17067         * mini.c (mini_get_method): New static method; inflate all generic
17068         methods and methods in open generic instances.
17069         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
17070         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
17071
17072 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
17073
17074         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
17075
17076         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
17077
17078 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
17079
17080         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
17081
17082         * mini-sparc.c (flushi mono_arch_output_basic_block): make
17083         it compile using Sun's compiler.
17084
17085 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
17086
17087         * 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.
17088
17089         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
17090
17091 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
17092
17093         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
17094         code.
17095         * mini-ppc.c: handle calls outside of the allowed range with thunks
17096         allocated using the code manager.
17097         * tramp-ppc.c: use the code manager to hold generated native code.
17098         Fixed the magic trampoline to just patch vtable entries.
17099
17100 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
17101
17102         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
17103         independent file.
17104
17105 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
17106
17107         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
17108         PPC.
17109
17110         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
17111         if we have a working __thread implementation.
17112
17113         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
17114         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
17115
17116 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
17117
17118         * mini-x86.c: Fix compilation under gcc 2.
17119         
17120 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
17121
17122         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
17123         contains a call to the wrapped function.
17124
17125         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
17126         OP_<CALL>_IMM opcodes, and use them under X86.
17127         
17128         * mini.c (mono_jit_find_compiled_method): Fix warning.
17129
17130         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
17131
17132         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
17133
17134         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
17135         functionality to mini.c.
17136
17137         * mini.c (mono_create_jump_trampoline): New function to create a jump
17138         trampoline. Return a compiled method instead of a trampoline if it
17139         exists. Add a cache for jump trampolines.
17140
17141         * mini.c (mono_jit_find_compiled_method): New function to return a
17142         compiled method if it exists.
17143
17144         * mini-x86.c: Call mono_create_jump_trampoline instead of 
17145         mono_arch_create_jit_trampoline.
17146
17147         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
17148         a jump trampoline. Fixes #52092.
17149         
17150 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
17151
17152         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
17153         which is not up-to-date. Add check_corlib_version () instead.
17154
17155         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
17156         have to call it.
17157         
17158         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
17159         since newer valgrind versions do not need it.
17160
17161         * mini.c (mono_jit_compile_method_with_opt): New helper function to
17162         compile a method with a given set of optimizations.
17163
17164         * mini.c: Compile icall wrappers on-demand instead of at startup.
17165
17166         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
17167         wrapper for an icall.
17168
17169 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
17170
17171         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
17172         #54063.
17173
17174         * iltests.il: Add test for non-empty stack before switch instruction.
17175
17176 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
17177
17178         * mini.c: Add support for new stringbuilder marshalling conventions.
17179
17180         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
17181
17182 2004-02-01  Martin Baulig  <martin@ximian.com>
17183
17184         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
17185         in `ginst->mtype_argv'.
17186
17187 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
17188
17189         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
17190         facilitate grepping.
17191
17192 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
17193
17194         * mini.c: fixed buglet in initobj generic implementation for references.
17195
17196 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
17197
17198         * Makefile.am: make the version script conditional.
17199         * jit-icalls.c: handle missing truncl().
17200
17201 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
17202
17203         * exceptions.cs: Add more tests for double->int conversion.
17204
17205         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
17206         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
17207
17208 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
17209
17210         * driver.c: make --verbose --version emit an error
17211         if the loaded corlib doesn't match the runtime version.
17212
17213 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
17214
17215         * mini-ppc.h: export ppc_patch().
17216         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
17217         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
17218         on par or better than on MacOSX.
17219
17220 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
17221
17222         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
17223         mono_lookup_pinvoke_call.
17224
17225         * mini-x86.c: Under windows, the default pinvoke calling convention is
17226         stdcall. Fixes #52834.
17227
17228         * mini.c (optimize_branches): Add an upper bound to the number of
17229         iterations to prevent infinite loops on strange loops. Fixes #53003.
17230
17231 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
17232
17233         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
17234         and ISINST. Fixes #52093.
17235
17236         * objects.cs (test_0_vector_array_cast): New tests.
17237         
17238 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
17239
17240         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
17241         checking in Array.Set ().
17242
17243         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
17244         #52590.
17245
17246         * object.cs (test_0_multi_array_cast): New regression test.
17247
17248 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
17249
17250         * exceptions-ppc.c: fix build on Linux/PPC.
17251
17252 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
17253
17254         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
17255         running under valgrind.
17256         (x86_magic_trampoline): Fix build bustage.
17257
17258         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
17259         negative values as well. This is needed for the encoding of the line number
17260         info, since sometimes the line numbers are not in increasing order.
17261
17262 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
17263
17264         * cpu-pentium.md (localloc): Increase the size of the localloc 
17265         instruction since it is a loop under Win32.
17266
17267         * debug-mini.c (record_line_number): Get rid of unneccesary memory
17268         allocation.
17269
17270 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
17271
17272         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
17273         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
17274         Max Horn (max@quendi.de). Fix file names in comments.
17275
17276 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
17277
17278         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
17279         avoid stack overflow.
17280         (replace_usage): Avoid uninitialized variable warnings.
17281
17282         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
17283         and taking the address of valuetype variables.
17284
17285 2004-01-03  Patrik Torstensson
17286
17287         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
17288         for other purposes than FP later on.
17289
17290 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
17291
17292         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
17293         of tail calls.
17294
17295 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
17296
17297         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
17298
17299 2003-12-30  Patrik Torstensson <p@rxc.se>
17300
17301         * mini-x86.h: Decreased number of availiable fp regs.
17302         Solves corner cases with FP spilling.
17303
17304 2003-12-23  Patrik Torstensson <p@rxc.se>
17305
17306         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
17307         for floating point stack tracking / spilling on x86. 
17308         Fixes bug #49012.
17309         
17310         * basic-float.cs: added float mul overflow test.
17311
17312 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
17313
17314         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
17315
17316 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17317
17318         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
17319         supports for cond branches that overflow the immediate
17320         overflow offset. mcs can compile simple programs.
17321
17322 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17323
17324         * exceptions-ppc.c: exception handling support wip:
17325         finally handlers get run on exception.
17326
17327 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
17328
17329         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
17330         profiling.
17331
17332 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17333
17334         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
17335         initial support for stack walking and unwinding.
17336
17337 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
17338
17339         * driver.c (mono_main): Make corlib-out-of-sync message more 
17340         descriptive. Also remove verify_corlib call.
17341
17342 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17343
17344         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
17345         not overlap with other call's arguments, too.
17346
17347 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
17348
17349         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
17350         move to arch-specific code the choice of arch-specific
17351         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
17352         * mini.c: ensure emulation calls will not interleave
17353         with other calls.
17354
17355 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
17356
17357         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
17358         the magic trampoline stack frame is dropped before executing
17359         the new method.
17360
17361 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
17362
17363         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
17364         and integer to fp conversions. Added support for overflowing
17365         arguments on the stack. Reserve a couple more registers as temps.
17366         Added support for aot compilation (as output still needs to be
17367         tweaked, though).
17368
17369 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17370
17371         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
17372         Don't overwrite return register in some corner cases.
17373
17374 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
17375
17376         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
17377         static constructors when AOT compiling.
17378
17379         * driver.c (mono_main): Call mono_check_corlib_version.
17380
17381 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17382
17383         * cpu-g4.md, basic.cs: fixed div target register.
17384
17385 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
17386
17387         * mini-ppc.c, basic.cs: shl_imm fix with test.
17388
17389 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17390
17391         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
17392         structures by value. Misc fixes.
17393         * objects.cs: more tests.
17394
17395 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
17396
17397         * mini-ppc.c: lconv.ovf.i implemented.
17398
17399 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17400
17401         * mini.c:
17402         (mini_init): don't error out if someone already called g_thread_init.
17403
17404 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17405
17406         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
17407         to be any type per the spec. Fix abnormal memory usage when
17408         the same object is repeatedly thrown.
17409
17410 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
17411
17412         * mini.c: check for overruns in IL code.
17413
17414 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
17415
17416         * TODO: Add/remove some todo entries.
17417
17418 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
17419
17420         * driver.c (mono_main): Call mono_verify_corlib.
17421
17422 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
17423
17424         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
17425         This has been moved to mini.c
17426         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
17427         type being casted is marshalbyref it could be a proxy, so instead of
17428         emitting the type check code, emit a call to a runtime method that will
17429         perform the check by calling CanCastTo if needed.
17430
17431 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
17432
17433         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
17434         methods with large stack frames under Win32.
17435
17436 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
17437
17438         * Makefile.am: Distribute regression tests.
17439
17440         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
17441         at the end instead of inserting each variable into the sorted list.
17442
17443         * linear-scan.c (mono_varlist_sort): New helper function.
17444         
17445 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17446
17447         * mini.c: ensure arguments and locals are within bounds.
17448
17449 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17450
17451         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
17452         related fixes.
17453
17454 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
17455
17456         * mini.c (mono_cprop_copy_values): Fix crash.
17457
17458         * aot.c: Set verbosity back to 0.
17459         
17460 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17461
17462         * regalloc.c: complete memory leak fix by Laurent Morichetti
17463         (l_m@pacbell.net).
17464
17465 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
17466
17467         * driver.c (main_thread_handler): Revert the previous patch.
17468
17469         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
17470         under valgrind.
17471
17472         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
17473         memory from the memory pool.
17474
17475         * driver.c (main_thread_handler): Turn on all optimizations when
17476         --aot is used.
17477
17478         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
17479         an array for better performance.
17480
17481         * regalloc.c (mono_regstate_assign): Fix memory leak.
17482
17483         * debug-mini.c (mono_debug_serialize_debug_info): New function to
17484         serialize the debug info.
17485
17486         * debug-mini.c (mono_debug_add_aot_method): New function to load the
17487         debug info from the serialized representation.
17488
17489         * aot.c: Save debug info into the generated file and load it when 
17490         loading a method.
17491
17492         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
17493
17494 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17495
17496         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
17497         More FP-related fixes.
17498
17499 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
17500
17501         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
17502         and register allocation buglet. Hello world now runs.
17503
17504 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17505
17506         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
17507         * tramp-ppc.c: fixed class init trampoline.
17508         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
17509
17510 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17511
17512         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
17513         mini.c: more ppc changes/fixes.
17514
17515 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
17516
17517         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
17518         Also optimize the case when the arguments are the same in the caller 
17519         and in the callee.
17520
17521         * iltests.il: Add tests for tail calls with valuetype arguments.
17522
17523 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17524
17525         * mini-ppc.c: fixes for struct return type.
17526
17527 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
17528
17529         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
17530         mono_spillvar_offset() to arch-specific code.
17531
17532 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
17533
17534         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
17535
17536 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
17537
17538         * exceptions-x86.c: Fix stack space leaks.
17539         
17540         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
17541         registers from the lmf if the method has save_lmf set.
17542
17543 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
17544
17545         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
17546         of icall wrappers into InvokeInDomain, since these are now per-domain.
17547
17548 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
17549
17550         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
17551         make some opcode emulation and intrinsic ops enabled/disabled 
17552         according to the architecture. More fixes.
17553
17554 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17555
17556         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
17557
17558 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17559
17560         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
17561         arch-specific handling for 'this' and struct return type to
17562         arch-specific code.
17563
17564 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17565
17566         * aot.c: prevent divide by zero error when reporting (it happened with
17567         Accessibility.dll).
17568
17569 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
17570
17571         * mini.h (inst_switch): Remove unused macro.
17572
17573 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17574
17575         * aot.c:
17576         (load_aot_module): free 'info->methods' and 'info' properly. No more
17577         "free(): invalid pointer blah" messages when you have an old aot
17578         compiled assembly.
17579
17580 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
17581
17582         * jit-icalls.c, mini.c: Added support for context static fields.
17583
17584 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
17585
17586         * mini.c (mono_method_blittable): Methods which set LastError are not 
17587         blittable either. Fixes #51108.
17588         
17589 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17590
17591         * mini.c: flush icache.
17592         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
17593
17594 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
17595
17596         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
17597
17598 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
17599
17600         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
17601         safe on IA32.
17602
17603         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
17604         vararg calls.
17605
17606         * inssel.brg (CEE_MKREFANY): Fix AOT case.
17607
17608 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
17609
17610         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
17611         instruction when the result is discarded.
17612
17613         * iltests.il (test_0_div_regalloc): New regression test.
17614
17615         * arrays.cs: Fix compilation error.
17616
17617 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
17618
17619         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
17620         float rules to inssel-x86.brg: sane architectures with FP registers
17621         don't need to implement these rules.
17622
17623 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17624
17625         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
17626
17627 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17628
17629         * mini.h, inssel-long32.brg: fixed endianess issues in int64
17630         implementation of 32 bit systems.
17631
17632 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17633
17634         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
17635         (Jeroen Zwartepoorte).
17636
17637 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
17638
17639         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
17640         the caller and the callee matches.
17641         
17642         * mini.c (mono_method_to_ir): Add comment.
17643
17644         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
17645         signbit is missing on some platforms.
17646
17647 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
17648
17649         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
17650
17651         * mini.c (setup_jit_tls_data): Call the new function.
17652         
17653         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
17654
17655         * mini-x86.c: Add experimental support for fast access to the lmf
17656         structure under NPTL/Linux 2.6.x.
17657
17658 2003-11-06  Martin Baulig  <martin@ximian.com>
17659
17660         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
17661         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
17662         the debugger.
17663
17664 2003-11-02  Martin Baulig  <martin@ximian.com>
17665
17666         * mini.c (inflate_generic_field): New static method.
17667         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
17668         generic instance and the field is declared in a generic type, call
17669         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
17670
17671 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
17672
17673         * mini.h mini.c (mono_method_same_domain): New function to return
17674         whenever the caller and the callee are in the same domain.
17675
17676         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
17677
17678 2003-10-30  Martin Baulig  <martin@ximian.com>
17679
17680         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
17681         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
17682         method parameters.
17683         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
17684         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
17685
17686 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
17687
17688         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
17689         propagation.
17690
17691         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
17692         object here, so it is in the correct appdomain etc.
17693
17694 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
17695
17696         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
17697         already done.
17698         (mono_method_to_ir): Avoid freeing the type created returned from
17699         mono_type_create_from_typespec, since it is put into an internal cache
17700         by the function. Fixes pointer.exe.
17701
17702         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
17703         trampolines for icalls and pinvokes as well. Fixes #33569.
17704
17705 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
17706
17707         * mini.c: Update after appdomain changes.
17708
17709         * mini.c (mono_jit_compile_method_inner): Allways compile native
17710         method wrappers in the root domain, since there can only be one
17711         instance of them, whose address is stored in method->info.
17712
17713 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
17714
17715         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
17716         environment variable. Instead detect automatically whenever running
17717         under valgrind using the magic macro RUNNING_ON_VALGRIND from
17718         valgrind.h.
17719
17720 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
17721
17722         * trace.c, trace.h: New files that implement the new trace option
17723         parsing. 
17724
17725         * driver.c: Document new --trace options.
17726
17727         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
17728         mini-x86.c: Apply:
17729
17730         -       if (mono_jit_trace_calls)
17731         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
17732
17733         * mini.h: prototypes.
17734         
17735 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
17736
17737         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
17738
17739         * mini.c inssel.brg: Implement typedefbyref opcodes.
17740
17741         * mini.c (mono_jit_compile_method): Remove unused local variable.
17742
17743         * mini.c (mono_jit_compile_method_inner): Ditto.
17744         
17745 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
17746
17747         * tramp-x86.c (x86_class_init_trampoline): Fix build.
17748         
17749         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
17750
17751 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
17752
17753         * mini.c (mono_no_aot): Remove unused global variable.
17754
17755         * mini.c: Thread safety fixes.
17756
17757 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
17758
17759         * mini.c (mono_create_class_init_trampoline): Add a lock around
17760         class_init_hash_addr.
17761
17762         * arrays.cs (test_0_newarr_emulation): Add new regression test for
17763         #30073.
17764
17765         * mini.c: Decompose the NEWARR instruction before decomposing its
17766         arguments. Fixes #30073.
17767
17768 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
17769
17770         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
17771         convention.
17772
17773 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
17774
17775         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
17776
17777         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
17778
17779         * driver.c: Add support for compiling icall wrappers to --compile.
17780
17781 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
17782
17783         * inssel.brg: The empty value in class->interface_offsets is -1, not
17784         0. Fixes #49287.
17785
17786 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
17787
17788         * objects.cs: New test for 'is' operator on an array of interfaces.
17789
17790 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17791
17792         * tramp-ppc.c: update trampoline code to support jumps
17793         and class initialization.
17794
17795 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
17796
17797         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
17798
17799         * inssel.brg (OP_UNBOXCAST): Fix #46027.
17800
17801         * inssel.brg (OP_UNBOX): Remove unused rule.
17802
17803         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
17804         region instead of one for each method. Fixes #47813.
17805
17806 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
17807
17808         * exceptions.cs (test_0_nested_finally): New regression test for
17809         nested exception handlers.
17810
17811         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
17812
17813         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
17814
17815         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
17816         inlining.
17817
17818         * mini.c (mono_method_check_inlining): Make the inlining limit 
17819         configurable by an environment variable.
17820         
17821         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
17822
17823         * mini.h: Bump AOT file version.
17824
17825         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
17826         token, store the image along with the token, since the token might not 
17827         refer to the same image as the method containing the relocation, 
17828         because of inlining.
17829
17830 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
17831
17832         * mini.c (mono_precompile_assemblies): New function to compile
17833         all methods in all loaded assemblies.
17834
17835         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
17836
17837         * regalloc.h regalloc.c (MonoRegState): Change the type of 
17838         iassign and fassign to int*, since they can contain large negative
17839         values if the register is spilled. Also added some comments. Fixes
17840         #45817.
17841
17842         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
17843         under Win32. Fixes #42964.
17844
17845 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
17846
17847         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
17848
17849         * aot.c: Added support for AOT compiling methods which contain calls
17850         to wrappers. Currently, only remoting-invoke-with-check wrappers are
17851         handled.
17852         
17853         * driver.c (compile_all_methods): Run the compilation in a thread
17854         managed by mono. Fixes #44023.
17855
17856         * mini.c (mono_codegen): Print full method name in verbose output.
17857
17858         * mini-x86.c (mono_arch_patch_code): Fix warning.
17859         
17860         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
17861         jumps, since the method we are jumping to might be domain-specific.
17862
17863         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
17864
17865 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
17866
17867         * inssel.brg: string chars are unsigned.
17868
17869 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
17870
17871         * TODO: New todo item.
17872
17873         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
17874         which calls mono_runtime_class_init and patches the call site to
17875         avoid further calls.
17876         (mono_arch_create_class_init_trampoline): New arch specific function 
17877         to create a class init trampoline.
17878         (create_trampoline_code): Generalized so it can create
17879         class init trampolines as well.
17880
17881         * mini.c (helper_sig_class_init_trampoline): New helper variable.
17882         (mono_create_class_init_trampoline): New function to create and cache
17883         class init trampolines.
17884         (mono_find_class_init_trampoline_by_addr): New function to lookup the
17885         vtable given the address of a class init trampoline. Used by the
17886         patching process.
17887         (mono_codegen): Generate a call to a trampoline instead of
17888         mono_runtime_class_init in LDSFLD[A].
17889         (mono_codegen): Add relocations for the new trampoline.
17890         
17891         * mini.h mini-x86.c aot.c: Added a new relocation type: 
17892         MONO_PATCH_INFO_CLASS_INIT.
17893
17894         * mini.h: Bump AOT version number.
17895
17896         * aot.c: Create a copy of the loaded code instead of using the original
17897         so methods which call each other will be close in memory, improving
17898         cache behaviour.
17899         
17900         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
17901         patch since it breaks the regression tests.
17902         
17903         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
17904         for the register saving instruction sequence since the 
17905         frame_state_for function in glibc 2.3.2 don't seem to detect it.
17906
17907 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
17908
17909         * TODO: Fix todo item && remove another.
17910
17911 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
17912
17913         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
17914         previous checkin.
17915
17916         * aot.c: Moved the check for MONO_LASTAOT into the initialization
17917         function of the module.
17918
17919         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
17920         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
17921         --no-aot command line option.
17922
17923 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
17924
17925         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
17926         by Bernie Solomon (bernard@ugsolutions.com).
17927
17928         * inssel.brg: Refactor the interface offset table related code into
17929         its separate functions and add support for the AOT case.
17930
17931 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
17932
17933         * aot.c (mono_aot_get_method_inner): Fix memory leak.
17934         
17935         * aot.c: Added mono_aot_verbose variable and made all debugging
17936         output depend on the value of this variable.
17937
17938         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
17939         method_label and info_label.
17940
17941         * mini.h mini-x86.c aot.c: Added a new relocation type 
17942         MONO_PATCH_INFO_IID for klass->interface_id.
17943
17944         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
17945         the MonoJitInfo structure.
17946
17947         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
17948         a non-root appdomain in shared mode.
17949
17950 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17951
17952         * aot.c: make aot loader less verbose. Remove free of unused variable.
17953
17954 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
17955
17956         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
17957
17958         * .cvsignore: Added *.dll.
17959
17960         * mini.c (mono_print_tree_nl): New function callable while debugging.
17961
17962         * mini.c (mono_print_code): Export this.
17963
17964         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
17965         patched code.
17966
17967 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
17968
17969         * mini.h (MonoCompile): Added 'jit_info' field.
17970
17971         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
17972         the cfg structure, since it is needed by the AOT compiler.
17973
17974         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
17975
17976         * aot.c: A major rewrite. Changes include:
17977         - save exception tables for methods which have them.
17978         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
17979         to g_module_symbol.
17980         - reworked the file format so it is now much smaller and needs
17981         fewer relocation entries.
17982         
17983 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
17984
17985         * aot.c (load_aot_module): Fix build bustage on platforms without
17986         Boehm GC.
17987
17988 2003-09-04  Martin Baulig  <martin@ximian.com>
17989
17990         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
17991
17992 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
17993
17994         * TODO: Some new optimization ideas.
17995
17996         * aot.c: Move AOT module loading logic here from mono_assembly_open.
17997
17998         * aot.c: Save the optimization flags used to compile the code into
17999         the AOT module.
18000
18001         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
18002         support emitting domain specific code.
18003         
18004         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
18005         no longer domain neutral. It can be made domain neutral by compiling 
18006         with --optimize=shared.
18007
18008         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
18009         between appdomains.
18010
18011         * driver.c mini.h mini.c: New --no-aot debugging option which disables
18012         loading of AOT code.
18013
18014         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
18015         
18016         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
18017         if there is no domain neutrality information.
18018
18019 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
18020
18021         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
18022         format version into the generated library.
18023
18024         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
18025         callee method into the caller since one of them could be shared.
18026
18027         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
18028         system exceptions from AOT code now works.
18029
18030         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
18031         method if it is domain neutral and the callee is not.
18032
18033         * graph.c (cfg_emit_one_loop_level): Fix warning.
18034
18035 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
18036
18037         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
18038         last checkin.
18039
18040 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
18041
18042         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
18043         is needed  by code which is executed before mono_runtime_init ().
18044         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
18045         
18046         * mini.c (mono_thread_abort): Fix warning.
18047         (mono_jit_compile_method): Call static constructor in the AOT case too.
18048
18049         * aot.c (mono_compile_assembly): Fix warning.
18050
18051 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18052
18053         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
18054
18055 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
18056
18057         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
18058
18059         * cpu-pentium.md: Fix the length of call opcodes so they include the
18060         ESP restoring instruction. Fixes #47968.
18061
18062 2003-08-28  Martin Baulig  <martin@ximian.com>
18063
18064         * mini-x86.c (mono_arch_call_opcode): Added support for
18065         MONO_TYPE_GENERICINST.
18066
18067         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
18068
18069 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
18070
18071         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
18072         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
18073
18074         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
18075         metadata_section.
18076
18077 2003-08-26  Martin Baulig  <martin@ximian.com>
18078
18079         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
18080         when reporting an error, set this to the actual error location.
18081         (mono_method_to_ir): Report the correct error location if
18082         get_basic_blocks() returned an error.
18083
18084 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
18085
18086         * mini.c (mono_type_blittable): OBJECT is not blittable.
18087         (mono_method_blittable): Methods which have marshalling descriptors
18088         are not blittable either. Fixes #47842.
18089
18090 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
18091
18092         * driver.c mini.c: Use an environment variable instead of a global 
18093         variable. Also fix the build.
18094
18095         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
18096         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
18097         reporting this. 
18098
18099         * driver.c mini.c: Added --with-valgrind option to turn off some
18100         code which prevents mono from running under valgrind.
18101
18102         * mini.c (mono_emit_call_args): Fixed warning.
18103
18104         * mini.c (mono_emulate_opcode): Fixed warning.
18105
18106 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18107
18108         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
18109         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
18110         regalloc.c, regalloc.h: specify available registers in arch-specific
18111         code and support floats in the regallocator (patch by Laurent Morichetti 
18112         <l_m@pacbell.net>)
18113
18114 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18115
18116         * mini.c: mono_thread_current() can be called only after
18117         mono_runtime_init(): rearrange code to not call it early on.
18118
18119 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18120
18121         * mini.c: allocate jump tables in the code mempools.
18122
18123 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18124
18125         * mini.c, mini.h: make sure per-thread data allocated by the jit is
18126         freed.
18127
18128 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
18129
18130         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
18131         12 to 16.  This fixes bug #47453.
18132
18133
18134 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
18135
18136         * mini-ppc.c: fixed indexed load and unsigned compares.
18137
18138 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
18139
18140         * mini.c: reenabled installation of handler for
18141           thread abort signal.
18142
18143 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18144
18145         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
18146         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
18147         until it's fixed and actually useful.
18148
18149 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18150
18151         * inssel-long32.brg: couple more opcodes implemented.
18152
18153 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18154         
18155         * mini-sparc.c: Even more opcodes implemeted.
18156
18157 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
18158
18159         * mini-sparc.c: More opcodes implemented.
18160
18161 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
18162
18163         * mini-sparc.c: More opcodes implemented.
18164
18165 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18166
18167         * inssel-sparc.brg: Add some needed rules.  Direct
18168         copy from PPC.
18169         * Makefile.am: Use inssel-sparc.brg
18170         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
18171         an assert happy for now.
18172
18173 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
18174
18175         * mini-sparc.c: Fixed compile errors.
18176         * exceptions-sparc.c: Same.  We now produce a mono binary 
18177         on sparc-linux.  Yea.
18178
18179 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
18180
18181         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
18182         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
18183         They compile, but do not work.
18184
18185 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18186
18187         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
18188         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
18189         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
18190         (ct@gentoo.org).
18191
18192 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18193
18194         * mini.c: more opcodes implemented and better support for generics.
18195
18196 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18197
18198         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
18199         * mini.c, mini.h: first cut at generics support: some new instructions 
18200         added and changed the behaviour of some of the existing ones.
18201
18202 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
18203
18204         * mini.c: Removed definition of metadata_shared mutex here.
18205
18206 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18207
18208         * mini-x86.c: make vararg calls work for instance methods.
18209
18210 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18211
18212         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
18213         returns the arguments in a separte list, now.
18214
18215 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18216
18217         * aot.c, mini.c: updates for array type representation changes.
18218
18219 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
18220
18221         * mini.c: register function to perform jit shutdown.
18222
18223 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18224
18225         * mini.c: use a faster allocator if possible.
18226
18227 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18228
18229         * aot.c: some cleanups and portability changes.
18230
18231 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18232
18233         * mini.c: use faster allocation for CEE_BOX if possible.
18234
18235 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18236
18237         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
18238         Moved inlined mempcy code to its own function so that is can be
18239         reused. Added an inline memset function as well (optimized initobj).
18240         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
18241
18242 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18243
18244         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
18245
18246 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18247
18248         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
18249         arch code can setup the cpu for CLR execution, if needed.
18250         We use it on x86 to set the precision of FP operations.
18251
18252 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18253
18254         * mini.c: disable some optimizations if we can guess they'll cost too
18255         much for a given method.
18256
18257 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18258
18259         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
18260         
18261 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18262         * mini.h mini.c mini-x86.c: Added instruction level coverage 
18263         info collection support.
18264
18265 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18266
18267         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
18268         is now implemented in the profiling API. Get rid of a couple of
18269         unnecessary global variables.
18270
18271 2003-06-15  Nick Drochak <ndrochak@gol.com>
18272
18273         * basic-long.cs: tests for negative values for bigmul, and unsigned.
18274         * cpu-g4.md: add op_bigmul and op_bigmul_un
18275         * cpu_pentium.md: add op_bigmul_un
18276         * inssel-long32.brg: add rule for unsigned bigmul
18277         * mini-ops.h: define OP_BIGMUL_UN
18278         * mini-x86.c: THE BUG: handle (un)signed properly
18279         * mini.c: choose unsigned opcode if needed.
18280         This set of patches fixes bug #44291
18281
18282 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
18283
18284         * mini.c (optimize_branches): improved to handle all kinds of
18285         conditional branches.
18286
18287 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18288
18289         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
18290         don't raise exceptions.
18291
18292 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18293
18294         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
18295         to arch-specific files.
18296
18297 2003-06-09  Martin Baulig  <martin@ximian.com>
18298
18299         * Makefile.am (libs): Added $(LIBGC_LIBS).
18300
18301 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
18302
18303         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
18304         and OP_ATAN (fixes bug#44293).
18305
18306 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
18307
18308         * Makefile.am, mini-x86.c: rename cpu description array to
18309         pentium_desc, since some compilers define the 'pentium' preprocessor
18310         symbol.
18311
18312 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
18313
18314         * mini.c (mini_select_instructions): add explicit branch if the
18315         following block is not the false target of a conditional branch -
18316         we need this with any optimization that reorder or remove bblocks
18317
18318         * mini.c (optimize_branches): bug fixes
18319
18320 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
18321
18322         * mini.c (mono_method_to_ir): inline static readonly fields
18323
18324         * ssa.c (fold_tree): start cfold support for long (very simple
18325         cases only)
18326
18327         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
18328
18329 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18330
18331         * inssel.brg: fixed memcpy (bug #44219).
18332
18333 2003-06-05  Dick Porter  <dick@ximian.com>
18334
18335         * driver.c: Set the glib log levels to not abort if g_message
18336         recurses.
18337
18338         g_set_prgname() has to happen before mini_init() so that the
18339         process handle gets the info.
18340         
18341 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18342
18343         * driver.c: add intrins to the default optimizations to get wider
18344         exposure.
18345
18346 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18347
18348         * mini.h: some large basic blocks will overflow a 16-bit
18349         integers for symbolic registers.
18350
18351 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
18352
18353         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
18354         (mono_arch_output_basic_block): fix bug 43499 
18355
18356 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18357
18358         * mini.c: kill duplicated definition of mono_debug_format.
18359
18360 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18361
18362         * mini-x86.c, arrays.cs: fixed register allocation bug.
18363
18364 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
18365
18366         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
18367
18368         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
18369
18370 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18371
18372         * mini.c:
18373         (print_method_from_ip): also print source location information if
18374         available.
18375
18376 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
18377
18378         * mini.c (mono_find_block_region): bug fix in region code
18379         (mini_method_compile): enable removing unreachable code again, but
18380         only in methods without exception clauses.
18381
18382 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18383
18384         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
18385         Implemented arglist opcode and handling of TypedReference type.
18386         Fixed x86 call convention when a structure is returned.
18387         Minimal support for calling static vararg methods.
18388
18389 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
18390
18391         * mini.c (mini_method_compile):  always remove unreachable code,
18392         because the code in them may be inconsistent  (access to dead
18393         variables for example).
18394
18395 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18396
18397         * driver.c, debug-mini.c: warning fixes.
18398
18399 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
18400
18401         * Makefile.am, jit.h, mini.h: install header for embedding mono.
18402
18403 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
18404
18405         * mini.c: thread-static fields are registered in mono_class_vtable(),
18406         so ensure the function is called before checking for them.
18407
18408 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
18409
18410         * mini.c (optimize_branches): fix for bug 43586
18411
18412         * jit-icalls.c (mono_llmult_ovf): added an additional check for
18413         overflow (fixes Bug #43639)
18414
18415 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18416
18417         * mini.c, objects.cs: allow the use of stobj for primitive types.
18418
18419 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18420
18421         * mini.c: be less strict about argument checking until we support
18422         running the verifier.
18423
18424 2003-05-27  Nick Drochak <ndrochak@gol.com>
18425
18426         * basic-long.cs: tests for (ulong)int * (ulong)int also
18427         * mini.c: use the same trick for (ulong)int * (ulong)int
18428
18429 2003-05-27  Nick Drochak <ndrochak@gol.com>
18430
18431         * basic-long.cs: add regression test for (long)int * (long)int
18432         * cpu-pentium.md: add op_bigmul specification
18433         * inssel-long32.brg: add OP_BIGMUL rule
18434         * mini-ops.h: add OP_BIGMUL
18435         * mini-x86.c: register allocator: handle case where src1 needs to be
18436         in EAX.
18437         * mini.c: substitute special BIGMUL opcode in the tree for 
18438         (long)int * (long)int
18439
18440 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18441
18442         * jit-icalls.c: call the type ctor on field access if needed.
18443
18444 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18445
18446         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
18447         to a method (including results of ldelema, bug#43207).
18448
18449 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
18450
18451         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
18452         colors to show exception handler blocks.
18453
18454         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
18455         (fix for pinvoke7.cs).
18456
18457 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18458
18459         * mini.h, mini.c: ensure correct initialization order for types that
18460         require it. Prepare for lazy compilation of jit icall wrappers.
18461         Provide a name for opcode emulation to reduce unneeded mallocing.
18462
18463 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
18464
18465         * mini-x86.c: better register restoring code and profiling
18466         support for tail calls.
18467
18468 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18469
18470         * mini.h, driver.c: prepare for leaf methods optimization.
18471
18472 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18473
18474         * mini.c: get targets of branches before converting a method.
18475
18476 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
18477
18478         * mini.c (optimize_branches): added some experimental code (disbaled) 
18479
18480 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
18481
18482         * mini.c (optimize_branches): fix branch to branch optimization 
18483
18484         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
18485
18486         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
18487
18488         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
18489
18490         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
18491         if needed.
18492
18493 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
18494
18495         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
18496         enable use of interface variables again.
18497
18498         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
18499         I1 to registers because there is no simply way to sign extend 8bit
18500         quantities in caller saved registers on x86.
18501
18502         * inssel-float.brg: set costs of some rules to 2 so
18503         that monobure always select the arch. specific ones if supplied,
18504         regardless of the order we pass the files to monoburg.
18505
18506 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18507
18508         * mini.c, mini-x86.c: since the magic trampoline for jumps
18509         can't patch the code directly, we do it as soon as the
18510         method gets compiled.
18511
18512 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18513
18514         * mini-x86.c, mini.h: introduce a new patching method
18515         to support CEE_JMP and tail calls.
18516         * mini.c: obey tail.call. Don't precompile methods target
18517         of CEE_JMP.
18518         * tramp-x86.c: new trampoline code to handle methods
18519         reached through a jump.
18520
18521 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
18522
18523         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
18524         bit values to registers
18525
18526 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
18527
18528         * mini.c (mono_compile_get_interface_var): share interface
18529         variables if possible.
18530
18531 2003-05-16  Martin Baulig  <martin@ximian.com>
18532
18533         * debug-mini.c (mono_init_debugger): New function to initialize
18534         the debugger.  This is not in the debugger since it needs to
18535         access some of mini's internals.
18536
18537 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
18538
18539         * mini.c (mono_method_to_ir): inlining fixes/cleanups
18540
18541 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
18542
18543         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
18544         for value type handling.
18545
18546 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
18547
18548         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
18549         (mono_method_check_inlining): enable inlining of all kinds of wrappers
18550
18551 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
18552
18553         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
18554           the constructor through a proxy.
18555
18556 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18557
18558         * jit-icalls.c, inssel.brg: fixes to array element address
18559         calculations.
18560
18561 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
18562
18563         * mini-x86.c (is_regsize_var): allocate pointer to registers
18564
18565 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18566
18567         * driver.c: fixed typo, added intrins to the set of optimizations
18568         tested with regressions.
18569
18570 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18571
18572         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
18573         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
18574         test case.
18575
18576 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
18577
18578         * inssel.brg: remove some common pop instructions without side effects
18579
18580 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18581
18582         * inssel-x86.brg: fixed thinko in int to double conversions.
18583
18584 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18585
18586         * mini.c, jit-icalls.c: added runtime thread-static variable support.
18587
18588 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18589
18590         * inssel-long32.brg: two more missing instructions.
18591
18592 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
18593
18594         * mini.c (mono_emit_call_args): set the cil_code for all arguments
18595         if not already set.
18596
18597 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
18598
18599         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
18600         correctly.
18601
18602         * basic-float.cs: Added tests for negative zero.
18603
18604 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18605
18606         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
18607         a couple of missing operations for long casts, with test cases.
18608
18609 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18610
18611         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
18612
18613 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
18614
18615         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
18616         code size estimation.
18617
18618 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
18619
18620         * mini.c (mono_jit_create_remoting_trampoline): make it work with
18621         abstract methods (fix bug 42542)
18622
18623         * aot.c: add ability to handle array types
18624         
18625 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
18626
18627         * mini.c: Call the _specific versions of the object allocation
18628         functions if possible.
18629
18630 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18631
18632         * driver.c: call setlocale ().
18633
18634 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18635
18636         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
18637         windows build.
18638
18639 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
18640
18641         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
18642
18643         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
18644         wrappers (fix bug 42122)
18645
18646 2003-05-04  Martin Baulig  <martin@ximian.com>
18647
18648         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
18649
18650         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
18651         s/mini_set_defaults/mono_set_defaults/g.
18652
18653 2003-05-04  Martin Baulig  <martin@ximian.com>
18654
18655         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
18656
18657 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18658
18659         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
18660         (reported by Don Roberts).
18661
18662 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18663
18664         * mini.c: temporarily work around two bugs for this release.
18665
18666 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18667
18668         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
18669         that contains -export-dynamic and it makes using the ld script
18670         useless.
18671         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
18672
18673 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18674
18675         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
18676         specific cpu.
18677
18678 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18679
18680         * mini.c: make sure leave calls all the needed finally blocks,
18681         even when the target jumps out of multiple exception clauses.
18682
18683 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18684
18685         * ldscript, Makefile.am: add linker script to reduce the number of
18686         exported symbols (should also fix the issues with libwine defining
18687         some of the same symbols in io-layer).
18688
18689 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
18690
18691         * driver.c (mini_main): Avoid assertion when no file name is given on 
18692         the command line.
18693
18694 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
18695
18696         * driver.c: added --version/-V command line option.
18697         Added the inline optimization in the regression tests.
18698
18699 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18700
18701         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
18702         to the type in the method signature (fixes bug#42134).
18703
18704 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
18705
18706         * mini.c: when inlining, check this is not null only when needed (bug #42135).
18707
18708 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
18709
18710         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
18711
18712 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18713
18714         * driver.c: fixed bug #42100.
18715
18716 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
18717
18718         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
18719
18720 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18721
18722         * mini.c: moved most of the code required to do inlining to its own
18723         function so it can be reused. Inline also ctors if appropriate.
18724
18725 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
18726
18727         * Makefile.am: Link with -export-dynamic so shared libs loaded by
18728         the runtime can call mono API functions.
18729
18730 2003-04-27  Martin Baulig  <martin@ximian.com>
18731
18732         * debug-mini.c (mono_debug_init_method): Added
18733         `guint32 breakpoint_id' argument; if the method has a breakpoint,
18734         send a notification to the debugger.
18735
18736         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
18737         running in the Mono Debugger, just pass the breakpoint number to
18738         mono_debug_init_method().
18739
18740         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
18741
18742 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
18743
18744         * mini.c: allow some more unsafe compares.
18745
18746 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18747
18748         * mini-x86.c, Makefile.am: make distcheck works (partially from
18749         a patch by Richard Lee <r.h.lee@attbi.com>).
18750         * regset.c, regset.h: removed, they are unused.
18751
18752 2003-04-25  Dick Porter  <dick@ximian.com>
18753
18754         * driver.c: Usage reports the name as 'mono' not 'mini'
18755         * exceptions-x86.c: Build and run on freebsd
18756
18757 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
18758
18759         * Makefile.am: install the program with the 'mono' name and
18760         the library as libmono instead of mini and libmini.
18761
18762 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18763
18764         * driver.c: provide the APIs for the embedding interface of the old jit.
18765
18766 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
18767
18768         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
18769
18770 2003-04-23  Martin Baulig  <martin@ximian.com>
18771
18772         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
18773
18774         * driver.c: Added `--debug' command line argument to enable
18775         debugging support.
18776
18777 2003-04-23  Martin Baulig  <martin@ximian.com>
18778
18779         * debug.[ch]: Removed.  The code is now in
18780         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
18781
18782         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
18783         last six months.
18784
18785 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
18786
18787         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
18788
18789 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18790
18791         * mini.c:
18792         (mini_cleanup): moved mono_runtime_cleanup call after the call to
18793         mono_domain_finalize.
18794         (mini_method_compile): use mono_method_profile* if the the option is
18795         enabled.
18796
18797 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
18798
18799         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18800         methods with their wrapper.
18801
18802         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18803         methods with their wrapper.
18804
18805         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
18806         their wrapper.
18807
18808         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
18809         wrapper.
18810
18811         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
18812         methods.
18813
18814 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
18815
18816         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
18817
18818 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
18819
18820         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
18821         of the mempool. This is slightly faster and uses less memory
18822
18823 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18824
18825         * mini.c: avoid O(n) allocation for variables.
18826
18827 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18828
18829         * mini.c: handle items on the stack after inlining methods.
18830
18831 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18832
18833         * mini.c: make the method->opcode optimization dependent
18834         on MONO_OPT_INSTRINS and do it lazily.
18835
18836 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18837
18838         * driver.c: print overall results at the end of regression run.
18839
18840 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
18841
18842         * inssel.brg: don't overwrite symbolic registers.
18843
18844 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
18845
18846         * inssel-x86.brg: fix conversion from long to float.
18847
18848 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
18849
18850         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
18851
18852 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
18853
18854         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
18855
18856         * driver.c: Added --print-vtable option as in the old JIT.
18857
18858 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18859
18860         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
18861
18862 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
18863
18864         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
18865
18866 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
18867
18868         * mini.c regalloc.c regalloc.h: Fix memory leak.
18869
18870 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
18871
18872         * aot.c (mono_aot_get_method): register all used strings
18873
18874 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18875
18876         * mini.c: always intern strings references with ldstr at compile time.
18877
18878 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18879
18880         * Makefile.am: add BUILT_SOURCES.
18881
18882 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
18883
18884         * driver.c: give a better error message when the assembly to execute
18885         doesn't have an entry point.
18886
18887 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
18888
18889         * Makefile.am: added hack for automake
18890
18891         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
18892         correct sematics.
18893
18894         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
18895
18896 22003-04-07  Martin Baulig  <martin@ximian.com>
18897
18898         * Makefile.am: Added Makefile.am.
18899
18900         * debugger-main.c: Removed, this is now in the debugger where it
18901         belongs.
18902
18903         * mini.pc.in: Call this package `mini' for the moment.
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918