aboutsummaryrefslogtreecommitdiff
path: root/opcodes/frv-asm.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-06-05 16:04:20 +0000
committerNick Clifton <nickc@redhat.com>2003-06-05 16:04:20 +0000
commit36c3ae2457c89d404e9bb81de084da39064ce7cc (patch)
tree8fc0752722e1a7e4458e19310a686ac2679a9621 /opcodes/frv-asm.c
parente5379b03cf80d6b0bd9a8d7dd03e2220a61956a2 (diff)
downloadgdb-36c3ae2457c89d404e9bb81de084da39064ce7cc.zip
gdb-36c3ae2457c89d404e9bb81de084da39064ce7cc.tar.gz
gdb-36c3ae2457c89d404e9bb81de084da39064ce7cc.tar.bz2
Add code to handle even-numbered only register operands
Diffstat (limited to 'opcodes/frv-asm.c')
-rw-r--r--opcodes/frv-asm.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/opcodes/frv-asm.c b/opcodes/frv-asm.c
index 538ed2d..b4647b1 100644
--- a/opcodes/frv-asm.c
+++ b/opcodes/frv-asm.c
@@ -64,6 +64,8 @@ static const char * parse_s12
PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
static const char * parse_u12
PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
+static const char * parse_even_register
+ PARAMS ((CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *));
static const char *
parse_ulo16 (cd, strp, opindex, valuep)
@@ -346,6 +348,26 @@ parse_u12 (cd, strp, opindex, valuep)
}
}
+static const char *
+parse_even_register (cd, strP, tableP, valueP)
+ CGEN_CPU_DESC cd;
+ const char ** strP;
+ CGEN_KEYWORD * tableP;
+ long * valueP;
+{
+ const char * errmsg;
+ const char * saved_star_strP = * strP;
+
+ errmsg = cgen_parse_keyword (cd, strP, tableP, valueP);
+
+ if (errmsg == NULL && ((* valueP) & 1))
+ {
+ errmsg = _("register number must be even");
+ * strP = saved_star_strP;
+ }
+
+ return errmsg;
+}
/* -- */
const char * frv_cgen_parse_operand
@@ -455,12 +477,21 @@ frv_cgen_parse_operand (cd, opindex, strp, fields)
case FRV_OPERAND_FRINTI :
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRi);
break;
+ case FRV_OPERAND_FRINTIEVEN :
+ errmsg = parse_even_register (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRi);
+ break;
case FRV_OPERAND_FRINTJ :
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRj);
break;
+ case FRV_OPERAND_FRINTJEVEN :
+ errmsg = parse_even_register (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRj);
+ break;
case FRV_OPERAND_FRINTK :
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRk);
break;
+ case FRV_OPERAND_FRINTKEVEN :
+ errmsg = parse_even_register (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRk);
+ break;
case FRV_OPERAND_FRJ :
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRj);
break;