diff options
author | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-20 23:47:35 +0000 |
---|---|---|
committer | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-20 23:47:35 +0000 |
commit | 6b40961666f073231ed8a76e6e33deeda063cde7 (patch) | |
tree | 8247eb4232e8be98b7f61bd68bab2fd1a9f06ca3 /gcc/gensupport.c | |
parent | e6b1b76450af5f98696ecedd4bd9a0ed18cdb2a6 (diff) | |
parent | fc1ce0cf396bf638746d546a557158d87f13849b (diff) | |
download | gcc-6b40961666f073231ed8a76e6e33deeda063cde7.tar.gz |
Merge in trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@203881 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gensupport.c')
-rw-r--r-- | gcc/gensupport.c | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/gcc/gensupport.c b/gcc/gensupport.c index f15ac7ff9e5..1b80f956d1d 100644 --- a/gcc/gensupport.c +++ b/gcc/gensupport.c @@ -392,7 +392,7 @@ static struct queue_elem * queue_pattern (rtx pattern, struct queue_elem ***list_tail, const char *filename, int lineno) { - struct queue_elem *e = XNEW(struct queue_elem); + struct queue_elem *e = XNEW (struct queue_elem); e->data = pattern; e->filename = filename; e->lineno = lineno; @@ -429,7 +429,7 @@ remove_from_queue (struct queue_elem *elem, struct queue_elem **queue) static void add_define_attr (const char *name) { - struct queue_elem *e = XNEW(struct queue_elem); + struct queue_elem *e = XNEW (struct queue_elem); rtx t1 = rtx_alloc (DEFINE_ATTR); XSTR (t1, 0) = name; XSTR (t1, 1) = "no,yes"; @@ -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); @@ -2876,7 +2891,7 @@ record_insn_name (int code, const char *name) new_size = (insn_name_ptr_size ? insn_name_ptr_size * 2 : 512); insn_name_ptr = XRESIZEVEC (char *, insn_name_ptr, new_size); memset (insn_name_ptr + insn_name_ptr_size, 0, - sizeof(char *) * (new_size - insn_name_ptr_size)); + sizeof (char *) * (new_size - insn_name_ptr_size)); insn_name_ptr_size = new_size; } |