aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>1997-10-23 00:40:25 +0000
committerRichard Henderson <rth@redhat.com>1997-10-23 00:40:25 +0000
commit1277cdda1c03a8a2411246cf03941c977d335a59 (patch)
treea4383ed409a6b806db9b9b6833fa1008caa05e9b
parent81dac216f97775a2e839346039bf739f3b6e5e56 (diff)
downloadgdb-1277cdda1c03a8a2411246cf03941c977d335a59.zip
gdb-1277cdda1c03a8a2411246cf03941c977d335a59.tar.gz
gdb-1277cdda1c03a8a2411246cf03941c977d335a59.tar.bz2
* config/tc-sparc.c (v9a_asr_table): New variable.
(sparc_ip): Handle v9a asr's. Patch from David Miller <davem@vger.rutgers.edu>.
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-sparc.c56
2 files changed, 62 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 6eafd03..e1137bd 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+Wed Oct 22 17:42:12 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-sparc.c (v9a_asr_table): New variable.
+ (sparc_ip): Handle v9a asr's.
+ Patch from David Miller <davem@vger.rutgers.edu>.
+
Wed Oct 22 17:22:59 1997 Richard Henderson <rth@cygnus.com>
* config/tc-sparc.h (md_do_align): New macro.
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index 124da4e..9eee6ac 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -578,6 +578,21 @@ struct priv_reg_entry priv_reg_table[] =
{"", -1}, /* end marker */
};
+/* v9a specific asrs */
+
+struct priv_reg_entry v9a_asr_table[] =
+{
+ {"tick_cmpr", 23},
+ {"softint", 22},
+ {"set_softint", 20},
+ {"pic", 17},
+ {"pcr", 16},
+ {"gsr", 19},
+ {"dcr", 18},
+ {"clear_softint", 21},
+ {"", -1}, /* end marker */
+};
+
static int
cmp_reg_entry (parg, qarg)
const PTR parg;
@@ -1232,6 +1247,47 @@ sparc_ip (str, pinsn)
goto error;
}
+ case '_':
+ case '/':
+ /* Parse a v9a ancillary state register. */
+ if (*s == '%')
+ {
+ struct priv_reg_entry *p = v9a_asr_table;
+ unsigned int len = 9999999; /* init to make gcc happy */
+
+ s += 1;
+ while (p->name[0] > s[0])
+ p++;
+ while (p->name[0] == s[0])
+ {
+ len = strlen (p->name);
+ if (strncmp (p->name, s, len) == 0)
+ break;
+ p++;
+ }
+ if (p->name[0] != s[0])
+ {
+ error_message = ": unrecognizable v9a ancillary state register";
+ goto error;
+ }
+ if (*args == '/' && (p->regnum == 20 || p->regnum == 21))
+ {
+ error_message = ": rd on write only ancillary state register";
+ goto error;
+ }
+ if (*args == '/')
+ opcode |= (p->regnum << 14);
+ else
+ opcode |= (p->regnum << 25);
+ s += len;
+ continue;
+ }
+ else
+ {
+ error_message = ": unrecognizable v9a ancillary state register";
+ goto error;
+ }
+
case 'M':
case 'm':
if (strncmp (s, "%asr", 4) == 0)