aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2017-07-23 12:28:26 +0200
committerUros Bizjak <uros@gcc.gnu.org>2017-07-23 12:28:26 +0200
commitf36dda3b640088390c182eae1a44f07d1041eb27 (patch)
treed3edad4ade9231b06e6ec6b2f60db020220c4d08 /gcc/config
parent4a15d84228ee29d55cd011094f82c8d4fa9a5a76 (diff)
downloadgcc-f36dda3b640088390c182eae1a44f07d1041eb27.zip
gcc-f36dda3b640088390c182eae1a44f07d1041eb27.tar.gz
gcc-f36dda3b640088390c182eae1a44f07d1041eb27.tar.bz2
re PR target/80569 (i686: "shrx" instruction generated in 16-bit mode)
PR target/80569 * config/i386/i386.c (ix86_option_override_internal): Disable BMI, BMI2 and TBM instructions for -m16. testsuite/ChangeLog: PR target/80569 * gcc.target/i386/pr80569.c: New test. From-SVN: r250459
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/i386.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index ca29135..b7ef554 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -6284,6 +6284,12 @@ ix86_option_override_internal (bool main_args_p,
opts->x_ix86_isa_flags
|= OPTION_MASK_ISA_LZCNT & ~opts->x_ix86_isa_flags_explicit;
+ /* Disable BMI, BMI2 and TBM instructions for -m16. */
+ if (TARGET_16BIT_P(opts->x_ix86_isa_flags))
+ opts->x_ix86_isa_flags
+ &= ~((OPTION_MASK_ISA_BMI | OPTION_MASK_ISA_BMI2 | OPTION_MASK_ISA_TBM)
+ & ~opts->x_ix86_isa_flags_explicit);
+
/* Validate -mpreferred-stack-boundary= value or default it to
PREFERRED_STACK_BOUNDARY_DEFAULT. */
ix86_preferred_stack_boundary = PREFERRED_STACK_BOUNDARY_DEFAULT;