summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-27 18:41:47 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-27 18:41:47 +0000
commit2bcb1d5714e9a13ff423fb7b6f3930bf8eb820ef (patch)
treef97d77074662430d47fc081e8f098efb43319ae5
parent31f6a8fe5c6205f843229f1859629cdee12e6801 (diff)
downloadgcc-2bcb1d5714e9a13ff423fb7b6f3930bf8eb820ef.tar.gz
gcc/
* config/i386/i386.c (extended_reg_mentioned_1): Delete. (x86_extended_reg_mentioned_p): Use FOR_EACH_SUBRTX. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216759 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/i386.c23
2 files changed, 14 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7a87dcea028..a0c8dec6d0b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2014-10-27 Richard Sandiford <richard.sandiford@arm.com>
+ * config/i386/i386.c (extended_reg_mentioned_1): Delete.
+ (x86_extended_reg_mentioned_p): Use FOR_EACH_SUBRTX.
+
+2014-10-27 Richard Sandiford <richard.sandiford@arm.com>
+
* config/i386/i386.c: Include rtl-iter.h
(ix86_check_avx256_register): Take a const_rtx and return a bool.
(ix86_check_avx256_stores): Update call accordingly.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 57a2d07da8b..408fbd9cd54 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -39695,25 +39695,20 @@ x86_extended_QIreg_mentioned_p (rtx_insn *insn)
return false;
}
-/* Return nonzero when P points to register encoded via REX prefix.
- Called via for_each_rtx. */
-static int
-extended_reg_mentioned_1 (rtx *p, void *)
-{
- unsigned int regno;
- if (!REG_P (*p))
- return 0;
- regno = REGNO (*p);
- return REX_INT_REGNO_P (regno) || REX_SSE_REGNO_P (regno);
-}
-
/* Return true when INSN mentions register that must be encoded using REX
prefix. */
bool
x86_extended_reg_mentioned_p (rtx insn)
{
- return for_each_rtx (INSN_P (insn) ? &PATTERN (insn) : &insn,
- extended_reg_mentioned_1, NULL);
+ subrtx_iterator::array_type array;
+ FOR_EACH_SUBRTX (iter, array, INSN_P (insn) ? PATTERN (insn) : insn, NONCONST)
+ {
+ const_rtx x = *iter;
+ if (REG_P (x)
+ && (REX_INT_REGNO_P (REGNO (x)) || REX_SSE_REGNO_P (REGNO (x))))
+ return true;
+ }
+ return false;
}
/* If profitable, negate (without causing overflow) integer constant