From 9ec960239680726720385bcb82725d0c14204546 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Tue, 13 Mar 2012 11:35:19 +0100 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 17aa11f0b78..dd02f1864b8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-03-13 Uros Bizjak + + * config/i386/i386.c (ix86_decompose_address): Prevent %fs:(%reg) + addresses only when %reg is not in word mode. + 2012-03-13 Rainer Orth * config/microblaze/microblaze.md: Fix typo. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index e3668927cb6..1a18dc7a3f2 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. */ -- 2.30.2