aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorClaudiu Zissulescu <claziss@synopsys.com>2017-03-27 12:56:46 +0200
committerClaudiu Zissulescu <claziss@gcc.gnu.org>2017-03-27 12:56:46 +0200
commite5dcff3eb55dcccf1ad20d94c0f5680f75f3b75c (patch)
tree58a74d8196faec545c085f294fc96f8192b072b6 /gcc
parentc4192ad7027a3e991134b5d6d5f2d7451d058f48 (diff)
downloadgcc-e5dcff3eb55dcccf1ad20d94c0f5680f75f3b75c.zip
gcc-e5dcff3eb55dcccf1ad20d94c0f5680f75f3b75c.tar.gz
gcc-e5dcff3eb55dcccf1ad20d94c0f5680f75f3b75c.tar.bz2
[ARC] Fix move_double_src_operand predicate.
Durring compilation process, (subreg (mem ...) ...) can occur. Hence, we need to check if the address of mem is a valid one. This patch is fixing this check by directly calling the address_operand, instead of calling move_double_src_operand, as the latter is always checking against the original mode, thus, returning false when the inner and outer modes are different. gcc/ 2017-03-27 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/predicates.md (move_double_src_operand): Replace the call to move_double_src_operand with a call to address_operand. From-SVN: r246499
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/arc/predicates.md2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2740aa6..6296cdd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2017-03-27 Claudiu Zissulescu <claziss@synopsys.com>
+ * config/arc/predicates.md (move_double_src_operand): Replace the
+ call to move_double_src_operand with a call to address_operand.
+
+2017-03-27 Claudiu Zissulescu <claziss@synopsys.com>
+
* config/arc/elf.h (ARGET_ARC_TP_REGNO_DEFAULT): Define.
* config/arc/linux.h (ARGET_ARC_TP_REGNO_DEFAULT): Likewise.
* config/arc/arc.opt (mtp-regno): Use ARGET_ARC_TP_REGNO_DEFAULT.
diff --git a/gcc/config/arc/predicates.md b/gcc/config/arc/predicates.md
index 8dd8d55..9e60cb7 100644
--- a/gcc/config/arc/predicates.md
+++ b/gcc/config/arc/predicates.md
@@ -318,7 +318,7 @@
/* (subreg (mem ...) ...) can occur here if the inner part was once a
pseudo-reg and is now a stack slot. */
if (GET_CODE (SUBREG_REG (op)) == MEM)
- return move_double_src_operand (SUBREG_REG (op), mode);
+ return address_operand (XEXP (SUBREG_REG (op), 0), mode);
else
return register_operand (op, mode);
case MEM :