/
ChangeLog
12204 lines (7335 loc) · 382 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2008-01-31 Zoltan Varga <vargaz@gmail.com>
* mini.c: Fix a couple more soft-float issues.
2008-01-30 Zoltan Varga <vargaz@gmail.com>
* exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
exception happens while compiling a virtual method.
2008-01-27 Zoltan Varga <vargaz@gmail.com>
* mini-exceptions.c (mono_handle_exception_internal): Remove the old style
altstack handling code.
* mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
* mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
* mini-s390.c: Add support for generic sharing.
* mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
Fix CAS on s390.
(ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
* mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
* mini-s390x.c: Add support for generic sharing.
* mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
Fix CAS on ia64.
(ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
* mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
can be used since it takes a 16 bit signed immediate.
* inssel-s390x.brg: Fix OP_SETRET.
* mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
* mini-codegen.c (mono_opcode_to_cond): Fix a warning.
* mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
* mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
* mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
in one place.
* mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
stuff.
* mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
of the unused mono_arch_patch_delegate_trampoline stuff.
2008-01-26 Zoltan Varga <vargaz@gmail.com>
* basic-long.cs: Move the fp related tests to basic-float.cs.
* mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
* mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
* basic-calls.cs: Add a test for proper float argument passing.
* mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
if the context corresponds to an exception received through a signal.
* exceptions.cs: Add a test for nullref handling at the start of a try
clause.
* mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
* jit-icalls.c (mono_break): New JIT icall.
* mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
* mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
2008-01-25 Zoltan Varga <vargaz@gmail.com>
* cpu-*.md: Get rid of unused opcodes.
* cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
* Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
by all platforms.
* mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
define.
* mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
the arch independent trampoline code in mini-trampolines.c.
* aot-runtime.c (mono_aot_init_vtable): Fix a warning.
* mini.c (get_runtime_generic_context_ptr): Fix a warning.
* mini-s390.h: Remove an unused define.
* mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
the arch independent trampoline code in mini-trampolines.c.
* mini-arm.c (mono_arch_emit_prolog): Fix build.
2008-01-24 Zoltan Varga <vargaz@gmail.com>
* mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
* mini-s390.c (mono_arch_emit_prolog): Fix build.
* mini-s390x.c (mono_arch_emit_prolog): Fix build.
* mini-ppc.c (mono_arch_emit_prolog): Fix build.
* cpu-amd64.md: Use smaller sizes for int opcodes.
* *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
* *.cs: Add some tests from the linear-ir branch. Move structs tests to
objects.cs.
* driver.c (mono_main): Add a --break-at-bb command line argument for JIT
debugging.
* mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
instead of though a pointer to save an indirection when accessing elements of
the array.
* mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
some typos.
(NOT_IMPLEMENTED): New helper macro.
(MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
of a bb.
* *.c: Use the new helper macro.
2008-01-21 Zoltan Varga <vargaz@gmail.com>
* mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
2008-01-20 Zoltan Varga <vargaz@gmail.com>
* mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
stack slots.
2008-01-18 Zoltan Varga <vargaz@gmail.com>
* mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
profiling is enabled.
* mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
the end.
(mono_arch_emit_prolog): Add more first bblock optimizations.
* mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
in order if possible.
(mono_arch_emit_prolog): Optimize assignments to arg registers in the first
bblock, since the arguments are still in their original registers.
* mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
2008-01-17 Zoltan Varga <vargaz@gmail.com>
* mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
as well.
* mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
offset 0.
* mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
* exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
process async exceptions received while in unmanaged code.
* mini.c (mini_init): Install a callback with the runtime which will be called
when a thread receives an async exception while in unmanaged code.
* mini.c driver.c: Update after mono_get_native_wrapper () signature change.
* mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
2008-01-16 Wade Berrier <wberrier@novell.com>
* cpu-g4.md:
* cpu-arm.md:
* cpu-s390x.md:
fix build
2008-01-16 Zoltan Varga <vargaz@gmail.com>
* mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
compilation with sun cc.
* cpu-*.md: Fix the build.
* cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
* mini-amd64.h: Add some comments to the MonoLMF structure.
* mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
* mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
in the LMF structure if possible. This saves two instructions in the
managed->native wrappers.
* mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
2008-01-16 Mark Probst <mark.probst@gmail.com>
* generic-sharing.c: New type argument lookup code which uses the
runtime generic context template.
2008-01-15 Zoltan Varga <vargaz@gmail.com>
* mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
* mini-arm.c (add_general): Fix arm eabi parameter passing.
(mono_arch_output_basic_block): Fix localloc implementation.
* mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
* mini-ia64.c (peephole_pass): Fix ia64 build.
* mini-amd64.c (peephole_pass): Fix a warning.
* mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
at a constant offset from sp/fp.
* exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
instead of obtaining it from *lmf in the managed method case.
2008-01-14 Zoltan Varga <vargaz@gmail.com>
* exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
* mini.h (MonoInstList): New type.
(MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
__MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
__MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
MONO_INST_LIST_FOR_EACH_PREV_SAFE,
MONO_INST_LIST_FOR_EACH_ENTRY,
MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
mono_inst_list_first, mono_inst_list_last,
mono_inst_list_next, mono_inst_list_prev): New instruction
list handling interfaces.
(MonoBasicBlock): Remove 'last_ins' and 'code', replace with
list head 'ins_list'.
(MonoInst): Replace next pointer with list head 'node'.
(MonoCallInst): Make 'out_args' a MonoInstList.
(MONO_INST_NEW_CALL): Explicitly init ->out_args.
(MonoCompile): Delete reverse_inst_list and
reverse_inst_list_len.
* mini-hppa.c (mono_arch_call_opcode, NEW_INS,
mono_arch_lowering_pass, mono_arch_local_regalloc,
mono_arch_output_basic_block, mono_arch_emit_prolog):
Convert to new instruction lists.
(insert_after_ins): Delete.
* inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
instruction lists.
* mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
* mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
split_bblock, mono_add_ins_to_end, mono_emit_call_args,
mono_emulate_opcode, mono_emit_load_got_addr,
inline_method, mono_method_to_ir, mono_print_bb_code,
print_dfn, decompose_pass, nullify_basic_block,
replace_out_block_in_code, remove_block_if_useless,
merge_basic_blocks, move_basic_block_to_end,
try_unsigned_compare, optimize_branches, mono_print_code,
mini_select_instructions, remove_critical_edges): Likewise.
* mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
mono_arch_output_basic_block, mono_arch_emit_prolog):
Likewise.
* mini-mips.c (mono_arch_call_opcode, peephole_pass,
NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
mono_arch_output_basic_block): Likewise.
(inst_list_prepend, insert_after_ins): Delete.
* mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
instruction lists.
* mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
mono_arch_emit_prolog): Likewise.
* cfold.c (mono_constant_fold): Likewise.
* liveness.c (visit_bb, mono_analyze_liveness,
optimize_initlocals): Likewise.
* ssapre.c (dump_code, process_bb, code_motion): Likewise.
* graph.c (mono_draw_code_cfg): Likewise.
* ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
mono_ssa_cprop): Likewise.
* abcremoval (get_relations_from_previous_bb, process_block):
Likewise.
* local-propagation (mono_cprop_invalidate_values,
mono_local_cprop_bb): Likewise.
* mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
peephole_pass, mono_arch_output_basic_block,
mono_arch_emit_prolog): Likewise.
* mini-arm.c (mono_arch_call_opcode, peephole_pass,
NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
mono_arch_emit_prolog): Likewise.
(insert_after_ins): Delete.
* aliasing.c (print_code_with_aliasing_information,
mono_build_aliasing_information, mono_aliasing_deadce):
Convert to new instruction lists.
* mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
peephole_pass, NEW_INS, mono_arch_lowering_pass,
mono_arch_local_regalloc, mono_arch_output_basic_block):
Likewise.
(insert_after_ins): Delete.
* mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
peephole_pass, mono_arch_output_basic_block): Convert to
new instruction lists.
* mini-codegen (InstList, inst_list_prepend,
insert_after_ins): Delete.
(insert_before_ins, get_register_force_spilling,
get_register_spilling, free_up_ireg, free_up_reg,
create_copy_ins, create_spilled_store, alloc_int_reg,
alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
to new instruction lists.
* mini-ppc.c (mono_arch_call_opcode, peephole_pass,
NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
(insert_after_ins): Delete.
* mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
mono_arch_local_regalloc, mono_arch_output_basic_block,
mono_arch_call_opcode): Convert to new instruction lists.
(insert_after_ins): Delete.
* mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
peephole_pass, mono_arch_output_basic_block,
mono_arch_emit_prolog): Convert to new instruction lists.
2008-01-11 Zoltan Varga <vargaz@gmail.com>
* mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
* mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
Fixes #353182.
* Makefile.am (version.h): Make this work with non-bash shells.
2008-01-10 Zoltan Varga <vargaz@gmail.com>
* mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
2008-01-08 Zoltan Varga <vargaz@gmail.com>
* mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
the InitializeArray optimization.
2008-01-06 Zoltan Varga <vargaz@gmail.com>
* mini.c driver.c: Don't include os/gc_wrapper.h.
2008-01-05 Zoltan Varga <vargaz@gmail.com>
* mini.c (print_jit_stats): Print GC statistics if available.
2008-01-04 Zoltan Varga <vargaz@gmail.com>
* mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
2007-12-29 Zoltan Varga <vargaz@gmail.com>
* mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
2007-12-26 Zoltan Varga <vargaz@gmail.com>
* mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
* mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
* driver.c (mono_main): Ditto.
2007-12-23 Zoltan Varga <vargaz@gmail.com>
* mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
* aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
in the vtable can't be encoded.
(compile_method): Ditto.
2007-12-21 Zoltan Varga <vargaz@gmail.com>
* mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
defined.
* mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
lmf->rbp.
* exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
the top LMF entry belongs to the current method.
* mini.c: Update after renaming of mono_thread_get_pending_exception ().
2007-12-20 Zoltan Varga <vargaz@gmail.com>
* tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
* tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
* tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
* tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
* tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
* cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
implementation.
* basic-float.cs: Add an ulong->double cast test.
2007-12-15 Zoltan Varga <vargaz@gmail.com>
* mini.c (mono_method_to_ir): Fix a warning.
2007-12-14 Zoltan Varga <vargaz@gmail.com>
* mini-ops.h: Add OP_SWITCH.
* mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
CEE_SWITCH in back-end code, use OP_SWITCH instead.
2007-12-11 Geoff Norton <gnorton@novell.com>
* mini-s390x.c: Minor change to the MAX() define to allow
it to compile with other gcc versions.
2007-12-11 Geoff Norton <gnorton@novell.com>
* cpu-s390x.md:
* mini-s390x.c: Implement sext_i4 to fix the build on s390x
2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
exceptions-arm.c (mono_arch_get_restore_context): Restore
the frame pointer.
exceptions-arm.c (throw_exception): Save the frame pointer.
This is a partial fix for #323747. Only the client side is
fixed.
2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
* mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
was using an unrelated variable to log the class which
needed the cctor to be called. This was crashing on arm.
2007-12-09 Robert Jordan <robertj@gmx.net>
* mini-x86.c (mono_arch_emit_epilog):
Consider all kinds of 64-bit types. Fixes #323114.
2007-12-08 Zoltan Varga <vargaz@gmail.com>
* tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
2007-12-07 Zoltan Varga <vargaz@gmail.com>
* mini-amd64.c (peephole_pass): Add a missing instruction check.
Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
* mini.c: run type ctor before allocating an object, not only
when running it's constructor method (fixes at least part of bug #342507).
2007-12-07 Zoltan Varga <vargaz@gmail.com>
* mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
* mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
* mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
function.
* tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
mono_generic_class_init_trampoline () the same as it is done with the other
trampolines.
* mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
aot-runtime.c aot-compiler.c: Implement AOT support.
2007-12-07 Mark Probst <mark.probst@gmail.com>
* mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
build for archs which don't have the vtable trampoline defined
yet.
2007-12-07 Zoltan Varga <vargaz@gmail.com>
* tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
* tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
* mini-trampolines.c (mono_get_trampoline_func): New helper function.
* tramp-<ARCH>.c: Use the new helper function.
2007-12-07 Mark Probst <mark.probst@gmail.com>
* inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
trampoline call, which takes a vtable argument.
* graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
OP_TRAMPCALL_VTABLEs like other calls.
* mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
call. Implemented a support function which fetches the vtable
from a register set.
* mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
Implemented a generic class init trampoline, using the
OP_TRAMPCALL_VTABLE opcode.
* mini.c: Implemented static field access when sharing generic
code. This implies initing the class using the new
OP_TRAMPCALL_VTABLE call.
2007-12-07 Mark Probst <mark.probst@gmail.com>
* mini.c: Don't compile methods with sharing enabled if their
classes are disabled for sharing.
2007-12-06 Zoltan Varga <vargaz@gmail.com>
* inssel.brg: Add a missing sign extension to the GETCHR and array access
opcodes. Fixes #346563.
* objects.cs: Add a new test.
* aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
* mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
2007-12-06 Zoltan Varga <vargaz@gmail.com>
* mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
2007-12-03 Zoltan Varga <vargaz@gmail.com>
* mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
code stream.
2007-12-02 Zoltan Varga <vargaz@gmail.com>
* patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
* mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
optimization in the AOT case.
2007-11-30 Zoltan Varga <vargaz@gmail.com>
* aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
* aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
* aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
* mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
* mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
is created by the inlined delegate ctor.
* mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
* mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
2007-11-29 Zoltan Varga <vargaz@gmail.com>
* cpu-x86.md: Fix the length of ckfinite.
2007-11-28 Zoltan Varga <vargaz@gmail.com>
* mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
* mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
(mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
* mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
* mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
2007-11-28 Martin Baulig <martin@ximian.com>
* mini-x86.c
(mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
after creating the trampoline.
2007-11-27 Zoltan Varga <vargaz@gmail.com>
* aot-runtime.c (load_aot_module): Check runtime version if needed.
* aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
the same version.
* generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
instead of the calling method to help AOT.
* mini.c (get_runtime_generic_context_other_ptr): Update after the change.
2007-11-26 Zoltan Varga <vargaz@gmail.com>
* aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
is defined.
2007-11-23 Zoltan Varga <vargaz@gmail.com>
* aot-compiler.c (emit_class_name_table): Properly encode generic class names.
* aot-compiler.c (compile_method): Correct check for generic method definitions.
(encode_method_ref): No need to handle generic method definitions specially.
* mini.h (MONO_AOT_FILE_VERSION): Bump this.
* aot-runtime.c (decode_klass_ref): Clean this up and rename from
decode_klass_info.
* aot-compiler.c (encode_klass_ref): Clean this up and rename from
encode_klass_info.
(compile_method): Enable generic sharing.
2007-11-22 Zoltan Varga <vargaz@gmail.com>
* mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
(mini_method_compile): Add preliminary support for AOTing shared generic code.
* aot-compiler.c (compile_method): Add preliminary support for AOTing shared
generic code.
* mini-trampolines.c: Fix a warning.
* mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
NEW_PCONST.
(mono_method_to_ir): Use NEW_DOMAINCONST in one place.
(generic_class_is_reference_type): Remove unused function.
* mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
in the generic vtable trampoline case.
* aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
* aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
return an AOT method based on a vtable slot.
* aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
* mini.c (mini_get_vtable_trampoline): Export this.
2007-11-22 Martin Baulig <martin@ximian.com>
* debug-debugger.h
(MonoDebuggerInfo): Move `debugger_version' up.
2007-11-22 Martin Baulig <martin@ximian.com>
* mini-amd64.c
(mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
* mini-trampolines.c
(mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
after compiling the method.
2007-11-20 Martin Baulig <martin@ximian.com>
* debug-mini.c
(mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
(mono_debugger_remove_breakpoint): Likewise.
(mono_debugger_check_breakpoints): Likewise.
* debug-debugger.c: Implement the new breakpoint interface here.
2007-11-18 Zoltan Varga <vargaz@gmail.com>
* mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
* mini-x86.c (mono_arch_output_basic_block): Ditto.
2007-11-17 Zoltan Varga <vargaz@gmail.com>
* mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
* mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
mini.c.
* mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
mini.c.
* mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
returning a vtype in a register.
* mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
here from the arch specific code.
* mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
mini.c.
* mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
(mono_arch_emit_prolog): Increment maximum prolog size.
* mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
* mini-x86.c (get_call_info): Receive a MonoCompile instead of a
MonoGenericSharingContext.
* mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
MonoGenericSharingContext. Allocate memory from the cfg mempool.
2007-11-15 Mark Probst <mark.probst@gmail.com>
* mini.c, mini.h, generic-sharing.c: Functions for producing code
which extract fields out of the runtime generic context. Full
sharing of the NEWARR opcode.
Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
* abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
--enable-minimal=ssa.
2007-11-13 Zoltan Varga <vargaz@gmail.com>
* mini-trampolines.c (mono_delegate_trampoline): Update after
mono_marshal_get_delegate_invoke () signature change.
2007-11-13 Mark Probst <mark.probst@gmail.com>
* mini.c: Removed the shared context in favor of the generic
sharing context. Allocate the MonoJitInfo structure with room for
the generic sharing context if it's needed.
* mini.h: Remove MonoGenericSharingContext declaration. It's in
domain-internals.h now.
* mini-x86.c: Pass the generic sharing context to get_call_info ().
* generic-sharing.c: Several changes for working without a shared
context and instead operating on open types instead.
2007-11-12 David S. Miller <davem@davemloft.net>
* inssel-sparc.brg: Fix double instruction emit.
2007-11-12 Zoltan Varga <vargaz@gmail.com>
* mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
Get/Set/Address methods.
* mini.c debug-debugger.c mini-trampolines.c: Update after
mono_marshal_get_delegate_invoke signature change.
2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
* cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
This can happens with dynamic methods. Fixes the other bug in #322722.
2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
* tramp-arm.c (mono_arch_patch_callsite): Support patching
BX call sequence.
* mini-arm.c (arm_patch): Implement patching of BX call
sequence. Fixes one of the bugs in #322722.
2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
* mini-sparc.c (mono_arch_flush_icache): Make more efficient
under Linux. We only need to flush every 32-byte cache line.
2007-11-07 Massimiliano Mantione <massi@ximian.com>
* mini.c:
move_basic_block_to_end: Add branches when needed, eventually creating
a new BB.
optimize_branches: added a parameter that tells if it's ok to create
new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
and avoid calling move_basic_block_to_end when it's not ok.
Fixes bug 318677.
2007-11-07 Mark Probst <mark.probst@gmail.com>
* mini.c: Abort inlining call to InitializeArray if something
looks wrong. Let the icall handle it, which now has proper safety
checks.
2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
* mini.c (mono_spill_call): add support for soft-float.
* mini.c (mono_method_to_ir): add support for soft-float
to inlined functions that return float.
* mini.c (mono_method_to_ir): add support for soft-float
to cee_stsfld opcode on float fields.
2007-11-05 Geoff Norton <gnorton@novell.com>
* mini-x86.h: Fix the structure access for X86 Leopard.
2007-11-05 Martin Baulig <martin@ximian.com>
* mini-trampolines.c
(mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
after compiling the method to notify the debugger.
2007-11-05 Martin Baulig <martin@ximian.com>
* debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
2007-11-02 Zoltan Varga <vargaz@gmail.com>
* mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
David Miller <davem@davemloft.net>. Allow larger offsets in branches.
2007-11-01 Zoltan Varga <vargaz@gmail.com>
* mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
native-to-managed wrappers.
2007-11-01 Geoff Norton <gnorton@novell.com>
* mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
members.
Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
* mini.c, mini-x86.c: when getting back from unmanaged code
to managed via a marshaled delegate we also need to set the
right domain.
Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
* mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
for amd64.
Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
* mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
let the debugger or other external agents to tell the JIT when
a sw breakpoint has been inserted in the code that the JIT needs
to be able to inspect.
2007-10-31 Martin Baulig <martin@ximian.com>
* debug-debugger.h
(MonoDebuggerInfo): Remove `runtime_class_init'.
2007-10-30 Martin Baulig <martin@ximian.com>
* debug-mini.h
(mono_debugger_thread_created): Added `MonoThread *' argument.
(mono_debugger_extended_notification): New public method.
(mono_debugger_trampoline_compiled): New public method.
* debug-mini.c
(MonoDebuggerThreadInfo): Added `thread' and
`extended_notifications' fields.
* debug-debugger.c
(debugger_executable_code_buffer): New static variable.
* debug-debugger.h
(MonoDebuggerInfo): Added `executable_code_buffer',
`executable_code_buffer_size', `breakpoint_info_area',
`breakpoint_table' and `breakpoint_table_size'.
2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
* mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
that IP either is an unused value or the vtable pointer. IMT
calls use vtable + offset now. Reduced by almost half the size
of IMT entries.
2007-10-26 Jonathan Chambers <joncham@gmail.com>
* mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
defines to access param registers. Replace long usage with
gsize as sizeof(long) != sizeof(void*) on Win64.
* mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
on Win64. Fix intrinsic, use _AddressOfReturnAddress
instead of non-existant _GetAddressOfReturnAddress.
* tramp-amd64.c: Use AMD64_ARG_REG# defines to access
param registers. Save/restore %rdi and %rsi in MonoLMF.
* exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
param registers. Modify (throw_exception) signature to take
%rdi and %rsi on Win64.
Code is contributed under MIT/X11 license.
Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
* helpers.c: unlink debugging output files.
2007-10-25 Zoltan Varga <vargaz@gmail.com>
* mini.c: Move mono_create_ftnptr () to object.c.
2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
* helpers.c (mono_disassemble_code): MonoCompile parameter is now
optional. This function can now be used to disassemble code generated
outside the JIT such as trampolines and IMT thunks.
* mini-arm.h: defined MONO_ARCH_HAVE_IMT.
* mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
vtable pointer from a ldr instruction.
* mini-arm.c (mono_arch_get_vcall_slot_addr): support the
new IMT call sequence.
* mini-arm.c (mono_arch_output_basic_block): emit the IMT
call sequence for interface invocations.
* mini-arm.c (mono_arch_emit_imt_argument): added, required
for imt support. This function is empty since IMT on ARM requires no
special handling on the IR side.
* mini-arm.c (mono_arch_find_imt_method): added, required for
imt support.
* mini-arm.c (mono_arch_find_this_argument): added, required
for imt support.
* mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
a ldr instruction to load a value stored in the code stream.
* mini-arm.c (mono_arch_build_imt_thunk):added, required
for imt support.
2007-10-23 Zoltan Varga <vargaz@gmail.com>
* mini.c (mini_init): Install the jump trampoline callback.
Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
* mini-trampolines.c: handle synchronized methods with the common
vtable trampoline (bug #335601).
2007-10-17 Zoltan Varga <vargaz@gmail.com>
* mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
* inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
64 bit platforms.
* mini-ia64.h mini-ia64.c: Add support for IMT.
* mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
prolog. Fixes #331958.
2007-10-15 Zoltan Varga <vargaz@gmail.com>
* mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
* mini-ppc.c, mini-ppc.h: ppc support for the common vtable
trampoline.
Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
* mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
trampoline.
Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
* mini-x86.c, mini-x86.h: x86 support for the common vtable
trampoline.
Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
* mini-trampolines.c: changed the magic rampoline to understand
the common vtable trampoline method: the method to invoke is
determined by the vtable displacement of the call.
Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
* mini.c, mini.h: register the common vtable trampoline if the
architecture supports it.
Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
* cpu-amd64.md: use the correct max length for tls_get.