mirror of git://gcc.gnu.org/git/gcc.git
Disable -mpreferred-stack-boundary options for Windows.
From-SVN: r166120
This commit is contained in:
parent
f81c977403
commit
cc825d987a
|
@ -1,3 +1,12 @@
|
||||||
|
2010-10-31 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* lib/target-supports.exp
|
||||||
|
(check_effective_target_automatic_stack_alignment): True for
|
||||||
|
x86 but not windows.
|
||||||
|
* g++.dg/torture/stackalign/stackalign.exp: Use it to protect
|
||||||
|
use of the preferred-stack-boundary arguments.
|
||||||
|
* gcc.dg/torture/stackalign/stackalign.exp: Likewise.
|
||||||
|
|
||||||
2010-10-31 H.J. Lu <hongjiu.lu@intel.com>
|
2010-10-31 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR target/46142
|
PR target/46142
|
||||||
|
|
|
@ -18,19 +18,15 @@
|
||||||
# This harness is for tests that should be run at all optimisation levels.
|
# This harness is for tests that should be run at all optimisation levels.
|
||||||
|
|
||||||
load_lib g++-dg.exp
|
load_lib g++-dg.exp
|
||||||
|
dg-init
|
||||||
# Only run on targets which support automatic stack alignment.
|
|
||||||
if { ![check_effective_target_automatic_stack_alignment] } then {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
set additional_flags ""
|
set additional_flags ""
|
||||||
if { [istarget i?86*-*-*] || [istarget x86_64-*-*] } then {
|
|
||||||
|
# If automatic stack alignment is supported, force it on.
|
||||||
|
if { [check_effective_target_automatic_stack_alignment] } then {
|
||||||
lappend additional_flags "-mstackrealign"
|
lappend additional_flags "-mstackrealign"
|
||||||
lappend additional_flags "-mpreferred-stack-boundary=5"
|
lappend additional_flags "-mpreferred-stack-boundary=5"
|
||||||
}
|
}
|
||||||
|
|
||||||
dg-init
|
|
||||||
gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.C]] $additional_flags
|
gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.C]] $additional_flags
|
||||||
if { [check_effective_target_fpic] } then {
|
if { [check_effective_target_fpic] } then {
|
||||||
lappend additional_flags "-fpic"
|
lappend additional_flags "-fpic"
|
||||||
|
|
|
@ -19,15 +19,12 @@
|
||||||
|
|
||||||
load_lib gcc-dg.exp
|
load_lib gcc-dg.exp
|
||||||
|
|
||||||
# Only run on targets which support automatic stack alignment.
|
|
||||||
if { ![check_effective_target_automatic_stack_alignment] } then {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
set additional_flags ""
|
set additional_flags ""
|
||||||
if { [istarget i?86*-*-*] || [istarget x86_64-*-*] } then {
|
if { [check_effective_target_automatic_stack_alignment] } then {
|
||||||
lappend additional_flags "-mstackrealign"
|
lappend additional_flags "-mstackrealign"
|
||||||
lappend additional_flags "-mpreferred-stack-boundary=5"
|
lappend additional_flags "-mpreferred-stack-boundary=5"
|
||||||
|
}
|
||||||
|
if { [istarget i?86*-*-*] || [istarget x86_64-*-*] } then {
|
||||||
lappend additional_flags "-mno-mmx"
|
lappend additional_flags "-mno-mmx"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +37,7 @@ if { [check_effective_target_fpic] } then {
|
||||||
gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] $pic_additional_flags
|
gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] $pic_additional_flags
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [istarget i?86*-*-*] || [istarget x86_64-*-*] } then {
|
if { [check_effective_target_automatic_stack_alignment] } then {
|
||||||
lappend additional_flags "-mforce-drap"
|
lappend additional_flags "-mforce-drap"
|
||||||
gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] $additional_flags
|
gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] $additional_flags
|
||||||
if { [check_effective_target_fpic] } then {
|
if { [check_effective_target_fpic] } then {
|
||||||
|
|
|
@ -3551,8 +3551,15 @@ proc check_effective_target_4byte_wchar_t { } {
|
||||||
# Return 1 if the target supports automatic stack alignment.
|
# Return 1 if the target supports automatic stack alignment.
|
||||||
|
|
||||||
proc check_effective_target_automatic_stack_alignment { } {
|
proc check_effective_target_automatic_stack_alignment { } {
|
||||||
# Not "stack alignment" per se, but proper stack alignment of decls.
|
# Ordinarily x86 supports automatic stack alignment ...
|
||||||
return 1;
|
if { [istarget i?86*-*-*] || [istarget x86_64-*-*] } then {
|
||||||
|
if { [istarget *-*-mingw*] || [istarget *-*-cygwin*] } {
|
||||||
|
# ... except Win64 SEH doesn't. Succeed for Win32 though.
|
||||||
|
return [check_effective_target_ilp32];
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Return 1 if avx instructions can be compiled.
|
# Return 1 if avx instructions can be compiled.
|
||||||
|
|
Loading…
Reference in New Issue