From: Richard Sandiford Date: Sun, 26 Oct 2014 10:42:00 +0000 (+0000) Subject: mips.c (mips_at_reg_p): Delete. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d44f6d93470c7a689fe0836b18f0aa01cca99cb8;p=gcc.git mips.c (mips_at_reg_p): Delete. gcc/ * config/mips/mips.c (mips_at_reg_p): Delete. (mips_need_noat_wrapper_p): Use FOR_EACH_SUBRTX. From-SVN: r216715 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c10b1ee48b1..89f29edc6d4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-10-26 Richard Sandiford + + * config/mips/mips.c (mips_at_reg_p): Delete. + (mips_need_noat_wrapper_p): Use FOR_EACH_SUBRTX. + 2014-10-26 Richard Sandiford * config/mips/mips.c (mips_record_lo_sum): Replace with... 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; }