aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2012-03-13 11:35:19 +0100
committerUros Bizjak <uros@gcc.gnu.org>2012-03-13 11:35:19 +0100
commit9ec960239680726720385bcb82725d0c14204546 (patch)
tree9e2a04181ded7407cc5f7f845d66e02e07936de8 /gcc
parentd47657bd1dff3050fceaf1c755db4c47a536bd36 (diff)
downloadgcc-9ec960239680726720385bcb82725d0c14204546.zip
gcc-9ec960239680726720385bcb82725d0c14204546.tar.gz
gcc-9ec960239680726720385bcb82725d0c14204546.tar.bz2
i386.c (ix86_decompose_address): Prevent %fs:(%reg) addresses only when %reg is not in word mode.
* config/i386/i386.c (ix86_decompose_address): Prevent %fs:(%reg) addresses only when %reg is not in word mode. From-SVN: r185327
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/i386.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 17aa11f..dd02f18 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-13 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.c (ix86_decompose_address): Prevent %fs:(%reg)
+ addresses only when %reg is not in word mode.
+
2012-03-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/microblaze/microblaze.md: Fix typo.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index e366892..1a18dc7 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -11563,8 +11563,10 @@ ix86_decompose_address (rtx addr, struct ix86_address *out)
return 0;
}
- if (seg != SEG_DEFAULT && (base || index)
- && !TARGET_TLS_INDIRECT_SEG_REFS)
+/* Address override works only on the (%reg) part of %fs:(%reg). */
+ if (seg != SEG_DEFAULT
+ && ((base && GET_MODE (base) != word_mode)
+ || (index && GET_MODE (index) != word_mode)))
return 0;
/* Extract the integral value of scale. */