aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2014-10-27 18:40:13 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2014-10-27 18:40:13 +0000
commit3dfc96ea690917c6d15775c1189140922dd35bca (patch)
tree3a4eeddddd2e815045886aef32075d970c2df5c2 /gcc
parent3e605b20a0c804d57d4be0f4f2bbab8b4e42fce6 (diff)
downloadgcc-3dfc96ea690917c6d15775c1189140922dd35bca.zip
gcc-3dfc96ea690917c6d15775c1189140922dd35bca.tar.gz
gcc-3dfc96ea690917c6d15775c1189140922dd35bca.tar.bz2
spu.c: Include rtl-iter.h
gcc/ * config/spu/spu.c: Include rtl-iter.h (ea_symbol_ref): Replace with... (ea_symbol_ref_p): ...this new function. (spu_legitimate_address_p): Update call accordingly. (spu_legitimate_constant_p): Likewise. Use FOR_EACH_SUBRTX. From-SVN: r216752
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/spu/spu.c14
2 files changed, 16 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f588f03..b5dc7f2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2014-10-27 Richard Sandiford <richard.sandiford@arm.com>
+
+ * config/spu/spu.c: Include rtl-iter.h
+ (ea_symbol_ref): Replace with...
+ (ea_symbol_ref_p): ...this new function.
+ (spu_legitimate_address_p): Update call accordingly.
+ (spu_legitimate_constant_p): Likewise. Use FOR_EACH_SUBRTX.
+
2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey <tromey@redhat.com>
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index 5618636..ef1ccef 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -77,6 +77,7 @@
#include "dumpfile.h"
#include "cfgloop.h"
#include "builtins.h"
+#include "rtl-iter.h"
/* Builtin types, data and prototypes. */
@@ -3474,10 +3475,9 @@ exp2_immediate_p (rtx op, enum machine_mode mode, int low, int high)
/* Return true if X is a SYMBOL_REF to an __ea qualified variable. */
-static int
-ea_symbol_ref (rtx *px, void *data ATTRIBUTE_UNUSED)
+static bool
+ea_symbol_ref_p (const_rtx x)
{
- rtx x = *px;
tree decl;
if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS)
@@ -3504,13 +3504,15 @@ ea_symbol_ref (rtx *px, void *data ATTRIBUTE_UNUSED)
bool
spu_legitimate_constant_p (enum machine_mode mode, rtx x)
{
+ subrtx_iterator::array_type array;
if (GET_CODE (x) == HIGH)
x = XEXP (x, 0);
/* Reject any __ea qualified reference. These can't appear in
instructions but must be forced to the constant pool. */
- if (for_each_rtx (&x, ea_symbol_ref, 0))
- return 0;
+ FOR_EACH_SUBRTX (iter, array, x, ALL)
+ if (ea_symbol_ref_p (*iter))
+ return 0;
/* V4SI with all identical symbols is valid. */
if (!flag_pic
@@ -3556,7 +3558,7 @@ spu_legitimate_address_p (enum machine_mode mode,
case CONST:
/* Keep __ea references until reload so that spu_expand_mov can see them
in MEMs. */
- if (ea_symbol_ref (&x, 0))
+ if (ea_symbol_ref_p (x))
return !reload_in_progress && !reload_completed;
return !TARGET_LARGE_MEM;