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
commitecd51ad39f03eccde40cad9b5f69de264f160136 (patch)
treee95633c2eaa5ddc0029a4e49f8367e40d7dab5ad /opcodes/frv-asm.c
parent8caa9169eb9c4374cdf06c688b4ee1ca73a85a13 (diff)
downloadbinutils-ecd51ad39f03eccde40cad9b5f69de264f160136.tar.gz
binutils-ecd51ad39f03eccde40cad9b5f69de264f160136.tar.bz2
binutils-ecd51ad39f03eccde40cad9b5f69de264f160136.zip
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 5fe28d3a4da..1d24b28d405 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);