diff options
author | Chung-Lin Tang <cltang@codesourcery.com> | 2015-09-22 12:19:27 +0000 |
---|---|---|
committer | Chung-Lin Tang <cltang@gcc.gnu.org> | 2015-09-22 12:19:27 +0000 |
commit | b062ae05492afbb099e459d8cd7f498dd59de609 (patch) | |
tree | eba7e8959988c83051eadeee349062455448961a /gcc | |
parent | 01c102a6de3533060d0fdae935b70966182c3292 (diff) | |
download | gcc-b062ae05492afbb099e459d8cd7f498dd59de609.zip gcc-b062ae05492afbb099e459d8cd7f498dd59de609.tar.gz gcc-b062ae05492afbb099e459d8cd7f498dd59de609.tar.bz2 |
nios2.c (nios2_legitimize_address): When handling 'reg + reloc' cases...
2015-09-22 Chung-Lin Tang <cltang@codesourcery.com>
* config/nios2/nios2.c (nios2_legitimize_address): When handling
'reg + reloc' cases, allow first operand to be non-REG, and use
force_reg() to enforce address pattern.
From-SVN: r228012
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/nios2/nios2.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3de9aef..7eb8b6d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-09-22 Chung-Lin Tang <cltang@codesourcery.com> + + * config/nios2/nios2.c (nios2_legitimize_address): When handling + 'reg + reloc' cases, allow first operand to be non-REG, and use + force_reg() to enforce address pattern. + 2015-09-22 Alexander Fomin <alexander.fomin@intel.com> PR target/67480 diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c index 0fb11ea..76bc85d 100644 --- a/gcc/config/nios2/nios2.c +++ b/gcc/config/nios2/nios2.c @@ -2265,15 +2265,15 @@ nios2_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, Which will be output as '%tls_le(var+48)(r23)' in assembly. */ if (GET_CODE (x) == PLUS - && GET_CODE (XEXP (x, 0)) == REG && GET_CODE (XEXP (x, 1)) == CONST) { - rtx unspec, offset, reg = XEXP (x, 0); + rtx unspec, offset; split_const (XEXP (x, 1), &unspec, &offset); if (GET_CODE (unspec) == UNSPEC && !nios2_large_offset_p (XINT (unspec, 1)) && offset != const0_rtx) { + rtx reg = force_reg (Pmode, XEXP (x, 0)); unspec = copy_rtx (unspec); XVECEXP (unspec, 0, 0) = plus_constant (Pmode, XVECEXP (unspec, 0, 0), INTVAL (offset)); |