rs6000.c (rs6000_option_override_internal): Adjust flag interaction for new Power8 flags and VSX.

* config/rs6000/rs6000.c (rs6000_option_override_internal): Adjust flag
	interaction for new Power8 flags and VSX.

From-SVN: r201041
This commit is contained in:
Pat Haugen 2013-07-18 20:24:34 +00:00 committed by Pat Haugen
parent ec87a337f3
commit ed1fd9999c
2 changed files with 19 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2013-07-18 Pat Haugen <pthaugen@us.ibm.com>
* config/rs6000/rs6000.c (rs6000_option_override_internal): Adjust flag
interaction for new Power8 flags and VSX.
2013-07-18 Sriraman Tallam <tmsriram@google.com>
PR middle-end/57698

View File

@ -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);