aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-crx.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-10-07 14:18:17 +0000
committerNick Clifton <nickc@redhat.com>2004-10-07 14:18:17 +0000
commit48c9f030c98a3b53b9cb962857ffc16c435a63db (patch)
tree067750c1b6c54ae261583bd0babe56aca4b38766 /gas/config/tc-crx.c
parentcea15572cd414fca65f31f7bc1c9b89bfd0cc998 (diff)
downloadgdb-48c9f030c98a3b53b9cb962857ffc16c435a63db.zip
gdb-48c9f030c98a3b53b9cb962857ffc16c435a63db.tar.gz
gdb-48c9f030c98a3b53b9cb962857ffc16c435a63db.tar.bz2
Add support for CRX co-processor opcodes
Diffstat (limited to 'gas/config/tc-crx.c')
-rw-r--r--gas/config/tc-crx.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/gas/config/tc-crx.c b/gas/config/tc-crx.c
index 382c562..6c144b3 100644
--- a/gas/config/tc-crx.c
+++ b/gas/config/tc-crx.c
@@ -1724,7 +1724,7 @@ static int
get_cinv_parameters (char * operand)
{
char *p = operand;
- int d_used = 0, i_used = 0, u_used = 0;
+ int d_used = 0, i_used = 0, u_used = 0, b_used = 0;
while (*++p != ']')
{
@@ -1737,11 +1737,14 @@ get_cinv_parameters (char * operand)
i_used = 1;
else if (*p == 'u')
u_used = 1;
+ else if (*p == 'b')
+ b_used = 1;
else
as_bad (_("Illegal `cinv' parameter: `%c'"), *p);
}
- return ((d_used ? 4 : 0)
+ return ((b_used ? 8 : 0)
+ + (d_used ? 4 : 0)
+ (i_used ? 2 : 0)
+ (u_used ? 1 : 0));
}
@@ -2374,12 +2377,22 @@ preprocess_reglist (char *param, int *allocated)
strncpy (reg_name, regP, paramP - regP);
+ /* Coprocessor register c<N>. */
if (IS_INSN_TYPE (COP_REG_INS))
{
if ((cr = get_copregister (reg_name)) == nullcopregister)
as_bad (_("Illegal register `%s' in cop-register list"), reg_name);
mask_reg (getreg_image (cr - c0), &mask);
}
+ /* Coprocessor Special register cs<N>. */
+ else if (IS_INSN_TYPE (COPS_REG_INS))
+ {
+ if ((cr = get_copregister (reg_name)) == nullcopregister)
+ as_bad (_("Illegal register `%s' in cop-special-register list"),
+ reg_name);
+ mask_reg (getreg_image (cr - cs0), &mask);
+ }
+ /* General purpose register r<N>. */
else
{
if ((r = get_register (reg_name)) == nullregister)