summaryrefslogtreecommitdiff
path: root/opcodes/frv-asm.c
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2003-09-03 23:09:56 +0000
committerDave Brolley <brolley@redhat.com>2003-09-03 23:09:56 +0000
commit271d97acb3f612bdbdcdbf1d2e90fc8c8c23daec (patch)
treefbdc5704272c998ad04dbe970cc29a6c08dc519e /opcodes/frv-asm.c
parent4a9e0b50be857fc21de228bf752ec5ea95475876 (diff)
downloadbinutils-redhat-271d97acb3f612bdbdcdbf1d2e90fc8c8c23daec.tar.gz
2003-09-03 Dave Brolley <brolley@redhat.com>
* frv-*: Regenerated.
Diffstat (limited to 'opcodes/frv-asm.c')
-rw-r--r--opcodes/frv-asm.c56
1 files changed, 54 insertions, 2 deletions
diff --git a/opcodes/frv-asm.c b/opcodes/frv-asm.c
index 5fe28d3a4d..1d24b28d40 100644
--- a/opcodes/frv-asm.c
+++ b/opcodes/frv-asm.c
@@ -66,6 +66,12 @@ 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_A0
+ PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
+static const char * parse_A1
+ PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
+static const char * parse_A
+ PARAMS ((CGEN_CPU_DESC, const char **, int, long *, long));
static const char *
parse_ulo16 (cd, strp, opindex, valuep)
@@ -349,6 +355,49 @@ parse_u12 (cd, strp, opindex, valuep)
}
static const char *
+parse_A (cd, strp, opindex, valuep, A)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ long *valuep;
+ long A;
+{
+ const char *errmsg;
+
+ if (**strp == '#')
+ ++*strp;
+
+ errmsg = cgen_parse_unsigned_integer (cd, strp, opindex, valuep);
+ if (errmsg)
+ return errmsg;
+
+ if (*valuep != A)
+ return "Value of A operand must be 0 or 1";
+
+ return NULL;
+}
+
+static const char *
+parse_A0 (cd, strp, opindex, valuep)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ long *valuep;
+{
+ return parse_A (cd, strp, opindex, valuep, 0);
+}
+
+static const char *
+parse_A1 (cd, strp, opindex, valuep)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ long *valuep;
+{
+ return parse_A (cd, strp, opindex, valuep, 1);
+}
+
+static const char *
parse_even_register (cd, strP, tableP, valueP)
CGEN_CPU_DESC cd;
const char ** strP;
@@ -399,8 +448,11 @@ frv_cgen_parse_operand (cd, opindex, strp, fields)
switch (opindex)
{
- case FRV_OPERAND_A :
- errmsg = cgen_parse_unsigned_integer (cd, strp, FRV_OPERAND_A, &fields->f_A);
+ case FRV_OPERAND_A0 :
+ errmsg = parse_A0 (cd, strp, FRV_OPERAND_A0, &fields->f_A);
+ break;
+ case FRV_OPERAND_A1 :
+ errmsg = parse_A1 (cd, strp, FRV_OPERAND_A1, &fields->f_A);
break;
case FRV_OPERAND_ACC40SI :
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_acc_names, & fields->f_ACC40Si);