aboutsummaryrefslogtreecommitdiff
path: root/opcodes/ia64-gen.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@tuliptree.org>2001-03-20 02:32:27 +0000
committerJim Wilson <wilson@tuliptree.org>2001-03-20 02:32:27 +0000
commitf4bc6bb0c292785eba639c46abd2edc134ebfb17 (patch)
tree30672de153f0bbb5b9f7f6ac8b4095d615b92453 /opcodes/ia64-gen.c
parent3c37485b16d873d9fd8d5d448dce60a2d890e286 (diff)
downloadgdb-f4bc6bb0c292785eba639c46abd2edc134ebfb17.zip
gdb-f4bc6bb0c292785eba639c46abd2edc134ebfb17.tar.gz
gdb-f4bc6bb0c292785eba639c46abd2edc134ebfb17.tar.bz2
Fix 2 bugs with parsing the resource dependency tables.
* ia64-gen.c (fetch_insn_class): If xsect, then ignore comment and notestr if larger than xsect. (in_class): Handle format M5. * ia64-asmtab.c: Regnerate.
Diffstat (limited to 'opcodes/ia64-gen.c')
-rw-r--r--opcodes/ia64-gen.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/opcodes/ia64-gen.c b/opcodes/ia64-gen.c
index ee4acbe..4b4b197 100644
--- a/opcodes/ia64-gen.c
+++ b/opcodes/ia64-gen.c
@@ -399,9 +399,21 @@ fetch_insn_class(const char *full_name, int create)
if ((comment = strchr(name, '[')) != NULL)
is_class = 1;
if ((notestr = strchr(name, '+')) != NULL)
+ is_class = 1;
+
+ /* If it is a composite class, then ignore comments and notes that come after
+ the '\\', since they don't apply to the part we are decoding now. */
+ if (xsect)
+ {
+ if (comment > xsect)
+ comment = 0;
+ if (notestr > xsect)
+ notestr = 0;
+ }
+
+ if (notestr)
{
char *nextnotestr;
- is_class = 1;
note = atoi (notestr + 1);
if ((nextnotestr = strchr (notestr + 1, '+')) != NULL)
{
@@ -413,8 +425,9 @@ fetch_insn_class(const char *full_name, int create)
}
}
- /* if it's a composite class, leave the notes and comments in place so that
- we have a unique name for the composite class */
+ /* If it's a composite class, leave the notes and comments in place so that
+ we have a unique name for the composite class. Otherwise, we remove
+ them. */
if (!xsect)
{
if (notestr)
@@ -1055,6 +1068,9 @@ in_iclass(struct ia64_opcode *idesc, struct iclass *ic,
resolved = idesc->operands[0] == IA64_OPND_B2;
else if (strcmp (ic->name, "invala") == 0)
resolved = strcmp (idesc->name, ic->name) == 0;
+ else if (strncmp (idesc->name, "st", 2) == 0
+ && strstr (format, "M5") != NULL)
+ resolved = idesc->flags & IA64_OPCODE_POSTINC;
else
resolved = 0;
}