diff options
author | Jan Beulich <jbeulich@novell.com> | 2005-01-31 08:48:32 +0000 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2005-01-31 08:48:32 +0000 |
commit | 60b9a617725df23ea629c34a83919bf320082a7d (patch) | |
tree | 41c516899c81c93b7ef9997355ee9e56e126c483 /opcodes/ia64-gen.c | |
parent | e901b190a91d42356660e45e459c60fac24b2e7d (diff) | |
download | gdb-60b9a617725df23ea629c34a83919bf320082a7d.zip gdb-60b9a617725df23ea629c34a83919bf320082a7d.tar.gz gdb-60b9a617725df23ea629c34a83919bf320082a7d.tar.bz2 |
gas/
2005-01-31 Jan Beulich <jbeulich@novell.com>
* config/tc-ia64.c (parse_operands): Also handle alloc without first
input being ar.pfs.
gas/testsuite/
2005-01-31 Jan Beulich <jbeulich@novell.com>
* gas/ia64/pseudo.[ds]: New.
* gas/ia64/ia64.exp: Run new test.
opcodes/
2005-01-31 Jan Beulich <jbeulich@novell.com>
* ia64-gen.c (NELEMS): Define.
(shrink): Generate alias with missing second predicate register when
opcode has two outputs and these are both predicates.
* ia64-opc-i.c (FULL17): Define.
(ia64_opcodes_i): Add mov-to-pr alias without second input. Use FULL17
here to generate output template.
(TBITCM, TNATCM): Undefine after use.
* ia64-opc-m.c (ia64_opcodes_i): Add alloc alias without ar.pfs as
first input. Add ld16 aliases without ar.csd as second output. Add
st16 aliases without ar.csd as second input. Add cmpxchg aliases
without ar.ccv as third input. Add cmp8xchg16 aliases without ar.csd/
ar.ccv as third/fourth inputs. Consolidate through...
(CMPXCHG_acq, CMPXCHG_rel, CMPXCHG_1, CMPXCHG_2, CMPXCHG_4, CMPXCHG_8,
CMPXCHGn, CMP8XCHG16, CMPXCHG_ALL): Define.
* ia64-asmtab.c: Regenerate.
Diffstat (limited to 'opcodes/ia64-gen.c')
-rw-r--r-- | opcodes/ia64-gen.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/opcodes/ia64-gen.c b/opcodes/ia64-gen.c index c38cc35..bfad2f7 100644 --- a/opcodes/ia64-gen.c +++ b/opcodes/ia64-gen.c @@ -56,6 +56,7 @@ const char * program_name = NULL; int debug = 0; +#define NELEMS(a) (sizeof (a) / sizeof ((a)[0])) #define tmalloc(X) (X *) xmalloc (sizeof (X)) /* The main opcode table entry. Each entry is a unique combination of @@ -2725,7 +2726,26 @@ shrink (table) int curr_opcode; for (curr_opcode = 0; table[curr_opcode].name != NULL; curr_opcode++) - add_opcode_entry (table + curr_opcode); + { + add_opcode_entry (table + curr_opcode); + if (table[curr_opcode].num_outputs == 2 + && ((table[curr_opcode].operands[0] == IA64_OPND_P1 + && table[curr_opcode].operands[1] == IA64_OPND_P2) + || (table[curr_opcode].operands[0] == IA64_OPND_P2 + && table[curr_opcode].operands[1] == IA64_OPND_P1))) + { + struct ia64_opcode *alias = tmalloc(struct ia64_opcode); + unsigned i; + + *alias = table[curr_opcode]; + for (i = 2; i < NELEMS (alias->operands); ++i) + alias->operands[i - 1] = alias->operands[i]; + alias->operands[NELEMS (alias->operands) - 1] = IA64_OPND_NIL; + --alias->num_outputs; + alias->flags |= PSEUDO; + add_opcode_entry (alias); + } + } } |