Commit 5db40447 by Andreas Krebbel Committed by Andreas Krebbel

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
parent ed018d4b
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.
2013-10-10 Andrew MacLeod <amacleod@redhat.com>
* config/aplha/alpha.c: Add gimple-ssa.h to include list.
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment