summaryrefslogtreecommitdiff
path: root/gcc/config/mips
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-26 10:41:45 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-26 10:41:45 +0000
commitc5cc1cd18a8a7eea9aa1ba60d110fa41f4af097c (patch)
tree466e5b99bcc3a689e035bcd09a3af34840772fa7 /gcc/config/mips
parent24718ddbaaae09d0b69f9aef0f90161e9eb4d623 (diff)
downloadgcc-c5cc1cd18a8a7eea9aa1ba60d110fa41f4af097c.tar.gz
gcc/
* config/mips/mips.c (mips_sim_insn): Update comment. (mips_sim_wait_regs_2): Delete. (mips_sim_wait_regs_1): Use FOR_EACH_SUBRTX_VAR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216713 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mips')
-rw-r--r--gcc/config/mips/mips.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 8a0185c0c98..fe1f5f5f220 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -15468,7 +15468,7 @@ mips_annotate_pic_calls (void)
}
}
-/* A temporary variable used by for_each_rtx callbacks, etc. */
+/* A temporary variable used by note_uses callbacks, etc. */
static rtx_insn *mips_sim_insn;
/* A structure representing the state of the processor pipeline.
@@ -15562,23 +15562,16 @@ mips_sim_wait_reg (struct mips_sim *state, rtx_insn *insn, rtx reg)
}
}
-/* A for_each_rtx callback. If *X is a register, advance simulation state
- DATA until mips_sim_insn can read the register's value. */
-
-static int
-mips_sim_wait_regs_2 (rtx *x, void *data)
-{
- if (REG_P (*x))
- mips_sim_wait_reg ((struct mips_sim *) data, mips_sim_insn, *x);
- return 0;
-}
-
-/* Call mips_sim_wait_regs_2 (R, DATA) for each register R mentioned in *X. */
+/* A note_uses callback. For each register in *X, advance simulation
+ state DATA until mips_sim_insn can read the register's value. */
static void
mips_sim_wait_regs_1 (rtx *x, void *data)
{
- for_each_rtx (x, mips_sim_wait_regs_2, data);
+ subrtx_var_iterator::array_type array;
+ FOR_EACH_SUBRTX_VAR (iter, array, *x, NONCONST)
+ if (REG_P (*iter))
+ mips_sim_wait_reg ((struct mips_sim *) data, mips_sim_insn, *iter);
}
/* Advance simulation state STATE until all of INSN's register