summaryrefslogtreecommitdiff
path: root/gcc/config/mips
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-26 10:42:00 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-26 10:42:00 +0000
commitd736bde58498c1e617bf1dab6aafb99de1866256 (patch)
treeffa09d4eb94fd37728b85132cab38266962321d1 /gcc/config/mips
parent548765d9dc2ab900ec6b528d5762cd93c9f3cb1d (diff)
downloadgcc-d736bde58498c1e617bf1dab6aafb99de1866256.tar.gz
gcc/
* config/mips/mips.c (mips_at_reg_p): Delete. (mips_need_noat_wrapper_p): Use FOR_EACH_SUBRTX. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216715 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mips')
-rw-r--r--gcc/config/mips/mips.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index e0d701b532b..fc16a409d81 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -17528,26 +17528,20 @@ mips_epilogue_uses (unsigned int regno)
return false;
}
-/* A for_each_rtx callback. Stop the search if *X is an AT register. */
-
-static int
-mips_at_reg_p (rtx *x, void *data ATTRIBUTE_UNUSED)
-{
- return REG_P (*x) && REGNO (*x) == AT_REGNUM;
-}
-
/* Return true if INSN needs to be wrapped in ".set noat".
INSN has NOPERANDS operands, stored in OPVEC. */
static bool
mips_need_noat_wrapper_p (rtx_insn *insn, rtx *opvec, int noperands)
{
- int i;
-
if (recog_memoized (insn) >= 0)
- for (i = 0; i < noperands; i++)
- if (for_each_rtx (&opvec[i], mips_at_reg_p, NULL))
- return true;
+ {
+ subrtx_iterator::array_type array;
+ for (int i = 0; i < noperands; i++)
+ FOR_EACH_SUBRTX (iter, array, opvec[i], NONCONST)
+ if (REG_P (*iter) && REGNO (*iter) == AT_REGNUM)
+ return true;
+ }
return false;
}