aboutsummaryrefslogtreecommitdiff
path: root/gcc/gensupport.c
diff options
context:
space:
mode:
authorAndreas Krebbel <Andreas.Krebbel@de.ibm.com>2013-10-10 12:01:23 +0000
committerAndreas Krebbel <krebbel@gcc.gnu.org>2013-10-10 12:01:23 +0000
commit5db40447b829acea13897238012ebf4dc8090b04 (patch)
treefede89564009dac8323afb9c942a675a3f1358a9 /gcc/gensupport.c
parented018d4b1f9996ee14eadc313b4bac1a0ce23b4c (diff)
downloadgcc-5db40447b829acea13897238012ebf4dc8090b04.zip
gcc-5db40447b829acea13897238012ebf4dc8090b04.tar.gz
gcc-5db40447b829acea13897238012ebf4dc8090b04.tar.bz2
re PR target/57377 (compiler cannot be built with RTL checking)
2013-10-10 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> PR target/57377 * gensupport.c (gen_mnemonic_attr): Handle (set (attr x) y) and (set_attr_alternative x ...) when searching for user defined mnemonic attribute. From-SVN: r203353
Diffstat (limited to 'gcc/gensupport.c')
-rw-r--r--gcc/gensupport.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/gcc/gensupport.c b/gcc/gensupport.c
index 28165e3..e6c5c23 100644
--- a/gcc/gensupport.c
+++ b/gcc/gensupport.c
@@ -2445,14 +2445,29 @@ gen_mnemonic_attr (void)
bool found = false;
/* Check if the insn definition already has
- (set_attr "mnemonic" ...). */
+ (set_attr "mnemonic" ...) or (set (attr "mnemonic") ...). */
if (XVEC (insn, 4))
for (i = 0; i < XVECLEN (insn, 4); i++)
- if (strcmp (XSTR (XVECEXP (insn, 4, i), 0), MNEMONIC_ATTR_NAME) == 0)
- {
- found = true;
- break;
- }
+ {
+ rtx set_attr = XVECEXP (insn, 4, i);
+
+ switch (GET_CODE (set_attr))
+ {
+ case SET_ATTR:
+ case SET_ATTR_ALTERNATIVE:
+ if (strcmp (XSTR (set_attr, 0), MNEMONIC_ATTR_NAME) == 0)
+ found = true;
+ break;
+ case SET:
+ if (GET_CODE (SET_DEST (set_attr)) == ATTR
+ && strcmp (XSTR (SET_DEST (set_attr), 0),
+ MNEMONIC_ATTR_NAME) == 0)
+ found = true;
+ break;
+ default:
+ break;
+ }
+ }
if (!found)
gen_mnemonic_setattr (mnemonic_htab, insn);