diff options
author | krebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-10 12:01:23 +0000 |
---|---|---|
committer | krebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-10 12:01:23 +0000 |
commit | c534412bc9faa838b2aead6aef5e86adec0c7b2e (patch) | |
tree | fede89564009dac8323afb9c942a675a3f1358a9 /gcc/gensupport.c | |
parent | 02d1b0010e3c60b046c2f9e86e70c81eaed72549 (diff) | |
download | gcc-c534412bc9faa838b2aead6aef5e86adec0c7b2e.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203353 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gensupport.c')
-rw-r--r-- | gcc/gensupport.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/gcc/gensupport.c b/gcc/gensupport.c index 28165e37137..e6c5c23a161 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); |