2006-02-24 David S. Miller <davem@sunset.davemloft.net>

* config/tc-sparc.c (priv_reg_table): Add entry for "gl".
	(hpriv_reg_table): New table for hyperprivileged registers.
	(sparc_ip): New cases '$' and '%' for wrhpr/rdhpr hyperprivileged
	register encoding.
This commit is contained in:
David S. Miller 2006-02-25 01:34:09 +00:00
parent ff3f9d5b2a
commit 10156f834a
2 changed files with 56 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2006-02-24 David S. Miller <davem@sunset.davemloft.net>
* config/tc-sparc.c (priv_reg_table): Add entry for "gl".
(hpriv_reg_table): New table for hyperprivileged registers.
(sparc_ip): New cases '$' and '%' for wrhpr/rdhpr hyperprivileged
register encoding.
2006-02-24 DJ Delorie <dj@redhat.com>
* config/tc-m32c.h (md_apply_fix): Define to m32c_apply_fix.

View File

@ -724,7 +724,7 @@ struct
{NULL, NULL, NULL},
};
/* sparc64 privileged registers. */
/* sparc64 privileged and hyperprivileged registers. */
struct priv_reg_entry
{
@ -750,10 +750,22 @@ struct priv_reg_entry priv_reg_table[] =
{"otherwin", 13},
{"wstate", 14},
{"fq", 15},
{"gl", 16},
{"ver", 31},
{"", -1}, /* End marker. */
};
struct priv_reg_entry hpriv_reg_table[] =
{
{"hpstate", 0},
{"htstate", 1},
{"hintp", 3},
{"htba", 5},
{"hver", 6},
{"hstick_cmpr", 31},
{"", -1}, /* End marker. */
};
/* v9a specific asrs. */
struct priv_reg_entry v9a_asr_table[] =
@ -1572,6 +1584,42 @@ sparc_ip (str, pinsn)
goto error;
}
case '$':
case '%':
/* Parse a sparc64 hyperprivileged register. */
if (*s == '%')
{
struct priv_reg_entry *p = hpriv_reg_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 hyperprivileged register");
goto error;
}
if (*args == '$')
opcode |= (p->regnum << 14);
else
opcode |= (p->regnum << 25);
s += len;
continue;
}
else
{
error_message = _(": unrecognizable hyperprivileged register");
goto error;
}
case '_':
case '/':
/* Parse a v9a/v9b ancillary state register. */