From: Andreas Krebbel Date: Thu, 10 Oct 2013 12:01:23 +0000 (+0000) Subject: re PR target/57377 (compiler cannot be built with RTL checking) X-Git-Tag: releases/gcc-4.9.0~3636 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5db40447b829acea13897238012ebf4dc8090b04;p=thirdparty%2Fgcc.git re PR target/57377 (compiler cannot be built with RTL checking) 2013-10-10 Andreas Krebbel 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cae8b0b4b8f1..fdf0f2cc1d3c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2013-10-10 Andreas Krebbel + + 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 * config/aplha/alpha.c: Add gimple-ssa.h to include list. diff --git a/gcc/gensupport.c b/gcc/gensupport.c index 28165e371379..e6c5c23a161c 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);