diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2012-03-13 17:21:23 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2012-03-13 17:21:23 +0100 |
commit | ff71e554beee40f627444101b9567b1868c24650 (patch) | |
tree | 1dbc70f3e873d3956808761b223e10da039d1d8f /gcc | |
parent | 62a1c0416faf365a7d1fc9c31e009d784ef832f2 (diff) | |
download | gcc-ff71e554beee40f627444101b9567b1868c24650.zip gcc-ff71e554beee40f627444101b9567b1868c24650.tar.gz gcc-ff71e554beee40f627444101b9567b1868c24650.tar.bz2 |
i386.c (ix86_decompose_address): Handle subregs of AND zero extended address correctly.
* config/i386/i386.c (ix86_decompose_address): Handle subregs of
AND zero extended address correctly.
From-SVN: r185343
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4c6c6ed..9280a31 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2012-03-13 Uros Bizjak <ubizjak@gmail.com> + * config/i386/i386.c (ix86_decompose_address): Handle subregs of + AND zero extended address correctly. + +2012-03-13 Uros Bizjak <ubizjak@gmail.com> + * config/i386/predicates.md (tls_symbolic_operand): Declare as special predicate. (tls_modbase_operand): Ditto. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 1a18dc7..24f51fb 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -11435,10 +11435,14 @@ ix86_decompose_address (rtx addr, struct ix86_address *out) { addr = XEXP (addr, 0); - /* Strip subreg. */ - if (GET_CODE (addr) == SUBREG - && GET_MODE (SUBREG_REG (addr)) == SImode) + /* Adjust SUBREGs. */ + if (GET_MODE (addr) == DImode) + addr = gen_rtx_SUBREG (SImode, addr, 0); + else if (GET_CODE (addr) == SUBREG + && GET_MODE (SUBREG_REG (addr)) == SImode) addr = SUBREG_REG (addr); + else + return 0; } } |