aboutsummaryrefslogtreecommitdiff
path: root/gcc/ChangeLog.stackalign
blob: fba90ef6b98e01a2b82b7ce07b5319558f369f0f (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
2009-03-07  H.J. Lu  <hongjiu.lu@intel.com>

	PR c/39323
	* c-common.c (handle_aligned_attribute): Properly check alignment
	overflow.  Use (1U << i) instead of (1 << i).

	* emit-rtl.c (get_mem_align_offset): Use "unsigned int" for
	align.

	* expr.h (get_mem_align_offset): Updated.

	* tree.h (tree_decl_common): Change align to "unsigned int" and
	move it before pointer_alias_set.

2009-02-28  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/39315
	* cfgexpand.c (expand_one_stack_var_at): Change alignment
	limit to MAX_SUPPORTED_STACK_ALIGNMENT.

2009-02-20  Joey Ye  <joey.ye@intel.com>

	PR middle-end/39146
	* cfgexpand.c (get_decl_align_unit): Update
	max_used_stack_slot_alignment with align instead of
	stack_alignment_needed.

	* function.c (assign_stack_local_1): Update
	max_used_stack_slot_alignment with alignment_in_bits instead
	of stack_alignment_needed.
	(locate_and_pad_parm): Don't update max_used_stack_slot_alignment
	here.

2008-08-05  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/37010
	* calls.c (expand_call): Use the biggest preferred stack
	boundary.

2008-08-04  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/37049
	* config/i386/i386.c (ix86_expand_push): Set memory alignment
	to function argument boundary.

2008-08-04  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/37009
	* cfgexpand.c (expand_stack_alignment): Check parm_stack_boundary
	for incoming stack boundary.

	* function.c (assign_parm_find_entry_rtl): Update
	parm_stack_boundary.

	* function.h (rtl_data): Add parm_stack_boundary.

	* config/i386/i386.c (ix86_finalize_stack_realign_flags): Check
	parm_stack_boundary for incoming stack boundary.

2008-08-01  H.J. Lu  <hongjiu.lu@intel.com>

	PR debug/37002
	* dwarf2out.c (mem_loc_descriptor): Use DRAP for vDRAP which
	has been optimized out.

2008-07-30  H.J. Lu  <hongjiu.lu@intel.com>

	* cfgexpand.c (expand_stack_alignment): Set stack_realign_tried.

	* dwarf2out.c (based_loc_descr): Check crtl->stack_realign_tried
	for stack alignment.

	* function.h (rtl_data): Add stack_realign_tried.  Update
	comments.

2008-07-28  H.J. Lu  <hongjiu.lu@intel.com>

	* dwarf2out.c (dwarf2out_args_size_adjust): New.
	(dwarf2out_stack_adjust): Use it.
	(dwarf2out_frame_debug_expr): Likewise.

2008-07-22  Xuepeng Guo  <xuepeng.guo@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* dwarf2out.c (dwarf2out_frame_debug_expr): When adjusting
	DW_CFA_GNU_args_size if CSA pass merged some adjustments into
	prologue sp adjustment, also update cfa_store.offset.

2008-07-20  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (ix86_gimplify_va_arg): Re-indent.

2008-07-19  H.J. Lu  <hongjiu.lu@intel.com>

	* builtins.c (std_gimplify_va_arg_expr): Replace
	PREFERRED_STACK_BOUNDARY with MAX_SUPPORTED_STACK_ALIGNMENT.
	* config/i386/i386.c (ix86_gimplify_va_arg): Likewise.

2008-07-19  H.J. Lu  <hongjiu.lu@intel.com>

	* function.c (assign_stack_local_1): Use ">" instead of ">="
	to check MAX_SUPPORTED_STACK_ALIGNMENT.
	(locate_and_pad_parm): Likewise.

2008-07-08  H.J. Lu  <hongjiu.lu@intel.com>
	    Xuepeng Guo  <xuepeng.guo@intel.com>

	* dwarf2out.c (dw_fde_node): Add drap_reg_saved.
	(dwarf2out_frame_debug_expr): Update rule 16 to set drap_reg,
	update rules 19 and 20.

2008-07-07  H.J. Lu  <hongjiu.lu@intel.com>

	* dwarf2out.c (add_cfi): Don't allow redefine CFA when CFA is
	defined with an expression.

2008-07-07  H.J. Lu  <hongjiu.lu@intel.com>

	* dwarf2out.c (dwarf2out_frame_debug_expr): After stack is
	aligned, for (set reg sp), assert reg == fp and drap is used.

2008-07-07  H.J. Lu  <hongjiu.lu@intel.com>

	* dwarf2out.c: Update comments.

2008-07-07  H.J. Lu  <hongjiu.lu@intel.com>
	    Xuepeng Guo  <xuepeng.guo@intel.com>

	* dwarf2out.c (dw_fde_struct): Remove fp_has_aligned_sp.
	(dwarf2out_frame_debug_expr): Don't generate dwarf2 information for
	"mov sp bp" for drap cases. Only redefine cfa with expression in
	Rule 19.
	(build_cfa_aligned_loc): Swap parameter order.
	(reg_save): Updated.

2008-07-07  Joey Ye  <joey.ye@intel.com>

	*  config/i386/i386.c (ix86_expand_prologue): Add comments for
	pushing return address.

2008-07-06  H.J. Lu  <hongjiu.lu@intel.com>

	* dwarf2out.c (dw_fde_node): Add fp_has_aligned_sp.
	(dwarf2out_frame_debug_expr): Set fp_has_aligned_sp.  Assert
	cfa.reg != FP for rule 18.  Assert fp_has_aligned_sp == 1 and
	simplify rule 19.

2008-07-05  H.J. Lu  <hongjiu.lu@intel.com>

	* dwarf2out.c (build_cfa_aligned_loc): New.
	(reg_save): Moved back.  Use build_cfa_aligned_loc.
	(int_loc_descriptor): Move prototype forward.  Move definition
	back. Also define if DWARF2_UNWIND_INFO is true.

2008-07-05  H.J. Lu  <hongjiu.lu@intel.com>
	    Xuepeng Guo  <xuepeng.guo@intel.com>

	PR debug/36728
	* dwarf2out.c (dw_fde_node): Add drap_reg and vdrap_reg.  Remove
	cfa_uses_expression.
	(add_cfi): Check drap_reg instead of cfa_uses_expression.
	(dwarf2out_frame_debug_expr): Add rule 20 to handle virtual
	drap.  Update rule 19 to set drap_reg instead of
	cfa_uses_expression.
	(dwarf2out_begin_prologue): Initialize drap_reg and vdrap_reg
	to INVALID_REGNUM.
	(based_loc_descr): Use cfa+offset to represent the location of
	arguments passed on stack when drap is used to align stack.

	* config/i386/i386.c (ix86_get_drap_rtx): Set RTX_FRAME_RELATED_P
	bit on virtual drap insn.

2008-07-04  H.J. Lu  <hongjiu.lu@intel.com>

	* cfgexpand.c (expand_stack_alignment): Fix a typo in comments.

2008-07-04  Xuepeng Guo  <xuepeng.guo@intel.com>

	PR debug/36728
	* dwarf2out.c (based_loc_descr): For local variables, use
	sp+offset when stack is aligned without drap and fp+offset
	when stack is aligned with drap.

2008-06-30  H.J. Lu  <hongjiu.lu@intel.com>

	* global.c (compute_regsets): Reorder.

2008-06-28  H.J. Lu  <hongjiu.lu@intel.com>

	* global.c (compute_regsets): Update comments.

2008-06-27  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (ix86_update_stack_boundary): Don't check
	eh_return.

2008-06-27  Xuepeng Guo  <xuepeng.guo@intel.com>

	* dwarf2out.c (dw_fde_node): Remove drap_regnum, uses_drap
	and drap_reg_saved.  Add cfa_uses_expression.
	(reg_save_with_expression): Removed.
	(add_cfi): Updated.  Don't redefine CFA when CFA was defined
	with DW_CFA_def_cfa_expression.
	(reg_save): Moved before build_cfa_loc.  Handle stack
	alignment.
	(dwarf2out_frame_debug_expr): Update Rule 18 and 19.
	(int_loc_descriptor): Moved before output_cfa_loc.
	(compute_frame_pointer_to_fb_displacement): Update assert.

2008-06-12  H.J. Lu  <hongjiu.lu@intel.com>

	* cfgexpand.c (expand_stack_alignment): Don't set need_drap
	to true for calling eh_return.

	* dwarf2out.c (dw_fde_struct): Remove calls_eh_return.
	(dwarf2out_begin_prologue): Updated.
	(reg_save_with_expression): Likewise.

	* config/i386/i386.c (find_drap_reg): Don't check calls_eh_return.
	(ix86_update_stack_boundary): Set incoming stack boundary
	to preferred stack boundary if a function calls eh_return.
	(ix86_expand_epilogue): Assert stack isn't realigned when
	eh_return is called.

2008-06-10  Joey Ye  <joey.ye@intel.com>

	* dwarf2out.c (based_loc_descr): Assert eliminate arg or frame
	pointer with hard frame or stack pointer if stack alignment is
	supported.

2008-06-08  H.J. Lu  <hongjiu.lu@intel.com>

	* caller-save.c (setup_save_areas): Upate comments for spill
	space allocation.

	* function.c (assign_stack_local_1): Update comments for stack
	alignment.
	(locate_and_pad_parm): Likewise.

2008-06-07  H.J. Lu  <hongjiu.lu@intel.com>

	* defaults.h (MAX_STACK_ALIGNMENT): Update comments.
	(MAX_SUPPORTED_STACK_ALIGNMENT): New.

	* cfgexpand.c (get_decl_align_unit): Ignore alignment if it
	exceeds MAX_SUPPORTED_STACK_ALIGNMENT.
	* function.c (assign_stack_local_1): Likewise.
	(locate_and_pad_parm): Likewise.

	* doc/tm.texi (MAX_STACK_ALIGNMENT): Updated.

2008-06-05  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (ix86_get_drap_rtx): Update comments.
	(ix86_internal_arg_pointer): Reformat.

2008-06-03  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (ix86_gen_andsp): New.
	(override_options): Initialize ix86_gen_andsp.
	(ix86_expand_prologue): Updated.
	(ix86_expand_epilogue): Likewise.

2008-06-03  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (find_drap_reg): Fix a comment typo.

2008-06-03  Joey Ye  <joey.ye@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (find_drap_reg): Use static-chain register
	if possible.

2008-06-02  Xuepeng Guo  <xuepeng.guo@intel.com>

	* dwarf2out.c (dw_fde_struct): Rename is_drap to uses_drap.
	(add_cfi): Replace is_drap with uses_drap.
	(dwarf2out_frame_debug_expr): Update the comments, replace is_drap
	with uses_drap and add two assertions.
	(reg_save_with_expression): Replace is_drap with uses_drap.

2008-06-01  H.J. Lu  <hongjiu.lu@intel.com>

	* reload1.c (clear_can_eliminate): Removed.
	(set_label_offsets): Updated.
	(elimination_effects): Likewise.
	(eliminate_regs_in_insn): Likewise.
	(mark_not_eliminable): Likewise.

2008-06-01  H.J. Lu  <hongjiu.lu@intel.com>

	* function.h (rtl_data): Remove save_param_ptr_reg.
	* config/i386/i386.c (ix86_get_drap_rtx): Likewise.
	(ix86_expand_prologue): Check call_used_regs on DRAP register
	instead of crtl->save_param_ptr_reg.
	(ix86_expand_epilogue): Likewise.

2008-05-30  H.J. Lu  <hongjiu.lu@intel.com>

	* defaults.h (INCOMING_STACK_BOUNDARY): New.

	* cfgexpand.c (expand_stack_alignment): Call
	targetm.calls.update_stack_boundary to update stack boundary
	if needed.  Check if stack alignment is needed.

	* target.h (gcc_target): Add update_stack_boundary.

	* target-def.h (TARGET_UPDATE_STACK_BOUNDARY): New.
	(TARGET_CALLS): Add TARGET_UPDATE_STACK_BOUNDARY.

	* config/i386/i386.c (ix86_update_stack_boundary): New.
	(ix86_get_drap_rtx): Likewise.
	(TARGET_UPDATE_STACK_BOUNDARY): Likewise.
	(ix86_handle_drap): Removed.
	(TARGET_GET_DRAP_RTX): Replace ix86_handle_drap with
	ix86_get_drap_rtx.

	* doc/tm.texi (INCOMING_STACK_BOUNDARY): New.
	(TARGET_UPDATE_STACK_BOUNDARY): Likewise.
	(TARGET_GET_DRAP_RTX): Updated.

2008-05-30  Joey Ye  <joey.ye@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* cfgexpand.c (handle_drap): Renamed to ...
	(expand_stack_alignment): This.  Call targetm.calls.get_drap_rtx
	instead of targetm.calls.internal_arg_pointer for virtual
	DRAP.
	(tree_expand_cfg): Updated.

	* target.h (gcc_target): Add get_drap_rtx.

	* target-def.h (TARGET_GET_DRAP_RTX): New.
	(TARGET_CALLS): Add TARGET_GET_DRAP_RTX.

	* config/i386/i386.c (find_drap_reg): Add a FIXME to use an
	unused call-clobbered register.
	(ix86_internal_arg_pointer): Move stack alignment and virtual
	drap processing to ...
	(ix86_handle_drap): This.  New.
	(TARGET_GET_DRAP_RTX): New.

	* doc/tm.texi (TARGET_GET_DRAP_RTX): New.

2008-05-29  H.J. Lu  <hongjiu.lu@intel.com>

	* reload1.c (mark_not_eliminable): Call clear_can_eliminate
	to clear the can_eliminate field.

2008-05-29  H.J. Lu  <hongjiu.lu@intel.com>

	* reload1.c (SET_NOT_ELIMINABLE): Removed.
	(clear_can_eliminate): New.
	(set_label_offsets): Replace SET_NOT_ELIMINABLE with
	clear_can_eliminate.
	(elimination_effects): Likewise.
	(eliminate_regs_in_insn): Likewise.

	* config/i386/i386.h (SET_NOT_ELIMINABLE): Removed.
	* doc/tm.texi (SET_NOT_ELIMINABLE): Likewise.

2008-05-29  H.J. Lu  <hongjiu.lu@intel.com>

	* doc/tm.texi (SET_NOT_ELIMINABLE): Updated.

2008-05-29  Joey Ye  <joey.ye@intel.com>

	* config/i386/i386.h (SET_NOT_ELIMINABLE): Add more checks on
	eliminable registers.

2008-05-28  H.J. Lu  <hongjiu.lu@intel.com>

	* reload1.c (SET_NOT_ELIMINABLE): Set can_eliminate directly.
	(set_not_eliminable): Removed.

	* config/i386/i386.h (SET_NOT_ELIMINABLE): Set can_eliminate
	directly.

2008-05-28  H.J. Lu  <hongjiu.lu@intel.com>

	* builtins.c (expand_builtin_longjmp): Replace comparison of
	MAX_STACK_ALIGNMENT and STACK_BOUNDARY with
	SUPPORTS_STACK_ALIGNMENT.
	(expand_builtin_apply): Likewise.
	* calls.c (emit_call_1): Likewise.
	* cfgexpand.c (get_decl_align_unit): Likewise.
	(expand_one_var): Likewise.
	(handle_drap): Likewise.
	* emit-rtl.c (gen_reg_rtx): Likewise.
	* function.c (assign_stack_local_1): Likewise.
	(assign_parms): Likewise.
	(locate_and_pad_parm): Likewise.
	* global.c (compute_regsets): Likewise.
	* reload1.c (set_label_offsets): Likewise.
	(elimination_effects): Likewise.
	(eliminate_regs_in_insn): Likewise.
	(update_eliminables): Likewise.
	(init_elim_table): Likewise.

	* defaults.h (MAX_STACK_ALIGNMENT): Add FIXME.
	(SUPPORTS_STACK_ALIGNMENT): New.

	* function.c (assign_stack_local_1): Limit alignment to
	MAX_STACK_ALIGNMENT.
	(locate_and_pad_parm): Likewise.

	* doc/tm.texi (MAX_STACK_ALIGNMENT): Add FIXME.

2008-05-28  H.J. Lu  <hongjiu.lu@intel.com>

	* builtins.c (expand_builtin_longjmp): Replace MAX_STACK_ALIGNMENT
	with comparison of MAX_STACK_ALIGNMENT and STACK_BOUNDARY.
	(expand_builtin_apply): Likewise.
	* calls.c (emit_call_1): Likewise.
	* cfgexpand.c (get_decl_align_unit): Likewise.
	(expand_one_var): Likewise.
	(handle_drap): Likewise.
	* emit-rtl.c (gen_reg_rtx): Likewise.
	* function.c (assign_stack_local_1): Likewise.
	(assign_parms): Likewise.
	(locate_and_pad_parm): Likewise.
	* global.c (compute_regsets): Likewise.
	* reload1.c (set_label_offsets): Likewise.
	(elimination_effects): Likewise.
	(eliminate_regs_in_insn): Likewise.
	(update_eliminables): Likewise.
	(init_elim_table): Likewise.

	* tree-vectorizer.c (vect_can_force_dr_alignment_p): Use
	MAX_STACK_ALIGNMENT to check stack alignment.

	* defaults.h (MAX_STACK_ALIGNMENT): Default to STACK_BOUNDARY.
	* doc/tm.texi (MAX_STACK_ALIGNMENT): Likewise.

2008-05-28  H.J. Lu  <hongjiu.lu@intel.com>

	* reload1.c (SET_NOT_ELIMINABLE): New.
	(set_not_eliminable): Remove gcc_assert.
	(set_label_offsets): Use SET_NOT_ELIMINABLE instead of
	set_not_eliminable.
	(elimination_effects): Likewise.
	(eliminate_regs_in_insn): Likewise.

	* config/i386/i386.c (ix86_can_elimination): Renamed to ...
	(ix86_can_eliminate): This.

	* config/i386/i386.h (SET_NOT_ELIMINABLE): New.

	* doc/tm.texi (SET_NOT_ELIMINABLE): New.

2008-05-28  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (ix86_can_elimination): New.
	* config/i386/i386-protos.h (ix86_can_eliminate): Likewise.
	* config/i386/i386.h (CAN_ELIMINATE): Use it.

2008-05-28  H.J. Lu  <hongjiu.lu@intel.com>

	* reload1.c (set_not_eliminatable): Renamed to ...
	(set_not_eliminable): This.
	(set_label_offsets): Updated.
	(elimination_effects): Likewise.
	(eliminate_regs_in_insn): Likewise.

2008-05-28  Richard Guenther  <rguenther@suse.de>
	    Joey Ye  <joey.ye@intel.com>

	* reload1.c (set_not_eliminatable): New.
	(set_label_offsets): Use it.
	(elimination_effects): Likewise.
	(eliminate_regs_in_insn): Likewise.

2008-05-28  Joey Ye  <joey.ye@intel.com>

	* dwarf2out.c (compute_frame_pointer_to_fb_displacement): Change
	assertion for stack realign.

2008-05-28  H.J. Lu  <hongjiu.lu@intel.com>

	* doc/tm.texi (LOCAL_ALIGNMENT): Revert the last change.
	* config/bfin/bfin.c (bfin_local_alignment): Likewise.
	* config/bfin/bfin.h (LOCAL_ALIGNMENT): Likewise.
	* config/bfin/bfin-protos.h (bfin_local_alignment): Likewise.
	* config/mips/mips.h (LOCAL_ALIGNMENT): Likewise.
	* config/mmix/mmix.c (mmix_local_alignment): Likewise.
	* config/mmix/mmix.h (LOCAL_ALIGNMENT): Likewise.
	* config/mmix/mmix-protos.h (mmix_local_alignment): Likewise.
	* config/rs6000/rs6000.h (LOCAL_ALIGNMENT): Likewise.
	* config/score/score.h (LOCAL_ALIGNMENT): Likewise.
	* config/sh/sh.h (LOCAL_ALIGNMENT): Likewise.
	* config/sparc/sparc.h (LOCAL_ALIGNMENT): Likewise.
	* config/spu/spu.h (LOCAL_ALIGNMENT): Likewise.

2008-05-27  Xuepeng Guo  <xuepeng.guo@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* dwarf2out.c (CUR_FDE): Removed.
	(dw_fde_struct): Reformat comments.
	(add_cfi): Updated to replace CUR_FDE with current_fde.
	Reformat and update comments.
	(dwarf2out_frame_debug_expr): Likewise.
	(reg_save_with_expression): Likewise.

2008-05-26  Joey Ye  <joey.ye@intel.com>

	* dwarf2out.c (based_loc_descr): Update assertion for stack
	realign.

2008-05-26  Joey Ye  <joey.ye@intel.com>

	* function.h (frame_pointer_needed_set): Remove.
	* global.c (compute_regsets): Remove frame_pointer_needed_set
	and add comments.
	* reload1.c (init_elim_table): Likewise.

2008-05-26  Joey Ye  <joey.ye@intel.com>

	* function.h (rtl_data): Add more descriptive comments to
	preferred_stack_boundary, stack_alignment_estimated,
	frame_pointer_needed_set, stack_realign_needed,
	stack_realign_processed, stack_realign_finalized.  Remove
	stack_realign_really.  Rename stack_alignment_used to
	max_used_stack_slot_alignment.

	* cfgexpand.c (get_decl_align_unit): Updated.
	(tree_expand_cfg): Likewise.
	* function.c (assign_stack_local_1): Likewise.
	(locate_and_pad_parm): Likewise.
	* config/i386/i386.c (ix86_finalize_stack_realign_flags): Likewise.

	* config/i386/i386.c (ix86_finalize_stack_realign_flags): Remove
	stack_realign_really and reuse stack_realign_needed.
	(ix86_expand_prologue): Likewise.
	(ix86_expand_epilogue): Likewise.

2008-05-25  H.J. Lu  <hongjiu.lu@intel.com>

	* builtins.c (expand_builtin_longjmp): Replace
	MAX_VECTORIZE_STACK_ALIGNMENT with MAX_STACK_ALIGNMENT.
	(expand_builtin_apply): Likewise.
	* calls.c (emit_call_1): Likewise.
	* cfgexpand.c (get_decl_align_unit): Likewise.
	(expand_one_var): Likewise.
	(handle_drap): Likewise.
	* emit-rtl.c (gen_reg_rtx): Likewise.
	* function.c (assign_stack_local_1): Likewise.
	(assign_parms): Likewise.
	(locate_and_pad_parm): Likewise.
	* global.c (compute_regsets): Likewise.
	* reload1.c (set_label_offsets): Likewise.
	(elimination_effects): Likewise.
	(eliminate_regs_in_insn): Likewise.
	(update_eliminables): Likewise.
	(init_elim_table): Likewise.
	* tree-vectorizer.c (vect_can_force_dr_alignment_p): Likewise.

	* defaults.h (MAX_VECTORIZE_STACK_ALIGNMENT): Renamed to ...
	(MAX_STACK_ALIGNMENT): This.

	* config/i386/i386.h (MAX_VECTORIZE_STACK_ALIGNMENT): Removed.
	(MAX_STACK_ALIGNMENT): New.

	* doc/tm.texi (MAX_STACK_ALIGNMENT): New.

2008-05-25  H.J. Lu  <hongjiu.lu@intel.com>

	* function.h (rtl_data): Replace need_frame_pointer and
	need_frame_pointer_set with frame_pointer_needed and
	frame_pointer_needed_set, respectively.
	(frame_pointer_needed): Replace need_frame_pointer with
	frame_pointer_needed.

	* global.c (compute_regsets): Replace need_frame_pointer_set
	with frame_pointer_needed_set.
	* reload1.c (init_elim_table): Likewise.

2008-05-18  Joey Ye  <joey.ye@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* caller-save.c (setup_save_areas): Call assign_stack_local_1
	instead of assign_stack_local to allow alignment reduction.

	* function.c (assign_stack_local_1): New function to implement
	original assign_stack_local with one additional parameter.
	(assign_stack_local): Wrap assign_stack_local_1 with one
	additional parameter.

	* rtl.h (assign_stack_local_1): Declare new funtion.

2008-05-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/36253
	* caller-save.c (insert_restore): Verify alignment of spill
	space.
	(insert_save): Likewise.

	* cfgexpand.c (LOCAL_ALIGNMENT): Removed.
	(get_decl_align_unit): Pass VOIDmode to LOCAL_ALIGNMENT.

	* defaults.h (LOCAL_ALIGNMENT): New. Provide default.

	* function.c (LOCAL_ALIGNMENT): Removed.
	(get_stack_local_alignment): New.
	(assign_stack_local): Use it.  Set alignment on stack slot.
	(assign_stack_temp_for_type): Use get_stack_local_alignment.

	* config/bfin/bfin.c (bfin_local_alignment): Updated.
	* config/bfin/bfin.h (LOCAL_ALIGNMENT): Likewise.
	* config/bfin/bfin-protos.h (bfin_local_alignment): Likewise.
	* config/i386/i386.h (LOCAL_ALIGNMENT): Likewise.
	* config/i386/i386-protos.h (ix86_local_alignment): Likewise.
	* config/mips/mips.h (LOCAL_ALIGNMENT): Likewise.
	* config/mmix/mmix.c (mmix_local_alignment): Likewise.
	* config/mmix/mmix.h (LOCAL_ALIGNMENT): Likewise.
	* config/mmix/mmix-protos.h (mmix_local_alignment): Likewise.
	* config/rs6000/rs6000.h (LOCAL_ALIGNMENT): Likewise.
	* config/score/score.h (LOCAL_ALIGNMENT): Likewise.
	* config/sh/sh.h (LOCAL_ALIGNMENT): Likewise.
	* config/sparc/sparc.h (LOCAL_ALIGNMENT): Likewise.
	* config/spu/spu.h (LOCAL_ALIGNMENT): Likewise.

	* config/i386/i386.c (ix86_local_alignment): Handle caller-save
	stack slot in XFmode.

	* config/rs6000/rs6000.h (LOCAL_ALIGNMENT_1): New.
	* config/sh/sh.h (LOCAL_ALIGNMENT_1): Likewise.

	* doc/tm.texi (LOCAL_ALIGNMENT): Add mode.

2008-05-15  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.h (GET_MODE_SPILL_ALIGNMENT): Removed.
	* defaults.h (GET_MODE_SPILL_ALIGNMENT): Likewise.
	* doc/rtl.texi (GET_MODE_SPILL_ALIGNMENT): Likewise.

	* emit-rtl.c (gen_reg_rtx): Replace GET_MODE_SPILL_ALIGNMENT
	with GET_MODE_ALIGNMENT.

2008-05-09  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (ix86_internal_arg_pointer): Check non-call
	exceptions instead of exceptions.

2008-05-07  H.J. Lu  <hongjiu.lu@intel.com>

	* defaults.h (GET_MODE_SPILL_ALIGNMENT): New.
	* config/i386/i386.h (GET_MODE_SPILL_ALIGNMENT): Likewise.

	* emit-rtl.c (gen_reg_rtx): Use GET_MODE_SPILL_ALIGNMENT instead
	of GET_MODE_ALIGNMENT.

	* doc/rtl.texi (GET_MODE_SPILL_ALIGNMENT): New.

2008-05-07  H.J. Lu  <hongjiu.lu@intel.com>
	    Joey Ye  <joey.ye@intel.com>

	* config/i386/i386.c (ix86_internal_arg_pointer): Check
	PREFERRED_STACK_BOUNDARY if there may be exceptions.

2008-05-07  H.J. Lu  <hongjiu.lu@intel.com>

	* calls.c (expand_call): Don't use callgraph to increase
	preferred_stack_boundary.

	* cgraph.h (cgraph_rtl_info): Use unsigned on
	preferred_incoming_stack_boundary.

	* final.c (rest_of_clean_state): Use unsigned on
	preferred_stack_boundary.

2008-05-06  Joey Ye  <joey.ye@intel.com>

	* calls.c (expand_call): Do calculate preferred stack
	boundary according to incoming stack boundary.

	* config/i386/i386.c (ix86_internal_arg_pointer): Check
	crtl->preferred_stack_boundary instead of PREFERRED_STACK_BOUNDARY.

2008-04-26  H.J. Lu  <hongjiu.lu@intel.com>

	* cfgexpand.c (handle_drap): Replace current_function_calls_alloca,
	current_function_has_nonlocal_goto and
	current_function_calls_eh_return with cfun->calls_alloca,
	crtl->has_nonlocal_goto and crtl->calls_eh_return, respectively.

	* dwarf2out.c (dwarf2out_begin_prologue): Replace
	cfun->calls_eh_return with crtl->calls_eh_return.

	* global.c (compute_regsets): Replace
	current_function_accesses_prior_frames with
	crtl->accesses_prior_frames.

	* config/i386/i386.c (find_drap_reg): Replace cfun->tail_call_emit
	and current_function_calls_eh_return with crtl->tail_call_emit
	and crtl->calls_eh_return, respectively.
	(ix86_internal_arg_pointer): Replace current_function_stdarg with
	cfun->stdarg.
	(ix86_expand_epilogue): Replace cfun->calls_eh_return with
	crtl->calls_eh_return.

2008-04-26  H.J. Lu  <hongjiu.lu@intel.com>

	* function.h (rtl_data): Change stack_alignment_used,
	stack_alignment_estimated, stack_realign_needed,
	stack_realign_really, need_drap, save_param_ptr_reg,
	stack_realign_processed and stack_realign_finalized to bool.

2008-04-21  H.J. Lu  <hongjiu.lu@intel.com>

	* cfgexpand.c (expand_one_var): Don't collect stack alignment
	on error_mark_node.

2008-04-19  H.J. Lu  <hongjiu.lu@intel.com>

	* cfgexpand.c (tree_expand_cfg): Initialize stack_alignment_used
	and stack_alignment_estimated to STACK_BOUNDARY.

	* function.h (function): Move stack_alignment_used,
	stack_alignment_estimated, stack_realign_needed,
	stack_realign_really, need_drap, save_param_ptr_reg,
	stack_realign_processed and stack_realign_finalized to ...
	(rtl_data): Here.
	(stack_realign_fp): Updated.
	(stack_realign_drap): Likewise.
	* calls.c (emit_call_1): Likewise.
	(expand_call): Likewise.
	(emit_library_call_value_1): Likewise.
	* cfgexpand.c (get_decl_align_unit): Likewise.
	(expand_one_var): Likewise.
	(handle_drap): Likewise.
	* emit-rtl.c (gen_reg_rtx): Likewise.
	* function.c (assign_stack_local): Likewise.
	(assign_parm_adjust_stack_rtl): Likewise.
	(assign_parms): Likewise.
	(locate_and_pad_parm): Likewise.
	* global.c (compute_regsets): Likewise.
	* reload1.c (reload): Likewise.
	(update_eliminables): Likewise.
	* config/i386/i386.c (ix86_compute_frame_layout): Likewise.
	(ix86_internal_arg_pointer): Likewise.
	(ix86_finalize_stack_realign_flags): Likewise.
	(ix86_expand_prologue): Likewise.
	(ix86_expand_epilogue): Likewise.

	* function.c (allocate_struct_function): Remove initialization
	of stack_alignment_used and stack_alignment_estimated.

2008-04-15  Joey Ye  <joey.ye@intel.com>

	*  global.c (compute_regsets): Replace cfun->need_frame_pointer_set
	with crtl->need_frame_pointer_set.
	* reload1.c (init_elim_table): Likewise.

	* function.h (function): Move need_frame_pointer and
	need_frame_pointer_set to ...
	(rtl_data): Here.
	(frame_pointer_needed): Updated.

2008-04-14  Xuepeng Guo  <xuepeng.guo@intel.com>
	    Joey Ye  <joey.ye@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* dwarf2out.c (struct dw_fde_struct): Rename is_stack_realign
	to stack_realign and is_drap_reg_saved to drap_reg_saved.  Add
	calls_eh_return.
	(add_cfi): Updated.
	(dwarf2out_frame_debug_expr): Likewise.
	(dwarf2out_begin_prologue): Initialize calls_eh_return.
	(reg_save_with_expression): Don't generate unwind information
	for restoring the stack pointer if __builtin_eh_return is called.

	* cfgexpand.c (handle_drap): Need drap if functon calls
	__builtin_eh_return.

	* config/i386/i386.c (find_drap_reg): Use DI_REG if function
	calls __builtin_eh_return.
	(ix86_internal_arg_pointer): Remove setting incoming stack
	boundary to preferred when __builtin_eh_return is called.
	(ix86_finalize_stack_realign_flags): New.
	(ix86_expand_prologue): Call ix86_finalize_stack_realign_flags.
	(ix86_expand_epilogue): Likewise.  Handle __builtin_eh_return
	with stack realignment.

2008-04-14  Joey Ye  <joey.ye@intel.com>

	* emit-rtl.c (gen_reg_rtx): Don't update stack_alignment_estimated
	if stack_align_prcocessed is true.

2008-04-14  Joey Ye  <joey.ye@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* cfgexpand.c (handle_drap): Make it void.  Return if
	MAX_VECTORIZE_STACK_ALIGNMENT is 0.
	(tree_expand_cfg): Call handle_drap.
	(gate_handle_drap): Removed.
	(pass_handle_drap): Likewise.
	* passes.c (pass_handle_drap): Likewise.
	* tree-pass.h (pass_handle_drap): Likewise.

2008-04-12  H.J. Lu  <hongjiu.lu@intel.com>

	* builtins.c (expand_builtin_longjmp): Don't check !cfun->need_drap
	when setting cfun->need_drap.
	(expand_builtin_apply): Likewise.
	* calls.c (emit_call_1): Likewise.
	* cfgexpand.c (handle_drap): Likewise.

2008-04-11  H.J. Lu  <hongjiu.lu@intel.com>

	* function.c (assign_stack_local): Update alignment_in_bits.
	Set alignment on stack slot.

2008-04-11  Joey Ye  <joey.ye@intel.com>

	* dojump.c (discard_pending_stack_adjust): Insert empty line,
	which makes it same as trunk.

2008-04-09  Joey Ye  <joey.ye@intel.com>

	* dojump.c (clear_pending_stack_adjust): Revert comments.

	* function.c (locate_and_pad_parm): cfun->preferred_stack_boundary
	should be max of outgoing parameter alignment.

	* tree-vectorizer.c (vect_can_force_dr_alignment_p): Don't
	collect stack alignment here.

	* config/i386/i386.c (ix86_compute_frame_layout): Add assertion.

2008-04-09  H.J. Lu  <hongjiu.lu@intel.com>

	* builtins.c (expand_builtin_setjmp_receiver): Replace
	current_function_internal_arg_pointer with
	crtl->args.internal_arg_pointer.
	(expand_builtin_apply_args_1): Likewise.
	* calls.c (expand_call): Likewise.
	* cfgexpand.c (handle_drap): Likewise.
	* function.c (instantiate_new_reg): Likewise.
	(get_arg_pointer_save_area): Likewise.
	* stmt.c (expand_nl_goto_receiver): Likewise.

	* function.h (function): Move drap_reg to ...
	(rtl_data): Here.

	* config/i386/i386.c (ix86_va_start): Replace
	current_function_internal_arg_pointer with
	crtl->args.internal_arg_pointer.
	(ix86_select_alt_pic_regnum): Replace cfun->drap_reg with
	crtl->drap_reg.
	(ix86_save_reg): Likewise.
	(ix86_internal_arg_pointer): Likewise.
	(ix86_expand_prologue): Likewise.
	(ix86_expand_epilogue): Likewise.

2008-04-08  Joey Ye  <joey.ye@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* builtins.c (expand_builtin_longjmp): Need drap for longjmp.
	(expand_builtin_apply): Need drap for builtin_apply.

	* calls.c (emit_call_1): Need drap for callee pop function call.

	* cfgexpand.c (gate_stack_realign): Renamed to ...
	(gate_handle_drap): This.
	(collect_stackrealign_info): Removed.
	(pass_collect_stackrealign_info): Likewise.
	(handle_drap): Check DRAP conditions here.  Update comments.
	(pass_handle_drap): Updated.  Remove PROP_rtl.

	* emit-rtl.c (gen_reg_rtx): Update stack_alignment_estimated.

	* passes.c (pass_collect_stackrealign_info): Removed.
	* tree-pass.h (pass_collect_stackrealign_info): Likewise.

	* tree-inline.c (expand_call_inline): Don't collect alignment
	information here.

2008-03-24  H.J. Lu  <hongjiu.lu@intel.com>

	* cfgexpand.c (get_decl_align_unit): Update stack_alignment_used.
	* function.c (assign_stack_local_1): Likewise.
	(locate_and_pad_parm): Likewise.
	(allocate_struct_function): Initialize stack_alignment_used.

	* function.h (function): Update stack_alignment_needed
	comment.  Add stack_alignment_used.

	* config/i386/i386.c (ix86_expand_prologue): For leaf function,
	check stack_alignment_used to set stack_realign_really.

2008-03-24  Joey Ye  <joey.ye@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (ix86_select_alt_pic_regnum): Check
	DRAP register.

2008-03-23  Uros Bizjak  <ubizjak@gmail.com>

	Revert:
	2008-03-05  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386-modes.def: Use 4 byte alignment on DI for
	32bit host.

	2008-03-19  Uros Bizjak  <ubizjak@gmail.com>

	PR target/35496
	* stor-layout.c (update_alignment_for_field): Set minimum alignment
	of the underlying type of a MS bitfield layout to the natural
	alignment of the type.

2008-03-22  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (ix86_function_regparm): Remove check
	ix86_force_align_arg_pointer in the last patch.

2008-03-22  Uros Bizjak  <ubizjak@gmail.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	PR target/12329
	* config/i386/i386.c (ix86_function_regparm): Limit the number of
	register passing arguments to 2 for nested functions.

2008-03-19  Joey Ye  <joey.ye@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>
	    Xuepeng Guo  <xuepeng.guo@intel.com>

	* builtins.c (expand_builtin_setjmp_receiver): Replace
	virtual_incoming_args_rtx with
	current_function_internal_arg_pointer.
	(expand_builtin_apply_args_1): Likewise.

	* calls.c (expand_call): Don't calculate preferred stack
	boundary according to incoming stack boundary. Replace 
	virtual_incoming_args_rtx with
	current_function_internal_arg_pointer.

	* cfgexpand.c (get_decl_align_unit): Estimate stack variable
	alignment and store to stack_alignment_estimated.
	(expand_one_var): Likewise.
	(gate_stack_realign): Gate new pass pass_collect_stackrealign_info
	and pass_handle_drap.
	(collect_stackrealign_info): Execute new pass
	pass_collect_stackrealign_info.
	(pass_collect_stackrealign_info): Define new pass.
	(handle_drap): Execute new pass pass_handle_drap.
	(pass_handle_drap): Define new pass.

	* defaults.h (MAX_VECTORIZE_STACK_ALIGNMENT): New.

	* dojump.c (clear_pending_stack_adjust): Leave an FIXME in
	comments in case pending stack ajustment is discard when stack 
	realign is needed.

	* flags.h (frame_pointer_needed): Removed.
	* final.c (frame_pointer_needed): Likewise.

	* function.c (assign_stack_local_1): Estimate stack variable 
	alignment and store to stack_alignment_estimated.
	(instantiate_new_reg): Instantiate virtual incoming args rtx to
	vDRAP if stack realignment and DRAP is needed.
	(assign_parms): Collect parameter/return type alignment and 
	contribute to stack_alignment_estimated.
	(locate_and_pad_parm): Likewise.
	(allocate_struct_function): Init stack_alignment_estimated.
	(get_arg_pointer_save_area): Replace virtual_incoming_args_rtx
	with current_function_internal_arg_pointer.

	* function.h (function): Add drap_reg, stack_alignment_estimated,
	need_frame_pointer, need_frame_pointer_set, stack_realign_needed,
	stack_realign_really, need_drap, save_param_ptr_reg,
	stack_realign_processed, and stack_realign_finalized.
	(frame_pointer_needed): New.
	(stack_realign_fp): Likewise.
	(stack_realign_drap): Likewise.

	* global.c (compute_regsets): Set frame_pointer_needed cannot_elim
	wrt stack_realign_needed.

	* stmt.c (expand_nl_goto_receiver): Replace 
	virtual_incoming_args_rtx with
	current_function_internal_arg_pointer.

	* passes.c (pass_collect_stackrealign_info): Insert this new pass
	immediately before expand.
	(pass_handle_drap): Insert this new pass immediately after expand.

	* tree-inline.c (expand_call_inline): Estimate stack variable
	alignment and store to stack_alignment_estimated.

	* tree-pass.h (pass_handle_drap): New.
	(pass_collect_stackrealign_info): Likewise.

	* tree-vectorizer.c (vect_can_force_dr_alignment_p): Estimate
	stack variable alignment and store to stack_alignment_estimated.

	* reload1.c (set_label_offsets): Assert that frame pointer must be
	elimiated to stack pointer in case stack realignment is estimated
	to happen without DRAP.
	(elimination_effects): Likewise.
	(eliminate_regs_in_insn): Likewise.
	(mark_not_eliminable): Likewise.
	(update_eliminables): Frame pointer is needed in case of stack
	realignment needed.
	(init_elim_table): Don't set frame_pointer_needed here.

	* config/i386/i386.c (ix86_force_align_arg_pointer_string): Break
	long line.
	(ix86_user_incoming_stack_boundary): New.
	(ix86_default_incoming_stack_boundary): Likewise.
	(ix86_incoming_stack_boundary): Likewise.
	(find_drap_reg): Likewise.
	(override_options): Overide option value for new options.
	(ix86_function_ok_for_sibcall): Sibcall is OK even stack need
	realigning.
	(ix86_handle_cconv_attribute): Stack realign no longer impacts
	number of regparm.
	(ix86_function_regparm): Likewise.
	(setup_incoming_varargs_64): Remove the logic to set
	stack_alignment_needed here.
	(ix86_va_start): Replace virtual_incoming_args_rtx with
	current_function_internal_arg_pointer.
	(ix86_save_reg): Replace force_align_arg_pointer with drap_reg.
	(ix86_compute_frame_layout): Compute frame layout wrt stack
	realignment.
	(ix86_internal_arg_pointer): Estimate if stack realignment is
	needed and returns appropriate arg pointer rtx accordingly.
	(ix86_expand_prologue): Finally decide if stack realignment
	is needed and generate prologue code accordingly.
	(ix86_expand_epilogue): Generate epilogue code wrt stack
	realignment is really needed or not.

	* config/i386/i386.h (MAIN_STACK_BOUNDARY): New.
	(ABI_STACK_BOUNDARY): Likewise.
	PREFERRED_STACK_BOUNDARY_DEFAULT): Likewise.
	(STACK_REALIGN_DEFAULT): Likewise.
	(INCOMING_STACK_BOUNDARY): Likewise.
	(MAX_VECTORIZE_STACK_ALIGNMENT): Likewise.
	(ix86_incoming_stack_boundary): Likewise.
	(REAL_PIC_OFFSET_TABLE_REGNUM): Updated to use BX_REG.
	(CAN_ELIMINATE): Redefine the macro to eliminate frame pointer to
	stack pointer and arg pointer to hard frame pointer in case of
	stack realignment without DRAP.
	(machine_function): Remove force_align_arg_pointer.

	* config/i386/i386.md (BX_REG): New.
	(R13_REG): Likewise.

	* config/i386/i386.opt (mforce_drap): New.
	(mincoming-stack-boundary): Likewise.
	(mstackrealign): Updated.

	* doc/extend.texi: Update force_align_arg_pointer.
	* doc/invoke.texi: Document -mincoming-stack-boundary.  Update
	-mstackrealign.

2008-03-19  Xuepeng Guo  <xuepeng.guo@intel.com>
	    Joey Ye  <joey.ye@intel.com>

	* dwarf2out.c (CUR_FDE): New.
	(reg_save_with_expression): Likewise.
	(dw_fde_struct): Add drap_regnum, stack_realignment,
	is_stack_realign, is_drap and is_drap_reg_saved.
	(add_cfi): If stack is realigned, call reg_save_with_expression
	to represent the location of stored vars.
	(dwarf2out_frame_debug_expr): Add rules 16-19 to handle stack
	realign.
	(output_cfa_loc): Handle DW_CFA_expression.
	(based_loc_descr): Update assert for stack realign.

2008-02-06  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386-modes.def: Use 8 byte alignment on DI for
	TARGET_ALIGN_DOUBLE.

2008-02-06  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386-modes.def: Use 4 byte alignment on DI for
	32bit host.

2008-02-06  Joey Ye  <joey.ye@intel.com>

	PR middle-end/34921
	* tree-nested.c (insert_field_into_struct): Set type alignment
	to field alignment if the former is less than the latter.