742d7dbe59bf4fd97d3e1e6f88d33efa0c9347e7
[mono.git] / mono / mini / ChangeLog
1 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
2
3         Backport of r122452.
4         
5         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
6         instead of directly accessing type->data.klass. Fixes #462016.
7         (mono_allocate_stack_slots_full): Ditto.
8
9         Backport of r122416.
10
11         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
12         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
13
14 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
15
16         Backport of r122392.
17         
18         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
19         change.
20         
21         Backport of r122386.
22
23         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
24         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
25         #463357.
26
27         * iltests.il.in: Add a regression test.
28
29 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
30
31         Backport of r122364.
32
33         * basic-simd.cs: Add a regression test for #462457.
34
35 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
36
37         Backport of r122363.
38
39         * mini-ops.h: Add a definition of XPHI.
40
41         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
42
43         * ssa.c (op_phi_to_move): Handle XPHI.
44
45         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
46
47         Fixes #462457
48
49 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
50
51         Backport of r122170.
52
53         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
54         while loading AOT methods.
55
56         Backport of r122168.
57         
58         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
59         since only the former is nulled out after a successful cast. This prevents
60         crashes with rethrown exceptions when using --debug=casts.
61
62 2008-12-24  Mark Probst  <mark.probst@gmail.com>
63
64         Backport of r122086.
65
66         * mini.h: New macro for checking whether a method is final,
67         i.e. whether the method or its class is marked final.
68
69         * method-to-ir.c: Use the new macro for all final-checks
70         consistently.  Fixes the crash in the System.ServiceModel tests.
71
72 2008-12-24  Mark Probst  <mark.probst@gmail.com>
73
74         * mini-ppc.c (mono_arch_build_imt_thunk): Fix the build.
75
76 2008-12-23  Mark Probst  <mark.probst@gmail.com>
77
78         Backport of r122034.
79
80         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
81         Clobbering it is not allowed because the caller might use it as
82         the vtable register in the interface call.
83
84 2008-12-23  Mark Probst  <mark.probst@gmail.com>
85
86         * mini-exceptions.c (get_exception_catch_class): Removed another
87         overly strict assertion.  Fixes #461198.
88
89 2008-12-19  Mark Probst  <mark.probst@gmail.com>
90
91         * mini-exceptions.c (get_exception_catch_class): Removed overly
92         strict assertion.
93
94 2008-12-19  Mark Probst  <mark.probst@gmail.com>
95
96         Backport of r121292.
97
98         * method-to-ir.c: Removed an unnecessary assertion.
99
100 2008-12-16  Martin Baulig  <martin@ximian.com>
101
102         Backport of r120438.
103
104         * method-to-ir.c (mono_method_to_ir): Disable debugging
105         information for the init locals block to make the debugger stop
106         after all locals have been initalized.
107
108 2008-12-16  Martin Baulig  <martin@ximian.com>
109
110         Backport of r120419.
111
112         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
113         running inside the debugger.
114
115 2008-12-16  Martin Baulig  <martin@ximian.com>
116
117         Backport of r120407 from Zoltan Varga.
118
119         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
120         is enabled.
121
122         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
123         alu->alu imm optimization which only shows if deadce is disabled.
124
125 2008-12-16  Martin Baulig  <martin@ximian.com>
126
127         Backport of r120260.
128
129         * mini-exceptions.c (mono_handle_native_sigsegv): Check
130         mono_debug_using_mono_debugger() in addition to the
131         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
132
133 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
134
135         Backport of r120389.
136         
137         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
138         the stack in CEE_LDFLDA. Fixes #450542.
139
140         * generics.cs: Add a new test.
141
142 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
143         
144         Backport of r121496.
145         
146         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
147         gshared code. Fixes #458947.
148
149         * generics.cs: Add a test.
150
151 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
152
153         Backport of r121457.
154         
155         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
156
157 2008-12-10  Rodrigo Kumpera  <rkumpera@novell.com>
158
159         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
160         expect that an OP_BR_REG will be there.
161
162         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
163         for the many branch ops. The original check miss OP_BR_REG.
164
165         Fixes #457574.
166
167         Backported from trunk r121173 and r121175
168
169 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
170
171         Backport of r121150.
172         
173         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
174         while holding the aot lock.
175
176 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
177
178         Backport of r121103.
179         
180         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
181         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
182
183 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
184
185         Backport of r120999.
186         
187         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
188         as such. Fixes #456669.
189
190 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
191
192         Backport of r120756.
193         
194         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
195
196         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
197         MONO_PATCH_INFO_ICALL_ADDR.
198
199 2008-12-03  Mark Probst  <mark.probst@gmail.com>
200
201         Backport of r120589.
202
203         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
204         generic type (via a typedef or typeref) correctly.
205
206 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
207
208         Backport of r120543.
209         
210         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
211         diagnose an assertion failure.
212
213 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
214
215         Backport of r120273.
216         
217         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
218
219 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
220
221         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
222         and not 4.1. 
223
224         Backported from trunk.
225
226 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
227
228         * mini-amd64.h: Change the monitor fastpath defines to check for
229         !PLATFORM_WIN32 so they work on *bsd too.
230
231 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
232
233         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
234
235 2008-11-10  Mark Probst  <mark.probst@gmail.com>
236
237         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
238         space for stdcall.  Fixes regressions on Win32.
239
240 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
241
242         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
243         bblocks.
244         (linear_scan): Remove an assert which doesn't seem to be needed.
245
246         * local-propagation.c (mono_local_deadce): Avoid a call to
247         MONO_DELETE_INS which would screw up the instruction linking.
248
249         * mini.c (mono_decompose_op_imm): Make this work with globalra.
250
251         * regalloc2.c: Upgrade to work the current JIT code.
252
253 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
254
255         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
256         case.
257
258         * aot-runtime.c: Remove some dead code.
259
260         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
261         consistency.
262         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
263
264         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
265         trampolines using sscanf since atoi doesn't work on large unsigned values.
266
267         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
268         Initialize code_size.
269
270 2008-11-08  Mark Probst  <mark.probst@gmail.com>
271
272         * method-to-ir.c (mini_emit_inst_for_method): Make
273         Interlocked.CompareExchange work for Int arguments on 32 bit
274         archs, as well.
275
276 2008-11-07  Mark Probst  <mark.probst@gmail.com>
277
278         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
279
280 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
281
282         * main.c Fix MSVC build.
283
284         Contributed under MIT/X11 license.
285
286 2008-11-06  Mark Probst  <mark.probst@gmail.com>
287
288         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
289         alignment larger than 8 bytes are aligned correctly, too.
290
291         * mini.c: Honor the min_align field of MonoClass when laying out
292         the stack.
293
294 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
295
296         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
297
298         * aot-compiler.c (emit_plt): Fix a warning.
299         
300         * aot-compiler.c: Implement ARM support in the binary writer.
301
302 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
303
304         * basic-simd.cs: Add test for getter with byref arg.
305         Fix the naming of a few tests.
306         Add missing checks to a test.
307
308 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
309
310         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
311
312         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
313         most of the full-aot support for monitor enter/exit trampolines.
314
315         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
316         enter/exit trampoline creation functions.
317
318         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
319         make dist.
320
321 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
322
323         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
324         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
325         implement the needed functionality without adding crap to the runtime.
326
327 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
328
329         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
330         non-x86 builds.
331
332         * mini.c (mono_build_date): New global version holding the build date in
333         string format.
334         
335         * Makefile.am (buildver.c): Generate a file containing the build date.
336
337         * main.c: Set the build date from the generated file.
338
339         * mini.c (mono_get_runtime_build_info): New helper function returning build
340         information in a string format.
341         
342         * driver.c (mono_main): Print the build date in --version.
343
344         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
345         file when the bind-to-runtime-version option is used.
346
347 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
348
349         * simd-intrinsics.c: Fix bug when using getters and byref args. 
350
351 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
352
353         * simd-methods.h: Rename prefetch methods.
354
355         * simd-intrinsics.c: Same.      
356
357 2008-11-05  Mark Probst  <mark.probst@gmail.com>
358
359         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
360         sizes.
361
362 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
363
364         * aot-compiler.c: Use the bundled elf header files instead of depending on
365         the system one.
366         
367         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
368         mempool.
369
370         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
371         on every call.
372
373 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
374
375         * cpu-x86.md: Add store nta ops.
376
377         * mini-ops.h: Same.
378
379         * mini-x86.c: Same.
380
381         * mini.h: Add an enum for simd prefetch modes.
382
383         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
384         of store. Use the changed code to support store nta.
385
386         * simd-intrinsics.c: Add prefetch ops for all vector types.
387
388 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
389
390         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
391         threads.
392         
393         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
394         names.
395
396         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
397         trampolines.
398
399 2008-11-04  Mark Probst  <mark.probst@gmail.com>
400
401         * mini-x86.c: Fixed commit.
402
403 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
404
405         * aot-compiler.c (emit_plt): Align the plt section only on x86.
406
407 2008-11-04  Mark Probst  <mark.probst@gmail.com>
408
409         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
410         and MONITOR_EXIT, for the ASM fastpaths.
411
412         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
413         available.
414
415         * mini.c, patch-info.h: Signature and patch infos for
416         Monitor.Enter/Exit trampolines.
417
418         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
419
420         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
421         Monitor.Enter/Exit ASM fastpath for Linux.
422
423 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
424
425         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
426
427         * objects.cs: Add a new test.
428         
429         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
430
431         * aot-runtime.c (load_method): Run class initialization in the PLT case even
432         if MONO_LOG_LEVEL is set.
433
434         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
435
436         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
437
438         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
439         
440         * aot-compiler.c: Change the relocation code to use virtual addresses instead
441         of file offsets. Align the sections belonging to the data segment to 
442         PAGESIZE.
443
444 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
445
446         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
447         elf.h. Port it to amd64.
448
449 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
450
451         * driver.c: Enable SIMD by default.
452
453 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
454
455         * cpu-x86.md: Add prefetch op.
456
457         * mini-ops.h: Same.
458
459         * mini-x86.c: Same.
460
461         * mini.h: Add an enum for simd prefetch modes.
462
463         * simd-methods.h: Add prefetch function names.
464
465         * simd-intrinsics.c: Add prefetch ops for all vector types.
466
467 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
468
469         * aot-compiler.c (emit_bytes): Speed this up a little.
470
471 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
472
473         * aot-compiler.c: Add JIT time etc. statistics.
474         
475         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
476
477         * mini.h (MonoCompile): Add 'got_offset' field.
478
479         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
480         method_got_offsets array.
481
482         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
483         wrappers.
484
485         * aot-compiler.c (compile_method): Add generic method instances referenced
486         by the method to the list of methods to be compiled, this is required so if
487         A<T> references B<T>, and another assembly references A<int>, then it will
488         also get a copy of B<int>.
489
490         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
491         when checking for monitor enter/exit.
492
493 2008-10-30  Mark Probst  <mark.probst@gmail.com>
494
495         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
496         for Monitor.Enter and Monitor.Exit if enabled.
497
498         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
499         Solaris.
500
501 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
502
503         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
504         of an OP_MOVE. Fixes #440046.
505
506         * basic-long.cs: Add a new test.
507
508 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
509
510         * mini.h: Add synchronization note for the managed counter-part.
511
512         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
513         returns the simd caps of the current cpu.
514
515 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
516
517         * basic-simd.cs: Remove Console.WriteLine.
518
519 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
520
521         * basic-simd.cs: New tests for Vector2ul.
522
523 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
524
525         * simd-intrinsics.c: Add new vector type Vector2ul.
526
527 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
528
529         * basic-simd.cs: New tests for Vector2l.
530
531 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
532
533         * cpu-x86.md: Add long version of most packed int ops.
534
535         * mini-ops.h: Same.
536
537         * mini-x86.h: Same.
538
539         * simd-intrinsics.c: Add new vector type Vector2l.
540
541 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
542
543         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
544
545         * simd-methods.h: Remove SN_op_BitwiseXor.
546
547 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
548
549         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
550         alignment.
551
552 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
553
554         * basic-simd.cs: Test for Vector2d.
555
556         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
557         value.
558
559 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
560
561         * cpu-x86.md: Add double version of all packed float ops.
562
563         * mini-ops.h: Same.
564
565         * mini-x86.h: Same.
566
567         * simd-intrinsics.c: Add new vector type Vector2d.
568
569         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
570
571         * simd-methods.h: Add Duplicate.
572
573 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
574
575         * basic-simd.cs: Test for packing with signed saturation.
576
577 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
578
579         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
580         found in the TYPESPEC table.
581
582 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
583
584         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
585         too.
586
587         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
588
589         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
590         instead of the RVA, since the RVA can be changed by tools like the cil 
591         stripper.
592
593         * method-to-ir.c (mono_method_to_ir2): Ditto.
594
595         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
596         (deserialize_variable): Ditto.
597
598 2008-10-25  Martin Baulig  <martin@ximian.com>
599
600         * debug-mini.c (write_variable): Use
601         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
602
603 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
604
605         * cpu-x86.md: Add unsigned variants of packd and packw.
606
607         * mini-ops.h: Same.
608
609         * mini-x86.h: Emit the right instruction for packd and packw.
610         Add unsigned variants of packd and packw.
611
612         * simd-intrinsics.c: Packd and packw were used in place of their
613         unsigned variants. Change that.
614         Add intrinsics for (Signed)PackWithSignedSaturation.
615
616         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
617
618 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
619
620         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
621
622 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
623
624         * mini-ops.h: Remove dword packed add/sub with saturation ops.
625
626         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
627
628         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
629         sse instructions.
630
631         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
632
633 2008-10-24  Mark Probst  <mark.probst@gmail.com>
634
635         * method-to-ir.c, mini.c: Special casing for the synchronized
636         wrapper for the ldtoken+GetTypeFromHandle case.
637
638 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
639
640         * mini.c (mono_replace_ins): Move this to branch-opts.c.
641
642         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
643         created/split bblocks.
644
645 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
646
647         * mini-ops.h: Add packed signed mul high.
648         
649         * cpu-x86.md: Same.
650
651         * mini-x86.c (mono_arch_output_basic_block): Same.
652
653         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
654
655         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
656
657 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
658
659         * basic-simd.cs: Tests for Vector16sb.
660
661 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
662
663         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
664
665 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
666
667         * mini-ops.h: Add packed signed min, max and compare greater.
668         
669         * cpu-x86.md: Same.
670
671         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
672         saturation.
673
674         * simd-methods.h: Add CompareGreaterThan.
675
676         * simd-methods.h: Remove CompareEquals.
677
678         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
679
680         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
681
682         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
683         CompareEqual.
684
685 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
686
687         * basic-simd.cs: Fix tests due to change in the API.
688
689 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
690
691         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
692
693 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
694
695         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
696
697         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
698         inst_offset as this has invalid values for LDADDR.
699
700 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
701
702         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
703
704         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
705
706 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
707
708         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
709         for accessing field->data.
710
711 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
712
713         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
714
715 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
716
717         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
718
719         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
720
721 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
722
723         * dominators.c (mono_compute_natural_loops): Allocate GList enties
724         from the cfg mempool.
725
726 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
727
728         * basic-simd.cs: Tests for new methods in Vector8us.
729
730 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
731
732         * mini-ops.h: Add multiply and store high.
733         
734         * cpu-x86.md: Same.
735
736         * mini-x86.c (mono_arch_output_basic_block): Same.
737
738         * simd-methods.h: Same.
739
740         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
741         and CompareEqual.
742
743 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
744
745         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
746         mono_class_setup_vtable ().
747
748         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
749         mono_class_get_vtable_entry () for accessing klass->vtable.
750
751         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
752
753         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
754         found.
755
756         * method-to-ir.c (mono_save_token_info): Don't save references made from
757         wrappers.
758
759         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
760         of generic instances.
761
762         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
763
764 2008-10-19  Mark Probst  <mark.probst@gmail.com>
765
766         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
767         OP_JMP depends on the method signature.  Calculate it properly.
768
769 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
770         
771         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
772         called directly.
773
774         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
775         instances.
776         (emit_extra_methods): Add another table mapping method indexes to 
777         offsets in the extra_method_info table.
778
779         * mini.h: Bump AOT file format version.
780         
781         * aot-runtime.c: Merge most of the code from mono_aot_get_method
782         and mono_aot_get_method_from_token () into one function.
783
784 2008-10-19  Mark Probst  <mark.probst@gmail.com>
785
786         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
787         separate counter.
788
789 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
790
791         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
792         methods.
793
794         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
795         disable_aot.
796
797         * mini.c (mono_patch_info_equal): Compare the generic context as well.
798
799         * mini.h: Bump aot file format version.
800
801         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
802         AOT file can contain native code for methods which are not in the METHOD
803         table. Generate code for non-sharable generic instances of generic methods
804         found in the METHODSPEC table.
805         
806         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
807         encoding generic type handles.
808
809         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
810         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
811
812         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
813         macros + MONO_ADD_INS.
814
815         * mini.c (mono_jump_info_token_new2): New function which takes a generic
816         context as well.
817
818         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
819
820         * mini.h: Bump aot file format version.
821
822         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
823
824 2008-10-17  Mark Probst  <mark.probst@gmail.com>
825
826         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
827         platforms, with definable stack alignment value.  Set to 16 now
828         for all platforms.
829
830         * mini.c, mini.h, driver.c: Command line option for disabling
831         stack alignment.
832
833 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
834
835         * basic-simd.cs: Tests for new methods in Vector4ui.
836
837 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
838
839         * mini-ops.h: Add packed int shuffle.
840         
841         * cpu-x86.md: Same.
842
843         * mini-x86.c (mono_arch_output_basic_block): Same.
844
845         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
846         extract mask, max, min, shuffle.
847
848         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
849
850 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
851
852         * basic-simd.cs: Tests for new methods in Vector8us.
853
854 2008-10-17  Mark Probst  <mark.probst@gmail.com>
855
856         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
857         RuntimeTypeHandle, not a TypedReference.
858
859 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
860
861         * simd-intrinsics.c: remove relocations.
862
863 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
864
865         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
866         optimizations from the x86 backend.
867
868 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
869
870         * simd-methods.h, simd-intrinsics.c: debloat method names and
871         prepare for no relocations.
872
873 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
874
875         * mini-ops.h: Add packed min/equal and sum of absolute differences.
876         
877         * cpu-x86.md: Same.
878
879         * mini-x86.c (mono_arch_output_basic_block): Same.
880
881         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
882         extract mask, max, min and sum of absolute differences.
883
884         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
885         method name.
886
887 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
888
889         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
890         Renamed one test for consistency.
891
892 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
893
894         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
895         fix to the code that deal with other blocks.
896
897 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
898
899         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
900
901 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
902
903         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
904         that deals with vreg interference. Explicitly check for OP_LDADDR to be
905         able to process the source reg.
906
907 2008-10-16  Martin Baulig  <martin@ximian.com>
908
909         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
910
911         * inssel.brg: Add `OP_HARD_NOP'.
912
913         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
914
915         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
916         `OP_HARD_NOP' instruction when running inside the debugger.
917
918         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
919         `OP_HARD_NOP' instruction when running inside the debugger.
920
921 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
922
923         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
924         now works. The issue with the regalloc tripping up no longer
925         happens.
926
927         * simd-intrinsics.c (load_simd_vreg): Same.
928
929 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
930         
931         * basic-simd.cs: Tests for new Vector8ui methods.
932
933 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
934
935         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
936         only for type. This fixes crashes where MonoInst::klass is checked
937         for ops of type != VTYPE or OBJ.
938
939         * simd-intrinsics.c (load_simd_vreg): Same.
940
941 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
942
943         * mini-ops.h: Add ops for packed shuffle/max/avg and
944         extract mask.
945         
946         * cpu-x86.md: Same.
947
948         * mini-x86.c (mono_arch_output_basic_block): Same.
949
950         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
951         extract mask.
952
953         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
954         to emit extract mask op.
955
956         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
957         to emit word shuffles.
958
959 2008-10-15  Mark Probst  <mark.probst@gmail.com>
960
961         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
962         the largest alignment needed by a variable, but at least
963         sizeof(gpointer).
964
965 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
966
967         * basic-simd.cs: Tests for the fixes in the last commit.
968
969 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
970
971         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
972         no longer handles STACK_PTR input.
973
974         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
975
976         * simd-intrinsics.c (load_simd_vreg): New function that works like 
977         get_simd_vreg   but handles STACK_PTR input.
978
979         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
980         as the input can be an arbitrary pointer.
981
982         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
983         LDADDR local optimization directly otherwise use a store op.
984
985 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
986
987         * basic-simd.cs: Tests for dup low and dup high.
988
989 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
990
991         * mini-ops.h: Add dup low and dup high ops.
992         
993         * cpu-x86.md: Same.
994
995         * mini-x86.c (mono_arch_output_basic_block): Same.
996
997         * simd-intrinsics.c (vector4f_intrinsics): Same.
998
999 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
1000
1001         * basic-simd.cs: Tests for recently added functionality.
1002
1003 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
1004
1005         * mini-ops.h: Add remaining sse1 fp ops.
1006         
1007         * cpu-x86.md: Add remaining sse1 fp ops.
1008
1009         * mini-x86.c (mono_arch_output_basic_block): Same.
1010
1011         * mini.h: Add enum for simd FP compare conditions.
1012
1013         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
1014
1015         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
1016         so the backed can generate the appropriate op.
1017
1018 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
1019         This patch squeese one more byte from the SimdIntrinsc struct.
1020
1021         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
1022         a a shift amount intead of simply or'ing it.
1023
1024         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
1025
1026         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
1027         byte so we can have an aditional flags field without increasing struct size.
1028
1029         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
1030         against the simd_supported_versions bitmask.
1031
1032         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
1033
1034 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
1035
1036         * mini.c: remove rawbuffer code (the only use here is unsafe because
1037         it takes locks during signal handling and the kernel now provides much
1038         better info in proc/pid/smaps these days).
1039
1040 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
1041
1042         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
1043         OP_X86_PUSH_OBJ. Fixes #434620.
1044
1045         * objects.cs: Add a test.
1046         
1047 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
1048
1049         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
1050         that the packuswb/packusdw don't work with unsigned numbers for what
1051         would be negative numbers in signed format.
1052
1053         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
1054         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
1055
1056         * mini-ops.h: Add doubleword forms of many ops and packing ones.
1057
1058         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
1059
1060         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
1061
1062         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
1063
1064         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
1065         add more ops.
1066
1067         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
1068         version as the enum in mini.h.
1069
1070         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
1071         for sse3 ops, check the simd_version field if present. This way the code
1072         works with all versions of sse.
1073
1074 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1075
1076         * simd-intrinsics.c: Fixed intrinsic name typo.
1077
1078         * mini.h: Added missing simd exported function.
1079
1080         * basic-simd.cs: Added tests for Vector4ui.
1081         Fixed broken test for Vector16b.
1082
1083 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
1084
1085         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
1086         the max length to 64.
1087
1088 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1089
1090         * method-to-ir.c: Only do the fast virtual generic method call for
1091         non-wrapper methods.
1092
1093         * mini.h, mini-trampolines.c: The new generic virtual remoting
1094         trampoline handles virtual method calls via the vtable (as done by
1095         the fast virtual generic method calls) to remoting proxies.
1096
1097         * mini.c (mono_jit_create_remoting_trampoline): For generic
1098         methods reate a generic virtual remoting trampoline.
1099
1100         * mini-amd64.h: Enable fast virtual generic method calls again.
1101
1102 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1103
1104         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
1105         restore registers when doing tail calls.
1106
1107 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1108
1109         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
1110         Vector4ui.
1111
1112 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1113
1114         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
1115
1116 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1117
1118         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
1119
1120 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1121
1122         * basic-simd.cs: Retrofit for API changes.
1123
1124 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1125
1126         * mini-ppc.c: Handle integer stack arguments for tail calls.
1127
1128 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1129
1130         * optflags-def.h: Removed sse3 optimization.
1131
1132         * driver.c: Same.
1133
1134         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
1135         sse3.
1136
1137         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
1138
1139         * mini.h: Added enumeration with simd versions.
1140
1141         * simd-intrinsics.c (emit_intrinsics): Use the new static var
1142         for detecting SSE3.
1143
1144         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
1145
1146         * mini.c (mini_init): Call mono_simd_intrinsics_init.
1147
1148 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1149
1150         * basic-simd.cs: Added tests for Vector8u and Vector16u.
1151
1152         * basic-simd.cs: Fixed test naming.
1153
1154 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1155
1156         * mini-ops.h: Added ops for packed and saturated math, shifts
1157         and packing/unpacking.
1158
1159         * cpu-x86.md: Added descriptors for the above ops.
1160
1161         * mini-x86.c: Added code to emmit the above ops.
1162
1163         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
1164
1165 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
1166
1167         * aot-compiler.c (compile_method): Enable AOT for generic code.
1168
1169         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
1170
1171 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
1172
1173         * mini.c: add a workaround for a common screwup that ends up blamed
1174         to mono (other processes blocking signal delivery).
1175
1176 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1177
1178         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
1179         in the LDFLD/STFLD opcodes. Fixes #432673.
1180
1181         * iltests.il.in: Add a new test.
1182
1183 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
1184
1185         * mini-arm.c: attach the thread in unmanaged->managed transitions
1186         using delegates (bug #433148).
1187
1188 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
1189
1190        * basic-simd.cs: Use new ShuffleSel constants.
1191
1192 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
1193
1194         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
1195
1196         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
1197         only disable simd intrinsics if no sse2 is detected.
1198
1199         * optflags-def.h: Added sse3.
1200
1201         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
1202         is disabled.
1203
1204 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1205
1206         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
1207         when adding delegate-invoke wrappers.
1208
1209 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1210
1211         * Makefile.am: Reenable the simd tests.
1212
1213 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
1214
1215         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
1216           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
1217           other vreg is allocated to that hreg.
1218
1219         Contributed under MIT/X11 license.
1220
1221 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1222
1223         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
1224         yet checked in.
1225
1226 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
1227
1228         * basic-simd.cs: New test suite for SIMD intrinsics.
1229
1230         * Makefile.am: Added new tests.
1231
1232 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
1233
1234         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
1235
1236         * mini-ops.h: Same.
1237
1238         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
1239
1240         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
1241         using SSE2 aware opcodes.
1242
1243         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
1244         is enabled, this code path is only reachable if conversion ops are emmited after
1245         mono_method_to_ir.
1246
1247         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
1248
1249         This optimization saves 6 bytes per conversion against the old version.
1250
1251 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1252
1253         * aot-compiler.c (compile_method): Don't skip methods referencing 
1254         generic methods without a corresponding entry in token_info_hash, since
1255         encode_method_ref () can handle all generic methods now.
1256
1257         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
1258         generic context is set.
1259         
1260         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
1261         generic sharing of LDTOKEN.
1262
1263 2008-10-06  Mark Probst  <mark.probst@gmail.com>
1264
1265         * mini-amd64.h: Temporarily disabled fast virtual generic method
1266         calls because it breaks the System.Runtime.Remoting tests.
1267
1268 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1269
1270         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
1271
1272         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
1273         so inlining actually works.
1274         (check_inline_caller_method_name_limit): Ditto.
1275
1276 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
1277
1278         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
1279         64 bit safety (from Olaf Hering and Andreas Färber).
1280
1281 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1282         
1283         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
1284         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
1285         unused virtual call support code.
1286
1287         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
1288         
1289         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
1290         which can't use aot trampolines.
1291         (decode_patch): Don't create aot trampolines for methods which can't use
1292         them.
1293
1294         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
1295         use aot trampolines.
1296
1297         * mini.h: Bump AOT image format version.
1298         
1299 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
1300
1301         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
1302         to save_token_info () since cmethod is inflated for constrained calls.
1303
1304         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
1305
1306 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
1307
1308         * Makefile.am: Add build rules for ppc64.
1309         This avoids the build failing at pedump with unresolved symbols
1310         due to lack of arch_sources. Instead it will now fail earlier
1311         due to lack of cpu-ppc64.md.
1312
1313         Contributed under MIT/X11 license.
1314
1315 2008-10-04  Mark Probst  <mark.probst@gmail.com>
1316
1317         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
1318         tail calls.
1319
1320         * iltests.il.in: Add test case for tail call with many arguments.
1321
1322 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
1323
1324         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
1325         to the fast virtual generic method code until the aot case is fixed.
1326
1327 2008-10-03  Mark Probst  <mark.probst@gmail.com>
1328
1329         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
1330
1331 2008-10-03  Mark Probst  <mark.probst@gmail.com>
1332
1333         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
1334         thunks.
1335
1336 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
1337         
1338         * simd-intrinsics.c: Forgot to add this one.
1339
1340         * mini-codegen.c: Fix macro in case SIMD is not supported.
1341
1342 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
1343         
1344         This patch land initial JIT support for simd intrinsics.
1345
1346         * mini-x86.h: Added new define to make --enable_minimal work on x86.
1347
1348         * Makefile.am: Added simd-intrinsics.c
1349
1350         * simd-intrinsics.c: New file with simd instrinsic related
1351         code.
1352
1353         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
1354
1355         * cpu-x86.md: Add simd related instructions.
1356
1357         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
1358
1359         * driver.c: Added two new --regression variants.
1360
1361         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
1362
1363         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
1364
1365         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
1366         extract some complicated logic to helper functions.
1367
1368         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
1369
1370         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
1371
1372         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
1373         the specialized simplification pass.
1374
1375         * method-to-ir.c (mono_spill_global_vars): Use new macro.
1376
1377         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
1378
1379         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
1380         table.
1381
1382         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
1383         if MONO_ARCH_NEED_SIMD_BANK is defined.
1384
1385         * mini-ops.h: Added the new simd ops.
1386
1387         * mini-x86.c: Added mono_arch_xregname.
1388
1389         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
1390
1391         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
1392
1393         * mini-x86.h: Define simd related MONO_ARCH macros.
1394
1395         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
1396
1397         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
1398
1399         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
1400         MONO_CLASS_IS_SIMD to deal with simd related IR.
1401
1402         * mini.h (MonoInst): Added spill_var to the backend union.
1403
1404         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
1405
1406         * mini.h: Added forward declarations of the new simd fuctions.
1407
1408         * optflags-def.h: Added new optimization names SIMD.
1409
1410         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
1411
1412         * regalloc.h: Added support for working with 3 register banks.
1413
1414         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
1415
1416         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
1417
1418 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
1419
1420         * mini-exceptions.c: remove 64 bit related ifdef clutter.
1421
1422 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
1423
1424         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
1425         instead of one on 64 bit systems.
1426
1427         * method-to-ir.c: Remove unused includes.
1428
1429 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
1430
1431         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
1432         cfg->used_int_regs, since the two are different on arm.
1433
1434 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1435
1436         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
1437         mono_method_get_vtable_index() to get the vtable index.
1438
1439 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1440
1441         * method-to-ir.c (mono_method_to_ir2): Don't create native
1442         wrappers for array methods, because they're never called (and if
1443         they were called they wouldn't work).
1444
1445 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1446
1447         * method-to-ir.c (mono_method_to_ir2): Array methods are
1448         special-cased and must not be invoked indirectly via the (M)RGCTX
1449         when generic sharing is turned on.  Fixes #431413.
1450
1451 2008-10-01  Mark Probst  <mark.probst@gmail.com>
1452
1453         * method-to-ir.c: When generic sharing is active, call
1454         non-interface virtual generic methods via the standard trampoline.
1455
1456         * mini-trampolines.c: Handle virtual generic shared methods.
1457
1458         * mini.h, mini-x86.c, mini-x86.h: New argument for
1459         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
1460         method thunks and which is the trampoline to call if the lookup
1461         fails.  Enable the virtual generic method thunk for x86.
1462
1463         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
1464         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
1465         argument but assert that it's NULL, because these archs don't yet
1466         implement the virtual generic method thunk.  Changes in the IMT
1467         thunk data structures.
1468
1469 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
1470
1471         * aot-compiler.c (emit_globals): Avoid invalid characters in
1472         the static linking symbol.
1473
1474         * objects.cs: Add a test for the range check optimization. Fix warnings.
1475
1476         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
1477         optimization from the current JIT.
1478
1479         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
1480         later in decompose_array_access_opts () to allow more optimizations.
1481
1482         * method-to-ir.c (mono_handle_soft_float): Rename this to 
1483         mono_decompose_soft_float () for consistency.
1484
1485         * mini-ops.h: Fix arguments of OP_STRLEN.
1486
1487         * method-to-ir.c (save_cast_details): Extract the cast details saving code
1488         into a separate function.
1489         (reset_cast_details): Ditto.
1490         (handle_unbox): Save cast details. Fixes #431254.
1491
1492         * method-to-ir.c: Remove some obsolete FIXMEs.
1493
1494 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1495
1496         * ir-emit.h (alloc_dreg): Write a warning before crashing.
1497
1498 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1499
1500         * mini-codegen.c: More work on macros to make them
1501         ready for multiple regbanks.
1502
1503 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1504
1505         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
1506
1507         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
1508
1509 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1510
1511         * mini-codegen.c (mono_spillvar_offset): Proper support for
1512         multiple regbanks.
1513
1514 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
1515
1516         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
1517         the stack overflow changes.
1518
1519 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1520
1521         * mini-codegen.c: Make all bank macros depend on reg_bank.
1522
1523         * mini-codegen.c (mono_local_regalloc): Make free mask
1524         initialization regbank aware.
1525
1526 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1527
1528         * mini-codegen.c (mono_local_regalloc): Extract callee
1529         mask selection to a function and make it regbank aware.
1530
1531 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1532
1533         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
1534         code to deal with many regbanks.
1535
1536 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
1537
1538         * mini-codegen.c: More fp->regbank changes.
1539
1540 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
1541
1542         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
1543         of a hardcoded constant.
1544
1545 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
1546
1547         * method-to-ir.c (type_from_stack_type): Fix typo.
1548
1549 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
1550
1551         * mini-ia64.c (emit_move_return_value): Convert float return values to
1552         double.
1553
1554         * objects.cs: Add a new test.
1555         
1556         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
1557         VARARG methods to fix an assert later.
1558
1559         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
1560         end so it at least compiles.
1561
1562 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
1563
1564         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
1565
1566 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
1567
1568         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
1569         optimization to a new function (emit_optimized_ldloca_ir) and enable
1570         it for both ldloca and ldloca_s.
1571
1572 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
1573
1574         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
1575         gshared CASTCLASS code.
1576
1577         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
1578         amd64, where the libc stack unwinder encounters stack frames referring to
1579         native code in unmapped memory.
1580
1581         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
1582         sharing.
1583
1584         * generics.cs: Add new test.
1585
1586 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
1587
1588         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
1589         add a check that one of the ARM_FPU_ constants is defined.
1590
1591         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
1592         
1593         * mini-exceptions.c: Fix build on non-altstack platforms.
1594
1595         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
1596         sharing of vtypes.
1597
1598         * ir-emit.h: Add a comment to NEW_PCONST.
1599
1600         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
1601
1602         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
1603
1604         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
1605         after the changes to MonoJitDomainInfo.
1606
1607 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1608
1609         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
1610
1611 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1612
1613         * mini-ppc.c: Compiler warning fixes.
1614
1615 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1616
1617         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
1618         for pinvokes.
1619
1620 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1621
1622         * exceptions-ppc.c, mini-ppc.h: Compile
1623         mono_arch_handle_altstack_exception() on Darwin, too.
1624
1625 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1626
1627         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
1628         work on archs which don't have generic sharing implemented, only
1629         without the vtable_arg.
1630
1631 2008-09-26  Mark Probst  <mark.probst@gmail.com>
1632
1633         * mini.c: Added comment explaining why delegate ctor icall
1634         wrappers are compiled.
1635
1636 2008-09-26  Mark Probst  <mark.probst@gmail.com>
1637
1638         * mini.c: Don't produce trampolines to delegate ctor icall
1639         wrappers but compile them upfront.
1640
1641 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
1642
1643         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
1644         runtime-set function when going back to managed code. Currently this
1645         is used to set back the protection on the soft ovf pages and/or to
1646         throw the stack overflow exception that happened in unmanaged code.
1647
1648 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
1649
1650         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
1651         runtime-set function when going back to managed code. Currently this
1652         is used to set back the protection on the soft ovf pages and/or to
1653         throw the stack overflow exception that happened in unmanaged code.
1654
1655 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1656
1657         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
1658         the support code for restoring stack protection after stack overflows
1659         that happen in unmanaged code. Don't set the exec permission on the
1660         soft overflow area.
1661
1662 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
1663
1664         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
1665         delegate->method_ptr is set. Fixes #428054.
1666
1667 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
1668
1669         * tests.cs: Rename to ratests.cs.
1670
1671         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
1672         emit_get_rgctx_... functions.
1673
1674 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1675
1676         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
1677
1678 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1679
1680         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
1681         before asserting that method is sharable.
1682
1683 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1684
1685         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
1686         whether method needs a static RGCTX wrapper used instead of
1687         complex conditions.
1688
1689         * generic-sharing.c, mini.h: A few functions moved to
1690         metadata/generic-sharing.c.
1691
1692 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1693
1694         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
1695         Generic code sharing for value types, which essentially means
1696         treating value type methods like static methods.  The RGCTX is
1697         passed in the same way.
1698
1699 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
1700
1701         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
1702         opcode when creating multi-dimensional arrays of open types.
1703
1704         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
1705         open generic types.
1706
1707         * generics.cs: Add a test.
1708
1709         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
1710
1711 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
1712
1713         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
1714
1715         * mini.c (mini_method_compile): Set it when running under the debugger. 
1716
1717         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
1718         vreg optimization if the flag is set.
1719
1720         * driver.c (mono_main): Add --attach= option to pass options to
1721         the attach agent.
1722
1723         * mini.c (sigquit_signal_handler): Start the attach agent.
1724
1725         * ssapre.c: Disable this to save space since it is not yet ported to
1726         linear IR.
1727
1728         * regalloc2.c: Disable this to save space.
1729
1730         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
1731
1732 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
1733
1734         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
1735         the -v option useful again.
1736
1737 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
1738
1739         * mini-amd64.c (mono_arch_output_basic_block): Add support for
1740         --break-at-bb.
1741
1742         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
1743         arrays of arrays. Fixes #428406.
1744
1745         * method-to-ir.c (mini_emit_castclass): Ditto.
1746
1747         * objects.cs: Add new test.
1748         
1749 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
1750
1751         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
1752         was wrong at it choked against target_type_is_incompatible for byref types.
1753
1754 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
1755
1756         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
1757         places.
1758
1759 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
1760
1761         * mini-exceptions.c: update a few more exceptions-related counters.
1762
1763 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
1764
1765         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
1766         new functions to allocate from persistent mempools.
1767
1768 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
1769
1770         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
1771         multiple register banks in the future.
1772
1773         * mini-codegen.c (mono_local_regalloc): Fix a warning.
1774
1775 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
1776
1777         * mini.c (type_to_eval_stack_type): Remove duplicated function.
1778
1779         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
1780
1781         * mini.h: Export type_to_eval_stack_type.
1782
1783         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
1784         is only ins->klass of byref types.
1785
1786 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
1787
1788         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
1789         (mini_emit_memcpy2): Ditto.
1790
1791         * mini-amd64.c: Fix a warning.
1792
1793 2008-09-21  Mark Probst  <mark.probst@gmail.com>
1794
1795         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
1796         linking.
1797
1798 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
1799
1800         * method-to-ir.c: Extract stloc micro-optimization to a
1801         function and apply it to all cases.
1802
1803 2008-09-19  Mark Probst  <mark.probst@gmail.com>
1804
1805         * method-to-ir.c: Don't fail generic code sharing in cases we
1806         already support.
1807
1808 2008-09-18  Mark Probst  <mark.probst@gmail.com>
1809
1810         * mini-ppc.c: Handle structs in tailcalls on Darwin.
1811
1812 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
1813
1814         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
1815         implementation.
1816
1817 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
1818
1819         * trace.c: make tracing more useful and correct, with per-thread
1820         id and indent info.
1821
1822 2008-09-15  Mark Probst  <mark.probst@gmail.com>
1823
1824         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
1825         doing a method call and the argument is an R4.
1826
1827 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
1828
1829         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
1830         generic methods.
1831
1832 2008-09-13  Mark Probst  <mark.probst@gmail.com>
1833
1834         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
1835
1836 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
1837
1838         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
1839         (MONO_JUMP_TABLE_FROM_INS): Ditto.
1840
1841 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
1842
1843         * driver.c: Add a --agent argument (not supported yet) to load managed
1844         agent assemblies before loading the main assembly, similarly to how the
1845         Java VM handles agents.
1846
1847 2008-09-11  Mark Probst  <mark.probst@gmail.com>
1848
1849         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
1850         function to do stack layout of local variables.
1851
1852 2008-09-11  Mark Probst  <mark.probst@gmail.com>
1853
1854         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
1855         calculation.
1856
1857 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
1858
1859         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
1860         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
1861         JIT if DISABLE_JIT is defined.
1862
1863         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
1864         defined.
1865
1866 2008-09-10  Mark Probst  <mark.probst@gmail.com>
1867
1868         * iltests.il.in: Disable the fconv test on PPC (the result is
1869         undefined according to ECMA).
1870
1871 2008-09-10  Mark Probst  <mark.probst@gmail.com>
1872
1873         * iltests.il.in: Enable tail call tests for PPC.
1874
1875         * mini.h: Add variable for storing incoming valuetype argument
1876         addresses for tail calls.
1877
1878         * mini-ppc.c: Implement valuetype arguments and return values for
1879         tailcalls on Linux.
1880
1881 2008-09-09  Mark Probst  <mark.probst@gmail.com>
1882
1883         * mini-ppc.c: Partially implement tail calls (struct arguments and
1884         return values not supported).
1885
1886         * method-to-ir.c: Enable tail calls on PPC.
1887
1888 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
1889
1890         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
1891         runtime-invoke wrappers to work around the problem of them getting
1892         assigned to a random class.
1893
1894         * aot-runtime.c (mono_aot_get_method): Ditto.
1895         
1896 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
1897
1898         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
1899         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
1900
1901 2008-09-07  Mark Probst  <mark.probst@gmail.com>
1902
1903         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
1904         until they're implemented properly.
1905
1906         * exceptions-ppc.c: Use arch-independent exception-handling code
1907         instead of custom one.
1908
1909         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
1910         for Linear IR.
1911
1912         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
1913
1914         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
1915         applies when __powerpc__ is defined.
1916
1917 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
1918
1919         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
1920         methods to their code to avoid computing the full name of wrappers and
1921         doing a lookup in a string hash table.
1922
1923 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
1924
1925         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
1926         we identify bblocks before method_to_ir () is ran.
1927
1928         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
1929         Also avoid optimizing branches pointing to themselves.
1930
1931         * mini.c (mini_method_compile): Ditto. Fixes #422947.
1932
1933 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
1934
1935         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
1936
1937 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
1938
1939         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
1940         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
1941         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
1942         'buf'.
1943
1944         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
1945         jumped to the same entry in plt_jump_table.
1946
1947 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
1948
1949         * method-to-ir.c (initialize_array_data): Handle field with RVA from
1950         dynamic images.
1951
1952 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
1953
1954         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
1955         other assignment can be if converted. Saves 1.5% on corlib size and fixes
1956         #421807.
1957
1958 2008-08-29  Geoff Norton  <gnorton@novell.com>
1959
1960         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
1961         segment, and doesn't properly handle .space as .text.  Fixes
1962         AOT Mach/ARM
1963
1964 2008-08-29  Geoff Norton  <gnorton@novell.com>
1965
1966         * mini.c: Disable the mach exception handler when running on 
1967         ARM
1968
1969 2008-08-29  Geoff Norton  <gnorton@novell.com>
1970
1971         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
1972         globals on Darwin/ARM
1973
1974 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
1975
1976         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
1977         since too many things depend on it. Instead, call 
1978         mono_runtime_set_no_exec ().
1979         
1980         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
1981         the new JIT.
1982
1983         * aot-compiler.c: Add an 'asm-only' AOT option.
1984
1985         * mini.c: Avoid initializing the runtime when doing AOT compilation.
1986                 
1987         * aot-compiler.c (compile_method): Disable gshared support for now as it
1988         doesn't yet work.
1989
1990 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
1991
1992         * mini-amd64.h : Fix a compiler warning.
1993
1994         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
1995           Changed to use a callback function to retrieve the unwind info.
1996           This avoids problems observed when code blocks were removed by
1997           unloading an app domain.
1998
1999         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
2000           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
2001           to work properly.
2002
2003         Contributed under MIT/X11 license.
2004
2005 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
2006
2007         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
2008           case to keep the stack aligned to 8.
2009
2010         Contributed under MIT/X11 license.
2011
2012 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
2013
2014         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
2015         avoid repeated linear searches.
2016
2017 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
2018
2019         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
2020         methods it can't handle.
2021         
2022         * aot-compiler.c (add_method): Avoid adding a method twice.
2023         (add_wrappers): Add runtime invoke wrappers for all methods.
2024
2025         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
2026         function to create an aot-compatible version of this trampoline.
2027
2028         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
2029
2030 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
2031
2032         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
2033
2034         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
2035         with a generic sharing failure.
2036
2037         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
2038
2039         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
2040         CEE_RETHROW. Fixes #419634.
2041
2042         * mini.c (mono_method_to_ir): Ditto.
2043
2044         * exceptions.cs: Add a new test.
2045         
2046         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
2047         to mono_type_stack_size_internal () since some callers might not pass in
2048         an rgctx.
2049
2050         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
2051         instrument_prolog. Fixes #419878.
2052
2053         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
2054         doubles in soft float mode volatile.
2055
2056 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
2057
2058         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
2059
2060         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
2061         to handle soft float correctly.
2062
2063         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
2064         the fast path.
2065
2066         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
2067
2068         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
2069         to sp, since the generics catch code requires it.
2070
2071         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
2072         copying.
2073
2074         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
2075         mono_arch_emit_imt_argument ().
2076
2077         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
2078
2079         * mini-arm.c tramp-arm.c: Generic sharing updates.
2080
2081 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
2082
2083         * mini-arm.c: Fix the arm build.
2084
2085         * generic-sharing.c (mini_type_get_underlying_type): New helper function
2086         handling enums, generic instances and generic sharing.
2087         (mini_type_stack_size_full): Ditto.
2088
2089         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
2090         
2091         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
2092
2093         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
2094
2095         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
2096         trampolines.
2097
2098         * mini-arm.c: Various small generic sharing changes.
2099
2100         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
2101         this for x86.
2102         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
2103         custom code.
2104
2105         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
2106         helper function to return a generic class init trampoline.
2107
2108         * method-to-ir.c mini.c: Use it.
2109         
2110         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
2111         arch-specfic function to return a generic class init trampoline.
2112
2113         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
2114         the GENERIC_CLASS_INIT custom code.
2115
2116         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
2117         a fatal error, not a sharing failure.
2118
2119         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
2120         needed.
2121
2122         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
2123         trampoline argument from MONO_ARCH_VTABLE_REG.
2124
2125         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2126         order of the arguments to the C trampoline: pass 'slot' as the trampoline
2127         argument, and pass the vtable in VTABLE_REG.
2128
2129         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2130         order of the arguments to the C trampoline: pass 'slot' as the trampoline
2131         argument, and pass the vtable in VTABLE_REG.
2132         (mono_arch_create_trampoline_code_full): Remove some special casing for
2133         the rgctx fetch trampoline.
2134
2135         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
2136         Fixes #419273.
2137
2138         * iltests.il: Add a test for it.
2139
2140 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
2141
2142         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
2143
2144         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
2145         no longer needed.
2146
2147         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
2148         use mono_jit_info_table_find () to avoid recursion.
2149         (mono_delegate_trampoline): Add a sync wrapper here.
2150
2151         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
2152         here.
2153
2154         * mini.c (mono_method_to_ir): Ditto.
2155         
2156         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
2157         add_sync_wrapper argument. Don't add a sync wrapper here.
2158         (mono_create_jump_trampoline): Don't add a sync wrapper here.
2159
2160         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
2161         
2162 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
2163
2164         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
2165           of nonvolatile registers back from MonoContext to CONTEXT.
2166
2167         Contributed under MIT/X11 license.
2168
2169 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
2170
2171         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
2172           arguments on Winx64 there are only 4 argument registers.  For this
2173           logic to work the last argument must be pulled from the stack.  
2174
2175         Contributed under MIT/X11 license.
2176
2177 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
2178
2179         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2180
2181         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
2182         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
2183         encode/decode_method_ref ().
2184
2185         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
2186
2187         * aot-runtime.c (decode_patch): Ditto.  
2188
2189         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
2190         MONO_PATCH_INFO_METHOD.
2191
2192         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
2193         MonoGenericJitInfo.
2194
2195         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
2196         MonoGenericJitInfo.
2197
2198         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
2199
2200         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
2201         one from the caller.
2202
2203         * aot-runtime.c (decode_generic_inst): New function to decode and
2204         return a interned generic inst.
2205         (decode_klass_ref): Use it.
2206         (decode_method_ref): Ditto.
2207
2208         * aot-compiler.c (emit_exception_debug_info): Save 
2209         jinfo->has_generic_jit_info too.
2210
2211 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
2212
2213         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
2214
2215         * iltests.il.in: Add a test for fconv_to_i.
2216
2217         * liveness.c: Disable the liveness2 pass for now to save space.
2218
2219         * regalloc2.c: Include mempool-internals.h to fix warnings.
2220
2221         * aot-compiler.c (encode_method_ref): Encode the context of generic
2222         instance methods.
2223
2224         * aot-runtime.c (decode_method_ref): Inflate generic methods using
2225         the context saved in the aot file.
2226
2227         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2228
2229         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
2230
2231         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
2232         volatile so they won't be optimized away.
2233
2234 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
2235
2236         * ssa.c:
2237         * ssa2.c:
2238         * mini.c:
2239         * regalloc2.c:
2240         * dominators.c: Remove duplicated functions that now are in
2241         mempool-internals.h.
2242
2243 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
2244
2245         * aot-compiler.c: Fix warnings.
2246
2247         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
2248
2249         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
2250
2251         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
2252         as the patch type.
2253
2254         * mini.c (mono_resolve_patch_target): Ditto.
2255         
2256         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
2257         (encode_klass_ref): Add support for encoding VARs/MVARs.
2258
2259         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
2260
2261         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
2262         the handling of the got entries into a separate 'decode_got_entry' function.
2263         Add support for RGCTX_FETCH.
2264
2265         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
2266         clobbered by the trampoline code.
2267
2268         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
2269         not clobbered by the indirect calling code.
2270
2271 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
2272
2273         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
2274         to fix the build.
2275
2276 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
2277
2278         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
2279         signature using the compilation mempool otherwise we would leak it.
2280
2281 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
2282
2283         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
2284         mono_emit_abs_call ().
2285
2286         * patch-info.h: Add GENERIC_CLASS_INIT.
2287
2288         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
2289
2290         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
2291         as their target as a near call.
2292
2293         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
2294         ABS handling code.
2295         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
2296
2297         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
2298         call to a runtime function described by a patch.
2299
2300         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
2301         mono_emit_abs_call, this has the advantage that the ABS handling code in
2302         mono_codegen () can handle them both, and can handle other stuff in the
2303         future without additional code.
2304
2305         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
2306         entry.
2307         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
2308         abs addresses.
2309
2310         * mini.h: Add missing bblock related prototypes.
2311
2312         * mini.h (MonoCompile): Remove unused reverse_inst_list and
2313         reverse_inst_list_len fields.
2314
2315         * mini.c: Refactor this file a bit by moving branch optimizations to 
2316         branch-opts.c.
2317
2318         * method-to-ir.c: Merge generic sharing changes missed earlier.
2319
2320         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
2321
2322         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
2323         shared patches. Process METHODCONST as a shared patch.
2324
2325         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
2326         as it crashes on the 2.0 mscorlib.
2327
2328         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
2329         to cause crashes.
2330         
2331         * aot-compiler.c: Use is_plt_patch () in a few additional places.
2332         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
2333         by IMT.
2334
2335         * aot-compiler.c: Reorganize the got handling code to be a bit more
2336         understandable.
2337
2338 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
2339
2340         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
2341         mono_patch_info_equals/hash, and use it to massively simplify
2342         get_plt_index ().
2343
2344         * mini.c (mono_patch_info_hash): Simplify this and add support for
2345         more patch types.
2346
2347         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
2348
2349         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
2350         handling code, since an offset is not enough to identify a trampoline.
2351
2352         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
2353
2354 2008-08-17  Mark Probst  <mark.probst@gmail.com>
2355
2356         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
2357
2358         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
2359
2360         * mini-ops.h: Argument and result types for OVF_CARRY ops.
2361
2362         * decompose.c: PPC decompositions for various ops.
2363
2364         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
2365
2366 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
2367
2368         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
2369         call the generic trampoline code using a call, instead of a jump, to
2370         remove some special casing from the generic trampoline code.
2371
2372         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
2373         (mono_codegen): Ditto.
2374
2375         * aot-compiler.c aot-runtime.c: Ditto.
2376
2377         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
2378
2379         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
2380         helper function to find the offset corresponding to a lazy fetch trampoline.
2381
2382         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
2383         when doing generic sharing.
2384
2385         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
2386         places.
2387         
2388         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
2389         mini-trampolines.c to be with the other trampoline creation functions.
2390
2391         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
2392         as it is equal to method->signature in most cases, add a 
2393         mono_emit_method_call_full variant which takes a signature and an imt
2394         argument as well.
2395
2396 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
2397
2398         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
2399         to this function, since it could be computed easily from the method 
2400         argument.
2401         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
2402         more.
2403
2404         * method-to-ir.c mini.c: Remove references to 
2405         compile_generic_method_wo_context.
2406
2407         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
2408         generic method calls.
2409         
2410         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
2411         dimensional non-szarrays.
2412
2413         * mini.c (mini_init): Register mono_array_new_1.
2414
2415         * jit-icalls.c (mono_array_new_1): New jit icall.
2416
2417         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
2418         pointing to the method.
2419
2420         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
2421         method addresses belonging to METHOD_JUMP patches in the 
2422         jump_target_got_slot_hash.
2423         (mono_aot_load_method): Ditto.
2424
2425         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
2426         METHOD_JUMP patches.
2427
2428         * mini.c (mini_create_jit_domain_info): New helper function which 
2429         initializes/frees domain->runtime_info.
2430         (mini_free_jit_domain_info): Ditto.
2431         (mini_init): Install the domain hook functions with the runtime.
2432
2433         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
2434         information maintained by the JIT.
2435
2436         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
2437         insertion into jump_table_hash into mono_codegen (), also implement proper
2438         locking.
2439
2440         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
2441         tail calls, it is already done by the aot code.
2442         
2443         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
2444         mechanism on amd64.
2445
2446         * iltests.il.in: Make the jmp test a bit more complex.
2447
2448         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
2449         generic instances which doesn't have a token.
2450
2451         * aot-runtime.c (decode_method_ref): Ditto.
2452         
2453         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
2454         can handle this case now.
2455         (handle_box): Ditto.
2456
2457 2008-08-15  Geoff Norton  <gnorton@novell.com>
2458
2459         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
2460         debugging check.
2461
2462 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
2463
2464         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
2465         calling generic methods.
2466
2467         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
2468
2469         * aot-runtime.c (decode_patch_info): Ditto.
2470
2471         * mini.c (mono_resolve_patch_target): Ditto.
2472         
2473         * patch-info.h: Add METHOD_RGCTX.
2474
2475         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
2476
2477 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
2478
2479         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
2480         arguments in registers.
2481
2482         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
2483         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
2484
2485         * mini.c (mini_method_compile): Abort aot compilation for generic
2486         methods if generic sharing is disabled.
2487         
2488         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
2489         an mrgctx.
2490
2491         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
2492         requiring an mrgctx.
2493
2494         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
2495         store instructions when converting a vcall to a normal call.
2496
2497         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
2498         mono_arch_find_jit_info.
2499
2500 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
2501
2502         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
2503         avoid calling mono_method_full_name () for every method even if the
2504         env var is not set.
2505         (check_inline_caller_method_name_limit): Ditto.
2506
2507 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
2508
2509         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
2510         assemblies in one run.
2511
2512         * aot-compiler.c (mono_compile_assembly): Only print out a count of
2513         skipped methods if it is not 0.
2514
2515         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
2516
2517 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
2518
2519         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
2520           MONO_ARCH_HAVE_UNWIND_TABLE.
2521
2522         Contributed under MIT/X11 license.
2523
2524 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
2525
2526         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
2527           from default optimizaton list on Winx64.
2528
2529         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
2530
2531         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
2532           the LMF from the MonoJitTlsData structure.
2533
2534         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
2535
2536         Contributed under MIT/X11 license.
2537
2538 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
2539
2540         * mini.c (sigsegv_signal_handler): Fix the build.
2541
2542         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
2543         assembly->aot_module.
2544
2545         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
2546         hash table. This simplifies and speeds up a lot of code, and fixes support
2547         for .netmodules.
2548
2549         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
2550         with the runtime.
2551
2552         * mini-exceptions.c: Ditto.
2553         
2554         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
2555         'native_offset' argument, since these are computed in the 
2556         mono_find_jit_info () function.
2557
2558         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
2559         is used by exceptions-ppc.c.
2560
2561         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
2562         mono_arch_find_jit_info ().
2563         
2564         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
2565         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
2566         generic code in mini-exceptions.c.
2567
2568 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
2569
2570         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
2571
2572         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
2573         
2574         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
2575         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
2576         called while holding the loader lock. Fixes #415608.
2577         (mono_aot_get_method_from_token_inner): Ditto.
2578
2579 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
2580
2581         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
2582         to reduce differences between this and the generic implementation in
2583         mini-exceptions.c.
2584         (ves_icall_get_frame_info): Ditto.
2585
2586         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
2587
2588         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
2589         longer neccesarry.
2590
2591         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
2592         mono_arch_get_call_filter () and make it non-static, for consistency with the
2593         other architectures.
2594
2595 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
2596
2597         * mini.c:
2598         * local-propagation.c:
2599         * mini-x86.c: Correct the name of arch defines.
2600
2601 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
2602
2603         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
2604         NO_EMULATE_LONG_SHIFT_OPS define.
2605
2606 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
2607
2608         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
2609         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
2610
2611         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
2612         MACH fixes. Merged from the 2.0 branch.
2613
2614         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
2615
2616         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
2617         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
2618
2619         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
2620
2621         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
2622         mono_marshal_get_native_wrapper () signature changes.
2623
2624 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
2625
2626         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
2627         conversion bug under arm.
2628
2629 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
2630
2631         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
2632
2633         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
2634         with overflow checking.
2635
2636 2008-08-05  Marek Habersack  <mhabersack@novell.com>
2637
2638         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
2639         to the genmdesc.pl file
2640
2641 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
2642
2643         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
2644         arg_array in the soft-float versions of the LOAD/STORE macros.
2645
2646         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
2647         implementation.
2648
2649         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
2650
2651 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
2652
2653         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
2654         a float HFA. Fixes #413621.
2655
2656 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
2657
2658         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
2659         frame_size to args_size. Fixes build.
2660
2661 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
2662
2663         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
2664         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
2665
2666         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
2667         the stack are not unaligned. Fixes #413247.
2668         
2669 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
2670
2671         * mini.c: update jitted methods performance counters.
2672
2673 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
2674
2675         * mini-exceptions.c: increase the exceptions thrown performance
2676         counter in mono_handle_exception ().
2677
2678 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
2679
2680         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
2681         can work with netmodules.
2682
2683 2008-07-28  Geoff Norton  <gnorton@novell.com>
2684
2685         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
2686         regression tests.
2687
2688 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
2689
2690         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
2691         correct place.
2692
2693 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
2694
2695         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2696           The float param registers and other param registers must be the 
2697           same index on Windows x64.
2698
2699         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
2700           ArgValuetypeAddrInIReg argument case.  Setting the argument
2701           op to OP_VTARG_ADDR (OP_REGOFFSET)).
2702
2703         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
2704           variable computed above as the copy length for arguments of storage
2705           type ArgValuetypeAddrInIReg.
2706
2707         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
2708           ArgValuetypeAddrInIReg argument case.  This case will rely on
2709           mono_arch_emit_outarg_vt to emit the correct code later in the process.
2710
2711         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
2712           a 32 byte stack allocation for all calls.  We will omit the adjustment for
2713           jump and tail call instructoins as they do not follow the typical call behavior.
2714
2715         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
2716           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
2717           local variable and pass the local variable by reference to the called method.
2718
2719         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
2720           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
2721           of a struct is passed in a register it must be saved with the other
2722           volatile argument on the stack.
2723
2724         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
2725           frame pointer the stack adjustment value must be saved to the unwind 
2726           info structure.
2727
2728         Contributed under MIT/X11 license.
2729
2730 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
2731
2732         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
2733         which got lost in the merge.
2734
2735 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
2736
2737         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
2738         build.
2739
2740         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
2741         
2742         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
2743         icalls, since they won't be patched.
2744
2745         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
2746         different code sequence when running under valgrind to prevent some valgrind
2747         errors.
2748
2749         * iltests.il.in: Add new regression test.
2750
2751         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
2752         end with a throw.
2753
2754         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
2755         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
2756
2757         * iltests.il.in: Add new test.
2758
2759         * aot-compiler.c: Fix some warnings.
2760
2761         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
2762         Fixes #412494.
2763
2764 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
2765
2766         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
2767         (mini_usage_jitdeveloper): Add a missing --wapi option.
2768
2769 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2770
2771         * mini-codegen.c: Simplify the is_fp macros.
2772         (free_up_ireg): Remove, use free_up_reg instead.
2773         (free_up_reg): Fix the fp case.
2774
2775 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
2776
2777         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
2778         lowered earlier.
2779
2780         * exceptions-x86.c: Merge some changes which seemed to have got lost
2781         in the linear-ir merge.
2782
2783         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
2784
2785         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
2786         long vreg volatile even if the variable was already created.
2787
2788         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
2789         volatile variables.
2790
2791 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
2792
2793         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
2794
2795         * mini.c (mono_jit_compile_method_inner): Add support for 
2796         MONO_EXCEPTION_BAD_IMAGE.
2797
2798         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
2799         mini_method_get_context () returns NULL. Fixes #356531.
2800
2801         * mini.c (mono_method_to_ir): Ditto.
2802         
2803         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
2804         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
2805
2806 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2807
2808         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
2809         in the LDFTN implementation.
2810
2811 2008-07-25  Mark Probst  <mark.probst@gmail.com>
2812
2813         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
2814         code, patch calls to icalls, too, even if they're not in the
2815         shared generic code hash.  Fixes #411962.
2816
2817 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2818
2819         * cpu-x86.md: Increase the length of the fcall opcodes.
2820
2821         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
2822         calls returning floats.
2823
2824         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
2825         on NEWARR.
2826         
2827         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
2828         missed earlier.
2829
2830         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
2831         into the domain->method_code_hash.
2832
2833         * aot-compiler.c: Fix win32 build.
2834
2835         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
2836         
2837         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
2838         gshared NEWARR implementation.
2839
2840         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
2841
2842         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
2843         can be used outside of method_to_ir.
2844
2845         * mini.h (MonoCompile): Add arg_types field.
2846
2847         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
2848         
2849         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
2850         the values of the local arg_array and param_types array.
2851
2852 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
2853
2854         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
2855         got accesses might only get generated later when NEWOBJ is decomposed.
2856         
2857         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
2858         looking up the native code of the target method when a delegate is called
2859         for the first time.
2860
2861         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
2862         optimization.
2863
2864         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
2865
2866         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
2867         AOT work on platforms without a working dlsym implementation.
2868
2869         * mini.h: Bump AOT image format version.
2870         
2871 2008-07-24  Mark Probst  <mark.probst@gmail.com>
2872
2873         * mini-exceptions.c: Free a MonoType with
2874         mono_metadata_free_type() instead of g_free().
2875
2876         * aot-runtime.c: Free a MonoType.
2877
2878 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
2879
2880         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
2881         optimization.
2882
2883         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
2884         fp stack on x86.
2885
2886 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
2887         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
2888         profiler hook.
2889
2890 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
2891
2892         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
2893         NEWOBJ calls on valuetypes.
2894
2895         * iltests.il.in: Add new test.
2896
2897         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
2898
2899 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
2900
2901         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
2902         is no longer needed.
2903
2904         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
2905         non register sized integer arguments.
2906         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
2907         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
2908         emit_memcpy2 ().
2909
2910         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
2911         CEE_MONO_RETOBJ.
2912         
2913         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
2914         two a binop with different sized arguments is emitted.
2915
2916         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
2917         instruction in the ins==NULL case.
2918
2919 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
2920
2921         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
2922
2923         * mini-x86.c: Fix osx build.
2924
2925         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
2926         opcodes as well.
2927
2928         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
2929         instruction for non int sized variables.
2930
2931         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
2932         implementation.
2933
2934 2008-07-23  Robert Jordan  <robertj@gmx.net>
2935
2936         * method-to-ir.c: Fix MSVC build.
2937
2938 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
2939
2940         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
2941         a non int sized type, widen it to an int since newer versions of gcc seem to
2942         generate code which needs this.
2943
2944         * ssa2.c abcremoval2.c: Fix warnings.
2945
2946         * *: Merge the Linear IR branch.
2947
2948         The original branch is at trunk/branches/vargaz/mini-linear-il, and
2949         the ChangeLog file there describes all the changes done over the years. 
2950         Further documentation can be found at www.mono-project.com/Linear_IL.
2951
2952 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
2953
2954         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2955           The float param registers and other param registers must be the 
2956           same index on Windows x64.
2957
2958         Contributed under MIT/X11 license.
2959
2960 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
2961
2962         * mini.c: Make the previous fix GC safe.
2963
2964 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
2965
2966         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
2967
2968 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
2969
2970         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
2971           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
2972           ArgValuetypeAddrInIReg instead.
2973
2974         Contributed under MIT/X11 license.
2975
2976 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
2977
2978         * mini-codegen.c (get_register_spilling): Fix a warning.
2979
2980 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
2981
2982         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
2983         for types which the initialization fails. Raises the provided exception
2984         at the right stop after cleanup.
2985
2986 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
2987
2988         * aot-compiler.c: Free most of the memory allocated during compilation.
2989
2990         * mini.c (mini_parse_debug_options): Fix a leak.
2991         
2992         * mini.c (mini_method_compile): Don't add the method to the jit info tables
2993         during aot compilation.
2994
2995 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
2996
2997         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
2998         it has too much register pressure.
2999
3000 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
3001
3002         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
3003
3004 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
3005
3006         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
3007         on x86.
3008
3009         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
3010         on amd64 similar to the way it is done on arm.
3011
3012         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3013
3014         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
3015         consistency, normalize error messages, avoid loading aot-only modules in
3016         normal mode.
3017
3018         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
3019         for consistency.
3020
3021         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
3022
3023 2008-07-11  Martin Baulig  <martin@ximian.com>
3024
3025         * debug-debugger.h
3026         (MonoDebuggerInfo): Add `interruption_request'.
3027
3028 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
3029
3030         * aot-compiler.c (emit_plt): Remove some dead code.
3031
3032         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
3033
3034         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
3035         return the plt info offset belonging to a given plt entry.
3036
3037         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
3038         mono_aot_get_plt_info_offset.
3039         
3040         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
3041         similar to the amd64 code by makeing jumps through a separate jump table 
3042         instead of embedding the jump addresses into the code.
3043
3044 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
3045
3046         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
3047         method.
3048
3049 2008-07-10  Martin Baulig  <martin@ximian.com>
3050
3051         * mini.c (mini_method_compile): Disable generics sharing when
3052         running in the debugger.
3053
3054 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
3055
3056         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
3057
3058         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
3059         the local register allocator from running out of registers on x86 when 
3060         using aot.
3061
3062 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
3063
3064         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
3065         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
3066         C4146.
3067
3068         Contributed under MIT/X11 license.
3069
3070 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
3071
3072         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
3073         speed up the assembler.
3074
3075 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
3076
3077         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
3078         support.
3079
3080         * mini.c: Move the soft float handling macros a bit earlier, add 
3081         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
3082         place.
3083
3084         * mini.h: Add prototype for mono_arch_fixup_jinfo.
3085
3086         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
3087         read-only to help catch code allocation requests.
3088         
3089         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
3090         and turn it off when using --aot-only or when compiling with --aot=full.
3091
3092         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
3093         jump table for switches from the normal domain mempool, not the code
3094         manager.
3095
3096         * mini-trampolines.c (get_unbox_trampoline): New function to return an
3097         unbox trampoline which handles aot-only mode too.
3098
3099         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
3100         an AOTed unbox trampoline.
3101
3102         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
3103
3104 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
3105
3106         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
3107         ""
3108
3109         Contributed under MIT/X11 license.
3110
3111 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
3112
3113         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
3114           the unwind information for the method at the end of the allocated block.
3115           
3116         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
3117           MonoCompileArch to hold the unwind info for SEH on Winx64
3118         
3119         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
3120           frame pointer info for the method being compiled.
3121           
3122         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
3123           the call to mono_exception_from_token.
3124           
3125         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
3126           storing the method prolog information in a format that the Winx64 SEH can understand.  This
3127           information is stored a the end of the method block because it is all 32-bit offset based.
3128
3129         Contributed under MIT/X11 license.
3130
3131 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
3132
3133         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
3134
3135         * wapihandles.c: Fix warnings.
3136
3137         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
3138         mode.
3139
3140         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
3141         mono_jit_compile_method in aot-only mode since that calls the type 
3142         initializer.
3143         
3144         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
3145         get_delegate_invoke_impl in aot-only mode.
3146
3147         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
3148
3149 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
3150
3151         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
3152
3153         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
3154         is on by default.
3155
3156         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
3157
3158         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
3159         init trampoline from the AOT file as well.
3160
3161         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
3162         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
3163         code.
3164
3165         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
3166         mono_init.
3167
3168         * exceptions-amd64.c: Add _full variants for the remaining exception code
3169         creation functions as well, allow emission of relocatable code, remove
3170         caching since that is now done by the caller.
3171
3172         * mini-exceptions.c: Add _full variants for the remaining exception code
3173         creation functions as well, add aot-only support.
3174
3175         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
3176         if we can determine a proper token for them.
3177         (add_wrappers): Add a few more wrappers.
3178         (emit_method_code): Remove some dead code.
3179         (emit_trampolines): Emit exception code too.
3180
3181         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
3182
3183         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
3184         mono_array_new_va which avoids varargs.
3185
3186         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
3187
3188         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
3189         mono_arch_create_specific_trampoline () in all places.
3190
3191         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
3192         a bit so it can be used for other things as well.
3193         
3194         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
3195         on demand as well.
3196
3197         * exceptions-amd64.c: Rename the caching from the exception code creation
3198         functions, it is done by the caller instead.
3199         
3200         * exceptions-amd64.c: Change the signature of the exception code creation 
3201         functions to allow the creation of relocatable code later.
3202
3203         * mini-exceptions.c: Add a set of functions to query the various 
3204         runtime-generated exception functions.
3205
3206         * mini.c mini-exceptions.c: Use the newly added functions instead of the
3207         mono_arch_.. () functions.
3208         
3209 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
3210
3211         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
3212
3213         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
3214
3215         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
3216         (mini_get_vtable_trampoline): Ditto.
3217
3218         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
3219         code in the AOT case by returning the code size and a list of relocations to
3220         the caller.
3221
3222         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
3223
3224 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
3225
3226         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
3227           clean the stack.
3228
3229         Contributed under MIT/X11 license.
3230
3231 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
3232
3233         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
3234         so the buffer size can be computed correctly. Fixes #404735.
3235
3236         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
3237         normally as cfg->debug_info is already freed.
3238
3239 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
3240
3241         * mini-amd64.c: For calls returning vtypes in registers, don't store
3242         the return address on the stack, instead allocate a separate local for
3243         it. Fixes #404729.
3244
3245 2008-07-05  Mark Probst  <mark.probst@gmail.com>
3246
3247         * mini-trampolines.c, mini.h: Add an argument to
3248         mono_create_jit_trampoline_in_domain() for turning off the adding
3249         of the sync wrapper.
3250
3251         * mini.c: Use the JIT trampoline without sync instead of
3252         ldftn_nosync in static RGCTX invoke wrappers so that the call can
3253         be patched.
3254
3255 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3256
3257         * driver.c: Turn on GSHARED optimization by default.
3258
3259 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
3260
3261         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
3262         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
3263
3264         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
3265         create a variant of the generic trampoline code callable from AOTed trampolines.
3266
3267         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
3268         trampoline code callable from AOTed trampolines.
3269
3270         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
3271
3272 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3273
3274         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
3275         pass-through manner.
3276
3277         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
3278         and don't fail sharing for them anymore.
3279
3280         * mini-exceptions.c: Handle exceptions in shared generic methods.
3281
3282         * generic-sharing.c: When checking the context of a generic
3283         method, also check its class's context.  Don't treat wrappers as
3284         sharable.
3285
3286         * mini-trampolines.c: Some code factored out to
3287         metadata/generic-sharing.c.  Handle the MRGCTX case.
3288
3289         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
3290         we must deal with the method being of another instantiation of the
3291         class.  Add static rgctx invoke wrappers to generic methods.
3292
3293 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3294
3295         * mini.c: Provide all jit infos of generic shared methods with a
3296         generic jit info.
3297
3298         * mini-exceptions.c: Handle the new situation that a generic info
3299         might be available, but not info about the this/vtable/mrgctx
3300         variable.
3301
3302 2008-07-03  Mark Probst  <mark.probst@gmail.com>
3303
3304         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
3305         generic methods.
3306
3307 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
3308
3309         * dominators.c (check_dominance_frontier): Fix a warning.
3310
3311         * mini.h: Add some missing prototypes.
3312
3313         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
3314
3315         * driver.c (mono_jit_init_version): Correct the comments since the first
3316         argument should be the name of the root domain, not a filename.
3317
3318         * aot-runtime.c (make_writable): Error out if this is called while running
3319         with --aot-only.
3320         (load_aot_module): Ditto.
3321
3322         * aot-compiler.c: Really fix the computation of method indexes.
3323
3324         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
3325         optimizations as this is no longer called frequently.
3326
3327         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
3328         method and the invoke impl code and pass it to the delegate trampoline instead of
3329         just the delegate class.
3330
3331 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
3332
3333         * aot-compiler.c: Fixup the computation of method indexes.
3334         (add_wrappers): Create the base methods of the runtime invoke wrappers using
3335         the method builder infrastructure.
3336
3337         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
3338         has no header.
3339
3340         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
3341         mode, load the method right away instead of creating a trampoline.
3342
3343         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
3344
3345         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
3346         some checks a bit.
3347
3348 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
3349
3350         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
3351         (mono_aot_load_method): Use method_index instead of method->token.
3352
3353         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
3354         can handle icalls etc. properly.
3355
3356         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3357
3358         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
3359
3360         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
3361         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
3362         JIT_ICALL_ADDR patch type.
3363
3364         * patch-info.h: Add JIT_ICALL_ADDR patch type.
3365
3366         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
3367         request flag.
3368         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
3369
3370         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
3371
3372 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
3373
3374         * mini.c: Use domain->jit_code_hash_lock for controlling access to
3375         domain->jit_code_hash.
3376
3377 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
3378
3379         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
3380
3381 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
3382
3383         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
3384         get_this_arg_from_call, let it compute it when needed.
3385
3386         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
3387         gsctx from code only when needed.
3388
3389         * mini-trampolines.c (get_generic_context): Rename this to 
3390         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
3391         it can be called by the arch backends.
3392
3393         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
3394
3395 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
3396
3397         * driver.c (mono_main): Add experimental --aot-only command line option.
3398
3399         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
3400         set.
3401
3402 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
3403
3404         * driver.c (DllMain): Remove mono_module_handle.
3405
3406         Contributed under MIT/X11 license.
3407
3408 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
3409
3410         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
3411         for emitting methods which are not in the source assembly. Detect and report
3412         failure of assembling+linking.
3413         
3414         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
3415
3416         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
3417
3418 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
3419
3420         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
3421
3422 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
3423
3424         * mini.h: Remove some obsolete prototypes.
3425
3426         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
3427
3428 2008-06-24  Mark Probst  <mark.probst@gmail.com>
3429
3430         * mini.c (get_object_generic_inst): Variable-sized arrays are not
3431         supported by Visual Studio, so use alloca().
3432
3433 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
3434
3435         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
3436         Fixes #402585.
3437
3438 2008-06-23  Mark Probst  <mark.probst@gmail.com>
3439
3440         * mini.c: Fail sharing of a generic method if it contains an open
3441         catch clause (because we don't pass MRGCTXs yet).
3442
3443 2008-06-23  Mark Probst  <mark.probst@gmail.com>
3444
3445         * mini.c: When compiling a method with generic sharing, insert the
3446         method instantiated with an all-Object generic context into the
3447         jit info table, instead of the context of the first instantiation
3448         of the method we happen to compile.
3449
3450 2008-06-18  Martin Baulig  <martin@ximian.com>
3451
3452         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
3453         `major_version' and `minor_version'.
3454
3455 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3456
3457         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
3458         mono_method_is_generic_sharable_impl() takes an additional
3459         argument specifying whether to treat type variables as reference
3460         types.
3461
3462 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3463
3464         * mini.h: Removed obsolete prototypes.
3465
3466 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3467
3468         * mini.c: Don't fail generic sharing for initobj and sizeof - we
3469         already handle them.
3470
3471 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3472
3473         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
3474         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
3475         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
3476         tramp-x86.c: Added a MonoGenericContext* argument to
3477         mono_arch_get_unbox_trampoline() so that it can call other
3478         functions which require it.
3479
3480 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3481
3482         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
3483         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
3484         mono_arch_get_this_arg_from_call() takes a
3485         MonoGenericSharingContext* as well.
3486
3487 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3488
3489         * mini.c: Factor out code for emitting unbox into emit_unbox() and
3490         implement generic sharing of unbox.
3491
3492 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3493
3494         * mini.c: Don't compute the vtable to determine whether a field is
3495         special static, because it might not work for open types.
3496
3497 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3498
3499         * mini.c: Removed the unused token_type and token_source arguments
3500         from get_runtime_generic_context_ptr().
3501
3502 2008-06-17  Marek Habersack  <mhabersack@novell.com>
3503
3504         * mini.c (ADD_BINOP): fix the build
3505
3506 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
3507
3508         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
3509         a widening op.
3510
3511 2008-06-16  Mark Probst  <mark.probst@gmail.com>
3512
3513         * mini.h: Removed class relations enum that's not used anymore.
3514
3515 2008-06-16  Mark Probst  <mark.probst@gmail.com>
3516
3517         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
3518
3519         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
3520         the lazy fetch trampoline access code.
3521
3522 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
3523
3524         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
3525
3526 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
3527
3528         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
3529
3530         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
3531
3532         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
3533
3534 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3535
3536         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
3537         intrinsics.
3538
3539         * mini-ops.h: Add MIN/MAX_UN opcodes.
3540
3541         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
3542         intrinsics.
3543
3544         * basic-math.cs: Add more min/max tests.
3545
3546         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3547
3548 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3549
3550         * mini.c: Small fix in the prologue of emit_castclass.
3551
3552 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3553
3554         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3555
3556         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
3557         do not work even for unsigned types. Fixes #400014.
3558
3559         * basic-math.cs: Add regression tests for unsigned Min/Max.
3560
3561 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3562
3563         * mini.c: Added additional context_used argument to several
3564         functions, which will be needed for sharing generic methods.  Use
3565         GET_RGCTX macro wherever appropriate.  Declare only one
3566         context_used in mono_method_to_ir().
3567
3568 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3569
3570         * mini.c, generic-sharing.c: Removed generic class relations.
3571
3572         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
3573         functions due to MRGCTX changes.
3574
3575 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3576
3577         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
3578         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
3579         with calculated IMT.
3580
3581         * mini.c: Generic sharing of calls via generic interfaces.
3582
3583         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
3584         generic method with non-constant MonoGenericContext*.  Instead,
3585         the context is taken out of the method itself.
3586
3587 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3588
3589         * mini.c: Generic sharing of ldvirtftn.
3590
3591 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3592
3593         * mini.c: Generic sharing of ldftn.
3594
3595 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3596
3597         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
3598
3599 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3600
3601         * mini.c: Generic sharing of the special case of ldtoken followed
3602         by a call to GetTypeFromHandle.
3603
3604 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3605
3606         * mini.c: Generic sharing of box for nullable types.
3607
3608 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3609
3610         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
3611         are passed on the stack. Fixes #324807.
3612
3613 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
3614
3615         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
3616         for the ArgValuetypeAddrInIReg case.
3617
3618         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
3619         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
3620
3621         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
3622         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
3623         local variable and pass the local variable by reference to the called method.
3624           
3625         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
3626         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
3627
3628         Contributed under MIT/X11 license.
3629
3630 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
3631
3632         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
3633
3634         * debug-mini.c (mono_debug_print_vars): Release memory after printing
3635         everything.
3636
3637 2008-06-10  Martin Baulig  <martin@ximian.com>
3638
3639         * debug-mini.c
3640         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
3641
3642 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
3643
3644         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
3645         possible error when no arguments are passed.
3646
3647         Contributed under MIT/X11 license.
3648
3649 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
3650
3651         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
3652         where the file name is NULL.
3653
3654 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
3655
3656         * mini.c: Fix s390 build.
3657
3658 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
3659
3660         * trace.c (mono_trace_parse_options): Fix warnings.
3661
3662         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
3663
3664 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
3665
3666         * mini.c (remove_block_if_useless): Avoid printing the method name.
3667         
3668         * mini.c: Remove needless setting of ins->cil_code which is now done by 
3669         MONO_INST_NEW.
3670
3671         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
3672         LMF. Not yet used.
3673
3674         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
3675         translated code after it has been patched.
3676
3677 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
3678
3679         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
3680         avoid problems during code patching on SMP systems.
3681         (emit_call): Avoid adding a patch info which is already added by 
3682         emit_call_body.
3683         (mono_arch_emit_exceptions): Ditto.
3684
3685 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
3686
3687         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
3688         MONO_TYPE_ISSTRUCT already checks for it.
3689
3690 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
3691
3692         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
3693           structs with floats on Winx64 the float registers are not used.  
3694           The integer registers are always used..
3695         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
3696           only one register will be used and only if the size of the struct 
3697           is 1,2,4, or 8 bytes.
3698
3699         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
3700           to work for Winx64.
3701
3702         Contributed under MIT/X11 license.
3703
3704 2008-06-05  Martin Baulig  <martin@ximian.com>
3705
3706         * debug-debugger.c (debugger_lookup_class): Also call
3707         mono_class_setup_methods() here; we're only called from RTI.
3708
3709 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
3710
3711         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
3712         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
3713         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
3714         Post-process object files and add dtrace-generated object, if necessary.
3715
3716         Contributed under MIT/X11 license.
3717
3718 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3719
3720         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
3721         element class.
3722
3723         * mini.c: Generic sharing for unbox.any and castclass.
3724
3725 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3726
3727         * mini.c: Ignore tailcall prefix in shared generic code and when
3728         doing calls which require a vtable/rgctx argument.
3729
3730 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3731
3732         * mini.c: Don't free the JIT info.
3733
3734         * driver.c: Changes in the JIT info table testing code.
3735
3736 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
3737
3738         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
3739         interruption. Fix some warnings.
3740
3741         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
3742         interruption_checkpoint.
3743
3744 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
3745
3746         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
3747         from embedding applications.
3748
3749 2008-06-02  William Holmes  <billholmes54@gmail.com>
3750
3751         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
3752           reserving 32 bytes on the stack when making calls. 
3753
3754         Contributed under MIT/X11 license.
3755
3756 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
3757
3758         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
3759         the linear IL branch.
3760
3761         * driver.c: Print out more information for --version on arm.
3762
3763 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
3764
3765         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
3766         bb_exit instead, since out of line bblocks might not actually be emitted
3767         out-of-line.
3768         
3769         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
3770         maximum epilog size for out of line bblocks if tracing is enabled.
3771
3772         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
3773
3774 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
3775
3776         * arrays.cs: Regression tests for allocating arrays with negative sizes.
3777
3778 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
3779
3780         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
3781         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
3782         opcodes.
3783
3784 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
3785
3786         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
3787         the 'value' to store is a constant.
3788
3789         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
3790
3791         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
3792         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
3793
3794 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
3795
3796         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
3797         for accessing method->generic_container.
3798
3799 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
3800
3801         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
3802         
3803         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
3804
3805         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
3806
3807         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
3808         fails.
3809
3810 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
3811
3812         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
3813
3814         * mini.c: Handle the case when mono_class_vtable () fails.
3815
3816 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
3817         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
3818         the stat profiler.
3819
3820 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3821
3822         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
3823         together with domain sharing.
3824
3825 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3826
3827         * mini.c: Treat callvirts to final methods like non-virtual calls
3828         when doing generic sharing, i.e. look them up in the runtime
3829         generic context.
3830
3831 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3832
3833         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
3834         with computed types (for generic sharing).
3835
3836         * mini.c: Generic sharing for mkrefany and refanyval.
3837
3838 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
3839
3840         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
3841         possible.
3842
3843         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
3844         the generic sharing code.
3845         
3846         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
3847         when needed.
3848
3849 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
3850
3851         * mini.h: Remove the declaration of mono_aot_init_vtable ().
3852
3853 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
3854
3855         * driver.c: updated copyright date
3856
3857 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
3858
3859         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
3860         needed.
3861
3862 2008-05-19  Martin Baulig  <martin@ximian.com>
3863
3864         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
3865         pointing to the new `_mono_debug_using_mono_debugger' variable.
3866
3867         * driver.c
3868         (mono_main): Check mono_debug_using_mono_debugger() rather than
3869         the `MONO_INSIDE_MDB' environment variable to check whether we're
3870         inside the debugger.
3871
3872 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
3873
3874         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
3875         argument.
3876
3877 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
3878
3879         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
3880
3881         * mini.c: Added mini_assembly_can_skip_verification. This
3882         function checks if the assembly requested to skip verification. 
3883         Fixes part of #387274.
3884
3885 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
3886
3887         * mini.c (mini_get_method): Disable the check for open generic classes when
3888         using generic sharing.
3889
3890         * generics.cs: Add a test for #387034.
3891
3892         * mini.c (mini_get_method): Check whenever the method class is an open generic
3893         type, and return NULL in that case, causing a verification error. Fixes
3894         #384123.
3895
3896 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3897
3898         * driver.c (mono_main): Revert r102623. The right
3899         thing to do is to enable the verifier under verifiable
3900         unless a --security flag was passed.
3901
3902         We need this non-trivial behavior for --verify-all otherwise
3903         mcs-compileall won't be able to use it. As it needs everything to
3904         be verified under validil.
3905
3906 2008-05-06  Martin Baulig  <martin@ximian.com>
3907
3908         Fix #383749.
3909
3910         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
3911         (mono_debugger_thread_cleanup): Likewise.
3912         (mono_debugger_extended_notification): Likewise.
3913
3914 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3915
3916         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
3917         against both inflated and non-inflated methods. We need to check against the
3918         generic definition for cases where the instantiated method is not visible.
3919         We need to check against the inflated types for cases where the instantiation
3920         changes any super type. This fixes #382986.
3921
3922         Note that this doesn't need to be applied to other parts of mono_method_to_ir
3923         that check for visibiliy as generic params only appears as the type subject
3924         of tokens on call opcodes. Field manipulation and ldftn must always
3925         target an exact type.
3926
3927 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3928
3929         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
3930         if no related --security flag is passed.
3931
3932 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3933
3934         * mini-arch.h: Prepare support for ppc64.
3935
3936         Contributed under MIT/X11 license.
3937
3938 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3939
3940         * aot-runtime.c: Prepare support for ppc64.
3941
3942         Contributed under MIT/X11 license.
3943
3944 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3945
3946         * mini-ops.h: Prepare support for ppc64.
3947
3948         Contributed under MIT/X11 license.
3949
3950 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
3951
3952         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
3953
3954         Contributed under MIT/X11 license.
3955
3956 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
3957
3958         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
3959         assemblies, since aot_name is not a full path, causing us to load MS.NET 
3960         assemblies on windows.
3961
3962 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
3963
3964         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
3965         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
3966         * main.c: Use UTF-8 encoded command line instead of Windows default code
3967         page on Windows to support Unicode.
3968         * driver.c (DllMain): New function for mixed-mode assembly support.
3969         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
3970         export __stdcall functions without decoration.
3971
3972         Contributed under MIT/X11 license.
3973
3974 2008-04-28  Mark Probst  <mark.probst@gmail.com>
3975
3976         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
3977         saving it very early.
3978
3979 2008-04-28  Mark Probst  <mark.probst@gmail.com>
3980
3981         * mini.h, mini.c: Lots of code for accessing the old RGCTX
3982         deleted.  The only way to access the new RGCTX is via the
3983         trampline.
3984
3985         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
3986         vtable instead of the RGCTX to static methods.
3987
3988         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
3989         accessing the new RGCTX.
3990
3991         * generic-sharing.c: There is no separation between self, type
3992         arguments and other types in the RGCTX anymore.
3993
3994 2008-04-25  Jonathan Chambers <joncham@gmail.com>
3995
3996         * mini-amd64.c (add_general): Remove previous stack adjustment.
3997         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
3998         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
3999         for 32 bytes of stack space reserved for all calls.
4000         
4001         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
4002         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
4003         adjustment.
4004         
4005         Code contributed under MIT/X11 license.
4006
4007 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
4008
4009         * mini.c (mini_method_verify): Only verify non-inflated methods, check
4010         against the root definition, peeling out method and type instantiations.
4011         Cache verify success results, code that fails verification is still
4012         checked multiple times.
4013
4014 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
4015
4016         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
4017
4018 2008-04-23  Jonathan Chambers <joncham@gmail.com>
4019
4020         * mini-amd64.c (add_general): Always increment stack on Win64.
4021         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
4022         on Win64.
4023         
4024         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
4025         stack based argument handling on Win64.
4026         
4027         Code contributed under MIT/X11 license.
4028
4029 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
4030
4031         * Makefile.am (version.h): Add support for git-svn.
4032
4033 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
4034
4035         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
4036         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
4037         avoiding allocations and libc functions which might deadlock.
4038         
4039         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
4040         'no-gdb-backtrace' option is set.
4041
4042         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
4043
4044         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
4045
4046 2008-04-21  Martin Baulig  <martin@ximian.com>
4047
4048         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
4049         and `get_lmf_addr'; `notification_address' is no longer a pointer.
4050
4051 2008-04-21  Martin Baulig  <martin@ximian.com>
4052
4053         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
4054         `thread_vtable', `event_handler_ptr' and `event_handler'.
4055
4056 2008-04-21  Martin Baulig  <martin@ximian.com>
4057
4058         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
4059         allows delayed initialization of the `executable_code_buffer' when
4060         attaching.
4061
4062 2008-04-21  Martin Baulig  <martin@ximian.com>
4063
4064         * mini.h (mono_debugger_create_notification_function): Removed.
4065         * tramp-*.c (mono_debugger_create_notification_function): Removed.
4066
4067         * mdb-debug-info64.s
4068         (MONO_DEBUGGER__notification_function): Added this in the .text section.
4069
4070         * mdb-debug-info32.s
4071         (MONO_DEBUGGER__notification_function): Added this in the .text section.
4072
4073         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
4074         currently only works on x86 and x86_64, so don't create it on ppc.
4075
4076 2008-04-21  Martin Baulig  <martin@ximian.com>
4077
4078         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
4079
4080         * mini.c
4081         (mini_method_compile): In the fp elimination check, check
4082         `debug_options.mdb_optimizations' in addition to
4083         mono_debug_using_mono_debugger().       
4084
4085         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
4086         disable some JIT optimizations which are only disabled when
4087         running inside the debugger.
4088         Added `--help-debug' option to describe the debugging options.
4089         (parse_debug_options): New static function to parse the `--debug'
4090         options, so we can easily add more stuff in future.
4091
4092 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
4093
4094         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
4095         the method has no body.
4096
4097 2008-04-19  Jonathan Chambers <joncham@gmail.com>
4098
4099         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
4100         assembly is not allowed in MSVC 64-bit compiler. 
4101         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
4102         as we get floating point exceptions everywhere.
4103         
4104         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
4105         correctly align arguments for call to throw_exception.
4106         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
4107         
4108         Code contributed under MIT/X11 license.
4109
4110 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
4111
4112         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
4113
4114 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
4115
4116         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
4117
4118         * mini-amd64.c (NEW_INS): Set cil_code.
4119
4120         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
4121         from mini-amd64.c so all debugger related logic is in one place.
4122
4123         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
4124         later won't have a random ip assigned to them.
4125
4126 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
4127
4128         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
4129         the arch specific function initializes code_size.
4130         (mono_create_delegate_trampoline): Ditto.
4131
4132         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
4133         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
4134         platforms.
4135
4136         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
4137         running under the debugger.
4138
4139         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
4140         debugger.
4141
4142         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
4143         debugger. Also move the disabling of optimizations here from driver.c.
4144         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
4145         debugger.
4146
4147         * mini.h (MonoCompile): Add a few new flags.
4148
4149 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
4150
4151         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
4152         so the cil_code field of created MonoInst's is properly set.
4153         (mini_select_instructions): Ditto.
4154
4155         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
4156         (MONO_INST_NEW_CALL): Ditto.
4157
4158         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
4159         in many places so the ins->cil_code field is properly initialized.
4160
4161         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
4162         place.
4163
4164 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
4165
4166         * mini.c (mini_method_compile): Print a different message when compiling a 
4167         shared method.
4168         
4169         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
4170         > 1.
4171
4172 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
4173
4174         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
4175         SSE2 instructions.
4176
4177         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
4178         
4179 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
4180
4181         * mini.c (handle_stack_args): Make this return void since its return value was
4182         never used. Also set cfg->unverifiable for invalid IL instead of calling
4183         G_BREAKPOINT ().
4184
4185 2008-04-10  Mark Probst  <mark.probst@gmail.com>
4186
4187         * mini.c: Make sure "this" is live in catch clauses with type
4188         variables in shared generic code.
4189
4190 2008-04-08  Mark Probst  <mark.probst@gmail.com>
4191
4192         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
4193         generic_class_is_reference_type() to ensure the proper behaviour
4194         when sharing generic code and the type in question is a type
4195         argument.
4196
4197 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
4198
4199         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
4200         race conditions when printing thread dumps. Fixes #377738.
4201
4202 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
4203         
4204         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
4205         shows up when both MonoInst arguments can cause aliasig.
4206         There is likely no way in the current JIT to trigger this problem, but
4207         it showed up in the development of generics sharing, when in a new
4208         opcode both args of an OP_GROUP can be aliases (addresses of a local).
4209         When the generics sharing code will be committed, its tests will be
4210         valid also for this bug.
4211
4212 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
4213
4214         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
4215         PATCH_INFO_METHOD.
4216
4217         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
4218         NULL.
4219
4220 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
4221
4222         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
4223         use a more detailed exception message for InvalidCastException.
4224
4225         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
4226
4227         * driver.c (mono_main): Add --debug=casts option to turn on better 
4228         InvalidCastException message details.
4229
4230         * mini.c (mini_get_debug_options): New helper function to return the address of
4231         the debug_options variable.
4232
4233         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
4234         the jit_tls TLS variable.
4235
4236         * mini.c (mono_jit_tls): New TLS variable.
4237
4238         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
4239         option is used.
4240
4241 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
4242
4243         * mini.h: Removed verifer related stuff. This code was moved to verify.c
4244
4245         * mini.c: Removed verifer related stuff, code moved to verify.c.
4246
4247         * driver.c: Using code from verify.c instead of mini.c.
4248
4249 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
4250
4251         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
4252         longer valid.
4253
4254 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
4255
4256         * mini.c (check_for_method_verify): Enabling verification of
4257         corlib if mono_verify_all is set. Bugs in the verifier preventing that
4258         have been fixed.
4259
4260 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
4261
4262         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
4263         caller saved registers as well.
4264         
4265         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
4266         saved registers as well.
4267
4268 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
4269
4270         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
4271
4272         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
4273         code.
4274
4275 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
4276
4277         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
4278         to get_call_info.
4279         (get_call_info): Take a gsctx argument instead of 'cfg'.
4280
4281 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
4282
4283         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
4284         mono_verify_all is set.
4285
4286         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
4287
4288         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
4289
4290 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
4291
4292         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
4293         an exception.
4294
4295         * driver.c mini.c mini.h: Add a --verify-all development option to test the
4296         verifier and the code generated by the compiler.
4297
4298 2008-03-25  Mark Probst  <mark.probst@gmail.com>
4299
4300         * mini.c: Generic sharing of the non-nullable case of the box
4301         instruction.
4302
4303 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
4304
4305         * inssel.brg: Fix the build.
4306
4307         * iltests.il.in: Add a test for lconv.ovf.u8.un.
4308
4309 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
4310
4311         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
4312         Array:Address. Fixes #372410.
4313
4314         * iltests.il.in: New tests for readonly prefix.
4315
4316 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
4317
4318         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
4319         mini-trampolines.c.
4320
4321         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
4322         mini-exceptions.c.
4323
4324         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
4325         
4326         * mini.c (mono_decompose_op_imm): New helper function.
4327
4328         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
4329         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4330         return value.
4331
4332         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
4333         mono_arch_output_basic_block. Fix warnings.
4334
4335         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
4336         for now.
4337
4338 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
4339
4340         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
4341         since the extra frame is now detected automatically inside the loop.
4342
4343         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
4344         opts which are now in mono_peephole_ins ().
4345         
4346         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
4347
4348         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
4349         frames and skip duplicate managed-to-native frames. Fixes #367665.
4350
4351         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4352         opts which are now in mono_peephole_ins ().
4353         (mono_arch_peephole_pass_2): Ditto.
4354
4355         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
4356
4357         * mini-codegen.c (mono_peephole_ins): New helper function containing the
4358         arch independent peephole optimizations.
4359
4360         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4361         opts which are now in mono_peephole_ins ().
4362
4363         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
4364         
4365         * mini-s390.c (mono_arch_output_basic_block): Fix build.
4366
4367         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
4368         pattern.
4369
4370         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
4371         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
4372         opcode. 
4373
4374 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
4375
4376         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
4377         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4378         return value.
4379
4380         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
4381         mono_arch_output_basic_block. Fix warnings.
4382
4383 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4384
4385         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4386         conv.ovf.u.un.
4387
4388 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4389
4390         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4391         conv.ovf.u.un.
4392
4393         * iltests.il: Add new tests.
4394
4395 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
4396
4397         * mini.c: Removed Windows version macros.
4398
4399 2008-03-20  Mark Probst  <mark.probst@gmail.com>
4400
4401         * generic-sharing.c: Put reflection types in the extensible part
4402         of the runtime generic context.
4403
4404         * mini.c: Generic sharing of the GetTypeHandle special case of the
4405         ldtoken instruction.
4406
4407 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4408
4409         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
4410
4411         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
4412         
4413         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
4414         consistency with the other version on the linear IR branch.
4415
4416         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
4417
4418         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
4419
4420         * iltests.il.in: Add new tests.
4421
4422 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
4423
4424         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
4425
4426         * iltests.il.in: Add new tests.
4427
4428 2008-03-19  Mark Probst  <mark.probst@gmail.com>
4429
4430         * mini.c: Two variables with the same name were declared in
4431         nesting contexts and one wasn't initialized.  Fixed.
4432
4433 2008-03-19  Mark Probst  <mark.probst@gmail.com>
4434
4435         * mini.c: Generic sharing of the initobj instruction.
4436
4437 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
4438
4439         * mini.c: make the test to optimize ldtoken from typeof() more
4440         precise.
4441
4442 2008-03-18  Mark Probst  <mark.probst@gmail.com>
4443
4444         * mini.c: Generic sharing of the initobj instruction for reference
4445         types.
4446
4447 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
4448
4449         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
4450         the mono_breakpoint_clean_code() code to perform bound checks.
4451
4452 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
4453
4454         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
4455         mono_arch_patch_callsite() to include the start of the managed method
4456         to be able to perform bound checks.
4457
4458 2008-03-17  Mark Probst  <mark.probst@gmail.com>
4459
4460         * mini.c: Generic sharing for the isinst instruction.
4461
4462 2008-03-17  Mark Probst  <mark.probst@gmail.com>
4463
4464         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4465         inssel-long32-mips.brg: Added opcodes for doing indirect calls
4466         with the runtime generic context argument.
4467
4468         * mini.c: Share calls to several types of unsharable methods by
4469         putting the address of the method code in the runtime generic
4470         context and doing an indirect call.
4471
4472         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4473         to switches.
4474
4475 2008-03-16  Mark Probst  <mark.probst@gmail.com>
4476
4477         * generic-sharing.c: Change due to a change in the runtime genric
4478         context API.
4479
4480 2008-03-15  Martin Baulig  <martin@ximian.com>
4481
4482         * tramp-x86.c
4483         (mono_arch_nullify_class_init_trampoline): Add call to
4484         mono_breakpoint_clean_code() to make things work when running
4485         inside the debugger.
4486
4487         * tramp-amd64.c
4488         (mono_arch_nullify_class_init_trampoline): Add call to
4489         mono_breakpoint_clean_code() to make things work when running
4490         inside the debugger.
4491
4492 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
4493
4494         * inssel-long.brg (reg): Fix 64 bit build.
4495
4496 2008-03-14  Mark Probst  <mark.probst@gmail.com>
4497
4498         * mini.c, mini.h: Share static generic code by passing it an
4499         implicit argument pointing to the runtime generic context.
4500
4501         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4502         inssel-long32-mips.brg: New opcodes for calling shared static,
4503         which need to be passed the runtime generic context.
4504
4505         * mini-amd64.c, mini-x86.c: Save the runtime generic context
4506         argument on the stack in the prologue if needed.  New function for
4507         finding the runtime generic context argument from the registers
4508         saved by the trampoline.
4509
4510         * mini-amd64.h, mini-x86.h: Specify which register to use for the
4511         runtime generic context argument.
4512
4513         * tramp-amd64.c: Also restore the register used for the runtime
4514         generic context argument.
4515
4516         * mini-trampoline.c: Resolve shared static calls by consulting the
4517         runtime generic context via the new argument.
4518
4519         * generic-sharing.c: Add an argument to sharability-checking
4520         functions that specifies whether type variables should be treated
4521         as sharable type arguments.
4522
4523         * inssel-x86.brg: Removed a superfluous, buggy rule.
4524
4525         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4526         to switches.
4527
4528 2008-03-14  Martin Baulig  <martin@ximian.com>
4529
4530         * debug-debugger.c (main_thread_handler): Call
4531         mono_runtime_run_main() without sending any notifications.
4532
4533         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
4534
4535 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
4536
4537         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
4538
4539 2008-03-14  Mark Probst  <mark.probst@gmail.com>
4540
4541         * tramp-x86.c: Fixed register restore offsets in the trampoline
4542         code for ECX and EDX.
4543
4544 2008-03-12  Geoff Norton  <gnorton@novell.com>
4545
4546         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
4547         different ucontext_t implementations.
4548         * exceptions-arm.c: Use the above defines to get exceptions working on 
4549         iPhone (based on a patch by Luke Howard lukeh@padl.com)
4550         * mini-arm.c: Implement iPhone icache support (based on a patch by
4551         Luke Howard lukeh@padl.com)
4552
4553 2008-03-12  Mark Probst  <mark.probst@gmail.com>
4554
4555         * mini.c: Enable generic sharing of calls to non-static
4556         non-interface non-generic non-value-type methods.
4557
4558         * mini-trampolines.c: Resolve calls from shared generic code.
4559
4560 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
4561
4562         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
4563
4564         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
4565
4566 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
4567
4568         * mini.c: some fixes for the AOT compiler.
4569
4570 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
4571
4572         * cpu-amd64.md: Add clob:1 to some float opcodes.
4573
4574 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
4575
4576         * mini.h: Added MiniVerifierMode enumeration.
4577
4578         * mini.c: Added mini_verifier_set_mode to control
4579         the usage of the new verifier.
4580
4581         * mini.c (mono_method): Integrated the new verifier.
4582
4583         * driver.c: Extended --security option with validil and
4584         verifiable options to activate the new verifier.
4585
4586 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
4587
4588         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
4589         optimization to ctors taking 0 or 2 arguments too.
4590
4591         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
4592         a bit.
4593
4594         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
4595
4596         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
4597
4598 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
4599
4600         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
4601         non-aot case as well.
4602
4603         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
4604
4605         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
4606         changes.
4607
4608         * aot-compiler.c (encode_patch): Ditto.
4609
4610         * mini.h (G_MININT32): Fix the definition of this.
4611
4612 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
4613
4614         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
4615
4616         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
4617
4618 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
4619
4620         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
4621         methods returning vtypes in registers.
4622         (mono_arch_allocate_vars): Ditto.
4623
4624         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
4625
4626         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
4627
4628         * generics.cs: Add a test from the linear IR branch.
4629
4630         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
4631
4632         * mini.c (inline_method): Cache failed inline attempts.
4633
4634 2008-03-04  Mark Probst  <mark.probst@gmail.com>
4635
4636         * mini.c: For shared methods of generic classes put the location
4637         of "this" into the MonoGenericJitInfo.
4638
4639         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
4640         register out of a MonoContext by register number.  Add the generic
4641         sharing context as an argument to mono_arch_find_this_argument().
4642
4643         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
4644         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
4645         for new arch function.
4646
4647         * mini-exception.c: Handle open exception clauses in shared
4648         generic code.
4649
4650         * mini-trampolines.c: Supply additional argument to
4651         mono_arch_find_this_argument().
4652
4653 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
4654
4655         * Makefile.am (regtests): Run the bench.exe tests last.
4656
4657 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
4658
4659         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
4660         a bit.
4661
4662 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
4663
4664         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
4665         with MS.
4666
4667         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
4668         
4669         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
4670
4671         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
4672         whose class has no cctor.
4673
4674         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
4675
4676 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
4677
4678         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
4679         unverified.
4680
4681 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
4682
4683         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
4684         to be in sync with the code on the linear IR branch.
4685
4686         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
4687
4688         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
4689
4690 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
4691
4692         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
4693
4694         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
4695
4696         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
4697
4698         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
4699
4700         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
4701         
4702         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
4703         body.
4704
4705 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
4706
4707         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
4708         OP_LOADR4_MEMBASE emission.
4709
4710         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
4711         (mono_spillvar_offset_float): Ditto.
4712
4713         * mini-mips.c (mono_arch_emit_prolog): Ditto.
4714
4715         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
4716         emission.
4717
4718         * basic-long.cs: Add regression tests for them.
4719
4720         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
4721         use.
4722         (mono_arch_allocate_vars): Fix representation of single-precision float
4723         argument.
4724         (mono_arch_output_basic_block): Ditto.
4725
4726         * inssel-mips.brg: Ditto, remove duplicate items.
4727
4728         * mini-mips.c (emit_load_volatile_arguments): New function to handle
4729         arguments of tail calls as on other platforms.
4730         (mono_arch_output_basic_block): Handle tail calls.
4731
4732         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
4733         register.
4734
4735         * objects.cs (test_5_pass_static_struct): Add test for it.
4736
4737         Contributed under MIT/X11 license.
4738
4739 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
4740
4741         * Makefile.am: Use gmcs for compiling the regression tests.
4742
4743         * *.2.cs *.2.il: Rename to *.cs and *.il.
4744
4745 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
4746
4747         * regalloc.h: Make the vassign array smaller.
4748
4749         * mini.c (mini_method_compile): Remove an unused field in cfg.
4750
4751         * mini-codegen.c: Add a bunch of micro optimizations.
4752
4753 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
4754
4755         * regalloc.h: Remove some unused fields.
4756
4757 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
4758
4759         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
4760
4761         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
4762
4763 2008-02-22  Mark Probst  <mark.probst@gmail.com>
4764
4765         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
4766
4767         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
4768         trampoline: Fetch an entry from the runtime generic context.  If
4769         it's NULL, jump to the actual trampoline to fill the runtime
4770         generic context.  Otherwise, return it.
4771
4772         * mini.c: Call the lazy fetch trampoline to get entries out of the
4773         runtime generic context.
4774
4775         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
4776         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
4777         tramp-sparc.c: Stubs for the lazy fetch trampoline.
4778
4779 2008-02-21  Mark Probst  <mark.probst@gmail.com>
4780
4781         * mini.c: Fetch data out of the extensible part of the runtime
4782         generic context instead of calling a helper function.
4783
4784         * generic-sharing.c: Some functions moved into
4785         metadata/generic-sharing.c.  Helper function for fetching other
4786         types now checks and asserts against extensible rgctx (just for
4787         debugging purposes - the helper function isn't called anymore
4788         unless for debugging).
4789
4790 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
4791
4792         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
4793         for tail calls up to the point that the tests in iltests.exe run. Also add a
4794         dummy CKFINITE implementation.
4795         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
4796         needed for trampoline LMF frames.
4797
4798         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
4799         trampoline LMF frames.
4800
4801 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
4802
4803         * mini.c (inline_method): clean any pending loader error when inlining fail.
4804         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
4805
4806 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
4807
4808         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
4809
4810         * aot-runtime.c (decode_patch_info): Ditto.
4811
4812         * mini.c (mono_resolve_patch_target): Ditto.
4813         
4814         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
4815         icall wrappers.
4816
4817         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
4818         
4819         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
4820         if it references an icall address.
4821
4822 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
4823
4824         * cpu-s390x.md: Remove some more unused opcodes.
4825         
4826         * cpu-s390x.md: Remove some unused opcodes.
4827
4828         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
4829         mono_op_imm_to_op ().
4830
4831         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
4832         instead of a switch statement.
4833         
4834         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
4835         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
4836
4837         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
4838         
4839         * mini-codegen.c: Remove unused mono_regstate2_... functions.
4840
4841         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
4842         -1.
4843
4844 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
4845
4846         * driver.c (mono_main): Improve error reporting when an assembly cannot be
4847         opened. Fixes #362607.
4848
4849         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
4850
4851         * iltests.il.in: Add a test for static methods in interfaces.
4852
4853 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
4854
4855         * genmdesc.c (build_table): Fix a crash on older glib versions.
4856
4857         * cpu-sparc.md: Remove some unused opcodes.
4858         
4859         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
4860         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
4861
4862         * cpu-amd64.md: Remove some unused opcodes.
4863
4864         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
4865         like the other opcodes.
4866
4867 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
4868
4869         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
4870
4871         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
4872
4873         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
4874         variables 'cfg' instead of 'm' for consistency.
4875
4876         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
4877
4878         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
4879         argument holding the vtype return address, to avoid the ambigious use of
4880         cfg->ret for this purpose.
4881
4882         * mini.c (NEW_RETLOADA): Use vret_addr if set.
4883
4884         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
4885         
4886         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
4887         new mono_print_ins () function which only takes one argument.
4888
4889 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
4890
4891         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
4892         macro arguments.
4893
4894 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
4895
4896         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
4897
4898         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
4899
4900         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
4901         opcodes and other small changes.
4902
4903         * mini-ops.h: Add some new opcodes from the linear IR branch.
4904
4905         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
4906
4907         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
4908         opcodes, use the REG_MEMBASE opcodes instead.
4909         
4910         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
4911         opcodes, use the REG_MEMBASE opcodes instead.
4912         
4913         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
4914         linear IR branch.
4915
4916         * mini.c (mono_op_imm_to_op): New helper function.
4917
4918         * mini-ops.h: Add some opcodes from linear IR branch.
4919
4920 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
4921
4922         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
4923         <tsv@solvo.ru>.
4924
4925 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
4926
4927         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
4928         OP_ICONV_TO_R4/R8.
4929
4930         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
4931
4932 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
4933
4934         * aot-compiler.c (emit_method_code): Add an assert.
4935
4936         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
4937         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
4938         methods.
4939
4940 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
4941
4942         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
4943         some load/store opcodes so they are consistent. 
4944         (mono_arch_emit_prolog): Simplify some code.
4945
4946         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
4947
4948         * objects.cs: Add tests for large argument offsets on ARM.
4949
4950         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
4951         stack offsets. Fixes #359651.
4952
4953         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
4954
4955         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
4956
4957         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
4958
4959         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
4960
4961         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
4962
4963         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
4964         rid of CEE_CONV_R_UN.
4965
4966         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
4967
4968 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
4969
4970         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
4971
4972         * mini.c (mono_normalize_opcodes): Add some more opcodes.
4973
4974         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
4975
4976         * cpu-amd64.md: Remove some unused opcodes.
4977
4978         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
4979
4980         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
4981
4982         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
4983         arch specific functions for its parts. Call the peephole pass after local
4984         regalloc so the prolog can compute a more accurate max_offset.
4985         
4986         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
4987         the corresponding OP_I/OP_L opcodes.
4988
4989         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
4990
4991         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
4992
4993 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
4994
4995         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
4996         as they are handled in mini.c.
4997
4998         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
4999         
5000         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
5001         case since it is handled in mini.c.
5002
5003         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
5004
5005         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
5006
5007         * *.c: Use the new opcodes in the IR and back end code.
5008
5009         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
5010
5011         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
5012
5013 2008-02-06  Mark Probst  <mark.probst@gmail.com>
5014
5015         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
5016         an assert because it has a race condition.
5017
5018 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
5019
5020         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
5021
5022         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
5023
5024         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
5025
5026         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
5027         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
5028
5029 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
5030
5031         * cpu-amd64.md (move): Correct the maximum size of move.
5032
5033 2008-02-05  Mark Probst  <mark.probst@gmail.com>
5034
5035         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
5036         the generic class init trampoline to return quickly if the class
5037         is already inited.
5038
5039 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
5040
5041         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
5042         issues where an 32 bit callsite cannot be patched by a 64 bit address.
5043
5044 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
5045
5046         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
5047         branch.
5048
5049 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
5050
5051         * objects.cs: Add some soft-float tests.
5052
5053         * mini.c: Fix a couple more soft-float issues.
5054
5055         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
5056
5057         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
5058         avoid a REX prefix.
5059
5060 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
5061
5062         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
5063         exception happens while compiling a virtual method.
5064
5065 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
5066
5067         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
5068         
5069         * mini-sparc.c: Fix build.
5070
5071         * mini-sparc.c (get_call_info): Add support for generic sharing.
5072
5073         * mini-exceptions.c: Add a FIXME.
5074
5075 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
5076
5077         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
5078         altstack handling code.
5079
5080         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
5081         
5082         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
5083
5084         * mini-s390.c: Add support for generic sharing.
5085
5086         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
5087         Fix CAS on s390.
5088         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5089
5090         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
5091
5092         * mini-s390x.c: Add support for generic sharing.
5093         
5094         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
5095         Fix CAS on ia64.
5096         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5097
5098         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
5099         can be used since it takes a 16 bit signed immediate.
5100
5101         * inssel-s390x.brg: Fix OP_SETRET.
5102
5103         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
5104
5105         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
5106
5107         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
5108
5109         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
5110
5111         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
5112         in one place.
5113
5114         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
5115         stuff.
5116
5117         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
5118         of the unused mono_arch_patch_delegate_trampoline stuff.
5119
5120 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
5121
5122         * basic-long.cs: Move the fp related tests to basic-float.cs.
5123
5124         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
5125
5126         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
5127
5128         * basic-calls.cs: Add a test for proper float argument passing.
5129
5130         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
5131         if the context corresponds to an exception received through a signal.
5132
5133         * exceptions.cs: Add a test for nullref handling at the start of a try
5134         clause.
5135
5136         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
5137
5138         * jit-icalls.c (mono_break): New JIT icall.
5139
5140         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
5141
5142         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
5143
5144 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
5145
5146         * cpu-*.md: Get rid of unused opcodes.
5147
5148         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
5149
5150         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
5151         by all platforms.
5152
5153         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
5154         define.
5155
5156         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
5157         the arch independent trampoline code in mini-trampolines.c.
5158
5159         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
5160
5161         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
5162
5163         * mini-s390.h: Remove an unused define.
5164         
5165         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
5166         the arch independent trampoline code in mini-trampolines.c.
5167
5168         * mini-arm.c (mono_arch_emit_prolog): Fix build.
5169
5170 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
5171
5172         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
5173
5174         * mini-s390.c (mono_arch_emit_prolog): Fix build.
5175
5176         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
5177
5178         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
5179
5180         * cpu-amd64.md: Use smaller sizes for int opcodes.
5181
5182         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
5183
5184         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
5185         objects.cs.
5186
5187         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
5188         debugging.
5189
5190         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
5191         instead of though a pointer to save an indirection when accessing elements of
5192         the array.
5193
5194         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
5195         some typos.
5196         (NOT_IMPLEMENTED): New helper macro.
5197         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
5198         of a bb.
5199
5200         * *.c: Use the new helper macro.
5201
5202 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
5203
5204         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
5205
5206 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
5207
5208         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
5209         stack slots.
5210
5211 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
5212
5213         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
5214         profiling is enabled.
5215         
5216         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
5217         the end.
5218         (mono_arch_emit_prolog): Add more first bblock optimizations.
5219
5220         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
5221         in order if possible.
5222         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
5223         bblock, since the arguments are still in their original registers.
5224
5225         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
5226
5227 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
5228
5229         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
5230         as well.
5231
5232         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
5233         offset 0.
5234
5235         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
5236
5237         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
5238         process async exceptions received while in unmanaged code.
5239
5240         * mini.c (mini_init): Install a callback with the runtime which will be called
5241         when a thread receives an async exception while in unmanaged code.
5242
5243         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
5244
5245         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
5246
5247 2008-01-16  Wade Berrier  <wberrier@novell.com>
5248
5249         * cpu-g4.md:
5250         * cpu-arm.md:
5251         * cpu-s390x.md:
5252         fix build
5253
5254 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
5255
5256         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
5257         compilation with sun cc.
5258
5259         * cpu-*.md: Fix the build.
5260
5261         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
5262
5263         * mini-amd64.h: Add some comments to the MonoLMF structure.
5264
5265         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
5266         
5267         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
5268         in the LMF structure if possible. This saves two instructions in the
5269         managed->native wrappers.
5270
5271         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
5272
5273 2008-01-16  Mark Probst  <mark.probst@gmail.com>
5274
5275         * generic-sharing.c: New type argument lookup code which uses the
5276         runtime generic context template.
5277
5278 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
5279
5280         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
5281
5282         * mini-arm.c (add_general): Fix arm eabi parameter passing.
5283         (mono_arch_output_basic_block): Fix localloc implementation.
5284
5285         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
5286
5287         * mini-ia64.c (peephole_pass): Fix ia64 build.
5288
5289         * mini-amd64.c (peephole_pass): Fix a warning.
5290         
5291         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
5292         at a constant offset from sp/fp.
5293
5294         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
5295         instead of obtaining it from *lmf in the managed method case.
5296
5297 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
5298
5299         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
5300
5301 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
5302
5303         * mini.h (MonoInstList): New type.
5304         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
5305         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
5306         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
5307         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
5308         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
5309         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
5310         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
5311         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
5312         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
5313         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
5314         MONO_INST_LIST_FOR_EACH_ENTRY,
5315         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
5316         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
5317         mono_inst_list_first, mono_inst_list_last,
5318         mono_inst_list_next, mono_inst_list_prev): New instruction
5319         list handling interfaces.
5320         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
5321         list head 'ins_list'.
5322         (MonoInst): Replace next pointer with list head 'node'.
5323         (MonoCallInst): Make 'out_args' a MonoInstList.
5324         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
5325         (MonoCompile): Delete reverse_inst_list and
5326         reverse_inst_list_len.
5327         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
5328         mono_arch_lowering_pass, mono_arch_local_regalloc,
5329         mono_arch_output_basic_block, mono_arch_emit_prolog):
5330         Convert to new instruction lists.
5331         (insert_after_ins): Delete.
5332         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
5333         instruction lists.
5334         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
5335         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
5336         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
5337         mono_emulate_opcode, mono_emit_load_got_addr,
5338         inline_method, mono_method_to_ir, mono_print_bb_code,
5339         print_dfn, decompose_pass, nullify_basic_block,
5340         replace_out_block_in_code, remove_block_if_useless,
5341         merge_basic_blocks, move_basic_block_to_end,
5342         try_unsigned_compare, optimize_branches, mono_print_code,
5343         mini_select_instructions, remove_critical_edges): Likewise.
5344         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
5345         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
5346         mono_arch_output_basic_block, mono_arch_emit_prolog):
5347         Likewise.
5348         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
5349         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5350         mono_arch_output_basic_block): Likewise.
5351         (inst_list_prepend, insert_after_ins): Delete.
5352         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
5353         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
5354         instruction lists.
5355         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
5356         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
5357         mono_arch_emit_prolog): Likewise.
5358         * cfold.c (mono_constant_fold): Likewise.
5359         * liveness.c (visit_bb, mono_analyze_liveness,
5360         optimize_initlocals): Likewise.
5361         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
5362         * graph.c (mono_draw_code_cfg): Likewise.
5363         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
5364         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
5365         mono_ssa_cprop): Likewise.
5366         * abcremoval (get_relations_from_previous_bb, process_block):
5367         Likewise.
5368         * local-propagation (mono_cprop_invalidate_values,
5369         mono_local_cprop_bb): Likewise.
5370         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
5371         peephole_pass, mono_arch_output_basic_block,
5372         mono_arch_emit_prolog): Likewise.
5373         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
5374         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5375         mono_arch_emit_prolog): Likewise.
5376         (insert_after_ins): Delete.
5377         * aliasing.c (print_code_with_aliasing_information,
5378         mono_build_aliasing_information, mono_aliasing_deadce):
5379         Convert to new instruction lists.
5380         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
5381         peephole_pass, NEW_INS, mono_arch_lowering_pass,
5382         mono_arch_local_regalloc, mono_arch_output_basic_block):
5383         Likewise.
5384         (insert_after_ins): Delete.
5385         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
5386         peephole_pass, mono_arch_output_basic_block): Convert to
5387         new instruction lists.
5388         * mini-codegen (InstList, inst_list_prepend,
5389         insert_after_ins): Delete.
5390         (insert_before_ins, get_register_force_spilling,
5391         get_register_spilling, free_up_ireg, free_up_reg,
5392         create_copy_ins, create_spilled_store, alloc_int_reg,
5393         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
5394         to new instruction lists.
5395         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
5396         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5397         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
5398         (insert_after_ins): Delete.
5399         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
5400         mono_arch_local_regalloc, mono_arch_output_basic_block,
5401         mono_arch_call_opcode): Convert to new instruction lists.
5402         (insert_after_ins): Delete.
5403         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
5404         peephole_pass, mono_arch_output_basic_block,
5405         mono_arch_emit_prolog): Convert to new instruction lists.
5406
5407 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
5408
5409         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
5410
5411         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
5412         Fixes #353182.
5413
5414         * Makefile.am (version.h): Make this work with non-bash shells.
5415
5416 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
5417
5418         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
5419
5420 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
5421
5422         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
5423         the InitializeArray optimization.
5424
5425 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
5426
5427         * mini.c driver.c: Don't include os/gc_wrapper.h.
5428
5429 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
5430
5431         * mini.c (print_jit_stats): Print GC statistics if available.
5432
5433 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
5434
5435         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
5436
5437 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
5438
5439         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
5440
5441 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
5442
5443         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
5444         
5445         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
5446
5447         * driver.c (mono_main): Ditto.
5448
5449 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
5450
5451         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
5452
5453         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
5454         in the vtable can't be encoded.
5455         (compile_method): Ditto.
5456
5457 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
5458
5459         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
5460         defined.
5461
5462         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
5463         lmf->rbp.
5464
5465         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
5466         the top LMF entry belongs to the current method.
5467
5468         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
5469
5470 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
5471
5472         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
5473         
5474         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
5475
5476         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
5477
5478         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
5479
5480         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
5481
5482         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
5483         implementation.
5484
5485         * basic-float.cs: Add an ulong->double cast test.
5486
5487 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
5488
5489         * mini.c (mono_method_to_ir): Fix a warning.
5490
5491 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
5492
5493         * mini-ops.h: Add OP_SWITCH.
5494
5495         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
5496         CEE_SWITCH in back-end code, use OP_SWITCH instead.
5497
5498 2007-12-11  Geoff Norton  <gnorton@novell.com>
5499
5500         * mini-s390x.c: Minor change to the MAX() define to allow
5501         it to compile with other gcc versions.
5502
5503 2007-12-11  Geoff Norton  <gnorton@novell.com>
5504
5505         * cpu-s390x.md:
5506         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
5507
5508 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
5509
5510         exceptions-arm.c (mono_arch_get_restore_context): Restore
5511         the frame pointer.
5512
5513         exceptions-arm.c (throw_exception): Save the frame pointer.
5514         This is a partial fix for #323747. Only the client side is
5515         fixed.
5516
5517 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
5518
5519         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
5520         was using an unrelated variable to log the class which
5521         needed the cctor to be called. This was crashing on arm.
5522
5523 2007-12-09  Robert Jordan  <robertj@gmx.net>
5524
5525         * mini-x86.c (mono_arch_emit_epilog):
5526         Consider all kinds of 64-bit types. Fixes #323114.
5527
5528 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
5529
5530         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
5531
5532 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5533
5534         * mini-amd64.c (peephole_pass): Add a missing instruction check.
5535
5536 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5537
5538         * mini.c: run type ctor before allocating an object, not only
5539         when running it's constructor method (fixes at least part of bug #342507).
5540
5541 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5542         
5543         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
5544         
5545         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
5546         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
5547         function.
5548
5549         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
5550         mono_generic_class_init_trampoline () the same as it is done with the other
5551         trampolines.
5552
5553         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
5554         aot-runtime.c aot-compiler.c: Implement AOT support.    
5555
5556 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5557
5558         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
5559         build for archs which don't have the vtable trampoline defined
5560         yet.
5561
5562 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5563
5564         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
5565
5566         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
5567
5568         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
5569
5570         * tramp-<ARCH>.c: Use the new helper function.
5571
5572 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5573
5574         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
5575         trampoline call, which takes a vtable argument.
5576
5577         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
5578         OP_TRAMPCALL_VTABLEs like other calls.
5579
5580         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
5581         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
5582         call.  Implemented a support function which fetches the vtable
5583         from a register set.
5584
5585         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
5586         Implemented a generic class init trampoline, using the
5587         OP_TRAMPCALL_VTABLE opcode.
5588
5589         * mini.c: Implemented static field access when sharing generic
5590         code.  This implies initing the class using the new
5591         OP_TRAMPCALL_VTABLE call.
5592
5593 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5594
5595         * mini.c: Don't compile methods with sharing enabled if their
5596         classes are disabled for sharing.
5597
5598 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
5599
5600         * inssel.brg: Add a missing sign extension to the GETCHR and array access
5601         opcodes. Fixes #346563.
5602
5603         * objects.cs: Add a new test.
5604
5605         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
5606
5607         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
5608         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
5609
5610 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
5611
5612         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
5613
5614 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
5615
5616         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
5617         code stream.
5618
5619 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
5620
5621         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
5622
5623         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
5624         optimization in the AOT case.
5625         
5626 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
5627
5628         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
5629         
5630         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
5631
5632         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
5633
5634         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
5635
5636         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
5637         is created by the inlined delegate ctor.
5638
5639         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
5640
5641         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
5642
5643 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
5644
5645         * cpu-x86.md: Fix the length of ckfinite.
5646
5647 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
5648
5649         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
5650         
5651         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
5652         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
5653
5654         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
5655
5656         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
5657         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
5658
5659 2007-11-28  Martin Baulig  <martin@ximian.com>
5660
5661         * mini-x86.c
5662         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
5663         after creating the trampoline.
5664
5665 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
5666
5667         * aot-runtime.c (load_aot_module): Check runtime version if needed.
5668
5669         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
5670         the same version.
5671
5672         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
5673         instead of the calling method to help AOT.
5674
5675         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
5676
5677 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
5678
5679         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
5680         is defined.
5681
5682 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
5683
5684         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
5685         
5686         * aot-compiler.c (compile_method): Correct check for generic method definitions.
5687         (encode_method_ref): No need to handle generic method definitions specially.
5688
5689         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5690
5691         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
5692         decode_klass_info.
5693
5694         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
5695         encode_klass_info.
5696         (compile_method): Enable generic sharing.
5697
5698 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
5699
5700         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
5701         (mini_method_compile): Add preliminary support for AOTing shared generic code.
5702
5703         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
5704         generic code.
5705
5706         * mini-trampolines.c: Fix a warning.
5707
5708         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
5709         NEW_PCONST.
5710         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
5711         (generic_class_is_reference_type): Remove unused function.
5712
5713         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
5714         in the generic vtable trampoline case.
5715
5716         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
5717         
5718         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
5719         return an AOT method based on a vtable slot.
5720
5721         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
5722
5723         * mini.c (mini_get_vtable_trampoline): Export this.
5724
5725 2007-11-22  Martin Baulig  <martin@ximian.com>
5726
5727         * debug-debugger.h
5728         (MonoDebuggerInfo): Move `debugger_version' up.
5729
5730 2007-11-22  Martin Baulig  <martin@ximian.com>
5731
5732         * mini-amd64.c
5733         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
5734
5735         * mini-trampolines.c
5736         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
5737         after compiling the method.
5738
5739 2007-11-20  Martin Baulig  <martin@ximian.com>
5740
5741         * debug-mini.c
5742         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
5743         (mono_debugger_remove_breakpoint): Likewise.
5744         (mono_debugger_check_breakpoints): Likewise.
5745
5746         * debug-debugger.c: Implement the new breakpoint interface here.
5747
5748 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
5749
5750         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
5751         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
5752
5753         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
5754
5755 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
5756
5757         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
5758
5759         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
5760         mini.c.
5761
5762         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
5763         mini.c.
5764
5765         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
5766         returning a vtype in a register.
5767
5768         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
5769         here from the arch specific code.
5770
5771         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
5772         mini.c.
5773
5774         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
5775         (mono_arch_emit_prolog): Increment maximum prolog size.
5776
5777         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
5778         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
5779
5780         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
5781         MonoGenericSharingContext.
5782
5783         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
5784         MonoGenericSharingContext. Allocate memory from the cfg mempool.
5785
5786 2007-11-15  Mark Probst  <mark.probst@gmail.com>
5787
5788         * mini.c, mini.h, generic-sharing.c: Functions for producing code
5789         which extract fields out of the runtime generic context.  Full
5790         sharing of the NEWARR opcode.
5791
5792 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
5793
5794         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
5795         --enable-minimal=ssa.
5796
5797 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
5798
5799         * mini-trampolines.c (mono_delegate_trampoline): Update after 
5800         mono_marshal_get_delegate_invoke () signature change.
5801
5802 2007-11-13  Mark Probst  <mark.probst@gmail.com>
5803
5804         * mini.c: Removed the shared context in favor of the generic
5805         sharing context.  Allocate the MonoJitInfo structure with room for
5806         the generic sharing context if it's needed.
5807
5808         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
5809         domain-internals.h now.
5810
5811         * mini-x86.c: Pass the generic sharing context to get_call_info ().
5812
5813         * generic-sharing.c: Several changes for working without a shared
5814         context and instead operating on open types instead.
5815
5816 2007-11-12  David S. Miller  <davem@davemloft.net>
5817
5818        * inssel-sparc.brg: Fix double instruction emit.
5819
5820 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
5821
5822         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
5823         Get/Set/Address methods.
5824         
5825         * mini.c debug-debugger.c mini-trampolines.c: Update after 
5826         mono_marshal_get_delegate_invoke signature change.
5827
5828 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5829
5830         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
5831         This can happens with dynamic methods. Fixes the other bug in #322722.
5832
5833 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5834
5835         * tramp-arm.c (mono_arch_patch_callsite): Support patching
5836         BX call sequence.
5837
5838         * mini-arm.c (arm_patch): Implement patching of BX call
5839         sequence. Fixes one of the bugs in #322722.
5840
5841 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
5842
5843        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
5844        under Linux.  We only need to flush every 32-byte cache line.    
5845
5846 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
5847
5848         * mini.c:
5849         move_basic_block_to_end: Add branches when needed, eventually creating
5850         a new BB.
5851         optimize_branches: added a parameter that tells if it's ok to create
5852         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
5853         and avoid calling move_basic_block_to_end when it's not ok.
5854         Fixes bug 318677.
5855
5856 2007-11-07  Mark Probst  <mark.probst@gmail.com>
5857
5858         * mini.c: Abort inlining call to InitializeArray if something
5859         looks wrong.  Let the icall handle it, which now has proper safety
5860         checks.
5861
5862 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5863
5864         * mini.c (mono_spill_call): add support for soft-float.
5865
5866         * mini.c (mono_method_to_ir): add support for soft-float
5867         to inlined functions that return float.
5868
5869         * mini.c (mono_method_to_ir): add support for soft-float
5870         to cee_stsfld opcode on float fields.
5871
5872 2007-11-05  Geoff Norton  <gnorton@novell.com>
5873
5874         * mini-x86.h: Fix the structure access for X86 Leopard.
5875
5876
5877 2007-11-05  Martin Baulig  <martin@ximian.com>
5878
5879         * mini-trampolines.c
5880         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
5881         after compiling the method to notify the debugger.
5882
5883 2007-11-05  Martin Baulig  <martin@ximian.com>
5884
5885         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
5886
5887 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
5888
5889         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
5890         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
5891
5892 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
5893
5894         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
5895         native-to-managed wrappers.
5896         
5897 2007-11-01  Geoff Norton  <gnorton@novell.com>
5898
5899         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
5900         members.
5901
5902 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5903
5904         * mini.c, mini-x86.c: when getting back from unmanaged code
5905         to managed via a marshaled delegate we also need to set the
5906         right domain.
5907
5908 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5909
5910         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
5911         for amd64.
5912
5913 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
5914
5915         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
5916         let the debugger or other external agents to tell the JIT when
5917         a sw breakpoint has been inserted in the code that the JIT needs
5918         to be able to inspect.
5919
5920 2007-10-31  Martin Baulig  <martin@ximian.com>
5921
5922         * debug-debugger.h
5923         (MonoDebuggerInfo): Remove `runtime_class_init'.
5924
5925 2007-10-30  Martin Baulig  <martin@ximian.com>
5926
5927         * debug-mini.h
5928         (mono_debugger_thread_created): Added `MonoThread *' argument.
5929         (mono_debugger_extended_notification): New public method.
5930         (mono_debugger_trampoline_compiled): New public method.
5931
5932         * debug-mini.c
5933         (MonoDebuggerThreadInfo): Added `thread' and
5934         `extended_notifications' fields.
5935
5936         * debug-debugger.c
5937         (debugger_executable_code_buffer): New static variable.
5938
5939         * debug-debugger.h
5940         (MonoDebuggerInfo): Added `executable_code_buffer',
5941         `executable_code_buffer_size', `breakpoint_info_area',
5942         `breakpoint_table' and `breakpoint_table_size'.
5943
5944 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
5945
5946         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
5947         that IP  either is an unused value or the vtable pointer. IMT 
5948         calls use vtable + offset now. Reduced by almost half the size
5949         of IMT entries.
5950
5951 2007-10-26  Jonathan Chambers <joncham@gmail.com>
5952
5953         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
5954         defines to access param registers. Replace long usage with
5955         gsize as sizeof(long) != sizeof(void*) on Win64.
5956
5957         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
5958         on Win64. Fix intrinsic, use _AddressOfReturnAddress
5959         instead of non-existant _GetAddressOfReturnAddress.
5960
5961         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
5962         param registers. Save/restore %rdi and %rsi in MonoLMF.
5963
5964         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
5965         param registers. Modify (throw_exception) signature to take 
5966         %rdi and %rsi on Win64. 
5967
5968         Code is contributed under MIT/X11 license.
5969
5970 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5971
5972         * helpers.c: unlink debugging output files.
5973
5974 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
5975
5976         * mini.c: Move mono_create_ftnptr () to object.c.
5977
5978 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5979
5980         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
5981         optional. This function can now be used to disassemble code generated
5982         outside the JIT such as trampolines and IMT thunks.
5983
5984         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
5985
5986         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
5987         vtable pointer from a ldr instruction.
5988
5989         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
5990         new IMT call sequence.
5991
5992         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
5993         call sequence for interface invocations.
5994
5995         * mini-arm.c (mono_arch_emit_imt_argument): added, required
5996         for imt support. This function is empty since IMT on ARM requires no
5997         special handling on the IR side.
5998
5999         * mini-arm.c (mono_arch_find_imt_method): added, required for
6000         imt support.
6001
6002         * mini-arm.c (mono_arch_find_this_argument): added, required
6003         for imt support.
6004
6005         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
6006         a ldr instruction to load a value stored in the code stream.
6007
6008         * mini-arm.c (mono_arch_build_imt_thunk):added, required
6009         for imt support.
6010
6011
6012 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
6013
6014         * mini.c (mini_init): Install the jump trampoline callback.
6015
6016 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6017
6018         * mini-trampolines.c: handle synchronized methods with the common
6019         vtable trampoline (bug #335601).
6020
6021 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
6022
6023         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
6024
6025         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
6026         64 bit platforms.
6027
6028         * mini-ia64.h mini-ia64.c: Add support for IMT.
6029
6030         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
6031         prolog. Fixes #331958.
6032
6033 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
6034
6035         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
6036
6037 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6038
6039         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
6040         trampoline.
6041
6042 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6043
6044         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
6045         trampoline.
6046
6047 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
6048
6049         * mini-x86.c, mini-x86.h: x86 support for the common vtable
6050         trampoline.
6051
6052 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6053
6054         * mini-trampolines.c: changed the magic rampoline to understand
6055         the common vtable trampoline method: the method to invoke is
6056         determined by the vtable displacement of the call.
6057
6058 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6059
6060         * mini.c, mini.h: register the common vtable trampoline if the
6061         architecture supports it.
6062
6063 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6064
6065         * cpu-amd64.md: use the correct max length for tls_get.
6066
6067 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
6068
6069         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
6070         CEE_STELEM_ANY. Fixes #333696.
6071
6072 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6073
6074         * exceptions-x86.c: provide more graceful handling of the case where
6075         we followed a bogus function pointer from managed code (bug #332866).
6076
6077 2007-10-11  Mark Probst  <mark.probst@gmail.com>
6078
6079         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
6080         replaces the generic_shared flag and will carry more information
6081         in the future.
6082
6083         * generic-sharing.c: Added mini_type_stack_size() which allows
6084         allows open types if given a generic sharing context.
6085         mini_get_basic_type_from_generic() takes a
6086         MonoGenericSharingContext* instead of a MonoCompile* now.
6087
6088         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
6089         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
6090         mini-sparc.c, mini-x86.c: Trivial changes required by the two
6091         changes above.  Just passing arguments through to the right
6092         places.
6093
6094 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6095
6096         * mini-arm.c: unify the call emission to emit_code_seq().
6097
6098 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
6099
6100         * tramp-arm.c: reduced the trampoline size.
6101
6102 2007-10-10  Mark Probst  <mark.probst@gmail.com>
6103
6104         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
6105         variable handling out of arch-specific code.
6106
6107 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
6108
6109         * mini-arm.c: implemented fast delegate dispatch.
6110
6111 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
6112
6113         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
6114         that fp elimination is turned off if the space required by locals is too
6115         big. Fixes #331958.
6116
6117 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6118
6119         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
6120         ARM to the new style trampoline.
6121
6122 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
6123
6124         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
6125
6126         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
6127
6128 2007-10-09  Martin Baulig  <martin@ximian.com>
6129
6130         * debug-debugger.h
6131         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
6132         `field_info_offset_offset'.     
6133
6134 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
6135
6136         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
6137         removed more internal usage of the r11 register and made it available
6138         to the register allocator.
6139
6140 2007-10-08  Mark Probst  <mark.probst@gmail.com>
6141
6142         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
6143         when sharing generics and treat type variables as references.
6144
6145 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6146
6147         * mini-ppc.c: started removing the internal uses of register r11
6148         to eventually allow the register allocator to manage it as an
6149         additional available register.
6150
6151 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6152
6153         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
6154
6155 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
6156
6157         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
6158         specific trampolines as they are not performance critical as a jump
6159         target (maybe align as before only for AOT code?). This saves about
6160         200 KB of native code on x86 for monodevelop startup.
6161
6162 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
6163
6164         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
6165         monodevelop startup.
6166
6167 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
6168
6169         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
6170
6171         * mini-sparc.h mini-sparc.c: Implement IMT support.
6172
6173         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
6174         its smaller and doesn't clobber sparc_g1.
6175
6176         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
6177
6178 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6179
6180         * mini-ppc.c: optimized the size of the IMT thunks a bit.
6181
6182 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6183
6184         * mini-ppc.c: implemented fast delegate invocation.
6185
6186 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
6187
6188         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
6189
6190 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6191
6192         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
6193         code to the new style trampoline in preparation for IMT support.
6194
6195 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
6196
6197         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
6198         systems already. This also reduces the specific trampiline sizes and
6199         prepares for the use of r12 as the IMT identifier register.
6200
6201 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6202
6203         * mini-mips.h: endianess fix (simplified from a patch by
6204         Thomas Kunze <thommy@tabao.de>, bug #323737).
6205
6206 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6207
6208         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
6209         to access ucontext fields and enable netbsd support
6210         (partially from Magnus Henoch <mange@freemail.hu>).
6211
6212 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6213
6214         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
6215         use the preprocessor from the CPP env var if it is set.
6216
6217 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6218
6219         * mini-trampolines.c: fixed an assertion and moved it earlier in the
6220         code, before interface_offset gets used.
6221
6222 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
6223
6224         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
6225         mono_class_setup_vtable () before accessing klass->vtable.
6226
6227 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
6228
6229         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
6230         hackish.
6231
6232 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6233
6234         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
6235         IMT slots (this saves hundreds of KB of memory in programs like
6236         IronPython and Monodevelop).
6237
6238 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6239
6240         * mini.c: print the delegate counter.
6241
6242 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
6243
6244         * mini-x86.c: make it easier to enable the debugging code for IMT
6245         slots.
6246
6247 2007-09-28  Martin Baulig  <martin@ximian.com>
6248
6249         * debug-debugger.h
6250         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
6251         `mono_method_klass_offset' and `mono_method_token_offset'.
6252
6253 2007-09-20  Mark Probst  <mark.probst@gmail.com>
6254
6255         * mini.c: First generics sharing implementation.  Can only share
6256         in very simple cases.  If sharing doesn't work it falls back to
6257         dedicated compilation.
6258
6259         * mini.h: Flag in MonoCompile to specify whether generic
6260         compilation is shared.  Flags enum for marking which generic inst
6261         of a context is used.  Prototypes for helper functions.
6262
6263         * generic-sharing.c: Helper functions for generic method sharing.
6264
6265         * optflags-def.h: Optimization flag (gshared) for enabling generic
6266         method sharing added.
6267
6268         * Makefile.am: generic-sharing.c added.
6269
6270 2007-09-19 Daniel Nauck <dna@mono-project.de>
6271
6272         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
6273
6274 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
6275         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
6276         fixes bug 325507.
6277
6278 2007-09-19  Martin Baulig  <martin@ximian.com>
6279
6280         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
6281         mono_debug_cleanup() is now part of mono_cleanup().
6282
6283 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
6284
6285         * driver.c (mono_main): Fix a warning.
6286
6287 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
6288
6289         * aot-compiler.c: Optimize various parts when processing large assemblies.
6290         Fixes ##325568.
6291
6292         * mini.c (mono_patch_info_hash): Improve hash function.
6293
6294 2007-09-14  Jonathan Chambers <joncham@gmail.com>
6295
6296         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
6297         
6298         Code is contributed under MIT/X11 license.
6299
6300 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
6301
6302         * mini.c (mini_init): Fix a leak.
6303
6304         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
6305
6306 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6307
6308         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
6309
6310 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
6311
6312         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
6313
6314 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
6315
6316         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
6317         variance tests.
6318
6319         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
6320
6321         * mini.c (handle_alloc): Enable managed allocators in AOT code.
6322
6323         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
6324
6325         * aot-runtime.c (decode_patch_info): Ditto.
6326
6327 2007-09-12  Jonathan Chambers <joncham@gmail.com>
6328
6329         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
6330         static case. Cache delegates in architecture specific code, 
6331         based on number of parameters.
6332         
6333         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
6334         in architecture specific code, based on number of parameters.
6335         
6336         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
6337         caching happen in architecture specific code now.
6338         
6339         Code is contributed under MIT/X11 license.
6340
6341 2007-09-12  Jonathan Chambers <joncham@gmail.com>
6342
6343         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
6344         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
6345         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
6346
6347         Code is contributed under MIT/X11 license.
6348
6349 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
6350         * mini.c: (mono_thread_abort) Fixed bug #82416.
6351
6352 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6353
6354         * mini.: hook the new managed GC allocation feature into the JIT.
6355
6356 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6357
6358         * mini.c: implementation for the new runtime tls opcode.
6359
6360 2007-09-11  Martin Baulig  <martin@ximian.com>
6361
6362         * debug-debugger.h
6363         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
6364         `mono_method_inflated_offset'.
6365
6366 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
6367
6368         * driver.c mini.h mini.c: Add a new devel command line option for injecting
6369         async exceptions into a method.
6370
6371         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
6372         purpose of testing whenever the unwinder works at every instruction.
6373
6374 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
6375
6376         * mini.c: check accessibility of method used in ldftn (fixes
6377         bug #82635).
6378
6379 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
6380
6381         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
6382
6383         * inssel.brg: Fix a warning.
6384
6385 2007-09-03  Martin Baulig  <martin@ximian.com>
6386
6387         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
6388         now takes the `main_method' as argument.
6389
6390 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
6391
6392         * cpu-sparc.md (endfilter): Add missing src1:i argument.
6393
6394 2007-08-30  Jonathan Chambers <joncham@gmail.com>
6395
6396         * driver.c: include the cil-coff.h header on Windows.
6397         
6398         Code is contributed under MIT/X11 license.
6399
6400 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6401
6402         * mini.c, driver.c: don't include the cil-coff.h header.
6403
6404 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6405
6406         * mini.c: flag places that needs fixes fo soft-float support.
6407
6408 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
6409
6410         * mini.h, inssel-float.brg: fix soft-float constant loads on big
6411         endian systems (partially from Dean Jenkins, bug #81924).
6412
6413 2007-08-28  Mark Probst  <mark.probst@gmail.com>
6414
6415         * mini.c (check_linkdemand): Remove embedded reference object in
6416         call to LinkDemandSecurityException.
6417         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
6418         with an IntPtr instead of a reference object.
6419
6420 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
6421
6422         * mini.c (handle_initobj): Handle alignment properly.
6423
6424         * inssel.brg (mini_emit_memset): Ditto. 
6425
6426         * inssel.brg (mini_emit_memcpy): Ditto. 
6427
6428         * inssel-sparc.brg: Ditto.              
6429
6430         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
6431
6432 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
6433
6434         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
6435         exceptions raised in unmanaged code. Fixes part of #82594.
6436
6437 2007-08-24  Mark Probst  <mark.probst@gmail.com>
6438
6439         * mini.c (mono_method_to_ir), declsec.c
6440         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
6441
6442 2007-08-22  Martin Baulig  <martin@ximian.com>
6443
6444         * debug-mini.h
6445         (MonoDebuggerThreadInfo): New typedef.
6446         (mono_debugger_thread_table): New global variable.
6447         (mono_debugger_thread_created): New public function.
6448         (mono_debugger_thread_cleanup): New public function.
6449
6450         * debug-debugger.h
6451         (MonoDebuggerInfo):
6452         - removed `get_current_thread' and `lookup_assembly'.
6453         - removed `data_table'.
6454         - added `thread_table'.
6455
6456         * mini.c
6457         (mono_thread_start_cb): Call mono_debugger_thread_created().
6458         (mono_thread_attach_cb): Likewise.
6459         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
6460         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
6461         initial domain.
6462
6463         * driver.c (mono_main): Move mono_debug_init() up, before calling
6464         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
6465
6466 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6467
6468         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
6469         together when passing several arguments of type double (gives a small
6470         speedup and saves a few bytes of generated code).
6471
6472 2007-08-20  Jb Evain  <jbevain@novell.com>
6473
6474         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
6475
6476 2007-08-20  Jb Evain  <jbevain@novell.com>
6477
6478         * mini.c (mono_method_to_ir): throw MethodAccessException
6479         and FieldAccessException instead of InvalidProgramException.
6480
6481 2007-08-20  Mark Probst  <mark.probst@gmail.com>
6482
6483         * mini.c: CoreCLR security checks.
6484
6485         * mini.h: Removed MonoSecurityMode (moved to
6486         metadata/security-manager.h) and mono_security_mode global var
6487         (replaced by set/get functions in security-manager.h).
6488
6489         * driver.c: Added "core-clr-test" security mode for testing.  Used
6490         set-function for setting security mode.
6491
6492 2007-08-17  Mark Probst  <mark.probst@gmail.com>
6493
6494         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
6495         the new jit_info_table.
6496
6497         * driver.c: Test code for the new jit_info_table (enabled by the
6498         define MONO_JIT_INFO_TABLE_TEST).
6499
6500 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
6501
6502         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
6503         detection of call <REG> instruction sequence. Fixes build on freebsd.
6504
6505 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
6506
6507         * mini-exceptions.c: Fix a warning.
6508
6509 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
6510
6511         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
6512         stack overflow handling code on amd64 too.
6513
6514         * mini-exceptions.c (mono_setup_altstack): Make this use 
6515         mono_thread_get_stack_bounds ().
6516
6517         * mini-x86.h: Disable sigaltstack on solaris x86.
6518
6519 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
6520
6521         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
6522
6523 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
6524
6525         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
6526
6527 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
6528
6529         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
6530
6531         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
6532
6533 2007-08-03  Neale Ferguson <neale@sinenomine.net>
6534
6535         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
6536         due to alignment.
6537
6538 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6539
6540         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
6541         to be emitted (bug #82281).
6542
6543 2007-08-01  Martin Baulig  <martin@ximian.com>
6544
6545         Merged the `debugger-dublin' branch.
6546
6547         * debug-debugger.h (MonoDebuggerInfo):
6548         Removed the `old_*' compatibility entries.
6549         Added `debugger_version' and `data_table'.
6550         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
6551         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
6552
6553         * debug-mini.c
6554         (MiniDebugMethodBreakpointInfo): Add `address_list'.
6555         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
6556         instead of a `gconstpointer'.
6557         (mono_debugger_insert_method_breakpoint): Return a
6558         `MonoDebugMethodAddressList *'.
6559
6560 2007-06-28  Martin Baulig  <martin@ximian.com>
6561
6562         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6563
6564 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
6565
6566         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
6567         __builtin_frame_address () since it is broken on older gcc versions.
6568
6569 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6570
6571         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
6572         on the stack overflow handling and made the managed stack overflows
6573         catchable in most cases using soft guard pages.
6574         * exceptions-x86.c: added code to restore the protection in the soft
6575         guard pages at the end of exception handling.
6576
6577 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
6578
6579         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
6580
6581 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6582
6583         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
6584         exception handling.
6585
6586 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6587
6588         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
6589         signal handling support until it has been ported to the new mechanism.
6590         * mini.c: fixed stack overflow detection and use the new
6591         architecture code  to handle signals on the altstack.
6592
6593 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
6594
6595         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
6596         stack overflows on the alt stack.
6597
6598 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
6599
6600         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
6601         stack overflows on the alt stack.
6602
6603 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
6604
6605         * exceptions-ppc.c: cleanup preparing for altstack support.
6606
6607 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6608
6609         * exceptions-arm.c: cleanup preparing for altstack support.
6610
6611 2007-07-27  Mark Probst  <mark.probst@gmail.com>
6612
6613         * mini.c (print_jit_stats): Output hazard pointer stats.
6614
6615 2007-07-26  Mark Probst  <mark.probst@gmail.com>
6616
6617         * driver.c, mini.c: Replaced security mode flags with a single
6618         enum variable.
6619
6620 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6621
6622         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
6623
6624 2007-07-25  Mark Probst  <mark.probst@gmail.com>
6625
6626         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
6627         (which doesn't do anything yet) for activating Core CLR
6628         (Silverlight) security.
6629
6630 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
6631
6632         * mini-codegen.c: work around a possible gcc bug on arm.
6633
6634 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6635
6636         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
6637         message for platforms that don't support AOT compilation.
6638
6639 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6640
6641         * mini.h, mini.c, driver.c: temporary smcs hack.
6642
6643 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
6644
6645         * mini-arm.h, mini-arm.c: arm EABI fixes.
6646
6647 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
6648
6649         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
6650         case.
6651
6652         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
6653         trampolines taking a method argument.
6654
6655         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
6656
6657         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
6658         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
6659
6660         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
6661         JIT compilation throws an exception. Fixes #82050.
6662
6663 2007-07-19  Mark Probst  <mark.probst@gmail.com>
6664
6665         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
6666         with the MONO_EXCEPTION_ defines.
6667
6668 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
6669
6670         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
6671         #82117.
6672         
6673         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
6674         the cause of an assertion.
6675
6676 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
6677
6678         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
6679         removed.
6680
6681 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
6682
6683         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
6684         assert. Should fix #82103.
6685
6686 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
6687
6688         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
6689         here too. Fixes #82095.
6690
6691         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
6692         addresses.
6693
6694         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
6695
6696         * mini-amd64.h: Enable IMT for amd64.
6697         
6698         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
6699
6700 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
6701
6702         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
6703
6704 2007-07-12  Mark Probst  <mark.probst@gmail.com>
6705
6706         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
6707         as soon as check_linkdemand sets an exception_type.
6708
6709 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6710
6711         * mini-x86.c: fixed offsets for IMT call sequence.
6712         * mini-x86.h: enable IMT again.
6713
6714 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
6715
6716         * trace.c (mono_trace_enter_method): Decode MonoType too.
6717
6718         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
6719
6720         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
6721
6722         * mini-amd64.c: Add preliminary IMT implementation.
6723         
6724 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6725
6726         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
6727         understand the new IMT-base interface invocation (thanks to
6728         Daniel Nauck for the report and the remote debugging session).
6729
6730 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6731
6732         * mini-x86.c: size and speed optimizations for the IMT bsearch.
6733
6734 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
6735
6736         * Makefile.am (aotcheck): Make this actually use the AOTed code.
6737
6738 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
6739
6740         * mini-trampolines.c: implement AOT IMT support.
6741         * mini-x86.h: enable IMT support for wider testing.
6742
6743 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
6744
6745         * inssel.brg (emit_imt_argument): Add aot support here.
6746
6747         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
6748
6749 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6750
6751         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
6752         of the IMT implementation, partially from massi, with my
6753         implementation of the bsearch sequence. Disabled by default until
6754         the AOT code is implemented.
6755
6756 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
6757
6758         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
6759
6760         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
6761
6762 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6763
6764         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
6765         arch-independent IMT JIT code from Massimiliano
6766         Mantione (massi@ximian.com) with small cleanups from me.
6767
6768 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6769
6770         * Makefile.am: fix svn invocation to get the svn revision to be
6771         independent of the local language (build fix).
6772
6773 2007-07-09  Mark Probst  <mark.probst@gmail.com>
6774
6775         * mini.c (inline_method): Reset cfg->exception_type if the
6776         inlining is aborted.  Fixes: 82049.
6777
6778 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
6779
6780         * mini.c: remove assert from exception handling code when exception_ptr
6781         is not set.
6782
6783 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
6784
6785         * mini.c (mono_codegen): Add an assert.
6786
6787         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
6788         enter and leave code.
6789         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
6790
6791 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6792
6793         * mini-ppc.c: fixed memory corruption for localloc(0)
6794         (bug #81852).
6795
6796 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
6797         
6798         * mini.c: Fix warnings.
6799
6800 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
6801
6802         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
6803         to emit better double->int conversions.
6804
6805 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6806
6807         * mini.c: the provided Min/Max optimizations are valid for unisgned
6808         ints.
6809
6810 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
6811
6812         * 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
6813
6814 2007-06-28  Miguel de Icaza  <miguel@novell.com>
6815
6816         * mini.c (mono_running_on_valgrind): Add support for reporting the
6817         method and  its boundaries to valgrind.
6818
6819 2007-06-28  Martin Baulig  <martin@ximian.com>
6820
6821         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6822
6823 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
6824
6825         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
6826
6827         * generic.2.cs: Add new test case.
6828
6829 2007-06-25  Martin Baulig  <martin@ximian.com>
6830
6831         Merged the `debugger-dublin' branch.
6832
6833         * debug-mini.c
6834         (mono_debugger_insert_method_breakpoint): New public method.
6835         (mono_debugger_remove_method_breakpoint): Likewise.
6836         (mono_debugger_check_breakpoints): New static method.
6837         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
6838
6839         * debug-debugger.h (MonoDebuggerInfo):
6840         Renamed (to keep backward compatibility in the vtable):
6841         `insert_breakpoint' -> `old_insert_breakpoint'.
6842         `remove_breakpoint' -> `old_remove_breakpoint'.
6843         `create_string' -> `old_create_string'.
6844         `lookup_class' -> `old_lookup_class'.
6845         `lookup_type' -> removed; changed into a dummy field.
6846         `lookup_assembly' -> `old_lookup_assembly'.
6847         Added (same functionality, but different signature):
6848         `create_string', `lookup_class', `lookup_assembly'
6849         Added new:
6850         `get_method_addr_or_bpt', `remove_method_breakpoint',
6851         `runtime_class_init'.
6852
6853         * debug-debugger.c: Merged the `debugger-dublin' branch.
6854
6855 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
6856
6857         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
6858         well.
6859         (peephole_pass): Likewise.
6860
6861 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
6862
6863         * driver.c: hopefully make setaffinity work also for ancient
6864         versions of linux.
6865
6866 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
6867
6868         * driver.c : win32 build fix.
6869
6870 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6871
6872         * driver.c: check for the MONO_NO_SMP env var and bind to a single
6873         processor if it is set.
6874
6875 2007-06-21  Martin Baulig  <martin@ximian.com>
6876
6877         * debug-mini.h: New file.
6878
6879         * debug-mini.c
6880         (mono_debugger_insert_breakpoint_full): Moved here from
6881         ../metadata/mono-debug-debugger.c.
6882         (mono_debugger_remove_breakpoint): Likewise.
6883         (mono_debugger_breakpoint_callback): Likewise.
6884
6885 2007-06-15  Raja R Harinath  <rharinath@novell.com>
6886
6887         * jit-icalls.c (mono_helper_compile_generic_method): Update to
6888         changes in MonoGenericClass.
6889
6890 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
6891
6892         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
6893
6894 2007-06-14  Raja R Harinath  <rharinath@novell.com>
6895
6896         * jit-icalls.c (mono_helper_compile_generic_method): Update to
6897         removal of MonoGenericMethod.
6898
6899 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6900
6901         * mini-exceptions.c: hooks for the exception events profiling API.
6902
6903 2007-06-14  Randolph Chung  <tausq@debian.org>
6904
6905         * Makefile.ma: Add hppa target.
6906         * mini-arch.h: Include mini-hppa.h
6907         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
6908         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
6909         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6910
6911 2007-06-14  Randolph Chung  <tausq@debian.org>
6912
6913         * inssel.brg: Add rules for "chained" compare-branch operations so that
6914         a single compare op can affect multiple branches.  Adjust cost for
6915         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
6916         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
6917         cost for some rules so that they can more easily be overridden by
6918         per-arch rules (with fixes from lupus).
6919         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6920
6921 2007-06-13  Randolph Chung  <tausq@debian.org>
6922
6923         * mini-ops.h: Reorder branch ops so that they match the order of the
6924         corresponding CEE_* ops.  The code expects them this way.
6925         Add new ops for HPPA target.
6926         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6927
6928 2007-06-13  Randolph Chung  <tausq@debian.org>
6929
6930         * mini-exceptions.c: Handle cases where the stack grows towards
6931         larger addresses.
6932         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6933
6934 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6935
6936         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
6937         counter.
6938         * driver.c: explain where a non-matching corlib is found.
6939
6940 2007-06-13  Mark Probst  <mark.probst@gmail.com>
6941
6942         * mini.c (print_jit_stats): Output dynamic code allocation stats.
6943
6944 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
6945
6946         * mini-exceptions.c: Generate a method profile leave event during
6947         an exception to ensure that the profiler gets notified.
6948
6949 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
6950
6951         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
6952         branch.
6953
6954         * cpu-amd64.md: Add long_and/or/xor opcodes.
6955
6956 2007-06-06  Wade Berrier  <wberrier@novell.com>
6957
6958         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
6959         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
6960         length of instruction shr_imm (expected 8, got 10)
6961
6962 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
6963
6964         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
6965
6966 2007-06-06  Mark Probst  <mark.probst@gmail.com>
6967
6968         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6969         MonoInternalHashTable again (fixed bug in the internal hash table
6970         code).
6971
6972 2007-06-06  Mark Probst  <mark.probst@gmail.com>
6973
6974         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
6975         Have to figure out what makes it crash the SWF regression.
6976
6977 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
6978
6979         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
6980
6981 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6982
6983         * mini.c: optimize out the type check when storing null in a
6984         reference array.
6985
6986 2007-06-04  Mark Probst  <mark.probst@gmail.com>
6987
6988         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6989         MonoInternalHashTable.
6990
6991 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
6992
6993         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
6994         signed integer methods.
6995
6996 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
6997
6998         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
6999         permanently since the current approach doesn't work.
7000
7001 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
7002
7003         * inssel.brg (stmt): Only call delegate->invoke_impl if 
7004         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
7005
7006 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
7007
7008         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
7009         the sreg2==rdx case.
7010         
7011         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
7012         account if it contains a rex prefix.
7013         (peephole_pass): Handle OP_FMOVE as well.
7014
7015 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
7016
7017         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
7018         as it causes regressions.
7019
7020 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
7021
7022         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
7023         static case as well.
7024
7025         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
7026
7027         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
7028         (mono_arch_get_this_arg_from_call): Ditto.
7029
7030         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
7031
7032         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
7033         invoke_impl field.
7034
7035         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
7036         (mono_arch_get_this_arg_from_call): Ditto.
7037
7038         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
7039         
7040         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
7041         try to create optimized invoke code and use that for further invocations. 
7042         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
7043
7044         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
7045
7046 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
7047
7048         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
7049         sealed classes or methods.
7050         *devirtualization.cs: tests for the new optimization
7051
7052 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
7053
7054         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
7055         by the update_volatile () function.
7056
7057 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
7058
7059         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
7060         require it.
7061
7062         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
7063
7064 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
7065
7066         * mini.c: Add configure checks for header files.
7067         * mini-x86.c: Add configure checks for header files.
7068         * trace.c: Add configure checks for header files.
7069         * aot-runtime.c: Add configure checks for header files.
7070         * aot-compiler.c: Add configure checks for header files.
7071         * driver.c: Add configure checks for header files.
7072         * mini-codegen.c: Add configure checks for header files.
7073         
7074         Code is contributed under MIT/X11 license.
7075
7076 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
7077
7078         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
7079         icompare_imm -128 + op_iclt. Fixes #81703.
7080
7081 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
7082
7083         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
7084
7085 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
7086
7087         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
7088         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
7089         so that all isinst checks now use "interface_bitmap".
7090
7091 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
7092
7093         * cpu-amd64.md (jmp): Fix a warning.
7094
7095         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
7096
7097         * basic.cs: Add new regression test.
7098
7099         * basic.cs: Remove test which is now in basic-long.cs.
7100
7101         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
7102
7103         * basic-long.cs: Add new test.
7104         
7105 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
7106
7107         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
7108
7109 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
7110
7111         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
7112
7113         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
7114         places.
7115         
7116         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
7117         throwing code a bit.
7118
7119         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
7120         the exception throwing code a bit.
7121
7122         * mini-x86.c (get_call_info): Allocate result from a mempool.
7123
7124 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
7125
7126         * aot-compiler.c (find_typespec_for_class): Fix the assert.
7127
7128         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
7129
7130         * mini.h (MonoCompile): Add 'token_info_hash' field.
7131
7132         * mini.c: Save token->method associations during compilation so the AOT 
7133         compiler can use it.
7134         
7135         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
7136         which reference generic classes and methods.
7137
7138 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
7139
7140         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
7141
7142         * aot-compiler.c (compile_method): Fix a typo in a comment.
7143
7144         * aot-runtime.c (decode_cached_class_info): Skip generic types.
7145
7146         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
7147         everything generic.
7148
7149         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
7150
7151 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
7152
7153         * mini.h (MonoCompile): Add 'args' field.
7154
7155         * mini.c (mono_compile_create_vars): Store variables representing the arguments
7156         into cfg->args.
7157
7158         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
7159
7160 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
7161
7162         * mini.c (mono_compile_get_interface_var): Remove this unused function.
7163
7164         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
7165
7166         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
7167         opcodes for some opcodes.
7168
7169         * mini.h *.brg *.c: Use the new opcodes.
7170
7171 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
7172
7173         * mini.h: Bumped aot revision.
7174
7175         * inssel.brg: modified code generation of type checks for interfaces
7176         to use the new "MonoClass.interface_bitmap" instead of the old
7177         "MonoClass.interface_offsets".
7178
7179 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
7180
7181         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
7182
7183 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
7184
7185         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
7186         64 bit platforms.
7187
7188 2007-04-27  Neale Ferguson <neale@sinenomine.net>
7189
7190         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
7191
7192 2007-04-27  Wade Berrier  <wberrier@novell.com>
7193
7194         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
7195         mini.h) to fix build.
7196
7197 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
7198
7199         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
7200         
7201         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
7202         causes the corlib unit tests to fail.
7203
7204 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
7205
7206         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
7207
7208         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
7209
7210         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
7211         opcodes to the comparison relations.
7212
7213         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
7214         opcodes to their types.
7215         
7216         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
7217
7218         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
7219         it in cfg->arch.cinfo.
7220
7221         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
7222
7223         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
7224         cfg->cil_offset_to_bb.
7225
7226 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
7227
7228         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
7229         created becase of initlocals.
7230
7231 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
7232
7233         * mini-alpha.c cpu-alpha.md: More alpha port work from 
7234         Sergey Tikhonov <tsv@solvo.ru>.
7235
7236 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
7237
7238         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
7239
7240 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
7241
7242         * cpu-s390.md (break): Correct the length of break instruction.
7243
7244 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7245
7246         * mini.c: fix a couple of soft-float issues and comments.
7247
7248 2007-04-15  Miguel de Icaza  <miguel@novell.com>
7249
7250         * trace.c (is_filenamechar): - is also a filename char.
7251
7252 2007-04-15  Neale Ferguson <neale@sinenomine.net>
7253
7254         * mini-s390.c: Correct checking for enum type in return value processing.
7255
7256 2007-04-14  Raja R Harinath  <rharinath@novell.com>
7257
7258         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
7259         (version.h): Makefile is in the build directory.
7260
7261 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
7262
7263         * mini-amd64.h: fix for assertion failure on Solaris/amd64
7264
7265 2007-04-11  Martin Baulig  <martin@ximian.com>
7266
7267         * mini.c (can_access_member): Fix handling of generic classes;
7268         fixes #81259.
7269
7270 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
7271
7272         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
7273
7274 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
7275
7276         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
7277
7278 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7279
7280         * mini-codegen.c: make sure the right spill amount is
7281         used for fp or integer registers (fixes the float_sub_spill() on ppc).
7282
7283 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
7284
7285         * mini-ppc.c: fixes for the fp_branch_nan test.
7286
7287 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
7288
7289         * basic.cs: Comment out new test which still fails on ia64.
7290
7291 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7292
7293         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
7294
7295 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7296
7297         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
7298
7299 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
7300
7301         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
7302         on 64 bit machines. Fixes part of #80738.
7303
7304         * basic.cs: Add regression test.
7305
7306 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
7307
7308         * inssel.brg basic.cs: Revert previous change to fix build.
7309
7310         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
7311         platforms.
7312         
7313         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
7314
7315         * basic.cs: Add new regression test.
7316
7317 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
7318
7319         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
7320         many arguments.
7321
7322 2007-03-16  Neale Ferguson <neale@sinenomine.net>
7323
7324         * cpu-s390x.md: Correct length of break instruction.
7325
7326 2007-03-16  Neale Ferguson <neale@sinenomine.net>
7327
7328         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
7329         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
7330
7331 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
7332
7333         * *.c: Begin WIN64 port.
7334         * mini.c:  Use correct register in profiler.
7335         * mini-amd64.c: No inline assembly on Win64.
7336         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
7337         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
7338         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
7339         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
7340         mono_arch_ip_from_context for Win64.
7341         
7342         Contributed under MIT/X11 license.
7343
7344 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
7345
7346         * exceptions-amd64.c (seh_handler): Ditto.
7347
7348         * exceptions-x86.c (seh_handler): Fix a memory leak.
7349
7350 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
7351
7352         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
7353         mini-s390x.c: fixed peephole optimizations to deal
7354         correctly with 1 and 2 byte reload avoidance.
7355
7356 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
7357
7358         * cpu-s390.md, cpu-s390x.md: update localloc length.
7359
7360 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7361
7362         * cpu-g4.md: added missing descriptions.
7363
7364 2007-03-14  Miguel de Icaza  <miguel@novell.com>
7365
7366         *  Makefile.am: Add support so the tail tests are not executed on
7367         PowerPC as that is a known limitation of the PowerPC port.
7368
7369 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
7370
7371         * runmdesc.bat:  Move to msvc directory.
7372         
7373 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
7374
7375         * runmdesc.bat:  Run executable that was produced by the current
7376         target and sent via an argument.
7377         
7378 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
7379
7380         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
7381         #81102.
7382
7383         * generics.2.cs: Add regression test.
7384
7385 2007-03-09  Wade berrier  <wberrier@novell.com>
7386
7387         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
7388
7389 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
7390
7391         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
7392         AOT code depends on this.
7393
7394 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7395
7396         * mini.c: more precise tracking of types in the eval stack
7397         (part of fix for bug #81044).
7398
7399 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
7400
7401         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
7402
7403         * aot-compiler.c (encode_patch): Remove an obsolete comment.
7404
7405 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
7406
7407         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
7408
7409         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
7410
7411 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
7412
7413         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
7414         a pointer on 64 bit systems. Fixes #80190.
7415
7416         * iltests.il: Add new regression test.
7417
7418 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7419
7420         * mini.c: inline a constant for Environment.IsRunningOnWindows.
7421
7422 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
7423
7424         * trace.c: Remove an erroneous alignemnt check when tracing.
7425           Fixes --trace on OSX86.
7426
7427 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7428
7429         * mini-$(arch).h: initialize SP in context for all the archs.
7430
7431 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
7432
7433         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
7434         regressions in the thread tests.
7435
7436 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
7437
7438         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
7439         - fixed implementation of LOCALLOC opcode
7440         - implemented non-un compare for floats
7441         - code cleanup
7442         - implementation of FDIV and CKFINITE opcodes
7443         - fixes for latest mono updates
7444         - additional arch opcodes
7445
7446 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7447
7448         * Makefile.am: simplify and merge rules for cross-compilation.
7449
7450 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
7451
7452         * local-propagation.c: Actually *apply* the fix for bug 80591...
7453
7454 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7455
7456         * mini-exceptions.c: backuot part of the last change
7457         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
7458
7459 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
7460         * inssel.brg: Fix bug 59286.
7461
7462
7463 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
7464
7465         * mini-exceptions.c: patch from Zoltan to correctly check for
7466         stack boundaries (using the stack register, not the frame register),
7467         fixes bugs #80724, #79717.
7468
7469 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
7470
7471         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
7472         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
7473
7474         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
7475         presence of frame pointer elimination.
7476
7477 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
7478         
7479         * mini-x86.h: NetBSD UCONTEX_REG defines.
7480
7481 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
7482
7483         * inssel-amd64.brg: Fix amd64 build.
7484
7485 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
7486
7487         * mini.h: remove extern to workaround what looks likes gcc bug 26905
7488         on amd64.
7489
7490 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
7491
7492         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
7493         ends.
7494
7495         * mini-<ARCH>.c: Use mono_is_regsize_var ().
7496
7497 2007-01-30 Mark Mason <mason@broadcom.com>
7498
7499            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
7500            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
7501            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
7502            beginning support for CEE_JMP [not quite working yet]
7503            * tramp-mips.c: LMF handling now works
7504         
7505 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
7506
7507         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
7508
7509         * mini.h (NULLIFY_INS): New macro.
7510
7511 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7512
7513         * mini.c: statistical profiler fix for windows, patch
7514         from Tor Lillqvist (tml@novell.com).
7515
7516 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
7517         * local-propagation.c: Fix bug 80591.
7518
7519 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7520
7521         * Makefile.am: put back the --export-dynamic option as with
7522         the previous gmodule flags (thanks to Robert Jordan).
7523
7524 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
7525
7526         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
7527
7528         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
7529         simplify and speed up the local register allocator. Also rename some fields
7530         like iassign->vassign.
7531         
7532         * regalloc.c: Remove some functions which are no longer used since their
7533         inlined version is in mini-codegen.c.
7534         
7535         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
7536
7537         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
7538
7539 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
7540
7541         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
7542         narrowing. Fixes #80622.
7543
7544         * iltests.il: Add new regresssion test. 
7545
7546 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7547
7548         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
7549         debug-debugger.c, debug-debugger.h: warning fixes.
7550         * driver.c: updated copyright year and made it fit in one line.
7551
7552 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
7553
7554         * aot-runtime.c: updated to use mono-dl instead of gmodule.
7555
7556 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
7557
7558         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
7559
7560         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
7561
7562         * iltests.il: Add new test for bug #80507.
7563
7564 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7565
7566         * mini-arm.h: use soft-float also on vfp for now.
7567
7568 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7569
7570         * mini.c: fix some more soft-float issues.
7571
7572 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
7573
7574         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
7575
7576 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
7577         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
7578         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
7579         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
7580
7581 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
7582
7583         * mini-arm.c: typo fix.
7584
7585 2007-01-23  Neale Ferguson <neale@sinenomine.net>
7586
7587         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
7588
7589 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
7590
7591         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
7592         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
7593
7594         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
7595
7596         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
7597
7598         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
7599         
7600         * inssel.brg: Fix a warning.
7601
7602         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
7603
7604         * abcremoval.c ssa.c ssapre.c: Update after this change.
7605         
7606         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
7607
7608         * dominators.c (df_set): Use mono_bitset_union_fast.    
7609
7610 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7611
7612         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
7613         mini-codegen.c: reduce relocations and memory usage for the cpu
7614         description.
7615
7616 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
7617
7618         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
7619
7620         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
7621         to reduce their size.
7622
7623 2007-01-19 Mark Mason <mason@broadcom.com>
7624
7625         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
7626         * mini-mips.c: more configuration macros, support long conditional branches, additional
7627         asserts, fix epilog instrumentation.
7628         * mini-mips.h: use standard stack walk
7629         * cpu-mips.md: increase size of div, rem and conditional branches
7630         
7631 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
7632
7633         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
7634         to cpu spec data.
7635
7636 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
7637
7638         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
7639         (compile_method): Ditto.
7640
7641         * aot-runtime.c (decode_klass_info): Ditto.
7642
7643         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
7644         needed by the code generated by inssel.brg. Also fix a warning.
7645
7646 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
7647
7648         * mini.c: deal with enums that become genericinsts by
7649         being nested in a generic class (bug #79956).
7650
7651 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7652
7653         * mini.c: match the generic definition to check for
7654         private access with generic types (bug #78431).
7655
7656 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7657
7658         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
7659         to make life easier for people cross-compiling that insist on not
7660         using scratchbox.
7661
7662 2007-01-17 Mark Mason <mason@broadcom.com>
7663
7664         * inssel-long.brg: patch to deal with mips missing flags
7665         * inssel-long32-mips.brg: implement overflow checks
7666         * insset-mips.brg: implement overflow checks
7667         * mini-mips.h: implement conditional exception handling
7668         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
7669           Remove unused code, minor cleanups.
7670         * exceptions-mips.c: minor cleanups
7671         * mini-ops.h: add mips conditional exception ops
7672         * cpu-mips.md: add mips conditional exception ops
7673
7674         
7675 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7676
7677         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
7678         to deal with mips missing of flags.
7679
7680 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7681
7682         * exceptions-ppc.c: execute fault handlers.
7683
7684 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
7685
7686         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
7687
7688 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7689
7690         * mini.c: handle also floating point values in initialize_array.
7691
7692 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7693
7694         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
7695         array initialization and make it conditional on the intrins option.
7696
7697 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7698
7699         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
7700         relocations and put the patch info names close to the enum definition.
7701
7702 2007-01-15 Mark Mason <mason@broadcom.com>
7703
7704         * basic.cs, exceptions.cs: break up large tests to increase debugability.
7705
7706 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7707
7708         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
7709
7710 2007-01-12  Raja R Harinath  <rharinath@novell.com>
7711
7712         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
7713
7714 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
7715
7716         * Makefile.am: distribute the mips sources.
7717
7718 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7719
7720         * mini-codegen.h: handle bug #80489 here, by excluding ecx
7721         directly.
7722
7723 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
7724
7725         * cpu-x86.md: back out for now as this triggers other regressions.
7726
7727 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7728
7729         * cpu-x86.md: force src1 and dest regpair for long shift instructions
7730         to eax:edx, so ecx can't get allocated to them (bug #80489).
7731
7732 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
7733
7734         * mini.c, mini-exceptions.c: enabled running fault handlers
7735         (bug #80469).
7736
7737 2007-01-03  Miguel de Icaza  <miguel@novell.com>
7738
7739         * driver.c: If nothing fail, do not use the string "failed",
7740         because it makes it very annoying to view test result logs on the
7741         web. 
7742
7743 2006-12-30  Miguel de Icaza  <miguel@novell.com>
7744
7745         * debug-debugger.c (mono_debugger_main): Rename "main" to
7746         "main_method" to prevent a warning.
7747
7748         Remove a warning for unused field.
7749
7750 2006-12-28  Martin Baulig  <martin@ximian.com>
7751
7752         * debug-debugger.c
7753         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
7754
7755 2006-12-22  Martin Baulig  <martin@ximian.com>
7756
7757         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
7758         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
7759         seperate `.mdb_debug_info' section, so we can access it from the
7760         debugger even if the binary is stripped.
7761
7762         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
7763         from the `.mdb_debug_info' here to prevent the linker from
7764         removing that section.
7765
7766         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
7767         mdb-debug-info64.s.
7768
7769 2006-12-19  Robert Jordan  <robertj@gmx.net>
7770
7771         * mini-x86: enable the code to return small structures in
7772         registers for FreeBSD as well. Fixes bug #80278.
7773         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
7774
7775 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7776
7777         * mini-x86.c: align the stack when calling the profiler
7778         function instrumenting the prolog (on OSX).
7779
7780 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
7781
7782         * mini.c: emit a break opcode where Debugger.Break () is called.
7783
7784 2006-12-13  Miguel de Icaza  <miguel@novell.com>
7785
7786         * mini.c (mono_method_to_ir): Provide useful information on this
7787         assert, to prevent others from debugging like I did.
7788
7789 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7790
7791         * mini.c: enable code which was incorrectly commented
7792         (bug #80235).
7793
7794 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7795
7796         * mini-x86.c: enable on OSX, too, the code to return small
7797         structures in registers.
7798
7799 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7800
7801         * mini-x86.c: remove the use of the dynamic code manager here, too.
7802
7803 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
7804
7805         * mini.h, debug-debugger.c, tramp-*.c: fixed 
7806         mono_debugger_create_notification_function() to use
7807         mono_global_codeman_reserve () instead of a dynamic code manager.
7808
7809 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
7810
7811         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
7812         ves_array_element_address() jit icall and use a generated
7813         managed method instead (which is about 4 times faster for a rank 3
7814         array access).
7815
7816 2006-11-29  Mark Mason  <mason@broadcom.com>
7817
7818         * basic-calls.cs: additional tests for passing
7819         structures as function arguments.
7820
7821 2006-11-29  Mark Mason  <mason@broadcom.com>
7822
7823         * mini-mips.h: disable custom exception handling
7824         * mini-mips.c: throw/rethrow should use jalr to call
7825         exception stubs.  Fixed bug with passing structures
7826         by value. More support for tracing floating point
7827         functions.
7828
7829 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7830
7831         * mini.c: fixed typo in the soft-float ldind.r4 handling
7832         (bug #80086).
7833
7834 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7835
7836         * mini.c, mini.h, driver.c: added --runtime command line
7837         option to select a different runtime than the autodetected one.
7838         * jit.h: added API for embedders to initialize with a specific
7839         runtime version.
7840
7841 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
7842
7843         * mini.c: handle also boxing of r4 values (bug #80024).
7844
7845 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
7846
7847         * mini-ppc.c: force indirect calls until we reserve
7848         enough address space for all the generated code.
7849
7850 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
7851
7852         * exceptions-arm.c: workaround bugs in the libc definition
7853         of struct ucontext.
7854
7855 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7856
7857         * inssel.brg: fixes from me and Mark Mason.
7858
7859 2006-11-23  Dick Porter  <dick@ximian.com>
7860
7861         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
7862         semaphore display now we've fixed the initial value
7863
7864 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7865
7866         * inssel.brg: partially revert the last change to fix the build.
7867
7868 2006-11-21  Mark Mason  <mason@broadcom.com>
7869
7870         * inssel.brg: Add and use compare-and-branch macros to support
7871         architectures that do not have condition code registers (ie. MIPS).
7872         * *-mips.{c,brg,md}: Fix copyright statements
7873
7874 2006-11-20  Mark Mason  <mason@broadcom.com>
7875
7876         * Makefile.am: remove mini-codegen.c from list of MIPS sources
7877         * mini.c: Allow GET_CONTEXT to be specified by the arch port
7878         * mini.h: Added declaration for mono_print_ins()
7879         * mini-codegen.c: added ins_spec initializer for MIPS
7880         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
7881         vreg to be virtual and hreg to be non-virtual.
7882         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
7883         is not yet working/implemented correctly.
7884         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
7885         non-static, fixup calls to print_ins() from other parts in the file.
7886
7887 2006-11-20  Mark Mason  <mason@broadcom.com>
7888
7889         * basic-calls.cs: added tests for passing structures as arguments
7890         to calls.
7891
7892 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7893
7894         * inssel-long32.brg: optimize signed division by power of two.
7895
7896 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
7897
7898         * mini-arm.c: added support for interworking with thumb code
7899         (mono must be still be built using the ARM instruction encoding).
7900
7901 2006-11-19  Miguel de Icaza  <miguel@novell.com>
7902
7903         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
7904         verifier has different rules for it.   Fixes a few verifier issues
7905         in the test suite.
7906
7907         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
7908         at the end, so people know what happened.
7909
7910 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7911
7912         * brach-opts.c: in optimize_exception_target() make sure we
7913         are in a catch clause (fixes bug #79871).
7914
7915 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7916
7917         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
7918         more soft-float support fixes.
7919
7920 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
7921
7922         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
7923         that are passed half on the stack and half in registers.
7924
7925 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
7926
7927         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
7928         more mips integration work from Mark E Mason 
7929         <mark.e.mason@broadcom.com>.
7930
7931 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7932
7933         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
7934         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
7935         tramp-mips.c: added sources for the mips port, not
7936         integrated in the build yet. Contributed by
7937         Mark E Mason <mark.e.mason@broadcom.com>.
7938
7939 2006-11-14  Neale Ferguson <neale@sinenomine.net>
7940
7941         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
7942
7943 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7944
7945         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
7946         put the soft-float rules in its own file since it seems to
7947         break s390 compilation.
7948
7949 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7950
7951         * mini-arm.c: fixed wrnings.
7952
7953 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
7954
7955         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
7956         inssel-arm.brg: ARM support for soft-float.
7957
7958 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7959
7960         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
7961         loads and stores of 32 bit fp values.
7962
7963 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
7964
7965         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
7966
7967         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
7968         works. Fixes #79852 and #79463.
7969
7970 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7971
7972         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
7973         more soft-float support WIP and fixes.
7974
7975 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
7976
7977         * mini-arm.c: some VFP updates.
7978
7979 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7980
7981         * mini-exceptions.c: 0 is a valid local var offset in some
7982         architectures, don't assert (bug #78508).
7983
7984 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
7985
7986         * exceptions-arm.c: fixed off by one error in stack walk code.
7987
7988 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
7989
7990         * mini.h, mini.c: more precise tracking of type load exceptions.
7991
7992 2006-11-03  Robert Jordan  <robertj@gmx.net>
7993
7994         * Makefile.am: [WIN32] Add monow.exe target.
7995         * driver.c: [WIN32] Don't detach the console when debugging.
7996         Fixes bug #79797.
7997         
7998 2006-10-30  Miguel de Icaza  <miguel@novell.com>
7999
8000         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
8001
8002 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
8003
8004         * aot-compiler.c (emit_method_info): Add a case missed earlier.
8005
8006         * driver.c (mini_regression): Fix --regression with AOT.
8007
8008         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
8009
8010 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
8011
8012         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
8013
8014         * mini-sparc.h: Don't use sigaction on sparc/linux.
8015
8016         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
8017
8018         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
8019
8020         * mini-exceptions.c: Add proper include files for getpid ().
8021
8022 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
8023
8024         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
8025         address instead of a MonoJitInfo* to avoid decoding the exception info for the
8026         method.
8027
8028         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
8029         name cache to reduce its size.
8030
8031         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
8032
8033 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
8034
8035         * mini-x86.c: Save/restore the current LMF structure more efficiently using
8036         the mono_lmf TLS variable.
8037
8038         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
8039         trampoline lmf frames.  
8040
8041         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
8042
8043 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
8044
8045         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
8046         the mono_lmf TLS variable.
8047
8048         * mini-exceptions.c: Access the LMF structure through accessors.
8049
8050         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
8051         variable instead of in jit_tls->lmf.
8052
8053         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
8054         
8055         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
8056         trampoline lmf frames.
8057
8058         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
8059
8060 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
8061
8062        * mini.c trace.c mini-x86.c: Revert these too.
8063         
8064        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
8065        signature change.
8066
8067 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
8068
8069         * genmdesc.c: removed now dead code.
8070
8071 2006-10-09  Robert Jordan <robertj@gmx.net>
8072
8073         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
8074
8075 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
8076
8077         * mini.h: do not leave gaps in the opcode values.
8078
8079 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
8080
8081         * jit-icalls.h: flag functions as internal here, too.
8082
8083 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
8084
8085         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
8086         functions with the internal attribute.
8087
8088 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
8089
8090         * aot-compiler.c: fclose the file descriptor in the profile read loop.
8091
8092 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
8093
8094         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
8095         for soft-float.
8096
8097 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
8098
8099         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
8100         tail calls as on other platforms.
8101
8102         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
8103
8104         * iltests.il: Add a few tailcall tests.
8105
8106 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8107
8108         * driver.c: fix loop for old compilers (bug #79521).
8109
8110 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
8111
8112         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
8113
8114         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
8115
8116         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
8117         metadata without any code.
8118
8119         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
8120         more precise debugging information using gdb.
8121
8122 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
8123
8124         * inssel-ia64.brg: Make the helper methods static.
8125
8126 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8127
8128         * inssel-x86.brg: make the helper methods static.
8129
8130 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
8131
8132         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
8133
8134 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8135
8136         * mini.c: updates for monoburg changes.
8137         * inssel.brg: make a few helper functions static as they should.
8138
8139 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
8140
8141         * Makefile.am: Move mini-codegen.c to common_sources.
8142
8143 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8144
8145         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
8146         instructions.
8147         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
8148         mini-ppc.h: port to use the common local register allocator.
8149
8150 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8151
8152         * mini.h: Remove the comment too then.
8153
8154 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
8155
8156         * mini.h: put back backend.data which is to be used shortly and
8157         doesn't increase the size of MonoInst. If any 64 bit arch aligned
8158         pointers on 4 byte boundaries it'd have much bigger issues running
8159         and you can ifdef it out anyway.
8160
8161 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8162
8163         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
8164         MonoInst size by 4 bytes on 64 bit machines.
8165
8166 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
8167
8168         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
8169         replacement with more meaningful field names. Arch maintainers, please
8170         check the assigned names are good enough for your arch.
8171
8172 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8173
8174         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
8175         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
8176
8177 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
8178
8179         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
8180         relocations and memory requirements, put the optimization flags
8181         definitions in their own file.
8182
8183 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
8184
8185         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
8186
8187         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
8188
8189 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
8190
8191         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
8192
8193 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
8194
8195         * inssel.brg: use the correct function to get the size of an item
8196         in an array, given an element class.
8197         * aot-compiler.c: do not access class->class_size directly.
8198
8199 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
8200
8201         * mini.h, debug-mini.c: added a debugging function to print
8202         info about local variables and arguments in a jitted method.
8203
8204 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
8205
8206         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8207
8208         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
8209
8210 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
8211
8212         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
8213         inner and outer loops when passing vtypes.
8214
8215 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
8216
8217         * mini-ppc.c: take into account the cpu errata for cache flushing
8218         which caused some random errors (bug #79381).
8219
8220 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
8221
8222         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
8223         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
8224
8225 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
8226
8227         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
8228         loaded.
8229
8230         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
8231         freebsd ports tree.
8232
8233         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
8234         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
8235
8236         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
8237         displacement.
8238
8239 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
8240
8241         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
8242
8243 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
8244
8245         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
8246         macro does not have to be changed during debugging.
8247
8248         * 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>.
8249
8250         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
8251
8252         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
8253         
8254         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
8255         MONO_ARCH_NO_EMULATE_MUL is defined.
8256
8257         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
8258
8259         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
8260
8261         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
8262
8263         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
8264         
8265 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
8266
8267         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
8268         stuff to mini-exceptions.c where it is used.
8269
8270         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
8271         setup code, the real one is in mini-exceptions.c.
8272
8273         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
8274         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
8275         some changes from the freebsd ports tree.
8276
8277         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
8278         constants.
8279         
8280         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
8281
8282 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
8283
8284         * mini.c: on Linux, check for /proc to be mounted
8285         (bug# 79351, novell bug#201204).
8286
8287 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
8288
8289         * mini.c: handle cases where pthread_attr_getstack() behaves
8290         incorrectly (bug #78096).
8291
8292 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
8293
8294         * mini-arm.c: support larger stack frames (bug #79272).
8295
8296 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
8297
8298         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
8299
8300         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
8301         tokens.
8302
8303         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
8304         mono_class_from_name () to find a class from its name.
8305
8306         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
8307
8308 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
8309
8310         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
8311
8312 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
8313
8314         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
8315
8316 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
8317
8318         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
8319         callinfo->trampoline.
8320
8321         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
8322         fixes #79271.
8323         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
8324         future.
8325
8326 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
8327
8328         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
8329
8330 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
8331
8332         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
8333         stats.method_trampolines, it is already done by the generic trampoline code.
8334
8335         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
8336         
8337 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
8338
8339         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
8340
8341         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
8342
8343         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
8344
8345         * mini.c (print_jit_stats): Print mscorlib mempool size too.
8346         
8347         * mini.c (print_jit_stats): Print new stats.
8348
8349         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8350
8351 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
8352
8353         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
8354         Address on two dimensional arrays. Fixes #78729.
8355
8356         * mini.h (MonoCompile): Add a 'skip_visibility' field.
8357
8358         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
8359         a method.
8360
8361         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
8362
8363         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
8364         #79130.
8365         
8366         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
8367         a race condition.
8368         (mini_get_ldelema_ins): Ditto.
8369
8370 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
8371
8372         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
8373         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
8374         Fixes #79213.
8375
8376 2006-08-29 Neale Ferguson <neale@sinenomine.net>
8377
8378         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
8379         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
8380
8381         * exceptions-s390x.c: Cosmetic change.
8382
8383         * tramp-s390.c: Fix warning.
8384
8385         * cpu-s390.md: Correct length of mul_imm.
8386
8387 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
8388
8389         * aot-compiler.c: added binary writer with ELF backend
8390         implementation (only on Linux/x86 for now).
8391
8392 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
8393
8394         * Makefile.am: Don't run net 2.0 AOT tests.
8395
8396         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
8397         (mono_compile_assembly): Skip net 2.0 assemblies as well.
8398
8399         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
8400
8401 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8402
8403         * aot-compiler.c: simplified and refactored the asm-writing code
8404         to allow different backends.
8405
8406 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
8407
8408         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8409
8410         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
8411         little. Share patches of type TYPE_FROM_HANDLE as well.
8412
8413         * mini.c (mono_patch_info_equal): New helper function.
8414         (mono_patch_info_hash): Ditto.
8415
8416         * aot-compiler.c (emit_method_code): Fix s390 build.
8417
8418         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
8419         is not handled because it is stored as a flag and not as a type ctor. Fixes
8420         #79016.
8421
8422 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
8423
8424         * aot-compiler.c: Fix computation of GOT slot statistics.
8425         
8426         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
8427         Also remove support for not PIC AOT.
8428
8429         * mini.h: Bump AOT file format version.
8430
8431         * objects.cs: Add a test for #78990.
8432
8433         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
8434         (peter.dettman@iinet.net.au). Fixes #79087.
8435
8436         * basic-long.cs: Add a test for the above.
8437
8438 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
8439
8440         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
8441         
8442         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
8443         code somewhat.
8444
8445 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
8446
8447         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
8448         exceptions.
8449
8450 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
8451
8452         * mini.c: Don't verify COM proxy invoke calls
8453         
8454
8455 2006-08-10  Dick Porter  <dick@ximian.com>
8456
8457         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
8458         which process is holding semaphores locked.
8459
8460 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
8461
8462         * mini-ia64.c mini-amd64.c: Fix #79027.
8463
8464         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
8465
8466         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
8467
8468         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
8469         implicit arguments in a vararg call. Fixes #79027.
8470
8471 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
8472
8473         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
8474         (mono_get_array_new_va_signature): Ditto.
8475
8476 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
8477
8478         * aot-runtime.c: Call init_plt lazily.
8479
8480         * inssel-long.brg: Fix unsigned long->int conversion.
8481
8482         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
8483
8484         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
8485         that most data is now in the .rss/.data section.
8486
8487 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
8488
8489         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
8490
8491         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
8492
8493         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
8494
8495         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
8496
8497         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
8498         virtual call. Fixes #79010.
8499
8500         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
8501         and use the result as the this argument in the real call.
8502
8503         * generics.2.cs: Add a new test for #79010.
8504         
8505 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
8506
8507         * mini-x86.c: Fix a warning.
8508
8509         * aot-compiler.c: Add a bunch of statistics.
8510
8511         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
8512
8513 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
8514
8515         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
8516
8517 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
8518
8519         * 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>.
8520
8521 2006-07-13  Miguel de Icaza  <miguel@novell.com>
8522
8523         * mini.c (mono_method_to_ir): Obtain the original method in the
8524         CIL stream and use this to perform validation.
8525
8526         Fixed: #78816
8527
8528 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
8529
8530         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
8531         (mono_arch_call_opcode): Ditto.
8532
8533         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
8534         #78826.
8535
8536         * mini.c (mono_patch_info_dup_mp): New helper function.
8537         
8538         * aot-compiler.c (compile_method): Fix some of the memory allocated during
8539         compilation. Fixes #78827.
8540
8541 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
8542
8543         * declsec.c: Use original security informations for
8544           MONO_WRAPPER_MANAGED_TO_MANAGED.
8545
8546 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
8547
8548         * mini.c: Allow Com Interop methods/classes and
8549         don't verify COM wrapper calls
8550         
8551
8552 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
8553
8554         * inssel-long32.brg: Fix long->i4 checked conversion.
8555
8556         * exceptions.cs: Add a test for the above.
8557
8558 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
8559
8560         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
8561
8562         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
8563         leaks.
8564
8565         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
8566         #78775.
8567
8568 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
8569
8570         * mini.c: Fix solaris/x86 exception handling.
8571
8572         * Makefile.am: Get rid of $(ICU_LIBS).
8573
8574 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
8575
8576         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
8577         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
8578         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
8579
8580         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
8581
8582         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
8583         this function causes a SIGSEGV.
8584
8585 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
8586
8587         * mini.c: Remove unused solaris/x86 includes.
8588
8589 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
8590
8591         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
8592
8593 2006-06-20  Jb Evain  <jbevain@gmail.com>
8594
8595         * cpu-g4.md: fix max length of start_handler instruction.
8596
8597 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
8598         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
8599
8600 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
8601         * ssa.c: Fixed bug 78653 for SSA based deadce.
8602         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
8603         MonoInst.flags, used in SSA based deadce.
8604         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
8605         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
8606
8607 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
8608
8609         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
8610         it can end up using non executable memory on ppc64 systems
8611         running ppc32 userspace (fix from Johannes Berg).
8612
8613 2006-06-14  Dick Porter  <dick@ximian.com>
8614
8615         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
8616         4.1.1
8617
8618 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
8619         * mini.c: Made so that inline is locally disabled if it would
8620         trigger a .cctor, because too many apps depend on this behavior
8621         (which seems to be also the one of the MS CLR).
8622
8623 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
8624
8625         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
8626         No idea why this worked before.
8627
8628         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
8629         which branch to outer exception clauses since they could skip the
8630         inner finally clauses. Fixes #78633.
8631
8632         * exceptions.cs: Add a test for the above.
8633
8634         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
8635         Fixes #78629.
8636
8637         * iltests.il: Add a test for the above.
8638
8639 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
8640
8641         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
8642         after the end of a try bblock, to prevent asserts in mini_method_compile ().
8643
8644         * iltests.il: Add a test for the above.
8645
8646 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
8647
8648         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
8649         
8650         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
8651         methods as instrinsics.
8652
8653 2006-06-09  Wade Berrier <wberrier@novell.com>
8654
8655         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
8656         (simple-cee-ops.h ssapre-mini-ops.h)
8657
8658 2006-06-09  Neale Ferguson <neale@sinenomine.net>
8659
8660         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
8661         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
8662         instruction).
8663         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
8664         * cpu-s390x.md: Fix max. length values for a couple of instructions.
8665
8666 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
8667
8668         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
8669
8670 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
8671
8672         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
8673         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
8674         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
8675         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
8676         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
8677         of opcodes, so that bug 78549 should not happen again.
8678         * ssapre.c: Updated to use the renamed files.
8679
8680 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
8681
8682         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
8683         in OP_ATOMIC_EXCHANGE_I4.
8684
8685 2006-06-07  Wade Berrier <wberrier@novell.com>
8686
8687         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
8688         in mono_debugger_create_notification_function)
8689
8690 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
8691
8692         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
8693         
8694         * mini.c (type_from_stack_type): Disable some changes which do not
8695         seem to work.
8696
8697         * driver.c: Reenable opts.
8698
8699         * mini.h (MonoStackSlot): New structure to keep track of the verification state
8700         of the evaluation stack.
8701         
8702         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
8703         evaluation stack trace at entry to the bblock.
8704
8705         * mini.c (merge_stacks): New function to perform verification of stack merges.
8706         Turned off by default.
8707
8708         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
8709         STACK_MP.
8710         
8711 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
8712
8713         * local-propagation.c: Fixed bug 78549.
8714
8715 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
8716
8717         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
8718
8719 2006-06-02  Miguel de Icaza  <miguel@novell.com>
8720
8721         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
8722         tramp-arm.c, tramp-ia64.c
8723         (mono_debugger_create_notification_function): Update signature to
8724         new signature and use new protocol for creating the notification
8725         function.  
8726
8727         Should fix the build.
8728
8729 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
8730
8731         * exceptions-ppc.c (mono_jit_walk_stack)
8732         (ves_icall_get_frame_info): Fix the build
8733
8734 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
8735
8736         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
8737
8738 2006-05-31  Raja R Harinath  <rharinath@novell.com>
8739
8740         * il2tests.2.il: New file for generics CIL tests.  Add test for
8741         #78019.
8742         * Makefile.am: Update.
8743
8744         Fix #78019
8745         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
8746         to nullable types.
8747
8748 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
8749
8750         * aliasing.c: Fixed bug 78311.
8751
8752 2006-05-29  Martin Baulig  <martin@ximian.com>
8753
8754         * mini-exceptions.c (mono_find_jit_info): When computing the
8755         native offset, check whether we're actually inside the method's
8756         code; call mono_debug_print_stack_frame() to format the frame.
8757         (ves_icall_System_Exception_get_trace): Call
8758         mono_debug_print_stack_frame() to format the stack frame.
8759         (ves_icall_get_trace): Update to the new debugging API.
8760         (mono_jit_walk_stack_from_ctx): Likewise.
8761         (ves_icall_get_frame_info): Likewise.
8762
8763         * mini.c (get_method_from_ip): Use the new debugging API.
8764         (mono_print_method_from_ip): Likewise.
8765
8766         * exceptions-ppc.c
8767         (mono_jit_walk_stack): Use the new debugging API.
8768         (ves_icall_get_frame_info): Likewise.   
8769
8770 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
8771
8772         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
8773
8774 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
8775
8776         * mini.c: Added "limitator" to inline for debugging.
8777
8778 2006-05-24  Martin Baulig  <martin@ximian.com>
8779
8780         * debug-debugger.c (mono_debugger_init): Create a private,
8781         malloc()-based code manager for the notification function and
8782         intentionally leak it on exit.  This fixes the crash-on-exit race
8783         condition.
8784
8785         * tramp-amd64.c
8786         (mono_debugger_create_notification_function): Added
8787         `MonoCodeManager *' argument.
8788
8789         * tramp-x86.c
8790         (mono_debugger_create_notification_function): Added
8791         `MonoCodeManager *' argument.
8792
8793 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
8794
8795         * aliasing.c: Fixed 64 bit issue.
8796         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8797         default since all known bugs are fixed (one more time!).
8798
8799 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8800
8801         * mini.c: write barrier support.
8802
8803 2006-05-23  Martin Baulig  <martin@ximian.com>
8804
8805         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
8806         check at the top of the file.
8807
8808 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
8809
8810         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
8811         reverting changes without reason and without changelog entries.
8812
8813 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
8814
8815         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
8816         to a few opcodes. Fixes #78439.
8817
8818         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
8819         consistency with other archs.
8820
8821         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
8822
8823 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8824
8825         * debug-debugger.c: fix the build.
8826
8827 2006-05-17  Martin Baulig  <martin@ximian.com>
8828
8829         * debug-debugger.c
8830         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
8831         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
8832         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
8833         (debugger_attach): Call GC_mono_debugger_add_all_threads().
8834
8835 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
8836
8837         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
8838
8839 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
8840
8841         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
8842         MONO_TYPE_GENERICINST.
8843         
8844         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
8845         MONO_TYPE_GENERICINST.
8846
8847 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
8848
8849         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
8850         #78325.
8851
8852 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
8853
8854         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
8855         mempool.
8856         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
8857
8858 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
8859
8860         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
8861         mono_trace_cleanup ().
8862
8863         * iltests.il: Fix problem with the newly added test.
8864
8865         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
8866         due to register constraints, free up the previous hreg. Fixes #78314.
8867
8868         * iltests.il: Add new test for #78314.  
8869
8870         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
8871         Interlocked.Add. Fixes #78312.
8872
8873         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
8874         
8875 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
8876
8877         * inssel.brg (mini_emit_virtual_call): Fix a warning.
8878
8879 2006-05-05  Martin Baulig  <martin@ximian.com>
8880
8881         * debug-mini.c (mono_debug_open_block): New method.
8882
8883         * mini-amd64.c
8884         (mono_arch_output_basic_block): Call mono_debug_open_block() at
8885         the beginning of each basic block.
8886
8887         * mini-x86.c
8888         (mono_arch_output_basic_block): Call mono_debug_open_block() at
8889         the beginning of each basic block.
8890
8891 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
8892
8893         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8894         default until I understand why they break the build on amd64.
8895
8896 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
8897
8898         * mini.c (mini_cleanup): Call mono_cleanup ().
8899
8900         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
8901         errors.
8902
8903 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
8904
8905         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
8906         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8907         default since all known bugs are fixed, and I cannot reproduce bug
8908         77944... I'm asking Matt Hargett to test again after this commit.
8909
8910 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
8911
8912         * mini-codegen.c: Fixed typo that thrashed inline.
8913
8914 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
8915
8916         * dominators.c (compute_dominators): Avoid using a worklist since
8917         it is not correct in some cases. Instead, iterate over all bblocks as
8918         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
8919
8920 2006-04-28  Miguel de Icaza  <miguel@novell.com>
8921
8922         * mini.c (mono_jit_compile_method_inner): Use
8923         mono_prepare_exception_from_error that resets the value
8924         internally.
8925
8926 2006-04-27  Miguel de Icaza  <miguel@novell.com>
8927
8928         * mini.c: Move the mini_loader_error_to_exception to metadata. 
8929         
8930 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
8931
8932         * aliasing.c: Fixed bug 78210.
8933
8934 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
8935
8936         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8937         default until all their problems (or the ones they trigger) are fixed.
8938
8939 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
8940
8941         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
8942         
8943         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
8944         as loaded only after resolving patches since that could invoke the same method.
8945
8946         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
8947
8948         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
8949         functions.
8950
8951         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
8952         AOT loader.
8953
8954         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
8955         stack.
8956
8957         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
8958         made from AOT code through the PLT table.
8959
8960         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
8961         holding the plt offset when a call is made to the aot plt trampoline.
8962         
8963 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
8964
8965         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
8966         amd64 AOT support.
8967
8968         * Makefile.am (common_sources): Fix build breakage.
8969
8970         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
8971         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
8972         intra-assembly calls if possible.
8973         
8974         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
8975
8976         * mini-trampolines.c: Handle PLT entries.
8977
8978         * mini.c: Avoid creating a GOT var for calls.
8979
8980         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
8981         from mscorlib code.
8982
8983         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
8984         from mscorlib code.
8985
8986         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
8987         AOT code.       
8988
8989         * mini.h: Bump AOT file format version.
8990         
8991         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
8992         covers more cases.
8993
8994 2006-04-25  Martin Baulig  <martin@ximian.com>
8995
8996         * driver.c: Disable copyprop, consprop and inline when running
8997         inside the debugger.
8998
8999 2006-04-25  Martin Baulig  <martin@ximian.com>
9000
9001         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
9002         with `get_current_thread' and added `detach'.
9003         (MonoDebuggerMetadataInfo): Added `thread_size',
9004         `thread_tid_offset', `thread_stack_ptr_offset' and
9005         `thread_end_stack_offset'.
9006
9007 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
9008
9009         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
9010         aot-runtime.c.
9011
9012         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
9013         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
9014
9015         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
9016
9017         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
9018
9019         * aot.c: Add support for ADJUSTED_IID.  
9020
9021 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
9022
9023         * aot.c (emit_method_order): Don't align method_order_end.
9024
9025         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
9026         the interface ID changes.
9027
9028 2006-04-21  Dick Porter  <dick@ximian.com>
9029
9030         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
9031         cleaning up a thread.  Fixes the new part of bug 77470.
9032
9033 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
9034
9035         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
9036         to managed wrapper.
9037                      
9038 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
9039
9040         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
9041         
9042         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
9043         SIGSEGV. Fixes #78072.
9044
9045         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
9046         unregister our SIGABRT handler.
9047
9048 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
9049
9050         * mini.c: Disabled inline where it can alter the call stack in a
9051         way visible from managed code.
9052         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
9053         default.
9054
9055 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
9056
9057         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
9058         on other platforms. Fixes #78089.
9059
9060 2006-04-13  Martin Baulig  <martin@ximian.com>
9061
9062         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
9063         determine whether we're inside the debugger.
9064
9065         * debug-debugger.h
9066         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
9067
9068 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
9069
9070         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
9071         handler clauses. Fixes #78024.
9072
9073         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
9074         in the CALL_MEMBASE opcodes. Fixes #78088.
9075         (mono_arch_get_vcall_slot_addr): Ditto.
9076
9077 2006-04-10  Martin Baulig  <martin@ximian.com>
9078
9079         * debug-debugger.c: The thread handling code has now been moved
9080         into ../metadata/threads.c.
9081
9082 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
9083
9084         * driver.c (mono_main): Fix --with-gc=none build.
9085
9086         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
9087         (mono_spillvar_offset_float): Ditto.
9088         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
9089         hreg, not when its !global, since on ia64, there is a third category: stacked
9090         registers.      
9091
9092 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
9093
9094         * mini.c: set MonoInst->klass for load field address and a few other
9095         places.
9096
9097 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
9098
9099         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
9100
9101 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
9102
9103         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
9104         the branch opt changes.
9105
9106 2006-04-06  Dick Porter  <dick@ximian.com>
9107
9108         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
9109         
9110         * wapihandles.c (mini_wapi_seminfo): 
9111         * driver.c (mono_main): Add semaphore info option
9112
9113 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
9114
9115         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
9116         branch optimization changes. Fixes #78009.
9117
9118 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
9119
9120         * mini.c: ignore accessibility of methods in managed->native wrappers.
9121
9122 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
9123
9124         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
9125         
9126         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
9127
9128 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
9129
9130         * mini.c: Modify the branch optimizations to preserve the invariant that
9131         the entries inside the in_bb and out_bb arrays are unique.
9132         (mono_unlink_bblock): Avoid creation of new arrays.
9133
9134 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
9135
9136         * mini.c (mono_unlink_bblock): Fix regression caused by previous
9137         change (#77992).
9138
9139 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
9140
9141         * mini.c (optimize_branches): Remove the "optimizations" in
9142         the cbranch1/cbranch2 -> branch cases which were causing several
9143         problems in the past. Fixes #77986.
9144
9145 2006-03-31  Chris Toshok  <toshok@ximian.com>
9146
9147         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
9148         default optimizations :(
9149
9150 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
9151
9152         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
9153         branch.
9154
9155 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
9156
9157         * local-propagation.c: Added comments to structs and removed
9158         "Mono" prefixes from local tree mover types.
9159
9160 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
9161
9162         * Makefile.am (arch_sources): Define this for each architecture so 
9163         libmono_la_SOURCES is defined in one place.
9164
9165 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
9166
9167         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
9168         from handles/.
9169
9170 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
9171
9172         * driver.c: print the GC name supplied by configure.
9173
9174 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
9175
9176         * local-propagation.c: Added tree mover, and moved here all the
9177         local propagation code from mini.c
9178         * mini.c: Added support for treeprop, and moved all the local
9179         propagation code to local-propagation.c
9180         * mini.h: Added support for treeprop
9181         * driver.c: Added support for treeprop, enabled consprop, copyprop,
9182         treeprop, inline and deadce by default
9183         * Makefile.am: Added local-propagation.c
9184
9185 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
9186
9187         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
9188
9189 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
9190
9191         * debug-debugger.c: make it compile without the Boehm GC.
9192
9193 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9194
9195         * mini.c: fixed issue with mismatch when an icall is registered
9196         with multiple names but same address.
9197
9198 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9199
9200         * declsec.c, mini-exceptions.c: use write barrier to set reference
9201         fields of managed objects.
9202
9203 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
9204
9205         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
9206         (can_access_internals): Fix a warning.
9207
9208         * mini.c (print_method_from_ip): Rename this to 
9209         mono_print_method_from_ip so it gets exported.
9210
9211         * trace.c: Deal with strings inside StringBuilder's containing garbage
9212         and fix memory leaks. Fixes #77848.
9213
9214 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
9215
9216         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
9217         fixes #77787.
9218
9219 2006-03-16 Neale Ferguson <neale@sinenomine.net>
9220         
9221         * mini-s390.c: Remove OP_X86_TEST_NULL.
9222
9223 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9224
9225         * mini.c: use the correct GetHashCode() for the moving collector.
9226
9227 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
9228
9229         * liveness.c: Regalloc spill cost tuning.
9230
9231 2006-03-15 Neale Ferguson <neale@sinenomine.net>
9232         
9233         * mini-s390x.h: Correct S390_LONG macro.
9234
9235         * mini-s390x.c: Cleanup unused code.
9236
9237 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
9238
9239         * jit-icalls.h: New file.
9240
9241         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
9242         icalls and include that instead of including jit-icalls.c.
9243
9244         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
9245         OP_X86 opcodes.
9246
9247 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
9248
9249         * mini.c: when checking for member accessibility, also check for
9250         friend assemblies and for explicit interface implementations.
9251
9252 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
9253
9254         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
9255
9256         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
9257
9258         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9259         common cases are done first.    
9260
9261         * mini-ops.h: Only define platform specific opcodes on the given platform.
9262
9263         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
9264         branch.
9265         
9266 2006-03-14  Martin Baulig  <martin@ximian.com>
9267
9268         Revert Paolo's change from r57348:
9269
9270         * mini.h: don't use gboolean for bitfields.
9271         * mini.c: verifier changes for fields and methods accessibility.
9272
9273 2006-03-13  Neale Ferguson <neale@sinenomine.net>
9274
9275         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
9276
9277         * mini-s390x.c: Fix conv_r_un.
9278
9279         * cpu-s390, cpu-s390x.md: Fix lengths.
9280
9281 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
9282
9283         * mini.c: nested types have access to all the nesting
9284         levels, not just the enclosing types.
9285
9286 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9287
9288         * mini.c: added a few more verification checks.
9289
9290 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
9291
9292         * liveness.c: Merge optimizations from the linear-il branch.
9293
9294 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
9295
9296         * mini-ia64.c (emit_call): Add a comment.
9297
9298         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
9299
9300         * tramp-ia64.c: Fix some warnings.
9301
9302 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
9303
9304         * mini.h: don't use gboolean for bitfields.
9305         * mini.c: verifier changes for fields and methods accessibility.
9306
9307 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
9308
9309         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
9310         lazy icall wrapper changes.
9311
9312         * dominators.c: Replace all the dominator algorithms with faster
9313         ones from the linear-il branch.
9314
9315         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
9316         the mempool.
9317
9318         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9319         common cases are done first.
9320
9321         * mini-amd64.c: Fix some warnings.
9322
9323         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
9324         from the mempool.
9325
9326         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
9327         added code.
9328
9329         * mini.h: Add a missing prototype.
9330
9331 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
9332
9333         * mini.c: Compile icall wrappers lazily.
9334
9335         * mini-codegen.c: Use printf instead of g_print since its much faster.
9336
9337         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
9338         function.
9339
9340         * mini.c (optimize_branches): Cache the negative result from 
9341         remove_block_if_useless ().
9342
9343         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
9344         Also fix some bblock linking issues.
9345
9346         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
9347         assembly files.
9348
9349         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
9350
9351         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
9352         accessed fields first, for better cache behavior.
9353         
9354 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9355
9356         * mini.c: speedup IList<T> array accesses.
9357
9358 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
9359
9360         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
9361         inline_costs counter. Fixes #77190.
9362
9363 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
9364
9365         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
9366         trace messages. Fixes #77706.
9367
9368 2006-03-04  Martin Baulig  <martin@ximian.com>
9369
9370         * tramp-amd64.c, tramp-x86.c
9371         (mono_debugger_create_notification_function): Use
9372         mono_global_codeman_reserve() to allocate a buffer at runtime and
9373         return it.
9374
9375         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
9376
9377         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
9378         notification function at runtime and then call `initialize' in the
9379         `MONO_DEBUGGER__debugger_info' vtable.
9380
9381 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
9382
9383         * iltests.il: Fix a visibility problem.
9384
9385 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9386
9387         * driver.c, mini.c: add hooks for the counters API.
9388
9389 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9390
9391         * driver.c: show disabled options.
9392
9393 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9394
9395         * linear-scan.c: always use cost-driven selection.
9396
9397 2006-02-28  Raja R Harinath  <rharinath@novell.com>
9398
9399         * jit-icalls.c (helper_compile_generic_method): Revert change from
9400         2006-02-24.
9401
9402 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
9403
9404         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
9405
9406 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
9407
9408         * inssel.brg: style fixes, mostly to force the updated monoburg
9409         to run for people using svn.
9410
9411 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
9412
9413         * mini.c: match monoburg changes.
9414
9415 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9416
9417         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
9418         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
9419         declaration in the header file.
9420
9421 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
9422
9423         * helpers.c: reduce relocations and mem usage.
9424
9425 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
9426
9427         * mini.h, mini-codegen.c: disable logging features if
9428         requested by configure.
9429
9430 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
9431
9432         * mini.c: tiny verifier changes.
9433
9434 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9435
9436         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
9437         cpu-pentium.md: stack alignment changes for osx/x86,
9438         partially from Geoff Norton <gnorton@customerdna.com>.
9439
9440 2006-02-24  Raja R Harinath  <harinath@gmail.com>
9441
9442         * jit-icalls.c (helper_compile_generic_method): Update to changes
9443         in metadata/class.c.
9444
9445 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
9446         
9447         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
9448         
9449         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
9450         interface calls with large offsets.
9451
9452 2006-02-23  Raja R Harinath  <rharinath@novell.com>
9453
9454         * jit-icalls.c (helper_compile_generic_method): Document the
9455         special-case we depend on so that we can inflate the method twice
9456         with the same context with no bad side-effects.
9457
9458 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
9459
9460         * mini-x86.c, mini-amd64.c: fix for case when xen support
9461         is disabled.
9462
9463 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
9464
9465         * mini-x86.c, mini-amd64.c: generate code to access tls items
9466         in a faster way for Xen systems.
9467
9468 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9469
9470         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
9471         updates and compilation fixes for the OSX/x86 port, mostly from
9472         Geoff Norton <gnorton@customerdna.com>.
9473
9474 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9475
9476         * inssel.brg: faster interface call implementation
9477         to sync with the interface_offsets MonoVTable changes.
9478
9479 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9480
9481         * mini.c: more verification checks.
9482
9483 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
9484
9485         * mini.c: added a few more verification checks.
9486
9487 2006-02-17      Neale Ferguson <neale@sinenomine.net>
9488
9489         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
9490         facility on the processor and use it if available.
9491
9492 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9493
9494         * driver.c, aot.c, mini.c: throw exception if the IL code is
9495         invalid or unverifiable.
9496
9497 2006-02-17  Raja R Harinath  <rharinath@novell.com>
9498
9499         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
9500         m.StructField.
9501
9502 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
9503
9504         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
9505
9506 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9507
9508         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
9509         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
9510         handling of instantiated generic valuetypes.
9511
9512 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
9513
9514         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
9515         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
9516         instead.
9517
9518         * generics.2.cs: Revert the nullable reftypes tests.
9519
9520 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
9521
9522         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
9523         using __builtin_frame_address (1) as it doesn't work in the presence
9524         of optimizations. Hopefully fixes #77273.
9525
9526         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
9527         -> generics.cs change as it doesn't work with some automake versions.
9528
9529 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9530
9531         * mini.c: handle systems that sue a different way to
9532         retrieve the stack address of the current thread.
9533
9534 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
9535
9536         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
9537         it specially in the makefile.
9538
9539         * generics.2.cs: Add tests for nullable reference types.
9540
9541 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9542
9543         * mini.c: always handle the case when mono_jit_init()
9544         is called in a thread different from the main thread,
9545         confusing libgc (bug #77309).
9546
9547 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
9548
9549         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
9550
9551 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9552
9553         * mini.c: change optimize_branches () to use a single loop
9554         and introduce a new optimization to simplify some range checks.
9555
9556 2006-02-03  Martin Baulig  <martin@ximian.com>
9557
9558         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
9559         and merged with debugger_thread_manager_add_thread().
9560         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
9561         inform the debugger about the main thread.
9562
9563 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
9564
9565         * basic.cs: Add test for div.un/rem.un constant folding.
9566
9567 2006-02-03  Neale Ferguson <neale@sinenomine.net>
9568
9569         * cpu-s390x.md: correct int_xor_imm length
9570
9571 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
9572
9573         * generics.2.cs: New test for #77442.
9574
9575         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
9576         #77442.
9577
9578 2006-02-02  Martin Baulig  <martin@ximian.com>
9579
9580         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
9581         <mono/metadata/mono-debug-debugger.h>   
9582
9583         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
9584
9585 2006-02-02  Martin Baulig  <martin@ximian.com>
9586
9587         * debug-debugger.h: New header file for debug-debugger.c.
9588
9589         * debug-debugger.c: Big API cleanup; don't run the managed Main()
9590         function is a separate thread anymore; add support for attaching.
9591
9592 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
9593
9594         * tramp-x86.c: Fix a warning.
9595
9596 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
9597
9598         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
9599         on very large methods.
9600
9601         * aot.c (load_patch_info): Fix a warning.
9602
9603 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
9604
9605         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
9606         mini-ops.h: alu membase optimizations.
9607
9608 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
9609
9610         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
9611         to speedup StringBuilder.
9612
9613 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
9614
9615         * dominators.c (mono_compute_natural_loops): Fix detection of
9616         loop body start blocks.
9617
9618         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
9619
9620 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
9621
9622         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
9623         #75145.
9624
9625 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
9626
9627         * aliasing.c: Fixed aliasing issue on 64 bit archs.
9628
9629 2006-01-25  Martin Baulig  <martin@ximian.com>
9630
9631         * debug-debugger.c: Moved the `MonoDebuggerManager' and
9632         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
9633         started to cleanup this file a little bit.
9634
9635 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
9636
9637         * mini.c: optimize a codepath frequently happening in generics code.
9638
9639 2006-01-23  Martin Baulig  <martin@ximian.com>
9640
9641         * Makefile.am: Only compile debug-debugger.c on supported platforms.
9642
9643         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
9644         functions directly.
9645
9646         * driver.c: debug-debugger.c is only available if
9647         `MONO_DEBUGGER_SUPPORTED' is defined.   
9648
9649 2006-01-23  Martin Baulig  <martin@ximian.com>
9650
9651         * debug-debugger.c: Only enable this on platforms where the Mono
9652         Debugger is working (x86 and x86_64).
9653
9654 2006-01-21  Martin Baulig  <martin@ximian.com>
9655
9656         The Mono Debugger is now using the normal `mono' instead of the
9657         `mono-debugger-mini-wrapper' when executing managed code.
9658
9659         * debug-debugger.c: New file; previously known as
9660         debugger/wrapper/wrapper.c.
9661
9662         * debug-mini.c (mono_init_debugger): Removed.
9663
9664         * driver.c (mono_main): Added new `--inside-mdb' command line
9665         argument which is used when running inside the debugger.
9666
9667 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
9668
9669         * liveness.c (mono_analyze_liveness): Remove some unused data
9670         structures.
9671
9672 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
9673
9674         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
9675
9676 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
9677
9678         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
9679         depends on implementation details of monobitset.
9680
9681         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
9682         Fixes #77271.
9683
9684 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
9685
9686         * liveness.c: Update after monobitset changes.
9687
9688 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
9689
9690         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
9691
9692 2006-01-11 Neale Ferguson <neale@sinenomine.net>
9693
9694         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
9695
9696         * mini-s390x.c: Remove warning messages.
9697
9698 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
9699
9700         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
9701
9702 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
9703
9704         * generics.2.cs: Add ldelem/stelem_any test.
9705
9706 2006-01-10 Neale Ferguson <neale@sinenomine.net>
9707
9708         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
9709
9710 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
9711
9712         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
9713         
9714 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
9715
9716         * generics.2.cs: Reenable vtype tests.
9717
9718         * inssel-x86.brg: Remove an icorrect valuetype rule.
9719
9720 2006-01-06 Neale Ferguson <neale@sinenomine.net>
9721
9722         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
9723         initial support for OP_ABS.
9724
9725 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9726
9727         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
9728
9729 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9730
9731         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
9732         conversion and implement LADD/LSUB.
9733
9734         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
9735         architectures.
9736
9737 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9738
9739         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
9740
9741         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
9742         architectures.
9743
9744 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9745
9746         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
9747         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
9748         (stack walk problem).
9749
9750 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
9751
9752         * aot.c (mono_aot_load_method): Fix a warning.
9753
9754 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9755
9756         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
9757
9758 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9759
9760         * iltests.il: Add test for #77148.
9761
9762         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
9763         #77148.
9764
9765 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9766
9767         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
9768
9769 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9770
9771         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
9772         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
9773
9774         * basic-long.cs: Add lconv-to-r4/r8 tests.
9775
9776 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9777
9778         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
9779
9780         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
9781         here as on other archs.
9782
9783 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9784
9785         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
9786
9787 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9788
9789         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
9790         
9791         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
9792
9793         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
9794         instrument_prolog; Add memory_barrier instruction.
9795
9796 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
9797
9798         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
9799
9800 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
9801
9802         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
9803
9804         * aliasing.c inssel.brg: Fix warnings.
9805
9806         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
9807         could skip initialization of some parts of memory.
9808
9809         * mini.c mini-ia64.c: Fix warnings.
9810
9811         * inssel-sparc.brg: Add an implementation of lneg which actually works.
9812
9813 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
9814
9815         * aliasing.c (mono_build_aliasing_information): Add a workaround for
9816         a crash seen on sparc.
9817
9818         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
9819         
9820         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
9821
9822 2005-12-21 Neale Ferguson <neale@sinenomine.net>
9823
9824         * mini-ops.h: Add s390_backchain instruction
9825
9826         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
9827
9828         * cpu-s390.md: Add s390_backchain instruction
9829
9830         * mini-s390.c: Significant ABI changes
9831
9832         * mini-s390.h: Cater for zero length structures
9833
9834 2005-12-20 Neale Ferguson <neale@sinenomine.net>
9835
9836         * mini-s390.c: ABI fixes
9837
9838         * inssel-s390.brg: Remove debug statements
9839
9840         * cpu-s390.md: Fix length of ATOMIC_xx operations
9841
9842 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
9843
9844         * basic-float.cs: Add float<->long conversion tests.
9845
9846 2005-12-16 Neale Ferguson <neale@sinenomine.net>
9847
9848         * mini-s390.c: Fix LOCALLOC processing.
9849
9850         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
9851
9852 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
9853
9854         * iltests.il: Add tests for some opcodes not covered by the other
9855         tests.
9856
9857 2005-12-15 Neale Ferguson <neale@sinenomine.net>
9858
9859         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
9860         register loading for Tail processing; Correct trace output.
9861
9862         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
9863
9864         * cpu-s390.md: Correct size of jmp instruction. 
9865
9866 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9867
9868         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
9869
9870 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9871
9872         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
9873           Bring s390 up to current level.
9874
9875 2005-12-12  Zltan Varga  <vargaz@gmail.com>
9876
9877         * generics.2.cs: Disable the newly added tests as they do not work yet.
9878         
9879         * generics.2.cs: Add valuetype tests.
9880
9881 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
9882
9883         * basic-long.cs: Add i4->u8 test.
9884
9885         * objects.cs: Add tests for JIT intrinsic.
9886
9887         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
9888         optimizations lost by a mistake.
9889
9890 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
9891
9892         * basic-long.cs: Remove a test moved to objects.cs.
9893
9894         * arrays.cs: Add more array tests.
9895
9896 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
9897
9898         * arrays.cs: Add new tests for multi-dimensional arrays.
9899
9900 2005-12-06  Raja R Harinath  <rharinath@novell.com>
9901
9902         * Makefile.am (test_sources2): Add generics.2.cs.
9903         (EXTRA_DIST): Add test_sources2.
9904
9905 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
9906
9907         Support for boxing and unboxing nullable types as well as the
9908         isinst operation on nullables, per the CLI ammendment.
9909
9910         * inssel.brg (CEE_ISINST): Special case for nullable
9911
9912         * mini.c (handle_unbox_nullable): new method
9913         (handle_box): Special case for nullable types
9914         (mono_method_to_ir): Call handle_unbox_nullable in correct
9915         places.
9916
9917         * generics.2.cs: New test suite
9918
9919         * Makefile.am: Support for regression tests with generics.
9920
9921 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
9922
9923         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
9924         allocated to registers. Fixes #76800.
9925
9926 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
9927
9928         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
9929
9930 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
9931
9932         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
9933         of platforms.
9934
9935 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
9936
9937         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
9938         objects.cs.
9939
9940         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
9941         
9942         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
9943 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
9944
9945         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
9946         single precision before storing to a single precision location.
9947
9948 2005-11-28  Raja R Harinath  <rharinath@novell.com>
9949
9950         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
9951
9952 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
9953
9954         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
9955         correct files.
9956
9957         * basic.cs: Remove test_0_byte_compares test which was moved to
9958         objects.cs a long time ago.
9959
9960 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
9961
9962         * aliasing.c: Fixed aliasing issue on 64 bit archs.
9963
9964 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
9965
9966         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
9967         handlers are called.
9968
9969         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
9970         throwing code.
9971
9972          * mini-ia64.c: Add support for the throw->branch exception 
9973         optimization.   
9974
9975         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
9976
9977 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
9978
9979         * mini.c: Enabled "fastpath" deadce :-)
9980         
9981 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
9982
9983         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
9984         alias analysis pass to support it.
9985         * mini.h: Likewise.
9986         * ssa.c: Likewise.
9987         * liveness.c: Likewise (liveness computation can use aliasing
9988         information to be more accurate).
9989         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
9990         moreover made so that "--compile-all" uses the given optimization
9991         flags and not the default ones.
9992         * aliasing.c: Alias analysis (new file).
9993         * aliasing.h: Likewise.
9994         * Makefile.am: added "aliasing.c" and "aliasing.h".
9995         
9996 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
9997
9998         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
9999         OP_L opcodes.
10000
10001 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
10002
10003         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
10004         fp >= end_of_stack exit condition, as it is not needed, and it might
10005         become true for fp eliminated frames.
10006
10007 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
10008
10009         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
10010         coded offsets.
10011
10012 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
10013
10014         * mini-arm.c: fixed alignment of doubles/longs to match
10015         the C ABI (bug #76635).
10016
10017 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
10018
10019         * aot.c: fix compilation with --enable-minimal=aot.
10020
10021 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
10022
10023         * mini-arm.c: fixed compatibility with the new
10024         floating point emulator package for compares.
10025
10026 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
10027
10028         * mini.c : reverted sig->pinvoke changes (r51396-51397).
10029
10030 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
10031
10032         * mini-exceptions.c (print_stack_frame): Output to stderr.
10033         (mono_handle_native_sigsegv): Ditto.
10034
10035 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
10036
10037         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
10038         OP_LCONV_TO_OVF_I implementation.
10039
10040         * mini-amd64.c: Add support for the throw->branch exception 
10041         optimization.
10042
10043         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
10044         when the catch clause catches a more general exception, i.e. Object.
10045
10046 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
10047
10048         * cpu-ia64.md: Remove unused opcodes.
10049
10050         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
10051         specific defines for architectures defining USE_SIGACTION.
10052
10053         * mini-ia64.c: Fix some warnings.
10054
10055         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
10056         version seemed to skip a frame.
10057
10058 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
10059
10060         * mini.c: Clean up the usage of sig->pinvoke flag. Now
10061         only calls which are made to native code use this flag.
10062
10063 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
10064
10065         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
10066         varargs methods as well.
10067         
10068         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
10069         which have save_lmf set. Reorganize methods prologs a bit.
10070
10071         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
10072         debugger to the proper place.
10073
10074 2005-10-29  Martin Baulig  <martin@ximian.com>
10075
10076         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
10077         when running inside the debugger until the debugger has support
10078         for it.
10079
10080 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
10081
10082         * mini.h: Fix a warning.
10083
10084 2005-10-24  Miguel de Icaza  <miguel@novell.com>
10085
10086         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
10087         we expose publicly, this returns the string.
10088
10089 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
10090
10091         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
10092         with fp elimination.
10093
10094 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
10095
10096         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
10097         native stacktrace using the glibc 'backtrace' function if available.
10098
10099 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
10100
10101         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
10102
10103         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
10104         handle SIGSEGVs received while in native code.
10105
10106         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
10107         code, call mono_handle_native_sigsegv which will abort the runtime
10108         after printing some diagnostics, instead of converting it into a
10109         confusing NullReferenceException.
10110
10111 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
10112
10113         * cpu-pentium.md: Remove unused opcodes.
10114
10115 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
10116
10117         * mini-amd64.h (MonoLMF): Add rsp field.
10118
10119         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
10120         the lmf too.
10121
10122 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
10123
10124         * mini-codegen.c (get_register_spilling): Fix some warnings.
10125
10126 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
10127
10128         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
10129         elimination during exception handling. Enable fp elimination by
10130         default.
10131
10132         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
10133         elimination.
10134
10135 2005-10-16  Martin Baulig  <martin@ximian.com>
10136
10137         * mini-exceptions.c
10138         (mono_debugger_run_finally): New public method for the debugger.
10139
10140 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
10141
10142         * debug-mini.c (mono_debug_init_method): Fix warning.
10143
10144         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
10145         the 'exname' parameter const to fix some warnings.
10146
10147 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
10148
10149         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
10150         introduced by the previous patch.
10151
10152 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
10153
10154         * basic-float.cs: Add test for precision of float arithmetic.
10155
10156         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
10157         when loading/storing single values from/to memory.
10158
10159         * mini.c (mono_jit_compile_method_with_opt): Create the function
10160         pointers in the correct domain.
10161
10162 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
10163
10164         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
10165         introduced by previous patch.
10166         
10167         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
10168         when out_filter_idx is NULL.
10169
10170         * mini-exceptions.c: Don't run filter clauses twice during exception
10171         handling. Fixes #75755.
10172
10173 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
10174
10175         * aot.c: Add support for ldflda wrappers.
10176
10177         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
10178         #75902.
10179
10180 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
10181
10182         * mini.c, mini.h: do not consider exception handlers blocks when
10183         setting up interface variables.
10184
10185 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
10186
10187         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
10188
10189 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
10190
10191         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
10192         causes a regression.
10193
10194         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
10195
10196 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
10197
10198         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
10199         of the OP_P definitions.
10200
10201         * TODO: Add a proposal for dealing with the CEE/OP mess.
10202
10203         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
10204         optimizations from the x86 port.
10205
10206         * cpu-amd64.md: Ditto.
10207
10208         * basic.cs basic-long.cs: Add tests.
10209
10210 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
10211
10212         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
10213         Patrik Torstensson's implementation of my exception-handling
10214         optimization idea, when the exception object is not used
10215         (bug #62150).
10216
10217 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
10218
10219         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
10220         of the mul_imm optimizations from the old jit.
10221
10222 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
10223
10224         * mini.c, liveness.c: patch by Patrik Torstensson and
10225         Zoltan Varga to improve performance in methods with
10226         exception clauses.
10227
10228 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
10229
10230         * driver.c: Remove 'Globalization' entry from --version.
10231
10232 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
10233
10234         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
10235         there is a profiler interested in JIT events.
10236
10237         * aot.c: Load profile files produced by the AOT profiling module, and
10238         reorder methods based on the profiling info. Add a 'method_order' table
10239         to the AOT file to make mono_aot_find_jit_info work with the reordered
10240         methods.
10241
10242         * mini.h: Bump AOT file version info.
10243
10244 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
10245
10246         * mini-arm.h: work around what looks like a gcc bug when optimizations
10247         are enabled.
10248
10249 2005-09-28  Raja R Harinath  <rharinath@novell.com>
10250
10251         * Makefile.am (AM_CFLAGS): Don't use += to append inside
10252         conditionals.  Use ...
10253         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
10254
10255 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
10256
10257         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
10258         to determine the amount of memory to copy when passing valuetypes.
10259
10260         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
10261         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
10262
10263 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
10264
10265         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
10266         information about aot.
10267
10268 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
10269
10270         * *.c: Replace the use of {Enter,Leave}CriticalSection with
10271         macros. This will allow a deadlock debugger to easily be plugged
10272         in.
10273
10274 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
10275
10276         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
10277
10278 2005-09-27  Raja R Harinath  <rharinath@novell.com>
10279
10280         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
10281         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
10282         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
10283         ($(arch_built)) [CROSS_COMPILING]: Error out.
10284
10285 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
10286
10287         * aot.c: Add support for the no_special_static flag for classes.
10288
10289 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
10290
10291         * Reapply reverted patches.
10292
10293         * *: Revert r50174 as well.
10294
10295         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
10296
10297 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
10298
10299         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
10300
10301 2005-09-23  Miguel de Icaza  <miguel@novell.com>
10302
10303         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
10304         part of the SIG_HANDLER_SIGNATURE.  
10305
10306 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
10307
10308         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
10309         statistics.
10310
10311         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
10312         introduced by previous patch.
10313
10314 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
10315
10316         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
10317         saved registers too.
10318
10319         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
10320         upon the information returned by get_call_info ().
10321         
10322         * mini-x86.c (add_float): Fix stack size calculation.
10323         (mono_arch_call_opcode): Rewrite this so it works based up the
10324         information returned by get_call_info ().
10325         (mono_arch_get_this_vret_args): Ditto.
10326
10327 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
10328
10329         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
10330         in cinfo to determine the registers which need to be used.
10331
10332 2005-09-20  Miguel de Icaza  <miguel@novell.com>
10333
10334         * driver.c (mono_main): Add --server and --desktop flags. 
10335
10336 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
10337
10338         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
10339         registers as global registers.
10340
10341         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
10342         longer needed with the new register allocator.
10343
10344         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
10345
10346         * cpu-ia64.md: Remove unused opcodes.
10347         
10348         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
10349         
10350 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
10351
10352         * cpu-amd64.md: Remove unused opcodes.
10353
10354         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
10355         needed with the new register allocator.
10356
10357         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
10358         reg-reg moves.
10359
10360 2005-09-16  Raja R Harinath  <rharinath@novell.com>
10361
10362         * Makefile.am (check-local): Don't invoke semdel-wrapper.
10363
10364 2005-09-16  Martin Baulig  <martin@ximian.com>
10365
10366         * exceptions-amd64.c
10367         (throw_exception): Don't call mono_debugger_throw_exception() if
10368         we're a rethrow - see the FIXME in the code.
10369
10370 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
10371
10372         * mini.c (mono_init_exceptions): This only works on some architectures.
10373         
10374 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
10375
10376         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
10377         on ia64.
10378
10379         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
10380
10381         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
10382         now in mini-exceptions.c.
10383
10384 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
10385
10386         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
10387         now in mini-exceptions.c.
10388
10389 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
10390
10391         * exceptions-x86.c: Applied patch from Patrik Torstensson 
10392         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
10393
10394         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
10395         code into mini-exceptions.c. Add some assertions to it.
10396
10397 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
10398
10399         * aot.c (emit_section_change): Applied patch from "The Software Team" 
10400         (<software@solmersa.com>). Fix as errors on windows.
10401
10402 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
10403
10404         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
10405         method info into the LMF.
10406
10407 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
10408         
10409         * mini-ia64.c: Add proper unwind info for method epilogs.
10410
10411         * exceptions-ia64.c: Add some code to help debugging.
10412         
10413         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
10414
10415         * mini-exceptions.c: Fix warning.
10416
10417 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
10418
10419         * mini.c: Really fix build.
10420
10421         * mini-x86.c mini-amd64.c: Fix build.
10422
10423 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
10424
10425         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
10426
10427         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
10428         some Interlocked methods as intrinsics.
10429
10430         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
10431         for Thread methods as well.
10432
10433         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
10434
10435         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
10436
10437         * mini-ia64.c mini-x86.c mini-amd64.c 
10438         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
10439         OP_MEMORY_BARRIER.
10440         
10441         * mini.c (mono_init_exceptions): Fix build breakage.
10442
10443 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
10444
10445         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
10446         of instructions. Use the new ia64_unw_op macros for emitting unwind
10447         info.
10448
10449         * mini.c (mono_init_exceptions): Initialize exception handling
10450         related trampolines at startup.
10451
10452 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
10453
10454         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
10455
10456 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
10457
10458         * mini.c: Handle type loading errors gracefully during compilation and
10459         throw the appropriate exception.
10460
10461 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
10462
10463         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
10464         for the mono binary.
10465
10466 2005-09-09  Martin Baulig  <martin@ximian.com>
10467
10468         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
10469         the release.
10470
10471 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10472
10473         * mini-arm.h: use emulation for conv.r.un for the release.
10474
10475 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10476
10477         * mini-arm.c, objects.cs: more fixes and tests for them.
10478
10479 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10480
10481         * mini-arm.c: align structures to at least 4 bytes to be able
10482         to keep our current optimized memcpy.
10483
10484 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
10485
10486         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
10487
10488 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10489
10490         * mini.c: ignore SIGPIPE.
10491
10492 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
10493
10494         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
10495
10496         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
10497
10498 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
10499
10500         * mini.h: Add prototype for mono_allocate_stack_slots_full.
10501
10502 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10503
10504         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
10505         exception handling support.
10506         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
10507         patch by Brian Koropoff <briank@marakicorp.com>).
10508
10509 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
10510
10511         * mini.c: revert another 'optimization' which breaks when
10512         items on the eval stack need to be saved at a basic block end
10513         (bug #75940).
10514
10515 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10516
10517         * jit-icalls.c: for arrays, ensure we always provide
10518         lower bounds.
10519
10520 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
10521
10522         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
10523         
10524         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
10525
10526 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
10527
10528         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
10529         arguments in their original register.
10530
10531 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
10532
10533         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
10534         memset/memcpy.
10535
10536         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
10537         when ssapre is enabled.
10538
10539         * inssel-long.brg: Fix bug in previous patch.
10540
10541         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
10542         multiplication by a constant.
10543
10544 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
10545
10546         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
10547         icc.
10548
10549         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
10550         saving registers.
10551
10552 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
10553
10554         * inssel-arm.brg: apply changes tested by Brian Koropoff
10555         <briank@marakicorp.com>.
10556
10557 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
10558
10559         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
10560         
10561 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
10562
10563         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
10564         to the same register if dreg is just a base register.
10565         (print_ins): Improve printing of membase opcodes.
10566
10567         * inssel-x86.brg: Add optimized ldind(reg) rules.
10568
10569         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
10570
10571 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
10572
10573         * mini.c: when running under valgrind, set the stack bottom for
10574         the GC at the actual approximate stack for the app (fixes running
10575         mono with valgrind).
10576
10577 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
10578
10579         * mini.c: do no break at the first valuetype to init found
10580         (fixes bug #75791).
10581
10582 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
10583
10584         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
10585
10586 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
10587
10588         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
10589
10590 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
10591
10592         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
10593
10594 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10595
10596         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
10597
10598         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
10599         code.
10600
10601         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
10602         code.
10603
10604         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
10605         methods.
10606
10607 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
10608
10609         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
10610
10611 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10612
10613         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
10614         in the tail recursion optimization.
10615
10616         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
10617         debug info into the assembly file.
10618
10619         * iltests.il: Add test for filter regions.
10620
10621         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
10622         initial stack of filter regions. Fixes #75755.
10623
10624 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
10625
10626         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
10627         stack requirements.
10628
10629 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10630
10631         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
10632         the check for an already compiled method on non-ia64 platforms.
10633         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
10634         proper domain.
10635
10636         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
10637
10638         * inssel-x86.brg: Add some optimized call rules.
10639
10640 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
10641
10642         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
10643         method here.
10644
10645         * mini.h mini-trampolines.c: Pass the trampoline argument to 
10646         mono_arch_patch_delegate_trampoline.
10647
10648         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
10649
10650         * mini-trampolines.c: Fix build.
10651
10652         * mini-amd64.h: Add delegate trampolines.
10653
10654         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
10655
10656         * inssel-amd64.brg: Add optimized call rules.
10657         
10658         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
10659
10660         * inssel-ia64.brg: Add optimized ldind(reg) rules.
10661
10662 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
10663
10664         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
10665         change.
10666
10667         * mini-ia64.c: Remove LMF fixmes.
10668
10669         * mini-ia64.h: Remove most fields from LMF.
10670
10671         * inssel-ia64.brg (stmt): Fix unaligned access errors.
10672
10673         * mini-trampolines.c: Add support for IA64 function descriptors.
10674
10675         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
10676         for IA64 function descriptors.
10677
10678 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
10679
10680         * tramp-arm.c: patch the vtable for virtual calls. Added
10681         support code to register/unregister the LMF.
10682         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
10683         more LMF work.
10684
10685 2005-08-19  Dick Porter  <dick@ximian.com>
10686
10687         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
10688         bit value if needed.
10689
10690 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
10691
10692         * mini.c (mini_get_method): Move handling of wrapper data here.
10693
10694         * mini.c (mono_method_to_ir): Add support for dynamic methods.
10695
10696         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
10697         virtual.
10698
10699         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
10700         bblock->code does not remain empty.
10701
10702 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
10703
10704         * arrays.cs: Add regression test for #75832.
10705
10706         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
10707         rules. Fixes #75832.
10708
10709         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
10710         instruction scheduling.
10711
10712 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
10713
10714         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
10715
10716 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
10717
10718         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
10719
10720         * mini-codegen.c: Fix VC build.
10721
10722         * cpu-pentium.md: Increase length of atomic_exhange_i4.
10723
10724 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10725
10726         * mini.h: fix signature for mono_register_opcode_emulation.
10727
10728 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
10729
10730         * mini.c: Get rid of most of the helper_sig_... constants using
10731         mono_create_icall_signature ().
10732
10733 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
10734
10735         * jit-icalls.c (helper_ldstr): New helper function.
10736
10737         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
10738
10739         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
10740         throw, load the string using a helper call instead of creating a string object.
10741
10742         * aot.c: Update after LDSTR changes.
10743
10744         * mini.h: Bump AOT file version.
10745         
10746         * aot.c: Save class size info into the AOT file. Print more statistics during
10747         compilation.
10748
10749         * mini.h: Bump AOT file version.
10750
10751         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
10752         ordering of disasm cases. Fixes #74957.
10753
10754 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
10755
10756         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
10757         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
10758         the generic code needed for the ARM port.
10759
10760 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
10761
10762         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
10763         inssel-arm.brg: more ARM features and fixes.
10764
10765 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
10766
10767         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
10768         ARM port work in progress.
10769
10770 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
10771
10772         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
10773
10774         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
10775
10776         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
10777
10778         * inssel.brg (mini_emit_memset): Add support for unaligned access.
10779
10780         * *-ia64.*: Ongoing IA64 work.
10781         
10782         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
10783
10784 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
10785
10786         * TODO: Remove out-of-data todo stuff.
10787
10788         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
10789         dead code.
10790
10791         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
10792
10793         * mini.h: Bump corlib version.
10794
10795 2005-07-27  Martin Baulig  <martin@ximian.com>
10796
10797         * mini-codegen.c
10798         (create_copy_ins): Added `const unsigned char *ip' argument; set
10799         `copy->cil_code' from it.
10800
10801 2005-07-27  Martin Baulig  <martin@ximian.com>
10802
10803         * mini-exceptions.c (mono_handle_exception): Don't call
10804         mono_debugger_handle_exception() for filters.
10805
10806 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
10807
10808         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
10809         as well.
10810
10811 2005-07-26  Martin Baulig  <martin@ximian.com>
10812
10813         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
10814
10815         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
10816         helper_compile_generic_method() if the method is actually virtual
10817         and non-final.
10818
10819 2005-07-26  Martin Baulig  <martin@ximian.com>
10820
10821         * mini.c
10822         (trampoline_code): Renamed to `mono_trampoline_code' and made it
10823         public; this is now accessed directly by the debugger.
10824         (mono_generic_trampoline_code): Removed.
10825
10826         * debug-mini.c
10827         (mono_debug_init_method): Also add interncalls and wrappers.
10828
10829 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
10830
10831         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
10832
10833 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
10834
10835         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
10836
10837 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
10838
10839         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
10840
10841 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
10842
10843         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
10844         getting TLS offsets on AMD64 too.
10845
10846 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
10847
10848         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
10849
10850 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
10851
10852         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
10853         inssel-arm.brg, mini-arm.h: ARM port work in progress.
10854
10855 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
10856
10857         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
10858
10859         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
10860         to mini.c.
10861
10862         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
10863         mono_sparc_is_virtual_call ().
10864         
10865         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
10866
10867         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
10868         trampoline parameters.
10869
10870         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
10871         
10872         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
10873         to mono_arch_get_vcall_slot_addr.
10874
10875         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
10876         trampoline code.
10877
10878         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
10879
10880 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
10881
10882         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
10883
10884 2005-07-19  Martin Baulig  <martin@ximian.com>
10885
10886         * exceptions-amd64.c (throw_exception): Call
10887         mono_debugger_throw_exception() here like we're doing it on i386.
10888
10889 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
10890
10891         * mini-ia64.c: Add optimized TLS access support.
10892
10893 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
10894
10895         * mini-exceptions.c: Ongoing IA64 work.
10896
10897         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
10898
10899         * mini.c: Use the default optimization set when embedding. Fixes
10900         #75194.
10901
10902 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
10903
10904         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
10905         of trampolines to a separate file.
10906
10907         * mini-trampolines.c: New file.
10908
10909         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
10910         separate file.
10911         
10912         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
10913         amd64/ia64 code.
10914
10915         * mini-codegen.c: Fix cygwin build.
10916
10917 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
10918
10919         * mini.c: Add some minor changes needed by the IA64 port.
10920
10921         * *-ia64.*: Ongoing IA64 work.
10922
10923 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
10924
10925         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
10926         trampolines into arch-independent and arch-dependent parts.
10927
10928         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
10929
10930 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
10931
10932         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
10933
10934         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
10935         the xp-regalloc-branch for amd64.
10936
10937         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
10938         xp-regalloc-branch for x86.
10939
10940 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
10941
10942         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
10943
10944 2005-07-06  Martin Baulig  <martin@ximian.com>
10945
10946         * mini.c
10947         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
10948         (mono_jit_runtime_invoke): Likewise.
10949
10950 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
10951
10952         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
10953         on x86 too.
10954         
10955         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
10956         without loading their metadata. Reorganize the file format so exception handling+
10957         debug info is kept separate from normal method info. Create MonoJitInfo 
10958         structures for methods lazily.
10959
10960         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
10961         loading metadata.
10962         (x86_class_init_trampoline): Patch AOT class init trampolines too.
10963
10964         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
10965
10966         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
10967         in AOT code.
10968
10969         * mini.h: Bump AOT file version.
10970
10971 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
10972
10973         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10974
10975 2005-07-01  Raja R Harinath  <rharinath@novell.com>
10976
10977         * Makefile.am (check-local): Call semdel-wrapper.
10978
10979 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
10980
10981         * mini-x86.c: Revert the last change as it seems to break the build..
10982
10983 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
10984
10985         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10986         
10987         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
10988
10989 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
10990
10991         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
10992         outside of the macro, so strange stuff doesn't happen with gcc4
10993         (NEW_AOTCONST_TOKEN): Likewise.
10994
10995 2005-06-28  Martin Baulig  <martin@ximian.com>
10996
10997         * mini.c (mini_class_is_system_array): New static method; use this
10998         instead of `klass->parent == mono_defaults.array_class' everywhere
10999         since this also works for the new generic array class.
11000
11001 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
11002
11003         * inssel.brg: Remove warnings.
11004
11005 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
11006
11007         * mini-ia64.c: Ongoing IA64 work.
11008
11009         * basic-float.cs: Add float->i1 conversion test.
11010
11011         * iltests.il: Add conv.u4 test.
11012
11013 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
11014
11015         * inssel-long.brg: Fix bug caused by last change.
11016
11017 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
11018
11019         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
11020         BSDs.  Allows the x86 JIT to work on OSX86
11021
11022 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
11023
11024         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
11025         u4->i8 conversion.
11026
11027         * mini-ia64.c: Ongoing IA64 work.
11028
11029 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
11030
11031         * mini-ia64.c: Ongoing IA64 work.
11032
11033         * driver.c: Clean up jit_code_hash as well when using --regression.
11034
11035         * inssel-long.brg: Fix long->i4/u4 conversion rules.
11036
11037         * basic-long.cs: Add tests for long->u4 conversion.
11038
11039 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
11040
11041         * mini.c: Take mono_get_domainvar out of macros. This makes sure
11042         that we do not depend on undefined C behavior: the order stuff
11043         gets evaluated within an expression. Fixes mono when compiled on
11044         GCC 4.
11045
11046 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
11047
11048         * *-ia64.*: Ongoing IA64 work.
11049
11050         * aot.c: Lower memory usage while loading AOT methods.
11051
11052         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
11053
11054         * mini.h: Bump AOT file format version.
11055
11056 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
11057
11058         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
11059
11060 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
11061
11062         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
11063         not on callee assembly). Fixed some comments.
11064
11065 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
11066
11067         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
11068         it gets proper disassembly.
11069         (emit_method_info): Remove some dead code.
11070
11071         * mini.c (mini_method_compile): Allways allocate the GOT var in
11072         mono_method_to_ir for emulating opcodes.
11073
11074 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
11075
11076         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
11077         before freeing the code memory. Fixes #74990.
11078
11079         * objects.cs: Add regression test for #74992.
11080
11081         * liveness.c: Extend live ranges of arguments to the beginning of the
11082         method. Fixes #74992.
11083
11084         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
11085         so it points into the faulting instruction.
11086
11087 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
11088
11089         * jit-icalls.c (mono_imul_ovf): Add exception handling.
11090
11091         * *-ia64.*: Ongoing IA64 work.
11092
11093         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
11094
11095 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
11096
11097         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
11098
11099         * *-ia64.*: Ongoing IA64 work.
11100
11101 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
11102
11103         * basic-long.cs: Add tests for add/sub.ovf.
11104
11105         * basic.cs: Add tests for sub.ovf.
11106
11107         * *-ia64.*: Ongoing IA64 work.
11108
11109 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
11110
11111         * *-ia64.*: Ongoing IA64 work.
11112
11113         * basic.cs: Add conv.ovf.i4.un test.
11114
11115 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
11116
11117         * mini.c: (remove_block_if_useless) Fixed bug 75061.
11118         
11119 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11120
11121         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
11122
11123 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
11124
11125         * *-ia64.*: Ongoing IA64 work.
11126
11127 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11128
11129         * trace.[ch]:
11130         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
11131
11132 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
11133
11134         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
11135
11136 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
11137
11138         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
11139
11140         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
11141         of a call is callable by a near call.
11142
11143 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
11144
11145         * mini-ia64.c: Ongoing IA64 work.
11146
11147 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
11148
11149         * genmdesc.c: Make the generated array non-static.
11150
11151         * inssel-long.brg: Fix LSHR_IMM rule.
11152
11153         * *-ia64.*: Ongoing IA64 work.
11154
11155         * *-ia64.*: Ongoing IA64 work.
11156
11157 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
11158
11159         * *-ia64.*: Ongoing IA64 work.
11160
11161         * *-ia64.*: Ongoing IA64 work.
11162         
11163         * mini-ia64.c: Ongoing IA64 work.
11164
11165         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
11166
11167 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
11168
11169         * objects.cs basic-calls.cs: Move some tests to objects.cs.
11170         
11171         * objects.cs basic-long.cs: Move some tests to objects.cs.
11172
11173 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
11174
11175         * *-ia64.*: Ongoing IA64 work.
11176
11177         * iltests.il: Add a new test.
11178
11179         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
11180         newobj. Fixes #75042.
11181
11182 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
11183
11184         * *-ia64.*: Ongoing IA64 work.
11185         
11186         * *-ia64.*: Ongoing IA64 work.
11187         
11188         * *-ia64.*: Ongoing IA64 work.
11189
11190         * basic.cs objects.cs: Move tests accessing static variables as well.
11191
11192         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
11193
11194 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
11195
11196         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
11197
11198         * driver.c: Always print failed tests.
11199
11200         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
11201         frame pointer.
11202
11203         * *ia64*: Ongoing IA64 work.
11204
11205 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
11206
11207         * basic.cs: Add tests for add.ovf. Fix warnings.
11208
11209 2005-05-18  Miguel de Icaza  <miguel@novell.com>
11210
11211         * driver.c (mono_main): Avoid crash if no argument is passed to
11212         --break;  Do not use g_error, but f_printf.   And fix all other
11213         ocurrences of the same crash.
11214
11215 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
11216
11217         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
11218         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
11219         Fixes #74742.
11220
11221 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
11222
11223         * *-ia64.*: Add beginnings of IA64 backend.
11224
11225         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
11226
11227 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
11228
11229         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
11230         Fixes #74925.
11231
11232         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
11233
11234         * mini-amd64.c: Fix a warning.
11235
11236 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
11237
11238         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
11239         in float_neg. Fixes #74897.
11240
11241         * mini-amd64.c (emit_call): Fix another near call bug.
11242
11243 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
11244
11245         * declsec.c: Keep the appdomain information in the structure. Added a 
11246         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
11247         value gets overwritten).
11248         * declsec.h: Set the default MonoArray for the the stack to 6. Added
11249         an MonoAppDomain member to MonoSecurityFrame.
11250         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
11251         used in the stack walk. Now use a MonoArray which grow (double) when
11252         it gets full.
11253
11254 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
11255
11256         * mini.c: Re-enabled runtime cleanup, since running threads should
11257         now properly stop when exiting.
11258
11259 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
11260
11261         * mini-codegen.c: New file contaning the arch-independent local
11262         register allocator. Not used by any architectures yet.
11263
11264         * mini.h linear-scan.c: Merge some changes from the 
11265         mini-xp-local-regalloc branch.
11266
11267 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
11268
11269         * mini-amd64.c (emit_call): Fix calls to native functions when the
11270         runtime is compiled as a shared library. Fixes #74756.
11271
11272         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
11273         on a literal field. Fixes #74751.
11274
11275 2005-04-25  Raja R Harinath  <rharinath@novell.com>
11276
11277         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
11278
11279 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
11280
11281         * objects.cs: Add missing null casting test.
11282
11283 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
11284
11285         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
11286         in wrapper methods. Also rename 'address' variable to 'offset'.
11287
11288 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
11289
11290         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
11291         warnings.
11292         
11293         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
11294
11295         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
11296         work on windows.
11297
11298 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
11299
11300         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
11301
11302 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
11303
11304         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
11305         just the last bytes.
11306
11307 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
11308
11309         * aot.c (mono_compile_assembly): Fix warning.
11310
11311         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
11312         by the _MSC_VER stuff.
11313
11314 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
11315
11316         * inssel-long.brg: Fix #74588.
11317
11318         * cpu-amd64.md: Fix #74591.
11319
11320         * iltests.il: Add new regression tests.
11321
11322 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
11323
11324         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
11325         valuetype.
11326
11327 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
11328
11329         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
11330
11331         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
11332         from Bill Middleton <flashdict@gmail.com>.
11333
11334 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
11335
11336         * arrays.cs: Add new regression test. Fix warnings.
11337
11338 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
11339
11340         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
11341         and leakage in CKFINITE.
11342
11343         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
11344         this to a null op since it is called on amd64 too.
11345
11346         * exceptions-amd64.c (get_throw_trampoline): Align stack.
11347
11348         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
11349         body since this is not used on amd64.
11350         
11351         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
11352
11353         * mini-amd64.c: Remove obsolete fixmes.
11354
11355         * mini.c (print_method_from_ip): Fix debugging support.
11356
11357 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11358
11359         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
11360         so that expressions that don't give much gain are not reduced.
11361         * ssapre.h: Likewise.
11362
11363 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
11364
11365         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
11366
11367         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
11368
11369         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
11370
11371 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
11372
11373         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
11374
11375         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
11376
11377 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
11378
11379         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
11380         stack touching.
11381
11382         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
11383
11384         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
11385
11386         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
11387
11388         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
11389         MONO_ARCH_USE_SIGACTION. Fixes #74252.
11390
11391         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
11392
11393         * mini-x86.c: Fix up stack overflow handling.   
11394
11395         * exceptions.cs: Add new regression test.
11396
11397 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
11398
11399         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
11400         mono_jit_thread_attach.
11401
11402         * mini.c (mono_method_to_ir): Verify called method is not abstract.
11403
11404 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
11405
11406         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
11407         avoid calling constructors using callvirt.
11408
11409         * inssel.brg: Fix #74073.
11410
11411 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
11412
11413         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
11414         compilation with non-GCC compilers.
11415         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
11416         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
11417
11418 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
11419
11420         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
11421         klass->interface_offsets (will likely fix bug#74073).
11422
11423 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
11424
11425         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
11426
11427 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
11428
11429         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
11430         to amd64_div_reg_size ().
11431         
11432         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
11433
11434 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
11435
11436         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
11437
11438 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
11439
11440         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
11441
11442 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
11443
11444         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
11445         
11446         * mini.c (mono_precompile_assembly): Load and precompile referenced
11447         assemblies as well. Fixes #74015.
11448
11449 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
11450
11451         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
11452
11453 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
11454
11455         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
11456         a lot of checks and (anyway) permissions cannot work until corlib is 
11457         loaded.
11458
11459 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
11460
11461         * mini-ppc.c: fixed ABI issue on sysv/ppc.
11462
11463 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
11464
11465         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
11466         calls (fixes bug#72824).
11467
11468 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
11469
11470         * mini.c: fix tail recursion elimination (see test in bug#73936).
11471
11472 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
11473
11474         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
11475         some fp functions in sse2 mode.
11476
11477 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
11478
11479         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
11480
11481 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
11482
11483         * mini.h mini.c: Add mono_get_jit_tls_key ().
11484
11485         * mini-x86.c: Enable fast TLS support on windows.
11486
11487 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
11488
11489         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
11490         * mini.c: Check for p/invoke method when generating code. If a
11491         p/invoke method, or it's class, isn't decorated with [Suppress
11492         UnmanagedCodeSecurity] then generate code to call System.Security.
11493         UnmanagedDemand (only if the security manager is active).
11494
11495 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
11496
11497         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
11498         last change as it seems to cause strange crashes.
11499         
11500 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11501
11502         * *.c: handle unsafe function pointers where needed.
11503
11504 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
11505
11506         * mini.c (mono_jit_free_method): Remove the fixme too.
11507
11508 2005-03-15  Miguel de Icaza  <miguel@novell.com>
11509
11510         * mini.c: As discussed, make the code actually free the delegate
11511         thunk now, to enable the debugging of delegate problems, use
11512         MONO_DEBUG=1 when running Mono. 
11513
11514         This takes also care of parts of the leaks as seen by Joe.
11515
11516 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
11517
11518         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
11519         thread_tls_offset calculation.
11520
11521 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
11522
11523         * declsec.c: Reworked linkdemand checks for icall. The previous code
11524         was using the declaration code (untrusted) and didn't work as expected
11525         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
11526         specific case.
11527
11528 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
11529
11530         * iltests.il: Add new localloc test.
11531
11532         * mini-amd64.c: Handle large stack allocations the same way as on
11533         windows if stack overflow handling is working.
11534         
11535         * mini-amd64.c: Allocate the signal stack using mmap.
11536
11537         * mini.c (sigsegv_signal_handler): Fix reading of context.
11538
11539         * mini-exceptions.c: Fix up stack overflow handling.
11540
11541         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
11542
11543         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
11544
11545         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
11546
11547         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
11548
11549         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
11550         tramp_init functions as they are no longer needed.
11551
11552 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
11553
11554         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
11555         
11556         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
11557
11558         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
11559         
11560         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
11561         support that now.
11562
11563         * mini-ops.h: Add OP_LMUL_IMM.
11564
11565         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
11566         long mul/div opcodes as intrinsic.
11567
11568         * mini-amd64.c (emit_call): Handle the case when the callee might be
11569         an AOT method.
11570
11571 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
11572
11573         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
11574         extra safe.
11575         
11576         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
11577
11578         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
11579
11580 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
11581
11582         * mini.c (mono_codegen): Don't leak here, to help people running
11583         monogrind.
11584
11585 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
11586
11587         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
11588         conversions in sse2 mode.
11589
11590         * basic-float.cs: Add regression test.
11591         
11592         * mini-amd64.c: Reenable sse2.
11593
11594 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
11595
11596         * mini-amd64.c: Disable sse2 until some regressions are fixed.
11597
11598 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
11599
11600         * driver.c: Copyright text should include 2005.
11601         
11602 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
11603
11604         * cpu-amd64.md (load_membase): Fix more max lengths.
11605
11606 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
11607
11608         * cpu-amd64.md (load_membase): Fix max length.
11609
11610         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
11611
11612         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
11613
11614         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
11615         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
11616
11617         * basic-float.cs: Add rounding regression test.
11618
11619         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
11620
11621 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
11622
11623         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
11624         structures in registers for pinvoke wrappers.
11625
11626 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
11627
11628         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
11629
11630 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
11631
11632         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
11633         wrapper to mono_jit_thread_attach.
11634
11635         * mini.c (mini_jit_thread_attach): New jit icall.
11636
11637         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
11638         native->managed wrappers.
11639
11640         * exceptions.cs: Add new regression test.
11641
11642         * mini.c (optimize_branches): Check regions in the cbranch to throw
11643         block case as well. Fixes #73242.
11644
11645 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
11646
11647         * mini.c: thread safety fixes.
11648
11649 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
11650
11651         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
11652         patching stuff, since delegates use jump trampolines so there is
11653         no caller.
11654
11655         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
11656         jump trampolines.
11657         
11658         * tramp-amd64.c: Fix build.
11659
11660         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
11661         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
11662
11663         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
11664         Rename this to mono_arch....
11665         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
11666
11667         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
11668
11669         * mini-amd64.c (emit_call): If both the caller and the callee is
11670         guaranteed to have 32 bit addresses, emit a normal call.
11671
11672         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
11673
11674         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
11675         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
11676         method_ptr inside delegates.
11677
11678 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
11679
11680         * mini.c (mono_jit_free_method): Free the method info even if the native code is
11681         invalidated. Fixes #73001.
11682
11683         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
11684
11685         * mini-x86.c: Only use stdcall for pinvokes on windows.
11686
11687 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
11688
11689         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
11690         * mini-x86.c: remove unreliable __thread var offset detection,
11691         use the correct accessors and enable by default.
11692
11693 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
11694
11695         * mini.c (mono_jit_free_method): Fix memory leak.
11696
11697 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
11698
11699         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
11700
11701 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
11702
11703         * cpu-amd64.md: Fix lengths of atomic opcodes.
11704
11705 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
11706
11707         * driver.c: try to not imply using ICU is any good.
11708
11709 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
11710
11711         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
11712         functions as inline ops.
11713
11714         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
11715         some Interlocked functions as inline ops.
11716
11717         * mini.c (move_basic_block_to_end): Fix bug in last patch.
11718
11719         * mini.h (MonoBasicBlock): Reorganize fields a bit.
11720
11721         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
11722
11723         * mini.c: Add support for OP_NOT_TAKEN.
11724
11725         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
11726         structures in registers for pinvoke wrappers.
11727
11728         * mini-amd64.c: Fix warnings.
11729
11730 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
11731
11732         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
11733
11734         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
11735
11736         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
11737         address instead of loading the address from it.
11738
11739         * mini-x86.c: Add support for returning small structs in registers
11740         on Win32. Fixes part of #70864.
11741         
11742 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
11743
11744         * trace.c (get_token): Improve error checking.
11745
11746 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
11747
11748         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
11749
11750 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
11751  
11752         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
11753         it can be reused for MonoClass.
11754         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
11755         _LINKDEMAND.
11756
11757 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
11758
11759         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
11760         instead of a MonoReflectionMethod. The method information wasn't used
11761         when displaying SecurityException details (but will be now).
11762
11763 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
11764
11765         * Makefile.am : windows build fix.
11766
11767 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
11768
11769         * iltests.il: Add new regression test.
11770
11771         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
11772         #72522.
11773
11774 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
11775  
11776         * mini.c: Moved linkdemand check into helper function check_linkdemand
11777         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
11778         LDFTN, LDVIRTFTN).
11779
11780 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
11781
11782         * declsec.c: Added statistics counter for different kinds of 
11783         LinkDemands.
11784         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
11785         (and commented) declaration.
11786         * mini.c: Added statistics counter for security Demand code 
11787         generation. Added display of security statistics.
11788
11789 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
11790
11791         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
11792         Fix compilation errors under gcc-2.95.
11793
11794 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
11795
11796         * mini.c, driver.c: Use the new jit trampoline hashtable
11797
11798 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11799
11800         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
11801
11802 2005-02-11  Martin Baulig  <martin@ximian.com>
11803
11804         * debug-mini.c (mono_debug_close_method): Free the line number array.
11805
11806 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
11807
11808         * aot.c: Break up large methods into smaller ones. Share GOT slots for
11809         icalls.
11810
11811         * mini.h: Bump AOT file format version. 
11812
11813 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
11814
11815         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
11816         APTC and P/Invoke.
11817         * declsec.h: Added macros to get/set lazyly initialized security 
11818         informations about assemblies. Added new enum for different type of
11819         possible LinkDemand violation. Added function to check LinkDemands.
11820         * mini.h: Added a field to MonoCompile to hold any security violation
11821         detected when JITting a method (so it can be thrown later).
11822         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
11823         and CEE_CALLVIRT. Added code to throw exception at the end of
11824         mini_method_compile (note: the exception is unhandled right now).
11825
11826 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
11827
11828         * mini.c, jit-icalls.c: use the managed implementation of
11829         memset for initobj and memset, to avoid managed <-> unmanaged
11830         transitions.
11831
11832 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
11833
11834         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
11835         optimization if it would need a GOT var.
11836
11837         * basic.cs: Add tests for constant propagation and switch statements.
11838
11839         * ssa.c: Fix out-of-range constant propagation and switch statements.
11840
11841 2005-02-09    <vargaz@freemail.hu>
11842
11843         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
11844
11845 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
11846
11847         * cpu-amd64.md (load_membase): Fix max length of load_membase.
11848
11849 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11850
11851         * mini.c: update to new signature of mono_class_get_allocation_ftn().
11852
11853 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
11854
11855         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
11856         arithmetic operations.
11857
11858 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
11859
11860         * mini-ppc.c: add a workaround for broken user code that
11861         DllImports vararg functions with non-vararg signatures.
11862
11863 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
11864
11865         * mini.c (mono_jit_compile_method_inner): Add detection and a 
11866         meaningfull error message for assemblies written in Managed C++.
11867
11868         * tramp-amd64.c mini-amd64.h: Add support for 
11869         create_trampoline_from_token ().
11870
11871         * aot.c mini-x86.c abcremoval.c: Applied patch from
11872         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
11873
11874 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
11875
11876         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
11877         which takes a MonoImage/token as parameter instead of a MonoMethod.
11878
11879         * aot.c: Use the new trampoline for initializing vtables.
11880
11881         * aot.c: Add support for ldfld/stfld_remote wrappers.
11882
11883         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
11884         rules for compare <MEM>, IMM.
11885
11886         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
11887
11888         * aot.c: Handle inherited finalizers correctly.
11889
11890 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
11891
11892         * inssel.brg (stmt): Add a missing _setup_... ().
11893
11894         * aot.c: Save some parts of the class state to the AOT file and use it
11895         to recompute that state when a class is initialized.
11896
11897         * mini.c: Install AOT hooks into the runtime.
11898
11899         * mini.h: Bump AOT file format version.
11900         
11901         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
11902         Fixes #72148.
11903
11904         * iltests.il: Add new test.
11905
11906 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
11907
11908         * mini.c: fix typo.
11909
11910 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
11911
11912         * mini.c: setup the statistical profiler in the thread attach
11913         callback to cope with the new single thread code.
11914
11915 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
11916
11917         * mini-ppc.c: ensure we have enough room for the profiler
11918         calls (fixed bug#72084).
11919
11920 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
11921
11922         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
11923         it.
11924
11925 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11926
11927         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
11928
11929 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11930
11931         * ssapre.c: Fixed an issue with down safety (this allows IronPython
11932         to succesfully execute parrotbench).
11933         * ssapre.h: Likewise.
11934
11935 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11936
11937         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
11938         variable for stores to method arguments (fixes a SSAPRE issue).
11939
11940 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11941
11942         * mini.c: handle value types in dup, fixes gen-112.cs.
11943
11944 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
11945
11946         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
11947         sequence for calls in dynamic methods to avoid thunks.
11948
11949 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
11950
11951         * mini.c: correctly remove dynamic methods from the hashtable.
11952
11953 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11954
11955         * driver.c: Disabled SSAPRE until fix the bug that appears
11956         in IronPython's parrotbench.
11957
11958 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
11959
11960         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
11961
11962         * mini.c (mono_method_to_ir): Revert the previous change.
11963         
11964         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
11965         when AOT compiling.
11966
11967         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
11968         mono_jit_info_table_find () etc. when running under valgrind.
11969
11970         * inssel.brg: Fix warnings.
11971
11972         * mini-exceptions.c: Fix warnings.
11973
11974 2005-01-31  Martin Baulig  <martin@ximian.com>
11975
11976         * driver.c (compile_all_methods_thread_main): Don't try to compile
11977         generic methods or anything which has type parameters.
11978
11979 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
11980
11981         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
11982
11983         * TestDriver.cs: Add --verbose flags.
11984
11985         * graph.c ssa.c: Fix 64 bit warnings.
11986         
11987         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
11988         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
11989         Fix 64 bit warnings.
11990
11991         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
11992         variable not spotted by gcc.
11993         
11994         * mini-amd64.c inssel-amd64.brg: Applied patch from  
11995         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
11996         X86_COMPARE_MEMBASE opcodes.
11997
11998         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
11999
12000 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
12001
12002         * *: MonoMethod->signature might be NULL now. You *MUST* use
12003         mono_method_signature.
12004
12005 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
12006
12007         * driver.c (compile_all_methods_thread_main): Compile the methods
12008         without invoking cctors.
12009
12010 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
12011
12012         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
12013         * basic-calls.cs: test for the above.
12014
12015 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
12016
12017         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
12018         MonoJitInfo changes.
12019
12020 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
12021
12022         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
12023         eagerly if it contains dynamic methods.
12024         
12025         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
12026
12027         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
12028         trace, it is now computed by an icall from trace_ips.
12029         
12030         * mini-exceptions.c: Fix a warning.
12031
12032 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
12033
12034         * mini-exceptions.c: don't bother getting stack trace info if
12035         it's not going to be used.
12036
12037 2005-01-27  Raja R Harinath  <rharinath@novell.com>
12038
12039         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
12040         ssapre-mini-ops.h.
12041
12042 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
12043
12044         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
12045
12046         * aot.c: Avoid calling mono_method_get_header () if not needed.
12047
12048         * mini.h: Bump AOT file format version.
12049         
12050         * mini.c (mono_emit_native_call): Allocate a GOT var here.
12051
12052         * mini.c (mono_print_tree): Print more info for calls.
12053
12054 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
12055
12056         * declsec.h: Remove warning by adding missing include for marshal.h
12057
12058 2005-01-26  Martin Baulig  <martin@ximian.com>
12059
12060         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
12061         `ip' twice.
12062
12063 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
12064
12065         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
12066         flags.
12067
12068         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
12069
12070         * aot.c (mono_compile_assembly): Fix a warning.
12071
12072 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
12073
12074         * declsec.c: Look for security attributes on the original MonoMethod 
12075         (and not the wrapped one). This fix permissions on icalls.
12076
12077 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
12078
12079         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12080
12081         * mini.c (mono_allocate_stack_slots): Add a fixme.
12082
12083         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12084
12085 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
12086
12087         * inssel.brg: optimize casts of sealed types (more
12088         optimizations waiting for fixes in remoting).
12089
12090 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
12091
12092         * inssel.brg (stmt): Add another dummy rule.
12093
12094         * driver.c: Fix warnings.
12095
12096         * driver.c (mono_main): If running under valgrind, instruct glib to use
12097         the system allocation functions so valgrind can track the memory
12098         allocated by the g_... functions.
12099
12100         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
12101
12102         * mini-ops.h: Add OP_DUMMY_STORE opcode.
12103
12104         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
12105
12106         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
12107         variables in try regions.
12108
12109         * mini.c (mini_method_compile): Don't disable optimizations on large
12110         methods when AOT compiling.
12111
12112         * mini.c (mono_allocate_stack_slots): New arch independent method to 
12113         allocate stack slots. Not yet used.
12114
12115 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
12116
12117         * debug-mini.c (mono_debug_close_method): Plug some leaks.
12118
12119 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
12120
12121         * mini-ppc.c: make the branch info relative as the code
12122         buffer can be reallocated.
12123
12124 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
12125
12126         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
12127         * driver.c: Removed the AOT/security restriction. Now initialize the
12128         security manager (in metadata) if --security is used.
12129         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
12130         rather than the pointer to declarative security, when AOT is used.
12131
12132 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
12133
12134         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
12135         basic blocks, reduced intrinsic exception throwing code size.
12136
12137 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
12138
12139         * driver.c (mini_usage): Reorder the usage screen.
12140
12141 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
12142
12143         * mini.c (mono_resolve_patch_target): Fix warning.
12144
12145 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
12146
12147         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
12148         previous patch.
12149
12150         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
12151
12152         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
12153         breaks the amd64 build.
12154
12155         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
12156         register allocation. Fixes #71454.
12157
12158         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
12159
12160         * arrays.cs: Add new regression test.   
12161
12162 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12163
12164         * ssapre.c: Turned usage of snprintf to GString.
12165         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
12166         (I left it on by mistake in my previous commit).
12167
12168 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
12169
12170         * mini.c, cfold.c, basic-calls.cs: preserve side effects
12171         on cond branch optimization (fixes bug# 71515).
12172
12173 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12174
12175         * abcremoval.c: Fixed bug 71062.
12176         * abcremoval.h: Likewise.
12177
12178 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12179
12180         * mini.c: Added a new functionality to optimize_branches, the removal
12181         of useless basic blocks, and fixed some problem in the removal of
12182         critical edges; some utility functions added for both purposes.
12183         * ssapre.c: Added complex expression support, and fixed bug 70637.
12184         * ssapre.h: Likewise.
12185         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
12186         enabled in SSAPRE.
12187         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
12188         * driver.c: Re-enabled SSAPRE.
12189
12190 2005-01-19  Martin Baulig  <martin@ximian.com>
12191
12192         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
12193         the result of mono_get_method_constrained().
12194
12195 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
12196
12197         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
12198         manager.
12199
12200 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
12201
12202         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
12203         be detected.  Fixes #59296.
12204
12205 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
12206
12207         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
12208         which can happen. Fixes #71361.
12209
12210 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
12211
12212         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
12213         manager.
12214
12215 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
12216
12217         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
12218         appdomain-unload.exe to fail.
12219         
12220         * mini.c: Fix some memory leaks.
12221
12222 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
12223
12224         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
12225         Fixed bug and sped up some codepaths.
12226
12227 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
12228
12229         * mini.c: Fix some memory leaks.
12230
12231         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
12232         conversion.
12233
12234         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
12235
12236         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
12237         #71320.
12238
12239         * iltests.il: Add regression test for #71320.
12240
12241 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
12242
12243         * mini.c (mono_codegen): Fix installation of profiler hooks.
12244
12245         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
12246
12247 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
12248
12249         * mini.h, mini.c, cfold.c: optimize access to enum
12250         readonly fields, too. Eval conditional branches if possible
12251         to perform unreachable code removal in more cases.
12252
12253 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
12254
12255         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
12256
12257         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
12258         code manager.
12259
12260         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
12261         WinXP DEP. Fixes #71244.
12262
12263 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
12264
12265         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
12266
12267 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
12268
12269         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
12270
12271 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
12272
12273         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
12274         changes.
12275
12276         * mini.h: Bump AOT version.
12277
12278         * mini.h (MonoCompile): Change exvar to a hash table.
12279
12280         * mini.c: Allocate a separate exvar for each handler block.
12281
12282         * mini.c: Get rid of the computation of filter_lengths, its not needed.
12283
12284         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
12285         ex var with the pending exception and only throw if the two are equal.
12286         Fixes #68552.
12287         
12288         * exceptions.cs: Add tests for rethrow and nested catch clauses.
12289
12290         * mini-x86.c: Fix warnings.
12291
12292         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
12293         used by all the ports now.
12294
12295         * aot.c: Add write-symbols and save-temps options.
12296
12297 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
12298
12299         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
12300
12301 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
12302
12303         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
12304         operations.
12305
12306         * tramp-s390.c: Check vtable slot belongs to the domain.
12307
12308         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
12309         as per other platforms.
12310
12311         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
12312
12313 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
12314
12315         * driver.c: we don't run the Main() code in a subthread anymore.
12316
12317 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
12318
12319         * mini.c: added experimental rtc support in the statistical
12320         profiler: if the user has the permission, more accurate statistics
12321         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
12322         The MONO_RTC value must be restricted to what the linux rtc allows:
12323         power of two from 64 to 8192 Hz.
12324
12325 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
12326
12327         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
12328
12329 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
12330
12331         * mini-ppc.c: better icache flush for smp.
12332
12333 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
12334
12335         * mini-amd64.c (emit_move_return_value): Fix memory leak.
12336
12337         * mini-x86.c (get_call_info): Add the get_call_info () code from the
12338         amd64 port, not yet used.
12339
12340 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
12341
12342         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
12343         a struct type.
12344
12345 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
12346
12347         * driver.c: Added --security option to activate the security manager.
12348         Right now this will allow code generation for declarative demands and
12349         is disabled when AOT is specified.
12350         * mini.c: Add code generation for declarative security demands.
12351         * mini.h: Add mono_use_security_manager as an extern gboolean.
12352
12353 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
12354
12355         * aot.c (mono_compile_assembly): Speed up compilation a bit by
12356         emitting more dense assembly code.
12357
12358         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
12359         exception throwing stuff.
12360
12361 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
12362
12363         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
12364         dead code.
12365
12366         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
12367         left in by mistake.
12368
12369         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
12370         fixed.
12371
12372         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
12373
12374         * tramp-*.c: Only patch vtable slots if the object is in the current
12375         domain. Fixes appdomain-unload.exe.
12376
12377         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
12378         
12379         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
12380         x86 branch.
12381
12382 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
12383
12384         * mini.c (reverse_branch_op): New helper function.
12385
12386         * mini.c (optimize_branches): Run the new optimization only on 
12387         platforms which support it. Also reverse all kinds of branches.
12388
12389         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
12390
12391         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
12392         a throw statement.
12393
12394         * mini.c (optimize_branches): Reverse not-equals branches if the false
12395         bblock is a throw. This happens a lot of time with argument checking in
12396         corlib.
12397
12398         * mini.c (mono_codegen): Add support for placing basic blocks after
12399         the function epilogue.
12400
12401         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
12402         function epilogue.
12403         
12404 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
12405
12406         * mini.c (setup_stat_profiler): Only set this up if the platform
12407         supports ITIMER_PROF.
12408
12409 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
12410
12411         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
12412         previous patch.
12413
12414         * inssel.brg: Fix a warning.
12415
12416 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
12417
12418         * mini.c: added support for statistical profiler 
12419         (run with: --profile=default:stat).
12420
12421 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
12422
12423         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
12424
12425         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
12426
12427         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
12428         related to global registers from the amd64 port.
12429
12430 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
12431
12432         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
12433
12434         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
12435         with global registers.
12436         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
12437
12438         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
12439
12440 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
12441
12442         * debug-mini.c (encode_value): Fix off-by-one.
12443
12444         * aot.c (encode_value): Likewise.
12445
12446         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
12447
12448 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
12449
12450         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
12451         AOT.
12452
12453         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
12454         
12455         * aot.c (emit_method_info): Increase size of temp buffer.
12456
12457         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
12458         the AOT case.
12459
12460 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
12461
12462         * aot.c (emit_method_info): Fix build.
12463         
12464         * aot.c: Further rework of the AOT file format to reduce the size of
12465         the method info data.
12466
12467         * mini.h: Bump AOT file format version.
12468
12469 2004-12-27  Martin Baulig  <martin@ximian.com>
12470
12471         * mini.c (mini_get_method): New static method; call
12472         mono_get_method_full() and mono_get_inflated_method().
12473         (mono_method_to_ir): Use mini_get_method() instead of
12474         mono_get_method_full(). 
12475
12476 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
12477
12478         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
12479
12480 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
12481
12482         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
12483
12484         * inssel-amd64.brg: Add some optimization rules.
12485
12486 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
12487
12488         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
12489         standard not GC'd stuff is fine.
12490
12491 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
12492
12493         * aot.c: Rework the AOT file format to get rid of most of the global
12494         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
12495
12496         * mini.h: Bump AOT file format version.
12497         
12498 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
12499
12500         * mini.h: Bump AOT file format version.
12501
12502         * aot.c (mono_aot_is_got_entry): New function to determine if an 
12503         address is inside a GOT.
12504
12505         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
12506
12507         * cpu-pentium.md: Increase the maximum size of some instructions which
12508         might involve a got access.
12509         
12510         * mini.c (get_method_from_ip): Another debug helper function.
12511
12512         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
12513         when got var accesses are created during the decompose phase.
12514
12515         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
12516
12517         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
12518         argument mini_compile_method and to MonoCompile, and use this to
12519         determine whenever a given method is compiled for AOT. This allows the
12520         other methods compiled during AOT compilation to be free of AOT stuff,
12521         so the backends does not need to add special support for them by
12522         creating a fake GOT etc.
12523
12524         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
12525         longer needed.
12526
12527 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
12528
12529         * mini.c (mono_method_to_ir): It turns out that some of the
12530         x-appdomain wrappers are lax with types, so just ignore this for
12531         all wrappers.
12532
12533         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
12534         at the vtable->klass. If it is non-shared code we can just use the
12535         vtable.
12536
12537 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
12538
12539         * mini-ppc.c: access MonoDomain from tls, too.
12540
12541 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
12542
12543         * declsec.c: Removed unused variable (and related warning ;-)
12544
12545 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
12546
12547         * iltests.il: New test for LDELEMA on an array of ref types.
12548
12549         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
12550         all ldelema's on reftypes.
12551         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
12552         it was the wrong place to put it.
12553
12554         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
12555         register to pop to make this cleaner, at the request of Paolo.
12556
12557 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
12558
12559         * mini-ops.h (OP_GETHASHCODE): New op.
12560
12561         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
12562
12563         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
12564         operation.
12565
12566         For a microbenchmark, this reduces the cost of Hashtable.get_Item
12567         by 25%.
12568         
12569         * mini-x86.c (mono_arch_output_basic_block): Rather than
12570
12571         add ebp, 4
12572
12573         Emit
12574
12575         pop edx
12576
12577         The first is 3 bytes while the second is 1. This saves 36 kb on
12578         mscorlib, quite a big saving. When bootstraping mcs, I was able to
12579         see a small boost because of icache locality.
12580
12581         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
12582
12583 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
12584
12585         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
12586         started code sharing with the generic code.
12587
12588 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
12589
12590         * mini-ppc.c, cpu-g4.md: added code for direct access to
12591         tls data slots.
12592
12593 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
12594
12595         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
12596          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
12597         to OP_TLS_GET.
12598
12599 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
12600
12601         * declsec.c|h: Added functions to cache the declarative stack modifiers
12602         in MonoJitInfo and to create a security frame from a MonoJitInfo 
12603         structure.
12604         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
12605         created. Register internal calls for System.Security.SecurityFrame::
12606         _GetSecurityFrame and _GetSecurityStack.
12607         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
12608         the definitions for the new stack walk/callback mechanism.
12609         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
12610         first security frame for LinkDemands and InheritanceDemands) and
12611         GetSecurityStack for Demands. Both use the new mono_walk_stack code
12612         from lupus.
12613         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
12614         walk initialization (lupus).
12615
12616 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
12617
12618         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
12619         idiom.
12620         (handle_loaded_temps): Do not create a temporary variable for
12621         things that we know are temps. They will never be modified.
12622         (mono_spill_call): Set MONO_INST_IS_TEMP
12623         (mono_emulate_opcode): ditto
12624         (emit_tree): ditto
12625         (mono_method_to_ir.CEE_DUP): ditto
12626
12627 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
12628
12629         * mini.c (type_to_eval_stack_type): Make this handle the void type
12630         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
12631         (emit_tree): use ip_in_bb to special case some common idioms
12632         Update all callers to pass in the IP.
12633         (mono_method_to_ir): Make CEE_CALL* do the above as well.
12634
12635         This gives us a nice 2% speedup in mcs bootstrap.
12636
12637         * mini-x86.c (peephole_pass): Peephole pass to make
12638         mov  [foo], eax
12639         push [foo]
12640
12641         into
12642
12643         mov [foo], eax
12644         push eax
12645
12646         * mini.c (ip_in_bb): new method.
12647         (mono_method_to_ir): use this method rather than doing the hash
12648         lookup ourselves.
12649
12650         * linear-scan.c (mono_linear_scan): When expiring actives, you
12651         don't need to keep around variables that expire on this
12652         instruction. This makes it so that:
12653              a = b + 1
12654         will turn into:
12655              store (ebx add (ebx, 1))
12656         which will become
12657              add ebx, 1
12658
12659 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
12660
12661         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
12662         combination to avoid doing two copies. Fix up problems with previous
12663         patch.
12664
12665         * mini.c: Fix 64 bit warnings.
12666
12667         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
12668
12669 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
12670
12671         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
12672         changes from the x86 code.
12673
12674         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
12675
12676 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
12677
12678         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
12679         throwing code to reduce its size, unify the AOT and non-aot code and 
12680         get rid of relocations in the AOT case.
12681
12682         * mini-x86.h mini.c exceptions-x86.c 
12683         (mono_arch_get_throw_corlib_exception): New arch specific function to 
12684         raise corlib exceptions which doesn't require relocations in the 
12685         caller.
12686
12687         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
12688
12689 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
12690
12691         * mini.c (mono_emit_method_call): Only allocate the got var when it is
12692         needed.
12693
12694         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
12695         in the AOT case.
12696
12697 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12698
12699         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
12700         with add function when used from Inc/dec atomic 
12701         functions. Re-enabled optimization on x86.
12702         * mini-ops.h: renamed atomic_add functions to
12703         allow _add to match the Interlocked::Add and
12704         _add_next to match Interlocked::Inc/Dec.
12705
12706 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
12707
12708         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
12709         linking of BBs to the end BB, and enabled SSAPRE also with
12710         consprop and copyprop (which was prevented by that bug).
12711
12712 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12713
12714         * mini-x86.c: disabling the Interlocked optimizing code. 
12715
12716 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
12717
12718         * aot.c (load_aot_module): Move reading of got_addr after the AOT
12719         file version check.
12720         
12721 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12722
12723         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
12724         interlocked optimization due lack of support on x86, rewrote 
12725         exchange to take into account that base may be in eax.
12726         
12727         xsp works again; activated Interlocked optimizing code.
12728         
12729 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
12730
12731         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
12732
12733 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
12734
12735         * mini-ops.h: Add new opcodes.
12736
12737         * mini.h: Add new patch types. Add got_var to MonoCompile.
12738
12739         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
12740         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
12741         make it work with all kinds of patchable code.
12742
12743         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
12744         address of the GOT, and referencing entries in the GOT.
12745
12746         * mini.c: Add code to load the GOT address if needed by an opcode.
12747
12748         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
12749         independent AOT code on the x86 using an elf-style Global Offset Table.
12750
12751 2004-12-14  Raja R Harinath  <rharinath@novell.com>
12752
12753         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
12754
12755 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12756
12757         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
12758         when running xsp.
12759
12760 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
12761
12762         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
12763         of Interlocked:Increment/Decrement/Add as inline ops.
12764         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
12765
12766 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
12767
12768         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
12769         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
12770
12771 2004-12-12  Duncan Mak  <duncan@ximian.com>
12772
12773         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
12774         again. `patch_info->table_size' is no longer valid after Zoltan's
12775         commit #37636.
12776
12777 2004-12-12  Martin Baulig  <martin@ximian.com>
12778
12779         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
12780         if we are the "real" method, ie. not an inlined method inside it.
12781
12782 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
12783
12784         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
12785         before we look in the special fields table. This fixes
12786         ../tests/thread-static-init.cs.
12787
12788 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12789
12790         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
12791         for Array get_Rank and get_Length. Fixes bug #70465.
12792
12793 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
12794
12795         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
12796         separate structure to reduce the size of MonoJumpInfo.
12797
12798 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
12799
12800         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
12801
12802 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
12803
12804         * mini.c (mini_get_inst_for_method): Changed to allow ports
12805         to return a MonoInst instead of opcode 
12806         (renamed mini_get_opcode_for_method to better reflect the new functionality)
12807         
12808         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
12809         Allow ports to return a created MonoInst instead of op-code, will enable
12810         new optimizations.
12811         (renamed mini_get_opcode_for_method to better reflected the functionality)
12812
12813 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
12814
12815         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
12816
12817 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
12818
12819         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
12820         Fixes #69985.
12821
12822 2004-12-08  Martin Baulig  <martin@ximian.com>
12823
12824         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
12825         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
12826
12827 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
12828
12829         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
12830         correctly.
12831
12832         * exceptions.cs: Disable some tests which depend on properties of x86 fp
12833         arithmetic.
12834
12835 2004-12-08  Raja R Harinath  <rharinath@novell.com>
12836
12837         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
12838
12839 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
12840
12841         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
12842         bug introduced by the previous patch.
12843
12844 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12845
12846         * mini-ppc.c, objectc.cs: handle large structs passed by value
12847         (fixes bug #69972).
12848
12849 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
12850
12851         * mini-ppc.c: OP_ARGLIST implementation from
12852         Geoff Norton  <gnorton@customerdna.com>.
12853
12854 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
12855
12856         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
12857         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
12858
12859 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12860
12861         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
12862
12863 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12864
12865         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
12866         support.
12867
12868 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
12869
12870         * mini-sparc.c: Zero out localled-ed memory.
12871
12872         * iltests.il: Add tests for zeroing out localloc-ed memory.
12873
12874 2004-12-04  Martin Baulig  <martin@ximian.com>
12875
12876         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
12877         mono_method_get_signature_full().       
12878
12879 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
12880
12881         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
12882         and some utility functions (always for SSAPRE), integrated SSAPRE.
12883         * mini.h: Likewise.
12884         * driver.c: Added ssapre option.
12885         * ssa.c: Small fix on OP_ARG handling.
12886         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
12887         * Makefile.am: Likewise.
12888
12889 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
12890
12891         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
12892         now in the xp code.
12893
12894         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
12895         icall.
12896
12897 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12898
12899         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
12900         
12901         * cpu-s390.md : Increase instruction length of oparglist.
12902
12903         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
12904
12905 2004-11-30  Martin Baulig  <martin@ximian.com>
12906
12907         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
12908         virtual generic methods.  We call a special helper_compile_generic_method()
12909         icall to retrieve the method from the vtable, inflate and compile
12910         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
12911
12912         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
12913
12914 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
12915
12916         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
12917
12918 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
12919
12920         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
12921         Fixes #69929.
12922
12923 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
12924
12925         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
12926         platforms with PIC aot.
12927
12928 2004-11-28  Martin Baulig  <martin@ximian.com>
12929
12930         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
12931         Fixes gen-112.cs.
12932
12933 2004-11-28  Martin Baulig  <martin@ximian.com>
12934
12935         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
12936         the result of mono_type_get_underlying_type() to check whether
12937         we're byref.
12938
12939 2004-11-26  Martin Baulig  <martin@ximian.com>
12940
12941         * mini.c
12942         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
12943         in the g_assert().
12944
12945 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
12946
12947         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
12948         the same way as the other arguments so they won't get clobbered.
12949
12950         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
12951         calls through R11 since it is clobbered by the trampoline code.
12952
12953 2004-11-26  Raja R Harinath  <rharinath@novell.com>
12954
12955         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
12956         pick up in-tree mscorlib.dll.
12957
12958 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
12959
12960         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
12961
12962         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
12963         runtime data/code are now stored in a table similar to the GOT in ELF. 
12964         This allows the code itself to be position independent.
12965
12966         * aot.c: Fix loading of referenced assemblies after the lazy assembly
12967         loading changes.
12968
12969         * aot.c: Attach ELF type (object/function) directives to all global
12970         symbols.
12971
12972         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
12973
12974         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
12975
12976         * mini-amd64.h: Turn on PIC AOT code.
12977
12978         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
12979         returning the offset within an OP_AOTCONST instruction where the GOT
12980         offset needs to be added.
12981
12982         * mini.h: Bump AOT file format version.
12983
12984 2004-11-25  Martin Baulig  <martin@ximian.com>
12985
12986         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
12987         uninflated generic methods.
12988
12989 2004-11-25  Martin Baulig  <martin@ximian.com>
12990
12991         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
12992
12993 2004-11-24  Martin Baulig  <martin@ximian.com>
12994
12995         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
12996         original klass (this only applies for generic instances).
12997
12998 2004-11-24  Martin Baulig  <martin@ximian.com>
12999
13000         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
13001         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
13002         that array).
13003
13004 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
13005
13006         * mini.c (mono_method_to_ir): Disable inlining for methods containing
13007         localloc. Fixes #69678.
13008
13009         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
13010         
13011 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
13012
13013         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
13014         used SSE registers on pinvoke calls. Fixes #69774.
13015
13016 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
13017
13018         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
13019         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
13020
13021 2004-11-23  Raja R Harinath  <rharinath@novell.com>
13022
13023         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
13024         Refer directly to the mcs/ tree.
13025
13026 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13027
13028         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
13029         Check if a trampoline for a synchronized method is required. 
13030
13031 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
13032
13033         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
13034         with localloc if needed. Throe arithmetric exception in
13035         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
13036         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
13037
13038 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
13039
13040         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
13041         types before switching on type.  Fixes #69622.
13042
13043 2004-11-19  Raja R Harinath  <rharinath@novell.com>
13044
13045         * Makefile.am (check-local): New.  Integrate into 'make check'.
13046         (MCS,RUNTIME): Define using in-tree mono and mcs.
13047         (ILASM): New.
13048         (%.exe): Use $(ILASM).
13049
13050 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
13051
13052         * mini-ppc.c: adjust initial prolog size (bug #69691).
13053
13054 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
13055
13056         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
13057         #69664.
13058
13059 2004-11-17  Raja R Harinath  <rharinath@novell.com>
13060
13061         * Makefile.am (clean-local): Rename from 'clean'.
13062
13063 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13064
13065         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
13066         to mono_arch_is_int_overflow. 
13067         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
13068         SIGFPE events.
13069
13070 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
13071
13072         * declsec.c|h: New files to support declarative security attributes.
13073         Added function to check if a method has (applicable) security.
13074         * mini.c|h: Add check for declarative security attributes in
13075         mono_method_check_inlining.
13076         * Makefile.am: Added declsec.c and declsec.h to the build.
13077
13078 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
13079
13080         * mini.c, mini.h: update to keep dynamic code info per-domain.
13081
13082 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
13083
13084         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
13085         (mini_init): Get rid of it from here too.
13086
13087 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
13088
13089         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
13090         implemented OP_RETHROW (patch by Geoff Norton
13091         <gnorton@customerdna.com>).
13092
13093 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
13094
13095         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
13096         between appdomains.  Fixes appdomain-unload on PPC.
13097
13098 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
13099
13100         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13101         mini-exceptions.c: handle the new wrapper types.
13102         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
13103         token value as a MonoClass* when compiling a wrapper.
13104         mono_jit_create_remoting_trampoline now takes an additional
13105         MonoRemotingTarget parameter.
13106         
13107 2004-11-10  Martin Baulig  <martin@localhost>
13108
13109         * mini.c (mono_method_to_ir): Use `generic_container->context'
13110         rather than creating a new one.
13111
13112 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13113
13114         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
13115
13116         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
13117
13118 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
13119
13120         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
13121         the experimental aot cache stuff.
13122
13123 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
13124
13125         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13126         mini-exceptions.c: update to exception clause structure changes.
13127
13128 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
13129
13130         * exceptions-x86.c (throw_exception): Fix warnings.
13131
13132         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
13133         for OP_RETHROW.
13134
13135 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
13136
13137         * exceptions-sparc.c (get_throw_exception): Really fix this.
13138
13139 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
13140
13141         * tramp-*.c: we no longer support icalls without wrappers, so
13142         a bit of code can be removed here
13143
13144 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
13145
13146         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
13147         patch.
13148
13149         * cpu-sparc.md: Add op_rethrow.
13150
13151         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
13152
13153         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
13154
13155         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
13156         * mini-ops.h: Add OP_RETHROW.
13157
13158         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
13159
13160         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
13161
13162 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
13163         
13164         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
13165         Makes the output much easier to read
13166
13167 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
13168
13169         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
13170         prevents another huge leak when compiling with ssa. Secondly, the
13171         performance of doing this rather than freeing the lists is much
13172         better. GList does a lock every time you allocate a list link,
13173         so that it can use a memory pool. So, it is better to just use
13174         a memory pool of our own.
13175         
13176         * ssa.c, linear-scan.c: replace g_list_remove_link with
13177         g_list_delete.  The remove one does not free the GList, so we were
13178         leaking memory. On -O=all --compile-all with corlib, this cut down
13179         3 MB of allocations.
13180
13181 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
13182
13183         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
13184
13185         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
13186
13187         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
13188         into a new function mono_create_jit_trampoline ().
13189
13190 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
13191
13192         * trace.c (get_spec): Allow tracing of classes without a namespace.
13193
13194 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
13195
13196         * mini.c: Fix pointer overwrite in mini_method_compile.
13197
13198 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
13199
13200         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
13201         The darwin ABI needs some special handling for 1 and 2 byte structs
13202         Lets use lbz/lhz instead of lwz everywhere.
13203         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
13204         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
13205         Use stb/sth for the former, and put the latter always on stack instead of in
13206         argument registers.
13207
13208 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
13209
13210         * trace.c (is_filenamechar): Add '_'.
13211
13212 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
13213
13214         * mini-s390.c: Fix prolog length to allow for large trace requirements.
13215
13216         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
13217
13218 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
13219
13220         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
13221         depends on libmonogc. Fixes #68805.
13222
13223 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
13224
13225         * mini.c (mono_jit_free_method): Provide extra information for
13226         this error.  Currently this leaks, but will be turned into a
13227         developer option in the future.
13228
13229 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
13230
13231         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
13232
13233 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
13234
13235         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
13236         boundary. Fixes reading of PATCH_INFO_R4 and R8.
13237         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
13238
13239 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
13240
13241         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
13242         trampolines for AOT code.
13243
13244 2004-10-22    <vargaz@freemail.hu>
13245
13246         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
13247         constructed types. Fixes #68136.
13248
13249 2004-10-21  Martin Baulig  <martin@ximian.com>
13250
13251         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
13252         if it returns true, unwind the stack to the call instruction.
13253
13254 2004-10-21    <vargaz@freemail.hu>
13255
13256         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
13257
13258         * mini.h: Bump AOT version number.
13259
13260         * objects.cs: Add another test for unbox trampolines.
13261
13262         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
13263         valuetype methods.
13264
13265 2004-10-20    <vargaz@freemail.hu>
13266
13267         * driver.c: Add SHARED to the set of optimizations tested.
13268
13269         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
13270
13271         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
13272         used by CEE_NEWARR.
13273
13274         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
13275
13276 2004-10-20  Martin Baulig  <martin@ximian.com>
13277
13278         * mini-exceptions.c (mono_handle_exception): Call
13279         mono_debugger_handle_exception() to tell the debugger about
13280         catch/finally clauses.
13281
13282 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
13283
13284         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
13285
13286         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
13287         #68447.
13288
13289 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
13290
13291         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
13292         methods as their native size, fixed bug #57543, #57545.
13293         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
13294         This saves a temporary register and mullw call down into 1 (minor perf
13295         increase for cases like sum = sum * 5;  This use to translate into:
13296             li r11,5
13297             mullw r28,r28,r11
13298         It now translates to
13299             mulli r28,r28,5
13300
13301 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
13302
13303         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
13304         #68388.
13305
13306 2004-10-11  Martin Baulig  <martin@ximian.com>
13307
13308         * mini.c (mono_method_to_ir): If we're a generic method, get the
13309         MonoGenericContainer from our MonoMethodNormal and create a
13310         MonoGenericContext from it.
13311
13312 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
13313
13314         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
13315
13316         * basic-long.cs: Add test for checked i8->i2 cast.
13317
13318 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13319
13320         * inssel-ppc.brg: added a couple of speedup rules.
13321
13322 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
13323
13324         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
13325         to speed up rebuilds.
13326
13327 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13328
13329         * mini-s390.c: Minor fix to OP_OR_IMM.
13330
13331 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
13332
13333         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
13334         better. Fixes appdomain-unload.exe on sparc.
13335
13336 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
13337
13338         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
13339         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
13340         see bug 67324.
13341
13342 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
13343
13344         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
13345
13346 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
13347
13348         * mini.c: Always generate a field read/write wrapper for members
13349         of the class MarshalByRefObject since the actual instance could
13350         be a CBO.
13351
13352 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
13353
13354         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
13355
13356 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
13357
13358         * driver.c mini.h trace.c: Move the setting of the main assembly into
13359         a separate function called mono_trace_set_assembly () and call it after
13360         actually loading the main assembly. Fixes #66872.
13361
13362 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
13363
13364         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
13365         using the code manager.
13366
13367 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
13368
13369         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
13370
13371 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
13372
13373         * cpu-amd64.md: Fix bug in previous patch.
13374         
13375         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
13376         #66650.
13377
13378 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
13379
13380         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13381         mini-exceptions.c: updates for changed stack walk interface.
13382
13383 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13384
13385         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
13386
13387 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
13388
13389         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
13390
13391 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
13392
13393         * driver.c (mini_regression_list): Do not call mono_assembly_close 
13394         since assemblies can't be unloaded.
13395         
13396 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
13397
13398         * cpu-amd64.md: Fix more instruction lengths.
13399
13400         * cpu-amd64.md: Fix lengths of some instructions.
13401
13402 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
13403
13404         * inssel.brg: Make the array ldelema check aot friendly.
13405
13406 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
13407
13408         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
13409
13410         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
13411
13412 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
13413
13414         * mini-x86.c: Fix build.
13415
13416         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
13417         mono_type_get_underlying_type () helper function to simplify code.
13418         
13419 2004-09-09  Martin Baulig  <martin@ximian.com>
13420
13421         * mini-amd64.c: Don't access `type->data.klass' directly, call
13422         mono_class_from_mono_type() instead since the type may be a
13423         generic instance.
13424
13425 2004-09-09  Martin Baulig  <martin@ximian.com>
13426
13427         * mini-amd64.c (get_call_info): Fix support for generic instances.
13428         (add_valuetype): Use mono_class_from_mono_type() to get the class
13429         since we can be a generic instance.
13430
13431 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
13432
13433         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
13434
13435 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
13436
13437         * liveness.c: reset spill costs on each scan: bug 62107
13438
13439 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
13440
13441         * exceptions-sparc.c (mono_arch_find_jit_info): remove
13442         unnecessary line that doesn't compile
13443
13444 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
13445
13446         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
13447         trampolines, make them call an error function so people can fix their
13448         code.
13449
13450 2004-09-06  Martin Baulig  <martin@ximian.com>
13451
13452         * mini.c (mono_method_to_ir): When initializing locals, handle a
13453         generic instances like a valuetype if it's a valuetype and like a
13454         class if it's a class.
13455
13456 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
13457
13458         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
13459         stack. Fixes #64674.
13460
13461         * exceptions.cs: Add test for unwinding of call arguments.
13462
13463 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
13464
13465         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
13466         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
13467         set the carry/borrow flag). The sparc and s390 implementations
13468         can now use optimized versions (and simplify the code). ppc bugfixes.
13469
13470 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
13471
13472         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
13473
13474 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
13475
13476         * inssel-amd64.brg: Remove leftover 32 bit rule.
13477
13478         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
13479
13480 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
13481
13482         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
13483         mono_arch_find_jit_info functions into a new function. Fix a memory
13484         leak.
13485
13486         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
13487         refactored code.
13488         
13489 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
13490
13491         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
13492         as well.
13493         
13494         * exceptions.cs: Add array size tests.
13495
13496         * mini.c: Allocate a separate icall wrapper for each arity of 
13497         mono_array_new_va. Fixes #59509.
13498
13499         * exceptions.cs: Add testcase for 64578.
13500
13501         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
13502
13503         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
13504         
13505 2004-09-02  Martin Baulig  <martin@ximian.com>
13506
13507         * mini.c (mono_method_to_ir): When initializing the locals, call
13508         handle_initobj() on the generic instance itself, not its
13509         underlying type.
13510
13511 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
13512
13513         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
13514         MonoJitInfo for dynamic methods.
13515
13516         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
13517
13518         * mini.c: Add support for freeing JIT data for dynamic methods.
13519         
13520 2004-09-01  Martin Baulig  <martin@ximian.com>
13521
13522         * mini-x86.c (is_regsize_var): Added support for generic
13523         instances.
13524         (mono_arch_emit_prolog): Make this compile again, use
13525         `x86_push_imm_template (code)'.
13526
13527 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
13528
13529         * mini-x86.c: make all push_imm instructions that get
13530         patched always emit the long form
13531
13532 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
13533
13534         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
13535         in a per-domain hash.
13536
13537         * mini-amd64.c (merge_argument_class_from_type): Handle generic
13538         types.
13539
13540 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
13541
13542         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
13543         work.
13544         
13545         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
13546         work.
13547
13548         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
13549         Beginnings of SSE2 support.
13550
13551         * exceptions.cs: Add more tests for checked int<->uint casts.
13552
13553 2004-08-28  Martin Baulig  <martin@ximian.com>
13554
13555         * mini-x86.c (mono_arch_instrument_epilog): Added support for
13556         generic instances.
13557
13558         * mini.c
13559         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
13560         Handle generic instances recursively.
13561
13562 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13563
13564         * iltests.il: test for conv.u8 on a constant
13565
13566 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13567
13568         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
13569         LCONV_x4 (shrun_32 (membase)).
13570
13571 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13572
13573         * inssel-x86.brg: c&p rules for push/setret of long
13574
13575 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
13576
13577         * inssel-x86.brg: c&p rules for compare (base, regvar) and
13578         compare (regvar, base)
13579
13580         * inssel-x86.brg: more burg love
13581
13582         * inssel.brg: more cleanup
13583
13584         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
13585
13586 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
13587
13588         * basic-long.cs, basic-calls.cs: new tests for optimization.
13589
13590 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
13591
13592         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
13593         patch.
13594
13595 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
13596
13597         * mini-amd64.c (read_tls_offset_from_method): Add another case.
13598         
13599 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
13600
13601         * inssel.brg (mini_emit_memcpy): use 
13602         NO_UNALIGNED_ACCESS to disable memcpy optimization
13603
13604 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
13605
13606         * mini-amd64.c: Handle generic types in various places.
13607
13608         * mini.c (mono_method_to_ir): Handle generic types in init locals.
13609
13610 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
13611
13612         * mini.c (handle_box): Fix warning.
13613
13614         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
13615
13616         * mini-amd64.h: Enable the emit_state optimization.
13617
13618         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
13619
13620         * mini-amd64.c: Add some new 64 bit peephole opts.
13621
13622         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
13623
13624         * cpu-amd64.md: sreg1 of div instructions must be %rax.
13625
13626         * mini-amd64.c: Register allocator fixes.
13627
13628         * mini.c: Add an optimization to emit_state to avoid allocation of new
13629         registers on some platforms.
13630
13631 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
13632
13633         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
13634
13635         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
13636         allocation. Fixes #63085.
13637
13638         * basic-long.cs: Add new regression test.
13639
13640         * mini-amd64.c: Register allocator improvements.
13641
13642 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
13643
13644         * mini-amd64.c (read_tls_offset_from_method): Add another code
13645         sequence.
13646
13647         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
13648         instruction sequence for nullifying class init trampolines.
13649
13650         * objects.cs: Add new regalloc test.
13651
13652         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
13653
13654 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13655
13656         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
13657         
13658         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
13659         arguments.
13660
13661         * driver.c: Fix profiling after TLS changes.
13662         
13663         * driver.c (mono_main): Set mono_stats.enabled if needed.
13664
13665         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
13666         CEE_BOX.
13667
13668 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
13669
13670         * mini-x86.c: use a 1 op rather than a 2 op tls access
13671         instruction -> faster.
13672
13673 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13674
13675         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
13676         x86 backend.
13677
13678 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
13679
13680         * exceptions-sparc.c (throw_exception): fix typo
13681
13682 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13683
13684         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
13685         set tree->dreg correctly with tls. Allow any
13686         register to be used.
13687
13688         * mini-x86.c (read_tls_offset_from_method): add new code
13689         generation pattern seen with GCC.
13690
13691
13692 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13693
13694         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
13695         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13696         exceptions-sparc.c: fix some performance issues in exception
13697         handling and setting of the stack trace for exceptions that were
13698         already thrown.
13699
13700 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
13701
13702         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
13703         x86 backend.
13704         
13705         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
13706         registers.
13707
13708 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13709
13710         This patch inlines tls access, when possible.
13711         
13712         * mini.h: new arch functions for TLS intrinsics.
13713         All platforms updated with a stub.
13714
13715         * mini.c: use the new intrinsics
13716
13717         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
13718         arch specific intrinsic for tls variables
13719
13720 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
13721
13722         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
13723         under windows.
13724
13725 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13726
13727         * mini.c: thread local allocation
13728
13729 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
13730
13731         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
13732
13733         * Makefile.am: Link against the static version of libmonogc.
13734         
13735         * Makefile.am: Link the static versions of the convenience libraries
13736         into the mono executable.
13737
13738         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
13739
13740 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
13741
13742         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
13743         on integer overflow.
13744
13745         * mini-amd64.c: Reorganize function call code.
13746
13747         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
13748
13749 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13750
13751         * inssel-x86.brg: use xor eax,eax.
13752         
13753         * basic.cs: new tests
13754
13755 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13756
13757         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
13758         in exception throwing code.
13759         
13760 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13761
13762         * inssel-x86.brg: use xor esi,esi.
13763
13764 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13765
13766         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
13767         can trace methods compiled during mini_init () too.
13768
13769         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
13770         CEE_CONV_U4.
13771
13772 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13773
13774         * Makefile.am: static link on x86 (r=zoltan)
13775
13776 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13777
13778         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
13779         code since it causes some programs to fail.
13780
13781 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
13782
13783         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
13784
13785 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
13786
13787         * mini.c: ovfops_op_map - add STACK_OBJ case for
13788         CONV_I 
13789         * basic.cs: add test_0_pin_string as test
13790         case for above.
13791
13792 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
13793
13794         * Makefile.am: build C# if srcdir != builddir
13795
13796 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13797
13798         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
13799         fall-through blocks.
13800
13801 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13802
13803         * driver.c: enable loop by default again and include abcrem in -O=all.
13804
13805 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
13806
13807         * iltests.il: Add some localloc tests.
13808
13809         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
13810
13811         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
13812         Fixes #62574.
13813
13814         * inssel-amd64.brg: Add some optimizations.
13815
13816         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
13817         for gcc-3.4.
13818
13819         * Makefile.am: Statically link mono against libmono on AMD64.
13820         
13821         * mini-amd64.c inssel-amd64.brg: Optimizations.
13822
13823 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
13824
13825         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
13826
13827         * tramp-amd64.c: Patch calling code in trampolines.
13828
13829 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
13830
13831         * mini-amd64.c: pinvoke struct passing fixes.
13832
13833 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
13834
13835         * mini-sparc.c: redo change, make mono_arch_cpu_init call
13836         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
13837
13838 2004-08-05  Duncan Mak  <duncan@ximian.com>
13839
13840         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
13841         CEE_LDELEM_ANY.
13842
13843 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13844
13845         * mini-amd64.c (emit_move_return_value): Move return value for normal
13846         calls too.
13847
13848 2004-08-05  Martin Baulig  <martin@ximian.com>
13849
13850         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
13851         `type->type'; just modify `type' itself when dealing with enums
13852         and generic instances.
13853         (check_call_signature): Make `simple_type' a `MonoType *'.
13854
13855 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13856
13857         * mini.c: Use OP_PADD to add offsets to addresses.
13858
13859         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
13860
13861 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
13862
13863         * mini-sparc.c (mono_arch_emit_epilog): fix check
13864         for folding last op into restore instruction
13865
13866 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13867
13868         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
13869         helper methods using the code manager.
13870         
13871         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
13872
13873         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
13874
13875 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13876         
13877         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
13878           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
13879
13880         * mini-s390.c: fix tail processing
13881
13882 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
13883
13884         * mini-ppc.c: mul.ovf.un exception name fix.
13885
13886 2004-08-03  Martin Baulig  <martin@ximian.com>
13887
13888         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
13889         instances; before jumping to `handle_enum', also modify `ptype'.
13890
13891 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
13892
13893         * cpu-sparc.md: fcall maximal length too small.
13894
13895 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
13896
13897         * mini-amd64.c mini.h: Add initial support for passing/returning 
13898         structures to/from pinvoked methods.
13899
13900 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
13901
13902         * mini-ppc.c: reg allocator fix.
13903
13904 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
13905
13906         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
13907
13908         * inssel.brg: Optimize memset on 64 bit machines.
13909
13910         * mini-amd64.c: Fix some vararg cases.
13911
13912 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13913
13914         * mini-s390.c: Corrected macro in emit_float_to_int
13915
13916         * s390-abi.cs: Tests to exercise the s390 ABI
13917
13918 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13919
13920         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
13921         caller saved regs.
13922
13923         * basic.cs: Add a test for add.ovf.un.
13924
13925 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
13926
13927         * mini-sparc.c: add case for OP_IDIV_UN
13928
13929 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13930
13931         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
13932         
13933         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
13934
13935 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
13936
13937         * basic.cs: regression tests.
13938
13939         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
13940         regressions.
13941
13942 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13943
13944         * basic.cs: Add a new test.
13945
13946         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
13947         and AOT. Various fixes and optimizations.
13948
13949         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
13950
13951 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
13952
13953         * mini-ppc.c: make sure temp regs are not used for global reg
13954         allocation.
13955
13956 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
13957
13958         * cpu-sparc.md: conv_i8 fix for 64bits
13959
13960         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
13961
13962 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
13963         
13964         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
13965         add opcode for cmp BYTE PTR [eax], imm.
13966
13967         * inssel.brg: Make memcpy and memset takes bases.
13968
13969 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
13970
13971         * *-amd64.*: More AMD64 work.
13972         
13973 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
13974
13975         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
13976         add a compare-not-equal opcode.
13977         
13978 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
13979
13980         * mini.c: Use mono_init_from_assembly instead of mono_init.
13981         
13982 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
13983
13984         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
13985
13986         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
13987
13988         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
13989
13990         * inssel.brg: 64 bit fixes.
13991
13992         * mini.h (MonoCallInst): Add some AMD64 specific data.
13993
13994         * mini.h: Add some OP_P opcodes.
13995
13996 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
13997
13998         * basic.cs: tests for 61797 and 61740
13999
14000 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
14001
14002         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
14003         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
14004
14005 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
14006
14007         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
14008
14009         * *-amd64*.*: Ongoing AMD64 work.
14010
14011 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
14012
14013         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
14014
14015         * *-amd64*: Ongoing AMD64 work.
14016
14017         * mini-arch.h: Add AMD64 support.
14018
14019         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
14020
14021         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
14022
14023         * mini-ops.h: Add new opcodes.
14024
14025         * Makefile.am: Add AMD64 support.
14026
14027         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
14028         rules into the inssel-long*.brg files.
14029
14030         * *-amd64.*: Add beginnings of AMD64 backend.
14031
14032 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
14033
14034         * mini.c (print_dfn): commenting out the code that prints
14035         the cil. With -O=deadce, this makes -v -v crash.
14036         
14037         * cpu-pentium.md: make checkthis have a length of 2
14038
14039 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
14040
14041         * mini-sparc.h: fix implementations of __builtin
14042         functions for Sun compiler for V9.
14043
14044 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
14045
14046         * mini.c: use the new stelem.ref wrapper
14047         * exceptions.cs, arrays.cs: new stelem.ref tests
14048
14049 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14050
14051         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
14052         new XSP should work with these changes).
14053
14054 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
14055         
14056         * inssel-{long32,x86,}.brg: trivial optimizations.
14057         
14058 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
14059
14060         * mini.c: load value when emitting box operation in
14061         constrained calls.
14062
14063 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
14064
14065         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
14066         is one byte shorter than cmp DWORD PTR [eax], 0.
14067
14068 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14069
14070         * inssel-ppc.brg: arguments on the stack are always
14071         relative to the stack pointer (spotted by Neale Ferguson).
14072
14073 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14074
14075         * exceptions-x86.c: delay appending the method name to the trace until
14076         after mono_jit_info_table_find is called, as this gets the real
14077         MonoMethod.
14078
14079 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
14080
14081         * aot.c: register roots
14082
14083 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14084
14085         * aot.c : I could just use PLATFORM_WIN32 flag.
14086
14087 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14088
14089         * aot.c : Reverting the previous fix. This time it broke linux build.
14090
14091 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14092
14093         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
14094
14095 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
14096
14097         * mini.c (handle_stack_args): Remove some more debugging code.
14098         
14099         * mini.c (handle_stack_args): Remove debug output left in by mistake.
14100
14101         * driver.c mini.h aot.c: Allow additional options to be specified with
14102         --aot and pass them to mono_compile_assembly.
14103
14104         * aot.c: Add experimental code to AOT compile all loaded assemblies
14105         on demand and save the code into a cache in the filesystem.
14106
14107         * aot.c: Add support for more wrapper methods.
14108         
14109         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
14110         58863.
14111
14112         * cpu-*.md: Remove removed opcodes.
14113
14114         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
14115         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
14116         related icalls to marshal.c.
14117
14118 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
14119
14120         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
14121
14122         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
14123
14124         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
14125
14126 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
14127         * liveness.c: If liveness is recomputated we need to reset the information
14128         for each variable. This way, if the liveness range has been narrowed
14129         by optimizations that happened after the last computation, we can return
14130         a smaller range.
14131         
14132         For example, if you have
14133         
14134         {
14135                 int i = 0;
14136                 
14137                 // Tons of code that does not affect i
14138                 
14139                 i = foo ();
14140                 ...
14141         }
14142         
14143         i = 0 is dead code and will be removed by SSA. However, when
14144         linear scan gets to the code, i will still appear to be live
14145         throughout the entire block. This prevents good register allocation.
14146
14147 2004-07-06  Martin Baulig  <martin@ximian.com>
14148
14149         * debug-mini.c (mono_debug_init_method): Allow
14150         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
14151         (mono_debug_add_icall_wrapper): New method.
14152
14153         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
14154
14155 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
14156
14157         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
14158         optimization.
14159
14160 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
14161
14162         * aot.c (mono_aot_load_method): Fix loading of debug info.
14163
14164 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
14165
14166         * aot.c: Add logging support.
14167
14168 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
14169
14170         * mini.h: Add prototype for mono_print_method_from_ip.
14171
14172         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
14173
14174         * inssel.brg: 64 bit fixes.
14175
14176         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
14177         inssel-long32.brg.
14178
14179         * Makefile.am: Add SPARC64 support.
14180
14181 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
14182
14183         * aot.c: Fix alignment problems on 32 bit platforms.
14184
14185 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
14186
14187         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
14188         SPARC64.
14189
14190         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
14191         problems.
14192
14193         * mini.h: Bump AOT file version. Some 64 bit fixes.
14194
14195 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
14196
14197         * inssel-sparc.brg: Add new rule to avoid register moves.
14198
14199         * inssel.brg: Add ldind_to_load_membase helper function.
14200
14201 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
14202
14203         * mini.c: OffsetToStringData intrinsic.
14204         
14205 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
14206
14207         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
14208
14209         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
14210         regression tests.
14211
14212         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
14213 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14214
14215         * mini.c: reinstated mono_compile_get_interface_var()
14216         on x86, too, since the change breaks the Gtk# build there as well.
14217
14218 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14219
14220         * driver.c: remove loop from the default optimizations: it seems to
14221         interact badly with some of the other options (see bug #60613).
14222
14223 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
14224
14225         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
14226         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
14227
14228 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
14229
14230         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
14231         vararg-using methods.
14232
14233 2004-06-21  Martin Baulig  <martin@ximian.com>
14234
14235         * mini/mini-exceptions.c
14236         (mono_handle_exception): Added `gpointer original_ip' argument.
14237         After calling mono_unhandled_exception(), call
14238         mono_debugger_unhandled_exception() and if that returns true,
14239         restore the context and return.
14240
14241 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
14242
14243         * mini-ppc.c: prefer the use of relative branches so
14244         they won't need to be patched in aot code (patch from Patrick Beard).
14245
14246 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14247
14248         * aot.c: patch from Patrick Beard to make the output assembly
14249         more correct for the MacOSX assembler. Small tweak to
14250         generate sane images on Linux/PPC, too.
14251
14252 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14253
14254         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
14255         case until bug #59509 is fixed (shows up in #60332).
14256
14257 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14258
14259         * mini.c: make sure the needed wrappers are compiled, too, with
14260         precomp.
14261
14262 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
14263
14264         * driver.c: remove NPTL reference in --version output.
14265
14266 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14267
14268         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
14269         generate valid assembly for the Mach-O assembler.
14270
14271 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14272
14273         * driver.c: don't include abcrem in the all optimization specifier
14274         since it slows down jit compilation too much for now.
14275
14276 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
14277
14278         * mini.c: use BIGMUL only if both operands have the same signage.
14279         * iltests.il: Test for bug 60056. (errors related to signage in
14280         BIGMUL).
14281
14282         r=lupus.
14283
14284 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
14285
14286         * mini.c, aot.c: memory leak fixes.
14287
14288 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14289
14290         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
14291
14292 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
14293
14294         * Makefile.am: remove the -static hack completely, it links in
14295         statically glib as well.
14296
14297 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
14298
14299         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
14300         * exceptions.cs: make it compile with new mcs/csc.
14301
14302 2004-06-03 Massimiliano Mantione <massi@ximian.com>
14303         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
14304         and added relevant test case.
14305
14306 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14307
14308         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
14309         regressions in gtk-sharp.
14310
14311 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
14312
14313         * exceptions.cs: New regression tests.
14314
14315         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
14316
14317 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
14318
14319         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
14320
14321 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
14322
14323         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
14324
14325         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
14326
14327 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
14328
14329         * mini.c (mono_jit_runtime_invoke): Init class in this
14330         method instead of trusting mono_jit_compile_method to
14331         do the work (because wrappers can be in object class)
14332
14333 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
14334
14335         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
14336
14337         * basic-long.cs: New regression test.
14338
14339 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
14340
14341         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
14342         and div/rem checks.
14343
14344 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
14345
14346         * Makefile.am: fix miguel's change to build mono statically against
14347         libmono (track build dependencies).
14348
14349 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
14350
14351         * cfold.c: Some glib versions do not have G_MININT32.
14352
14353 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
14354
14355         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
14356         with precision of tan, atan, sin and cos, and implemented related
14357         regressions tests (fixes bug 54467, but one new problem appeared and
14358         is not fixed yet).
14359
14360 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
14361
14362         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
14363
14364         * exceptions.cs: Add test for constant folding && division by zero.
14365
14366         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
14367         since driver.c is in libmono too, so the optimization was useless.
14368
14369         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
14370         variable to driver.c so the compiler can emit more efficient code to
14371         access them.
14372
14373 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14374
14375         * Makefile.am: don't distribute generated inssel.[ch] files.
14376
14377 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
14378
14379         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
14380         into the default appdomain. Fixes #58707.
14381
14382         * jit-icalls.c: Remove the broken approximation for truncl, doing
14383         no conversion is better.
14384
14385         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
14386         Fixes #58863.
14387
14388 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14389
14390         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
14391         of the mcrxr instruction which is not available on some processors
14392         even if it's documented to be. Implement add and sub overflow correctly
14393         (still not complete for long unsigned). Speed up icalls a bit.
14394
14395 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
14396
14397         * mini.c (mono_jit_compile_method_with_opt): Make sure that
14398         we run .cctor in the current domain instead of target_domain.
14399         
14400         Fixes bug #58558, .cctor not being called in -O=shared.
14401
14402 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14403
14404         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
14405
14406 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
14407
14408         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
14409         which can be done with an imm8, do it that way.
14410         (mono_arch_output_basic_block): ditto for a jmp
14411         (mono_arch_emit_prolog): Computate maximum offset of a label.
14412
14413 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
14414
14415         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
14416         now tries to allocate prefered physical reg's for virtual
14417         regs. This reduces the number of emited spills/loads with
14418         20-30% on our core assemblies.
14419
14420 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14421
14422         * jit-icalls.c: truncl() is not needed and trunc() is
14423         the correct thing to do anyway (bug #58287).
14424
14425 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
14426
14427         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
14428         if available.
14429
14430 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
14431
14432         * driver.c: enable loop optimizations by default.
14433
14434 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14435
14436         * mini-x86.c: fix calc of max loop size when aligning loops start.
14437
14438 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
14439
14440         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
14441         the stack.
14442
14443 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
14444
14445         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
14446         should set carry.
14447
14448         * basic-long.cs: Add tests for add/subtract of immediates with carry.
14449
14450         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
14451         
14452         * mini.c (inline_method): Allways inline some wrappers even if the cost
14453         is too large. Fixes #58785.
14454
14455         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
14456         
14457 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
14458
14459         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
14460         (crichton@gimp.org). Beginning of support for sparc/linux.
14461
14462         * mini-sparc.c: Optimize retrieval of LMF address.
14463
14464 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
14465
14466         * exceptions-ppc.c:  handle alloca in methods with clauses.
14467
14468 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
14469
14470         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
14471
14472 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
14473
14474         * mini.c: Delegate most of the abort signal work to 
14475           mono_thread_request_interruption, which also handles Stop and Suspend
14476           states.
14477
14478 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
14479
14480         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
14481         supports the save/restore lmf opcodes.
14482
14483 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
14484
14485         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
14486         by gcc-3.4 as well.
14487
14488         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
14489
14490 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
14491
14492         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
14493         methods which contain array accesses.
14494
14495         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
14496         boundaries. Fixes #58537.
14497
14498         * iltests.il: Add regression test for #58537.
14499
14500 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
14501
14502         * mini-x86.c (mono_arch_local_regalloc): Last part of
14503         fix for bug #58633 (releasing register to early).
14504
14505 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
14506
14507         * basic-long.cs: Add new regression test.
14508
14509 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
14510
14511         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
14512         register too early on the chain.
14513
14514 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
14515
14516         * mini.c (create_helper_signature): Use a helper function to reduce
14517         the code which needs to be written. Also set the calling convention of
14518         icalls on windows. Fixes #57840.
14519
14520 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14521
14522         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
14523         exceptions-ppc.c: added helper function to get the instruction address
14524         from a signal handler context.
14525
14526 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14527
14528         * helpers.c: use g_get_tmp_dir. Invokes happyness 
14529         from gonzalo.
14530
14531 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14532
14533         * helpers.c: Add new env variable to pass args to objdump.
14534         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
14535
14536 2004-05-17  Radek Doulik  <rodo@ximian.com>
14537
14538         * Makefile.am (common_sources): added abcremoval.h so it get
14539         disted and daily mono packages on go-mono.com will build again
14540
14541 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
14542
14543         * abcremoval.c: Fixed coding style, added copyright header.
14544
14545         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
14546
14547         * mini.h: Added prototype for abc removal main function.
14548
14549         * build_relations_propagation_table.pl: Added copyright header.
14550
14551 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
14552
14553         * basic-long.cs: reg test for complex ceq_long bug.
14554
14555 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
14556
14557         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
14558         reg in long and clob case (bug #58343). Fixed/added comments.
14559
14560 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
14561
14562         * mini.c (mono_jit_runtime_invoke): Follow new convention
14563         of calling the invoke method with an function pointer.
14564
14565 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
14566
14567         * ChangeLog: Fix author of memory leak patch.
14568
14569 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
14570
14571         * Makefile.am: fix make dist as well...
14572
14573
14574 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
14575
14576         * cfold.c: Made so that conversions from pointer to int4 are no-ops
14577         on archs where pointers are 4 bytes long.
14578
14579         * Makefile.am: Added abcremoval.c source file.
14580
14581         * abcremoval.c: Added abcremoval.c.
14582
14583         * abcremoval.h: Added abcremoval.h.
14584
14585         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
14586
14587         * inssel.brg: Enabled bounds check removal.
14588
14589         * mini.c: Added support for abcrem optimization.
14590
14591         * mini.h: Added abcrem optimization label.
14592
14593         * driver.c: Added support for abcrem optimization.
14594
14595         * propagated_relations_table.def: Added propagated_relations_table.def.
14596
14597 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
14598
14599         * mini.c, cfold.c: fix style.
14600
14601 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14602
14603         * mini.c: handle issue with the low-level implementation of
14604         some long opcodes (bug #54209).
14605
14606 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
14607
14608         * basic.cs: test for my new cmov stuff.
14609
14610 2004-05-13      Patrik Torstensson
14611
14612         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
14613         opt and added peephole documentation.
14614
14615 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
14616
14617         * tramp-ppc.c: rewrote the generic trampoline code.
14618
14619 2004-05-11      Patrik Torstensson
14620
14621         * mini-x86.c: optimize long shl/shr asm code (one less branch)
14622
14623 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
14624
14625         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
14626
14627         * mini.h mini.c dominators.c: Applied patch from Derek Woo
14628         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
14629
14630         * mini.c: Add new icalls for AsAny marshalling.
14631
14632 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14633
14634         * tramp-ppc.c, mini-ppc.c: more cleanups.
14635
14636 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14637
14638         * mini.c: no warnings.
14639
14640 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14641
14642         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
14643
14644 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
14645
14646         * mini.c: In the thread abort signal handler, if the thread is in the
14647         process of being stoped, don't throw the Abort exception, just stop the
14648         thread.
14649
14650 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
14651
14652         * tramp-ppc.c: removed old code.
14653
14654 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14655
14656         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
14657         do some simple speed optimizations on ppc.
14658
14659 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14660
14661         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
14662         and large offsets in load/store.
14663
14664 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
14665
14666         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
14667         it causes regressions.
14668
14669 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
14670
14671         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
14672         support.
14673
14674 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14675
14676         * jit-icalls.c: remove warnings.
14677         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
14678         speedups for unsafe code.
14679
14680 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
14681
14682         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
14683
14684 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
14685
14686         * basic-calls.cs: Add new regression test.
14687
14688         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
14689         more portable.
14690
14691         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
14692
14693         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
14694         is no longer used.
14695
14696 2004-05-06      Patrik Torstensson
14697
14698         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
14699         long reg allocation in any reg (not only eax:edx) and implemented 
14700         long shl/shr ops in asm instead of helpers.
14701
14702 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
14703
14704         * mini-sparc.h: Fix warnings.
14705
14706         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
14707         stack.
14708
14709         * mini-exceptions.c (mono_handle_exception): Call the filter in a
14710         separate statement for clarity.
14711
14712         * mini-sparc.c: Update status.
14713
14714 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
14715
14716         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
14717         here.
14718
14719 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14720
14721         * inssel-ppc.brg: another small pre-release workaround:
14722         we don't do overflow detection for long_sub_un.
14723
14724 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14725
14726         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
14727         (also works around a weird ppc bug: 57957).
14728
14729 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
14730
14731         * tramp-ppc.c: trampoline fixes.
14732
14733 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
14734
14735         * mini-ppc.c: fixed typos.
14736
14737 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14738
14739         * mini-ppc.c, exceptions-ppc.c: more code saves registers
14740         at the top of the stack. Fixed typos. Use a frame registers
14741         for all the methods with exception clauses.
14742
14743 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14744
14745         * exceptions-ppc.c: restore fp registers.
14746
14747 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14748
14749         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
14750         order from the stack top (moved the stack room to save the
14751         return value for trace after the param area). Fixed corruption
14752         in restoring registers on unwind.
14753
14754 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14755
14756         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
14757
14758 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14759
14760         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
14761         and prolog/epilog for methods that use it. Allow
14762         enough param area room for varargs methods. Fix miguel's
14763         breakage in exception handling.
14764
14765 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14766
14767         * Makefile.am: run genmdesc only on current arch.
14768
14769 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14770
14771         * exceptions-x86.c:
14772         * mini-x86.h: fix the build on windows.
14773
14774 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
14775
14776         * 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.
14777
14778         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
14779
14780         * mini-exceptions.c: New file.
14781         
14782         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
14783         Move some parts of the x86 exception handling code to an 
14784         arch-independent file so it can be shared with other ports.
14785
14786 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
14787
14788         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
14789
14790 2004-04-26  David Waite  <mass@akuma.org>
14791
14792         * driver.c: remove comma from end of enumeration declaration
14793
14794 2004-04-26  Jackson Harper  <jackson@ximian.com>
14795
14796         * driver.c: parse config file before loading first assembly. This
14797         allows the user gac to be enabled/disabled. 
14798         
14799 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
14800
14801         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
14802         simpler mechanism: we do not care what is encoded initially
14803         (branch absolute or relative), we care about the code and its
14804         target.  I kept the old code for reference for now.
14805
14806         The new code tries first to determine if the jump is anywhere in
14807         the -/+32 absolute meg range, if it succeeds, it encodes using the
14808         absolute branch;  If not, it tried to find something in the
14809         relative range, if not, it uses the handle_thunk code. 
14810
14811 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
14812
14813         * exceptions-ppc.c: use the correct ip register on macosx.
14814
14815 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
14816
14817         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
14818
14819 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
14820
14821         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
14822         Raise exception on integer divide by zero by hand since the hw
14823         doesn't support it. Handle NaNs in FP compares.
14824
14825 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
14826
14827         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
14828         code reducing duplication between the platforms and enabled
14829         signal exception handling (on linux for now).
14830
14831 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
14832
14833         * exceptions-ppc.c: more macosx support.
14834
14835 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14836
14837         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
14838
14839 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
14840
14841         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
14842
14843 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
14844
14845         * iltests.il: more tests.
14846
14847 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14848
14849         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
14850         vars as well.
14851
14852 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
14853
14854         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
14855
14856 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14857
14858         * liveness.c: Mark variables as volatile in all basic blocks reachable
14859         from exception clauses.
14860
14861 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
14862
14863         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
14864         inlining.
14865
14866 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
14867
14868         * iltests.il, basic.cs: more tests for regalloc.
14869
14870 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14871
14872         * iltests.il: Some tests for register allocation modifications
14873         I have locally.
14874
14875 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
14876
14877         * exceptions.cs: Add regression test for bug #56782.
14878
14879         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
14880         original stack trace if an exception is rethrown. Fixes #56782. Oh,
14881         the beauty of fixing the same thing in 5 different files...
14882
14883 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
14884
14885         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
14886         methods.
14887
14888 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
14889
14890         * mini.c: Add support for STRWLPARRAY marshalling convention.
14891
14892 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
14893
14894         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
14895         to init the context to setup the regs pointer).
14896
14897 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14898
14899         * exceptions-ppc.c: more exceptions work.
14900
14901 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14902
14903         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
14904         not allowed.
14905
14906 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14907
14908         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
14909         can use the memory directly.
14910
14911         * cpu-pentium.md: Update documentation from a post from Zoltan. 
14912
14913         add x86_add_membase, x86_sub_membase, x86_mul_membase
14914
14915 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14916
14917         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
14918         GENERAL_REGS they were also hardcoded for all PPC ports.
14919
14920         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
14921
14922         Remove hard-coded limit for floating point registers, use
14923         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
14924
14925         Notice that in MacOS X calling conventions you can fit a lot more
14926         floating point values in registers, so I should update the PInvoke
14927         test to excercise the passing of floating point values on the
14928         stack (currently broken).
14929         
14930 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
14931
14932         * tramp-ppc.c (create_trampoline_code): Added
14933         JUMP_TRAMPOLINE_SIZE. 
14934         (ppc_magic_trampoline): Follow the pattern from
14935         x86_magic_trampoline: if code is set to zero, return. 
14936         (create_trampoline_code): Always pass MonoMethod to the jump
14937         trampoline, before it was passing a null.
14938         (mono_arch_create_jump_trampoline): Implement the jump stub, could
14939         share the code with mono_arch_create_jit_trampoline. 
14940
14941         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
14942         implemented.
14943         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
14944         implemented.  
14945
14946         * cpu-g4.md: Added length for jmp instruction, the worst case
14947         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
14948         for save_lmf).
14949
14950 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
14951
14952         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
14953
14954 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
14955
14956         * mini.c: Only set bblock->real_offset when adding a new bblock, and
14957         before each IL instruction.
14958
14959         * mini.c (CEE_BOX): Fix warnings.
14960
14961 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14962
14963         * mini.c: removed a few unused vars and extra whitespace.
14964
14965 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
14966
14967         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
14968         checks.
14969         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
14970         index.
14971         (OP_GETCHR): use the above
14972         (CEE_LDELEMA): use the above.
14973
14974         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
14975         version of the generic impl.
14976         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
14977         (CEE_LDELEMA): use the above.
14978
14979 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14980
14981         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
14982         Fixes #56317.
14983
14984         * iltests.il: Added new regression test for #56317.
14985
14986 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14987
14988         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
14989         under NetBSD. Fixes #56450.
14990
14991         * liveness.c (update_gen_kill_set): Fix previous patch.
14992
14993 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14994
14995         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
14996
14997 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
14998
14999         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
15000         ldsfld and ldsflda.
15001
15002         * inssel-sparc.brg: Add more optimizations.
15003
15004         * mini-sparc.c: Replace multiply/divide with shifts if possible.
15005
15006 2004-04-01  Martin Baulig  <martin@ximian.com>
15007
15008         * mini.c (handle_box): New static function; moved the
15009         implementation of CEE_BOX here.
15010         (mono_method_to_ir): Added `constrained_call' variable.
15011         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
15012         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
15013         mono_method_get_constrained() to get the method.
15014
15015 2004-04-01  Martin Baulig  <martin@ximian.com>
15016
15017         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
15018         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
15019         (mono_method_to_ir): We don't need these macros anymore since
15020         mono_class_get_full() already takes care of it. 
15021
15022 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15023
15024         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
15025         use @function (as doesn't accept #function here) and check the return
15026         value of system and stop if fails.
15027
15028 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15029
15030         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
15031
15032 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
15033
15034         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
15035
15036         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
15037
15038         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
15039         #56223.
15040
15041         * basic-long.cs: Add test for negation of Int64.MinValue.
15042
15043 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
15044
15045         * mini-sparc.c: Update status.
15046
15047         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
15048
15049         * exceptions-sparc.c: Fix return value in filters.
15050
15051         * inssel-sparc.brg: Fix register allocation in some rules.
15052
15053 2004-03-28  Martin Baulig  <martin@ximian.com>
15054
15055         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
15056         if neccessary.  
15057
15058 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
15059
15060         * mini-x86.c (mono_arch_patch_code): Fix warnings.
15061         
15062         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
15063         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
15064         remove unused conv_u4 opcode.
15065
15066         * mini-x86.c: Remove valgrind workaround since it slows down things
15067         even when mono is not run under valgrind.
15068
15069 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
15070
15071         * mini-sparc.c: Update status.
15072
15073         * inssel-sparc.brg: Add some optimizations.
15074
15075         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
15076         future delay slot filling. Add support for varargs, tail calls and JMP.
15077
15078         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
15079         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
15080
15081         * inssel.brg: Fix register allocation in OP_ARGLIST.
15082
15083         * inssel.brg: Fix warnings.
15084
15085 2004-03-25  Martin Baulig  <martin@ximian.com>
15086
15087         * mini.c (inflate_generic_field): Removed.
15088         (mini_get_method): Removed, use mono_get_method_full(),
15089         (mini_get_class): Removed, use mono_class_get_full().
15090         (mono_method_to_ir): Pass our generic context to
15091         mono_field_from_token().        
15092
15093 2004-03-25  Martin Baulig  <martin@ximian.com>
15094
15095         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
15096         of a `MonoMethod *'.
15097         (mini_get_method): Take a `MonoGenericContext *' instead
15098         of a `MonoMethod *'.
15099         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
15100         a new local variable called `generic_context' which holds the
15101         current `MonoGenericContext *'; use it to lookup things.
15102
15103 2004-03-24  Martin Baulig  <martin@ximian.com>
15104
15105         * mini.c (mini_get_class): New static method; if we're inside a
15106         generic instance, inflate the class if neccessary.
15107         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
15108
15109 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
15110
15111         * iltests.il: New regression test for #55976.
15112
15113         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
15114         #55976.
15115
15116 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
15117
15118         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
15119         output.
15120
15121 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
15122
15123         * liveness.c: Consider SSA stores as well as loads when making vars
15124         volatile.
15125
15126         * exceptions.cs: New regression tests for register allocation.
15127         
15128 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
15129
15130         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
15131         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
15132           domain lock only to protect puntual access to data structures.
15133           Added access lock for sighash, jit_icall_hash_name, 
15134           jit_icall_hash_addr and domain->code_mp.
15135
15136 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
15137
15138         * driver.c: Print SIGSEGV handling method.
15139
15140         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
15141
15142         * mini.c (setup_jit_tls_data): Handle case when this is called
15143         multiple times for a thread.
15144
15145         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
15146         is different from fbxx_un. Fixes #54303. Also use constants instead of
15147         magic numbers in a lot of places.
15148
15149 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
15150
15151         * exceptions.cs: Fix cctor test when --regression is used.
15152
15153 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
15154
15155         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
15156         for Linux/ppc.
15157
15158 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15159
15160         * inssel-ppc.brg: fixed register assignments for some rules.
15161
15162 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15163
15164         * exceptions.cs: Add test for exceptions in static constructors.
15165
15166         * mini.c (mono_jit_compile_method_with_out): Move the calling of
15167         static constructors outside the domain lock. Fixes #55720.
15168
15169 2004-03-17  Martin Baulig  <martin@ximian.com>
15170
15171         * mini.c (get_generic_field_inst): Removed, this'll never happen.
15172         (inflate_generic_field): Take the `MonoMethod *' instead of the
15173         `MonoClass *' and added support for generic method.
15174         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
15175         have a `field->parent->gen_params', only inflate the field if it's
15176         an open constructed type.
15177
15178 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15179
15180         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
15181         exception object instead of the preconstructed ones.
15182
15183 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15184
15185         * mini.c: reverted changed to sigsegv_signal_handler commited
15186         accidentally in the previous patch.
15187
15188 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15189
15190         * mini.c:
15191         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
15192         running --aot with an old assembly.
15193
15194 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
15195
15196         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
15197         point values.
15198
15199         * mini-sparc.c: Add support for v9 branches with prediction.
15200
15201 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
15202
15203         * mini.c (mini_init): #warning is GNUC only
15204
15205         * mini-sparc.h: implement __builtin_frame_address
15206         and __builtin_return_address for Sun C compiler
15207
15208 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
15209
15210         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
15211
15212 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
15213
15214         * basic-calls.cs: Add test for unaligned byref long argument passing.
15215
15216         * mini-ops.h: Add sparcv9 compare and branch instructions.
15217
15218         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
15219         v9 instructions if we have a v9 cpu.
15220
15221         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
15222         registers for global allocation.
15223
15224         * exceptions-sparc.c: Fixes.
15225         
15226 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
15227
15228         * liveness.c (mono_analyze_liveness): Optimized version.
15229
15230         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
15231
15232         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
15233         sparc work.
15234
15235         * basic-float.cs basic-calls.cs: New regression tests.
15236
15237 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
15238
15239         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
15240         sigaltstack implementation.
15241
15242         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
15243         
15244         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
15245         stuff if SIGSEGV_ON_ALTSTACK is not defined.
15246
15247 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
15248
15249         * mini.c: Fix warnings.
15250         
15251         * mini.c (mono_resolve_patch_target): New function which contains the
15252         arch independent part of the patching process.
15253
15254         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
15255         patching code to a separate function.
15256
15257 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
15258
15259         * mini.c (add_signal_handler): ifdef out on Windows
15260
15261 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
15262
15263         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
15264         cpu-sparc.md: Add exception handling support + other fixes.
15265
15266         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
15267         typed GC detection in --version.
15268
15269         * basic.cs exceptions.cs: New regression tests.
15270
15271         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
15272         the arch specific code can store data during a compilation.
15273
15274         * mini-ops.h: Add OP_SETFRET.
15275
15276         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
15277         function, register a separate icall for each arity, so the icalls can
15278         get a wrapper.
15279         
15280         * mini.c (mono_print_tree): Print negative offsets in a more readable
15281         form.
15282         
15283         * mini.c: Make signal handling work on sparc.
15284         
15285         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
15286
15287         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
15288
15289         * jit-icalls.c: Emulate truncl by aintl on solaris.
15290
15291         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
15292
15293 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
15294
15295         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
15296
15297 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
15298
15299         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
15300         a MarshalByRef type, inline a method that performs the check, taking into
15301         account that the object can be a proxy. Also implemented tow new opcodes:
15302         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15303         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
15304         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15305
15306 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
15307
15308         * mini-ppc.c: if a relative branch displacement is too big
15309         but it points to and area reachable with an absolute branch, 
15310         avoid the thunks.
15311
15312 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
15313
15314         * mini.c: optimize small copies in cpblk.
15315
15316 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
15317
15318         * basic-calls.cs basic-float.cs: New regression tests.
15319
15320         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
15321         negative offsets from %fp. Implement localloc. Fix local register 
15322         allocation. Fix the case when the this argument needs to be saved to
15323         the stack. Implement some missing opcodes.
15324
15325 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
15326
15327         * mini.c (mini_method_compile): Reenable global regalloc in methods
15328         with exception handlers.
15329
15330         * linear-scan.c (mono_varlist_sort): Fix warning.
15331
15332         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
15333
15334         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
15335         regalloc costs.
15336
15337         * liveness.c: Make all variables uses in exception clauses volatile, to
15338         prevent them from being allocated to registers. Fixes #42136.
15339
15340 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
15341
15342         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
15343         causes regressions.
15344
15345         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
15346         argument to mono_arch_regalloc_cost.
15347
15348         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
15349         precisely.
15350
15351 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
15352
15353         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
15354         Make the cost of allocating a variable to a register arch dependent.
15355
15356         * basic-calls.cs: Fix compilation of tests.
15357         
15358         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
15359         helper function to cut back on the number of #ifdefs needed.
15360
15361         * mini-ppc.c: Fix compilation.
15362
15363         * basic-calls.cs: New regression tests.
15364
15365         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
15366
15367         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
15368         of l0 since that is callee saved.
15369
15370         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
15371         to virtual calls.
15372
15373         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
15374         of delay instruction.
15375
15376         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
15377
15378         * mini.h (MonoCallInst): Add 'virtual' flag.
15379
15380         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
15381
15382 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
15383
15384         * *.cs: New regression tests.
15385
15386         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
15387         work.
15388
15389         * mini.c (mono_runtime_install_handlers): Fix build.
15390
15391         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
15392         'signal_stack_size' members.
15393
15394         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
15395         alternate signal stack.
15396
15397         * exceptions-x86.c: Add stack overflow handling.
15398
15399         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
15400         functions to arch independent code.
15401
15402         * mini.c (mono_print_tree): Print more detailed info for load_membase
15403         opcodes.
15404         
15405 2004-02-23  Martin Baulig  <martin@ximian.com>
15406
15407         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
15408
15409 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15410
15411         * mini-x86.c: fixed reg allocation for div/rem.
15412
15413 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
15414
15415         * driver.c (mono_main): Report some configuratio options on --version.
15416
15417 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
15418
15419         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
15420         low in the address space. Correctly flush memory in thunks where we
15421         output native code.
15422
15423 2004-02-20  Martin Baulig  <martin@ximian.com>
15424
15425         * mini.c (mini_get_method): New static method; inflate all generic
15426         methods and methods in open generic instances.
15427         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
15428         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
15429
15430 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
15431
15432         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
15433
15434         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
15435
15436 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
15437
15438         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
15439
15440         * mini-sparc.c (flushi mono_arch_output_basic_block): make
15441         it compile using Sun's compiler.
15442
15443 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
15444
15445         * 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.
15446
15447         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
15448
15449 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
15450
15451         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
15452         code.
15453         * mini-ppc.c: handle calls outside of the allowed range with thunks
15454         allocated using the code manager.
15455         * tramp-ppc.c: use the code manager to hold generated native code.
15456         Fixed the magic trampoline to just patch vtable entries.
15457
15458 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
15459
15460         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
15461         independent file.
15462
15463 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
15464
15465         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
15466         PPC.
15467
15468         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
15469         if we have a working __thread implementation.
15470
15471         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
15472         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
15473
15474 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
15475
15476         * mini-x86.c: Fix compilation under gcc 2.
15477         
15478 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
15479
15480         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
15481         contains a call to the wrapped function.
15482
15483         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
15484         OP_<CALL>_IMM opcodes, and use them under X86.
15485         
15486         * mini.c (mono_jit_find_compiled_method): Fix warning.
15487
15488         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
15489
15490         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
15491
15492         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
15493         functionality to mini.c.
15494
15495         * mini.c (mono_create_jump_trampoline): New function to create a jump
15496         trampoline. Return a compiled method instead of a trampoline if it
15497         exists. Add a cache for jump trampolines.
15498
15499         * mini.c (mono_jit_find_compiled_method): New function to return a
15500         compiled method if it exists.
15501
15502         * mini-x86.c: Call mono_create_jump_trampoline instead of 
15503         mono_arch_create_jit_trampoline.
15504
15505         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
15506         a jump trampoline. Fixes #52092.
15507         
15508 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
15509
15510         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
15511         which is not up-to-date. Add check_corlib_version () instead.
15512
15513         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
15514         have to call it.
15515         
15516         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
15517         since newer valgrind versions do not need it.
15518
15519         * mini.c (mono_jit_compile_method_with_opt): New helper function to
15520         compile a method with a given set of optimizations.
15521
15522         * mini.c: Compile icall wrappers on-demand instead of at startup.
15523
15524         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
15525         wrapper for an icall.
15526
15527 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
15528
15529         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
15530         #54063.
15531
15532         * iltests.il: Add test for non-empty stack before switch instruction.
15533
15534 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
15535
15536         * mini.c: Add support for new stringbuilder marshalling conventions.
15537
15538         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
15539
15540 2004-02-01  Martin Baulig  <martin@ximian.com>
15541
15542         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
15543         in `ginst->mtype_argv'.
15544
15545 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
15546
15547         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
15548         facilitate grepping.
15549
15550 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
15551
15552         * mini.c: fixed buglet in initobj generic implementation for references.
15553
15554 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
15555
15556         * Makefile.am: make the version script conditional.
15557         * jit-icalls.c: handle missing truncl().
15558
15559 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
15560
15561         * exceptions.cs: Add more tests for double->int conversion.
15562
15563         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
15564         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
15565
15566 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
15567
15568         * driver.c: make --verbose --version emit an error
15569         if the loaded corlib doesn't match the runtime version.
15570
15571 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
15572
15573         * mini-ppc.h: export ppc_patch().
15574         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
15575         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
15576         on par or better than on MacOSX.
15577
15578 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
15579
15580         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
15581         mono_lookup_pinvoke_call.
15582
15583         * mini-x86.c: Under windows, the default pinvoke calling convention is
15584         stdcall. Fixes #52834.
15585
15586         * mini.c (optimize_branches): Add an upper bound to the number of
15587         iterations to prevent infinite loops on strange loops. Fixes #53003.
15588
15589 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
15590
15591         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
15592         and ISINST. Fixes #52093.
15593
15594         * objects.cs (test_0_vector_array_cast): New tests.
15595         
15596 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
15597
15598         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
15599         checking in Array.Set ().
15600
15601         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
15602         #52590.
15603
15604         * object.cs (test_0_multi_array_cast): New regression test.
15605
15606 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
15607
15608         * exceptions-ppc.c: fix build on Linux/PPC.
15609
15610 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
15611
15612         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
15613         running under valgrind.
15614         (x86_magic_trampoline): Fix build bustage.
15615
15616         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
15617         negative values as well. This is needed for the encoding of the line number
15618         info, since sometimes the line numbers are not in increasing order.
15619
15620 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
15621
15622         * cpu-pentium.md (localloc): Increase the size of the localloc 
15623         instruction since it is a loop under Win32.
15624
15625         * debug-mini.c (record_line_number): Get rid of unneccesary memory
15626         allocation.
15627
15628 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
15629
15630         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
15631         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
15632         Max Horn (max@quendi.de). Fix file names in comments.
15633
15634 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
15635
15636         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
15637         avoid stack overflow.
15638         (replace_usage): Avoid uninitialized variable warnings.
15639
15640         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
15641         and taking the address of valuetype variables.
15642
15643 2004-01-03  Patrik Torstensson
15644
15645         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
15646         for other purposes than FP later on.
15647
15648 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
15649
15650         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
15651         of tail calls.
15652
15653 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
15654
15655         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
15656
15657 2003-12-30  Patrik Torstensson <p@rxc.se>
15658
15659         * mini-x86.h: Decreased number of availiable fp regs.
15660         Solves corner cases with FP spilling.
15661
15662 2003-12-23  Patrik Torstensson <p@rxc.se>
15663
15664         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
15665         for floating point stack tracking / spilling on x86. 
15666         Fixes bug #49012.
15667         
15668         * basic-float.cs: added float mul overflow test.
15669
15670 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
15671
15672         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
15673
15674 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15675
15676         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
15677         supports for cond branches that overflow the immediate
15678         overflow offset. mcs can compile simple programs.
15679
15680 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15681
15682         * exceptions-ppc.c: exception handling support wip:
15683         finally handlers get run on exception.
15684
15685 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
15686
15687         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
15688         profiling.
15689
15690 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15691
15692         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
15693         initial support for stack walking and unwinding.
15694
15695 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
15696
15697         * driver.c (mono_main): Make corlib-out-of-sync message more 
15698         descriptive. Also remove verify_corlib call.
15699
15700 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15701
15702         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
15703         not overlap with other call's arguments, too.
15704
15705 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
15706
15707         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
15708         move to arch-specific code the choice of arch-specific
15709         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
15710         * mini.c: ensure emulation calls will not interleave
15711         with other calls.
15712
15713 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
15714
15715         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
15716         the magic trampoline stack frame is dropped before executing
15717         the new method.
15718
15719 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15720
15721         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
15722         and integer to fp conversions. Added support for overflowing
15723         arguments on the stack. Reserve a couple more registers as temps.
15724         Added support for aot compilation (as output still needs to be
15725         tweaked, though).
15726
15727 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15728
15729         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
15730         Don't overwrite return register in some corner cases.
15731
15732 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
15733
15734         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
15735         static constructors when AOT compiling.
15736
15737         * driver.c (mono_main): Call mono_check_corlib_version.
15738
15739 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15740
15741         * cpu-g4.md, basic.cs: fixed div target register.
15742
15743 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
15744
15745         * mini-ppc.c, basic.cs: shl_imm fix with test.
15746
15747 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15748
15749         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
15750         structures by value. Misc fixes.
15751         * objects.cs: more tests.
15752
15753 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
15754
15755         * mini-ppc.c: lconv.ovf.i implemented.
15756
15757 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15758
15759         * mini.c:
15760         (mini_init): don't error out if someone already called g_thread_init.
15761
15762 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15763
15764         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
15765         to be any type per the spec. Fix abnormal memory usage when
15766         the same object is repeatedly thrown.
15767
15768 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
15769
15770         * mini.c: check for overruns in IL code.
15771
15772 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
15773
15774         * TODO: Add/remove some todo entries.
15775
15776 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
15777
15778         * driver.c (mono_main): Call mono_verify_corlib.
15779
15780 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
15781
15782         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
15783         This has been moved to mini.c
15784         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
15785         type being casted is marshalbyref it could be a proxy, so instead of
15786         emitting the type check code, emit a call to a runtime method that will
15787         perform the check by calling CanCastTo if needed.
15788
15789 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
15790
15791         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
15792         methods with large stack frames under Win32.
15793
15794 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
15795
15796         * Makefile.am: Distribute regression tests.
15797
15798         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
15799         at the end instead of inserting each variable into the sorted list.
15800
15801         * linear-scan.c (mono_varlist_sort): New helper function.
15802         
15803 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15804
15805         * mini.c: ensure arguments and locals are within bounds.
15806
15807 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15808
15809         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
15810         related fixes.
15811
15812 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
15813
15814         * mini.c (mono_cprop_copy_values): Fix crash.
15815
15816         * aot.c: Set verbosity back to 0.
15817         
15818 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15819
15820         * regalloc.c: complete memory leak fix by Laurent Morichetti
15821         (l_m@pacbell.net).
15822
15823 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
15824
15825         * driver.c (main_thread_handler): Revert the previous patch.
15826
15827         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
15828         under valgrind.
15829
15830         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
15831         memory from the memory pool.
15832
15833         * driver.c (main_thread_handler): Turn on all optimizations when
15834         --aot is used.
15835
15836         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
15837         an array for better performance.
15838
15839         * regalloc.c (mono_regstate_assign): Fix memory leak.
15840
15841         * debug-mini.c (mono_debug_serialize_debug_info): New function to
15842         serialize the debug info.
15843
15844         * debug-mini.c (mono_debug_add_aot_method): New function to load the
15845         debug info from the serialized representation.
15846
15847         * aot.c: Save debug info into the generated file and load it when 
15848         loading a method.
15849
15850         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15851
15852 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15853
15854         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
15855         More FP-related fixes.
15856
15857 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15858
15859         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
15860         and register allocation buglet. Hello world now runs.
15861
15862 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15863
15864         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
15865         * tramp-ppc.c: fixed class init trampoline.
15866         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
15867
15868 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15869
15870         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
15871         mini.c: more ppc changes/fixes.
15872
15873 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
15874
15875         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
15876         Also optimize the case when the arguments are the same in the caller 
15877         and in the callee.
15878
15879         * iltests.il: Add tests for tail calls with valuetype arguments.
15880
15881 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15882
15883         * mini-ppc.c: fixes for struct return type.
15884
15885 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
15886
15887         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
15888         mono_spillvar_offset() to arch-specific code.
15889
15890 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15891
15892         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
15893
15894 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
15895
15896         * exceptions-x86.c: Fix stack space leaks.
15897         
15898         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
15899         registers from the lmf if the method has save_lmf set.
15900
15901 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
15902
15903         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
15904         of icall wrappers into InvokeInDomain, since these are now per-domain.
15905
15906 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
15907
15908         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
15909         make some opcode emulation and intrinsic ops enabled/disabled 
15910         according to the architecture. More fixes.
15911
15912 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15913
15914         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
15915
15916 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15917
15918         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
15919         arch-specific handling for 'this' and struct return type to
15920         arch-specific code.
15921
15922 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15923
15924         * aot.c: prevent divide by zero error when reporting (it happened with
15925         Accessibility.dll).
15926
15927 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
15928
15929         * mini.h (inst_switch): Remove unused macro.
15930
15931 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15932
15933         * aot.c:
15934         (load_aot_module): free 'info->methods' and 'info' properly. No more
15935         "free(): invalid pointer blah" messages when you have an old aot
15936         compiled assembly.
15937
15938 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
15939
15940         * jit-icalls.c, mini.c: Added support for context static fields.
15941
15942 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
15943
15944         * mini.c (mono_method_blittable): Methods which set LastError are not 
15945         blittable either. Fixes #51108.
15946         
15947 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15948
15949         * mini.c: flush icache.
15950         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
15951
15952 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
15953
15954         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
15955
15956 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
15957
15958         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
15959         safe on IA32.
15960
15961         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
15962         vararg calls.
15963
15964         * inssel.brg (CEE_MKREFANY): Fix AOT case.
15965
15966 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
15967
15968         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
15969         instruction when the result is discarded.
15970
15971         * iltests.il (test_0_div_regalloc): New regression test.
15972
15973         * arrays.cs: Fix compilation error.
15974
15975 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
15976
15977         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
15978         float rules to inssel-x86.brg: sane architectures with FP registers
15979         don't need to implement these rules.
15980
15981 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15982
15983         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
15984
15985 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15986
15987         * mini.h, inssel-long32.brg: fixed endianess issues in int64
15988         implementation of 32 bit systems.
15989
15990 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15991
15992         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
15993         (Jeroen Zwartepoorte).
15994
15995 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
15996
15997         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
15998         the caller and the callee matches.
15999         
16000         * mini.c (mono_method_to_ir): Add comment.
16001
16002         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
16003         signbit is missing on some platforms.
16004
16005 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
16006
16007         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
16008
16009         * mini.c (setup_jit_tls_data): Call the new function.
16010         
16011         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
16012
16013         * mini-x86.c: Add experimental support for fast access to the lmf
16014         structure under NPTL/Linux 2.6.x.
16015
16016 2003-11-06  Martin Baulig  <martin@ximian.com>
16017
16018         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
16019         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
16020         the debugger.
16021
16022 2003-11-02  Martin Baulig  <martin@ximian.com>
16023
16024         * mini.c (inflate_generic_field): New static method.
16025         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
16026         generic instance and the field is declared in a generic type, call
16027         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
16028
16029 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
16030
16031         * mini.h mini.c (mono_method_same_domain): New function to return
16032         whenever the caller and the callee are in the same domain.
16033
16034         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
16035
16036 2003-10-30  Martin Baulig  <martin@ximian.com>
16037
16038         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
16039         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
16040         method parameters.
16041         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
16042         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
16043
16044 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
16045
16046         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
16047         propagation.
16048
16049         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
16050         object here, so it is in the correct appdomain etc.
16051
16052 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
16053
16054         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
16055         already done.
16056         (mono_method_to_ir): Avoid freeing the type created returned from
16057         mono_type_create_from_typespec, since it is put into an internal cache
16058         by the function. Fixes pointer.exe.
16059
16060         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
16061         trampolines for icalls and pinvokes as well. Fixes #33569.
16062
16063 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
16064
16065         * mini.c: Update after appdomain changes.
16066
16067         * mini.c (mono_jit_compile_method_inner): Allways compile native
16068         method wrappers in the root domain, since there can only be one
16069         instance of them, whose address is stored in method->info.
16070
16071 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
16072
16073         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
16074         environment variable. Instead detect automatically whenever running
16075         under valgrind using the magic macro RUNNING_ON_VALGRIND from
16076         valgrind.h.
16077
16078 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
16079
16080         * trace.c, trace.h: New files that implement the new trace option
16081         parsing. 
16082
16083         * driver.c: Document new --trace options.
16084
16085         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
16086         mini-x86.c: Apply:
16087
16088         -       if (mono_jit_trace_calls)
16089         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
16090
16091         * mini.h: prototypes.
16092         
16093 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
16094
16095         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
16096
16097         * mini.c inssel.brg: Implement typedefbyref opcodes.
16098
16099         * mini.c (mono_jit_compile_method): Remove unused local variable.
16100
16101         * mini.c (mono_jit_compile_method_inner): Ditto.
16102         
16103 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
16104
16105         * tramp-x86.c (x86_class_init_trampoline): Fix build.
16106         
16107         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
16108
16109 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
16110
16111         * mini.c (mono_no_aot): Remove unused global variable.
16112
16113         * mini.c: Thread safety fixes.
16114
16115 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
16116
16117         * mini.c (mono_create_class_init_trampoline): Add a lock around
16118         class_init_hash_addr.
16119
16120         * arrays.cs (test_0_newarr_emulation): Add new regression test for
16121         #30073.
16122
16123         * mini.c: Decompose the NEWARR instruction before decomposing its
16124         arguments. Fixes #30073.
16125
16126 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
16127
16128         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
16129         convention.
16130
16131 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
16132
16133         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
16134
16135         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
16136
16137         * driver.c: Add support for compiling icall wrappers to --compile.
16138
16139 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
16140
16141         * inssel.brg: The empty value in class->interface_offsets is -1, not
16142         0. Fixes #49287.
16143
16144 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
16145
16146         * objects.cs: New test for 'is' operator on an array of interfaces.
16147
16148 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16149
16150         * tramp-ppc.c: update trampoline code to support jumps
16151         and class initialization.
16152
16153 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
16154
16155         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
16156
16157         * inssel.brg (OP_UNBOXCAST): Fix #46027.
16158
16159         * inssel.brg (OP_UNBOX): Remove unused rule.
16160
16161         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
16162         region instead of one for each method. Fixes #47813.
16163
16164 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
16165
16166         * exceptions.cs (test_0_nested_finally): New regression test for
16167         nested exception handlers.
16168
16169         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
16170
16171         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
16172
16173         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
16174         inlining.
16175
16176         * mini.c (mono_method_check_inlining): Make the inlining limit 
16177         configurable by an environment variable.
16178         
16179         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
16180
16181         * mini.h: Bump AOT file version.
16182
16183         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
16184         token, store the image along with the token, since the token might not 
16185         refer to the same image as the method containing the relocation, 
16186         because of inlining.
16187
16188 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
16189
16190         * mini.c (mono_precompile_assemblies): New function to compile
16191         all methods in all loaded assemblies.
16192
16193         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
16194
16195         * regalloc.h regalloc.c (MonoRegState): Change the type of 
16196         iassign and fassign to int*, since they can contain large negative
16197         values if the register is spilled. Also added some comments. Fixes
16198         #45817.
16199
16200         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
16201         under Win32. Fixes #42964.
16202
16203 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
16204
16205         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
16206
16207         * aot.c: Added support for AOT compiling methods which contain calls
16208         to wrappers. Currently, only remoting-invoke-with-check wrappers are
16209         handled.
16210         
16211         * driver.c (compile_all_methods): Run the compilation in a thread
16212         managed by mono. Fixes #44023.
16213
16214         * mini.c (mono_codegen): Print full method name in verbose output.
16215
16216         * mini-x86.c (mono_arch_patch_code): Fix warning.
16217         
16218         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
16219         jumps, since the method we are jumping to might be domain-specific.
16220
16221         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
16222
16223 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16224
16225         * inssel.brg: string chars are unsigned.
16226
16227 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
16228
16229         * TODO: New todo item.
16230
16231         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
16232         which calls mono_runtime_class_init and patches the call site to
16233         avoid further calls.
16234         (mono_arch_create_class_init_trampoline): New arch specific function 
16235         to create a class init trampoline.
16236         (create_trampoline_code): Generalized so it can create
16237         class init trampolines as well.
16238
16239         * mini.c (helper_sig_class_init_trampoline): New helper variable.
16240         (mono_create_class_init_trampoline): New function to create and cache
16241         class init trampolines.
16242         (mono_find_class_init_trampoline_by_addr): New function to lookup the
16243         vtable given the address of a class init trampoline. Used by the
16244         patching process.
16245         (mono_codegen): Generate a call to a trampoline instead of
16246         mono_runtime_class_init in LDSFLD[A].
16247         (mono_codegen): Add relocations for the new trampoline.
16248         
16249         * mini.h mini-x86.c aot.c: Added a new relocation type: 
16250         MONO_PATCH_INFO_CLASS_INIT.
16251
16252         * mini.h: Bump AOT version number.
16253
16254         * aot.c: Create a copy of the loaded code instead of using the original
16255         so methods which call each other will be close in memory, improving
16256         cache behaviour.
16257         
16258         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
16259         patch since it breaks the regression tests.
16260         
16261         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
16262         for the register saving instruction sequence since the 
16263         frame_state_for function in glibc 2.3.2 don't seem to detect it.
16264
16265 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
16266
16267         * TODO: Fix todo item && remove another.
16268
16269 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
16270
16271         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
16272         previous checkin.
16273
16274         * aot.c: Moved the check for MONO_LASTAOT into the initialization
16275         function of the module.
16276
16277         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
16278         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
16279         --no-aot command line option.
16280
16281 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
16282
16283         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
16284         by Bernie Solomon (bernard@ugsolutions.com).
16285
16286         * inssel.brg: Refactor the interface offset table related code into
16287         its separate functions and add support for the AOT case.
16288
16289 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
16290
16291         * aot.c (mono_aot_get_method_inner): Fix memory leak.
16292         
16293         * aot.c: Added mono_aot_verbose variable and made all debugging
16294         output depend on the value of this variable.
16295
16296         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
16297         method_label and info_label.
16298
16299         * mini.h mini-x86.c aot.c: Added a new relocation type 
16300         MONO_PATCH_INFO_IID for klass->interface_id.
16301
16302         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
16303         the MonoJitInfo structure.
16304
16305         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
16306         a non-root appdomain in shared mode.
16307
16308 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16309
16310         * aot.c: make aot loader less verbose. Remove free of unused variable.
16311
16312 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
16313
16314         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
16315
16316         * .cvsignore: Added *.dll.
16317
16318         * mini.c (mono_print_tree_nl): New function callable while debugging.
16319
16320         * mini.c (mono_print_code): Export this.
16321
16322         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
16323         patched code.
16324
16325 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
16326
16327         * mini.h (MonoCompile): Added 'jit_info' field.
16328
16329         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
16330         the cfg structure, since it is needed by the AOT compiler.
16331
16332         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
16333
16334         * aot.c: A major rewrite. Changes include:
16335         - save exception tables for methods which have them.
16336         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
16337         to g_module_symbol.
16338         - reworked the file format so it is now much smaller and needs
16339         fewer relocation entries.
16340         
16341 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
16342
16343         * aot.c (load_aot_module): Fix build bustage on platforms without
16344         Boehm GC.
16345
16346 2003-09-04  Martin Baulig  <martin@ximian.com>
16347
16348         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
16349
16350 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
16351
16352         * TODO: Some new optimization ideas.
16353
16354         * aot.c: Move AOT module loading logic here from mono_assembly_open.
16355
16356         * aot.c: Save the optimization flags used to compile the code into
16357         the AOT module.
16358
16359         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
16360         support emitting domain specific code.
16361         
16362         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
16363         no longer domain neutral. It can be made domain neutral by compiling 
16364         with --optimize=shared.
16365
16366         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
16367         between appdomains.
16368
16369         * driver.c mini.h mini.c: New --no-aot debugging option which disables
16370         loading of AOT code.
16371
16372         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
16373         
16374         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
16375         if there is no domain neutrality information.
16376
16377 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
16378
16379         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
16380         format version into the generated library.
16381
16382         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
16383         callee method into the caller since one of them could be shared.
16384
16385         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
16386         system exceptions from AOT code now works.
16387
16388         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
16389         method if it is domain neutral and the callee is not.
16390
16391         * graph.c (cfg_emit_one_loop_level): Fix warning.
16392
16393 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
16394
16395         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
16396         last checkin.
16397
16398 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
16399
16400         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
16401         is needed  by code which is executed before mono_runtime_init ().
16402         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
16403         
16404         * mini.c (mono_thread_abort): Fix warning.
16405         (mono_jit_compile_method): Call static constructor in the AOT case too.
16406
16407         * aot.c (mono_compile_assembly): Fix warning.
16408
16409 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16410
16411         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
16412
16413 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
16414
16415         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
16416
16417         * cpu-pentium.md: Fix the length of call opcodes so they include the
16418         ESP restoring instruction. Fixes #47968.
16419
16420 2003-08-28  Martin Baulig  <martin@ximian.com>
16421
16422         * mini-x86.c (mono_arch_call_opcode): Added support for
16423         MONO_TYPE_GENERICINST.
16424
16425         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
16426
16427 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
16428
16429         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
16430         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
16431
16432         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
16433         metadata_section.
16434
16435 2003-08-26  Martin Baulig  <martin@ximian.com>
16436
16437         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
16438         when reporting an error, set this to the actual error location.
16439         (mono_method_to_ir): Report the correct error location if
16440         get_basic_blocks() returned an error.
16441
16442 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
16443
16444         * mini.c (mono_type_blittable): OBJECT is not blittable.
16445         (mono_method_blittable): Methods which have marshalling descriptors
16446         are not blittable either. Fixes #47842.
16447
16448 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
16449
16450         * driver.c mini.c: Use an environment variable instead of a global 
16451         variable. Also fix the build.
16452
16453         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
16454         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
16455         reporting this. 
16456
16457         * driver.c mini.c: Added --with-valgrind option to turn off some
16458         code which prevents mono from running under valgrind.
16459
16460         * mini.c (mono_emit_call_args): Fixed warning.
16461
16462         * mini.c (mono_emulate_opcode): Fixed warning.
16463
16464 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16465
16466         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
16467         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
16468         regalloc.c, regalloc.h: specify available registers in arch-specific
16469         code and support floats in the regallocator (patch by Laurent Morichetti 
16470         <l_m@pacbell.net>)
16471
16472 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16473
16474         * mini.c: mono_thread_current() can be called only after
16475         mono_runtime_init(): rearrange code to not call it early on.
16476
16477 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16478
16479         * mini.c: allocate jump tables in the code mempools.
16480
16481 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16482
16483         * mini.c, mini.h: make sure per-thread data allocated by the jit is
16484         freed.
16485
16486 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
16487
16488         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
16489         12 to 16.  This fixes bug #47453.
16490
16491
16492 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
16493
16494         * mini-ppc.c: fixed indexed load and unsigned compares.
16495
16496 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
16497
16498         * mini.c: reenabled installation of handler for
16499           thread abort signal.
16500
16501 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16502
16503         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
16504         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
16505         until it's fixed and actually useful.
16506
16507 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16508
16509         * inssel-long32.brg: couple more opcodes implemented.
16510
16511 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16512         
16513         * mini-sparc.c: Even more opcodes implemeted.
16514
16515 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
16516
16517         * mini-sparc.c: More opcodes implemented.
16518
16519 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
16520
16521         * mini-sparc.c: More opcodes implemented.
16522
16523 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16524
16525         * inssel-sparc.brg: Add some needed rules.  Direct
16526         copy from PPC.
16527         * Makefile.am: Use inssel-sparc.brg
16528         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
16529         an assert happy for now.
16530
16531 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
16532
16533         * mini-sparc.c: Fixed compile errors.
16534         * exceptions-sparc.c: Same.  We now produce a mono binary 
16535         on sparc-linux.  Yea.
16536
16537 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
16538
16539         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
16540         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
16541         They compile, but do not work.
16542
16543 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16544
16545         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
16546         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
16547         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
16548         (ct@gentoo.org).
16549
16550 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16551
16552         * mini.c: more opcodes implemented and better support for generics.
16553
16554 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16555
16556         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
16557         * mini.c, mini.h: first cut at generics support: some new instructions 
16558         added and changed the behaviour of some of the existing ones.
16559
16560 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
16561
16562         * mini.c: Removed definition of metadata_shared mutex here.
16563
16564 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16565
16566         * mini-x86.c: make vararg calls work for instance methods.
16567
16568 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
16569
16570         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
16571         returns the arguments in a separte list, now.
16572
16573 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16574
16575         * aot.c, mini.c: updates for array type representation changes.
16576
16577 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
16578
16579         * mini.c: register function to perform jit shutdown.
16580
16581 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16582
16583         * mini.c: use a faster allocator if possible.
16584
16585 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16586
16587         * aot.c: some cleanups and portability changes.
16588
16589 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16590
16591         * mini.c: use faster allocation for CEE_BOX if possible.
16592
16593 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16594
16595         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
16596         Moved inlined mempcy code to its own function so that is can be
16597         reused. Added an inline memset function as well (optimized initobj).
16598         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
16599
16600 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16601
16602         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
16603
16604 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
16605
16606         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
16607         arch code can setup the cpu for CLR execution, if needed.
16608         We use it on x86 to set the precision of FP operations.
16609
16610 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
16611
16612         * mini.c: disable some optimizations if we can guess they'll cost too
16613         much for a given method.
16614
16615 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16616
16617         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
16618         
16619 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16620         * mini.h mini.c mini-x86.c: Added instruction level coverage 
16621         info collection support.
16622
16623 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16624
16625         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
16626         is now implemented in the profiling API. Get rid of a couple of
16627         unnecessary global variables.
16628
16629 2003-06-15  Nick Drochak <ndrochak@gol.com>
16630
16631         * basic-long.cs: tests for negative values for bigmul, and unsigned.
16632         * cpu-g4.md: add op_bigmul and op_bigmul_un
16633         * cpu_pentium.md: add op_bigmul_un
16634         * inssel-long32.brg: add rule for unsigned bigmul
16635         * mini-ops.h: define OP_BIGMUL_UN
16636         * mini-x86.c: THE BUG: handle (un)signed properly
16637         * mini.c: choose unsigned opcode if needed.
16638         This set of patches fixes bug #44291
16639
16640 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
16641
16642         * mini.c (optimize_branches): improved to handle all kinds of
16643         conditional branches.
16644
16645 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16646
16647         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
16648         don't raise exceptions.
16649
16650 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16651
16652         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
16653         to arch-specific files.
16654
16655 2003-06-09  Martin Baulig  <martin@ximian.com>
16656
16657         * Makefile.am (libs): Added $(LIBGC_LIBS).
16658
16659 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
16660
16661         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
16662         and OP_ATAN (fixes bug#44293).
16663
16664 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
16665
16666         * Makefile.am, mini-x86.c: rename cpu description array to
16667         pentium_desc, since some compilers define the 'pentium' preprocessor
16668         symbol.
16669
16670 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
16671
16672         * mini.c (mini_select_instructions): add explicit branch if the
16673         following block is not the false target of a conditional branch -
16674         we need this with any optimization that reorder or remove bblocks
16675
16676         * mini.c (optimize_branches): bug fixes
16677
16678 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
16679
16680         * mini.c (mono_method_to_ir): inline static readonly fields
16681
16682         * ssa.c (fold_tree): start cfold support for long (very simple
16683         cases only)
16684
16685         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
16686
16687 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16688
16689         * inssel.brg: fixed memcpy (bug #44219).
16690
16691 2003-06-05  Dick Porter  <dick@ximian.com>
16692
16693         * driver.c: Set the glib log levels to not abort if g_message
16694         recurses.
16695
16696         g_set_prgname() has to happen before mini_init() so that the
16697         process handle gets the info.
16698         
16699 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16700
16701         * driver.c: add intrins to the default optimizations to get wider
16702         exposure.
16703
16704 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16705
16706         * mini.h: some large basic blocks will overflow a 16-bit
16707         integers for symbolic registers.
16708
16709 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
16710
16711         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
16712         (mono_arch_output_basic_block): fix bug 43499 
16713
16714 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16715
16716         * mini.c: kill duplicated definition of mono_debug_format.
16717
16718 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
16719
16720         * mini-x86.c, arrays.cs: fixed register allocation bug.
16721
16722 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
16723
16724         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
16725
16726         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
16727
16728 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16729
16730         * mini.c:
16731         (print_method_from_ip): also print source location information if
16732         available.
16733
16734 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
16735
16736         * mini.c (mono_find_block_region): bug fix in region code
16737         (mini_method_compile): enable removing unreachable code again, but
16738         only in methods without exception clauses.
16739
16740 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16741
16742         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
16743         Implemented arglist opcode and handling of TypedReference type.
16744         Fixed x86 call convention when a structure is returned.
16745         Minimal support for calling static vararg methods.
16746
16747 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
16748
16749         * mini.c (mini_method_compile):  always remove unreachable code,
16750         because the code in them may be inconsistent  (access to dead
16751         variables for example).
16752
16753 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16754
16755         * driver.c, debug-mini.c: warning fixes.
16756
16757 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
16758
16759         * Makefile.am, jit.h, mini.h: install header for embedding mono.
16760
16761 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
16762
16763         * mini.c: thread-static fields are registered in mono_class_vtable(),
16764         so ensure the function is called before checking for them.
16765
16766 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
16767
16768         * mini.c (optimize_branches): fix for bug 43586
16769
16770         * jit-icalls.c (mono_llmult_ovf): added an additional check for
16771         overflow (fixes Bug #43639)
16772
16773 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16774
16775         * mini.c, objects.cs: allow the use of stobj for primitive types.
16776
16777 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16778
16779         * mini.c: be less strict about argument checking until we support
16780         running the verifier.
16781
16782 2003-05-27  Nick Drochak <ndrochak@gol.com>
16783
16784         * basic-long.cs: tests for (ulong)int * (ulong)int also
16785         * mini.c: use the same trick for (ulong)int * (ulong)int
16786
16787 2003-05-27  Nick Drochak <ndrochak@gol.com>
16788
16789         * basic-long.cs: add regression test for (long)int * (long)int
16790         * cpu-pentium.md: add op_bigmul specification
16791         * inssel-long32.brg: add OP_BIGMUL rule
16792         * mini-ops.h: add OP_BIGMUL
16793         * mini-x86.c: register allocator: handle case where src1 needs to be
16794         in EAX.
16795         * mini.c: substitute special BIGMUL opcode in the tree for 
16796         (long)int * (long)int
16797
16798 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
16799
16800         * jit-icalls.c: call the type ctor on field access if needed.
16801
16802 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16803
16804         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
16805         to a method (including results of ldelema, bug#43207).
16806
16807 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
16808
16809         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
16810         colors to show exception handler blocks.
16811
16812         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
16813         (fix for pinvoke7.cs).
16814
16815 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16816
16817         * mini.h, mini.c: ensure correct initialization order for types that
16818         require it. Prepare for lazy compilation of jit icall wrappers.
16819         Provide a name for opcode emulation to reduce unneeded mallocing.
16820
16821 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
16822
16823         * mini-x86.c: better register restoring code and profiling
16824         support for tail calls.
16825
16826 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16827
16828         * mini.h, driver.c: prepare for leaf methods optimization.
16829
16830 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16831
16832         * mini.c: get targets of branches before converting a method.
16833
16834 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
16835
16836         * mini.c (optimize_branches): added some experimental code (disbaled) 
16837
16838 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
16839
16840         * mini.c (optimize_branches): fix branch to branch optimization 
16841
16842         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
16843
16844         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
16845
16846         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
16847
16848         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
16849         if needed.
16850
16851 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
16852
16853         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
16854         enable use of interface variables again.
16855
16856         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
16857         I1 to registers because there is no simply way to sign extend 8bit
16858         quantities in caller saved registers on x86.
16859
16860         * inssel-float.brg: set costs of some rules to 2 so
16861         that monobure always select the arch. specific ones if supplied,
16862         regardless of the order we pass the files to monoburg.
16863
16864 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16865
16866         * mini.c, mini-x86.c: since the magic trampoline for jumps
16867         can't patch the code directly, we do it as soon as the
16868         method gets compiled.
16869
16870 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16871
16872         * mini-x86.c, mini.h: introduce a new patching method
16873         to support CEE_JMP and tail calls.
16874         * mini.c: obey tail.call. Don't precompile methods target
16875         of CEE_JMP.
16876         * tramp-x86.c: new trampoline code to handle methods
16877         reached through a jump.
16878
16879 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
16880
16881         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
16882         bit values to registers
16883
16884 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
16885
16886         * mini.c (mono_compile_get_interface_var): share interface
16887         variables if possible.
16888
16889 2003-05-16  Martin Baulig  <martin@ximian.com>
16890
16891         * debug-mini.c (mono_init_debugger): New function to initialize
16892         the debugger.  This is not in the debugger since it needs to
16893         access some of mini's internals.
16894
16895 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
16896
16897         * mini.c (mono_method_to_ir): inlining fixes/cleanups
16898
16899 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
16900
16901         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
16902         for value type handling.
16903
16904 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
16905
16906         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
16907         (mono_method_check_inlining): enable inlining of all kinds of wrappers
16908
16909 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
16910
16911         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
16912           the constructor through a proxy.
16913
16914 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16915
16916         * jit-icalls.c, inssel.brg: fixes to array element address
16917         calculations.
16918
16919 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
16920
16921         * mini-x86.c (is_regsize_var): allocate pointer to registers
16922
16923 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16924
16925         * driver.c: fixed typo, added intrins to the set of optimizations
16926         tested with regressions.
16927
16928 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
16929
16930         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
16931         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
16932         test case.
16933
16934 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
16935
16936         * inssel.brg: remove some common pop instructions without side effects
16937
16938 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16939
16940         * inssel-x86.brg: fixed thinko in int to double conversions.
16941
16942 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
16943
16944         * mini.c, jit-icalls.c: added runtime thread-static variable support.
16945
16946 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16947
16948         * inssel-long32.brg: two more missing instructions.
16949
16950 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
16951
16952         * mini.c (mono_emit_call_args): set the cil_code for all arguments
16953         if not already set.
16954
16955 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
16956
16957         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
16958         correctly.
16959
16960         * basic-float.cs: Added tests for negative zero.
16961
16962 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16963
16964         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
16965         a couple of missing operations for long casts, with test cases.
16966
16967 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16968
16969         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
16970
16971 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
16972
16973         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
16974         code size estimation.
16975
16976 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
16977
16978         * mini.c (mono_jit_create_remoting_trampoline): make it work with
16979         abstract methods (fix bug 42542)
16980
16981         * aot.c: add ability to handle array types
16982         
16983 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
16984
16985         * mini.c: Call the _specific versions of the object allocation
16986         functions if possible.
16987
16988 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16989
16990         * driver.c: call setlocale ().
16991
16992 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16993
16994         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
16995         windows build.
16996
16997 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
16998
16999         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
17000
17001         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
17002         wrappers (fix bug 42122)
17003
17004 2003-05-04  Martin Baulig  <martin@ximian.com>
17005
17006         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
17007
17008         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
17009         s/mini_set_defaults/mono_set_defaults/g.
17010
17011 2003-05-04  Martin Baulig  <martin@ximian.com>
17012
17013         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
17014
17015 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
17016
17017         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
17018         (reported by Don Roberts).
17019
17020 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
17021
17022         * mini.c: temporarily work around two bugs for this release.
17023
17024 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
17025
17026         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
17027         that contains -export-dynamic and it makes using the ld script
17028         useless.
17029         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
17030
17031 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
17032
17033         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
17034         specific cpu.
17035
17036 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
17037
17038         * mini.c: make sure leave calls all the needed finally blocks,
17039         even when the target jumps out of multiple exception clauses.
17040
17041 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17042
17043         * ldscript, Makefile.am: add linker script to reduce the number of
17044         exported symbols (should also fix the issues with libwine defining
17045         some of the same symbols in io-layer).
17046
17047 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
17048
17049         * driver.c (mini_main): Avoid assertion when no file name is given on 
17050         the command line.
17051
17052 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
17053
17054         * driver.c: added --version/-V command line option.
17055         Added the inline optimization in the regression tests.
17056
17057 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17058
17059         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
17060         to the type in the method signature (fixes bug#42134).
17061
17062 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
17063
17064         * mini.c: when inlining, check this is not null only when needed (bug #42135).
17065
17066 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
17067
17068         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
17069
17070 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17071
17072         * driver.c: fixed bug #42100.
17073
17074 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
17075
17076         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
17077
17078 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
17079
17080         * mini.c: moved most of the code required to do inlining to its own
17081         function so it can be reused. Inline also ctors if appropriate.
17082
17083 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
17084
17085         * Makefile.am: Link with -export-dynamic so shared libs loaded by
17086         the runtime can call mono API functions.
17087
17088 2003-04-27  Martin Baulig  <martin@ximian.com>
17089
17090         * debug-mini.c (mono_debug_init_method): Added
17091         `guint32 breakpoint_id' argument; if the method has a breakpoint,
17092         send a notification to the debugger.
17093
17094         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
17095         running in the Mono Debugger, just pass the breakpoint number to
17096         mono_debug_init_method().
17097
17098         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
17099
17100 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
17101
17102         * mini.c: allow some more unsafe compares.
17103
17104 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17105
17106         * mini-x86.c, Makefile.am: make distcheck works (partially from
17107         a patch by Richard Lee <r.h.lee@attbi.com>).
17108         * regset.c, regset.h: removed, they are unused.
17109
17110 2003-04-25  Dick Porter  <dick@ximian.com>
17111
17112         * driver.c: Usage reports the name as 'mono' not 'mini'
17113         * exceptions-x86.c: Build and run on freebsd
17114
17115 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
17116
17117         * Makefile.am: install the program with the 'mono' name and
17118         the library as libmono instead of mini and libmini.
17119
17120 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17121
17122         * driver.c: provide the APIs for the embedding interface of the old jit.
17123
17124 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
17125
17126         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
17127
17128 2003-04-23  Martin Baulig  <martin@ximian.com>
17129
17130         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
17131
17132         * driver.c: Added `--debug' command line argument to enable
17133         debugging support.
17134
17135 2003-04-23  Martin Baulig  <martin@ximian.com>
17136
17137         * debug.[ch]: Removed.  The code is now in
17138         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
17139
17140         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
17141         last six months.
17142
17143 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
17144
17145         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
17146
17147 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17148
17149         * mini.c:
17150         (mini_cleanup): moved mono_runtime_cleanup call after the call to
17151         mono_domain_finalize.
17152         (mini_method_compile): use mono_method_profile* if the the option is
17153         enabled.
17154
17155 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
17156
17157         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17158         methods with their wrapper.
17159
17160         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17161         methods with their wrapper.
17162
17163         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
17164         their wrapper.
17165
17166         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
17167         wrapper.
17168
17169         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
17170         methods.
17171
17172 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
17173
17174         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
17175
17176 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
17177
17178         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
17179         of the mempool. This is slightly faster and uses less memory
17180
17181 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
17182
17183         * mini.c: avoid O(n) allocation for variables.
17184
17185 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17186
17187         * mini.c: handle items on the stack after inlining methods.
17188
17189 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
17190
17191         * mini.c: make the method->opcode optimization dependent
17192         on MONO_OPT_INSTRINS and do it lazily.
17193
17194 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
17195
17196         * driver.c: print overall results at the end of regression run.
17197
17198 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
17199
17200         * inssel.brg: don't overwrite symbolic registers.
17201
17202 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17203
17204         * inssel-x86.brg: fix conversion from long to float.
17205
17206 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
17207
17208         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
17209
17210 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
17211
17212         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
17213
17214         * driver.c: Added --print-vtable option as in the old JIT.
17215
17216 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17217
17218         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
17219
17220 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
17221
17222         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
17223
17224 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
17225
17226         * mini.c regalloc.c regalloc.h: Fix memory leak.
17227
17228 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
17229
17230         * aot.c (mono_aot_get_method): register all used strings
17231
17232 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
17233
17234         * mini.c: always intern strings references with ldstr at compile time.
17235
17236 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17237
17238         * Makefile.am: add BUILT_SOURCES.
17239
17240 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17241
17242         * driver.c: give a better error message when the assembly to execute
17243         doesn't have an entry point.
17244
17245 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
17246
17247         * Makefile.am: added hack for automake
17248
17249         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
17250         correct sematics.
17251
17252         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
17253
17254 22003-04-07  Martin Baulig  <martin@ximian.com>
17255
17256         * Makefile.am: Added Makefile.am.
17257
17258         * debugger-main.c: Removed, this is now in the debugger where it
17259         belongs.
17260
17261         * mini.pc.in: Call this package `mini' for the moment.
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275