summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/rs6000.c
diff options
context:
space:
mode:
authorpthaugen <pthaugen@138bc75d-0d04-0410-961f-82ee72b054a4>2013-07-18 20:24:34 +0000
committerpthaugen <pthaugen@138bc75d-0d04-0410-961f-82ee72b054a4>2013-07-18 20:24:34 +0000
commit890f32a6632b89b36bedb7c2364264104863da92 (patch)
treeb7dd5103aa94f188bea73d436ea8af58de425452 /gcc/config/rs6000/rs6000.c
parent2120132c63d0c0746b53548eca6b14316c1ecf2d (diff)
downloadgcc-890f32a6632b89b36bedb7c2364264104863da92.tar.gz
* config/rs6000/rs6000.c (rs6000_option_override_internal): Adjust flag
interaction for new Power8 flags and VSX. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201041 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/rs6000.c')
-rw-r--r--gcc/config/rs6000/rs6000.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 3d86bd13381..2616e6cacc8 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -2966,7 +2966,10 @@ rs6000_option_override_internal (bool global_init_p)
if (rs6000_isa_flags_explicit & OPTION_MASK_VSX)
msg = N_("-mvsx requires hardware floating point");
else
- rs6000_isa_flags &= ~ OPTION_MASK_VSX;
+ {
+ rs6000_isa_flags &= ~ OPTION_MASK_VSX;
+ rs6000_isa_flags_explicit |= OPTION_MASK_VSX;
+ }
}
else if (TARGET_PAIRED_FLOAT)
msg = N_("-mvsx and -mpaired are incompatible");
@@ -2994,6 +2997,16 @@ rs6000_option_override_internal (bool global_init_p)
}
}
+ /* If hard-float/altivec/vsx were explicitly turned off then don't allow
+ the -mcpu setting to enable options that conflict. */
+ if ((!TARGET_HARD_FLOAT || !TARGET_ALTIVEC || !TARGET_VSX)
+ && (rs6000_isa_flags_explicit & (OPTION_MASK_SOFT_FLOAT
+ | OPTION_MASK_ALTIVEC
+ | OPTION_MASK_VSX)) != 0)
+ rs6000_isa_flags &= ~((OPTION_MASK_P8_VECTOR | OPTION_MASK_CRYPTO
+ | OPTION_MASK_DIRECT_MOVE)
+ & ~rs6000_isa_flags_explicit);
+
if (TARGET_DEBUG_REG || TARGET_DEBUG_TARGET)
rs6000_print_isa_options (stderr, 0, "before defaults", rs6000_isa_flags);