diff options
author | Nick Clifton <nickc@redhat.com> | 2003-06-05 16:04:20 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-06-05 16:04:20 +0000 |
commit | 36c3ae2457c89d404e9bb81de084da39064ce7cc (patch) | |
tree | 8fc0752722e1a7e4458e19310a686ac2679a9621 /cpu/frv.opc | |
parent | e5379b03cf80d6b0bd9a8d7dd03e2220a61956a2 (diff) | |
download | gdb-36c3ae2457c89d404e9bb81de084da39064ce7cc.zip gdb-36c3ae2457c89d404e9bb81de084da39064ce7cc.tar.gz gdb-36c3ae2457c89d404e9bb81de084da39064ce7cc.tar.bz2 |
Add code to handle even-numbered only register operands
Diffstat (limited to 'cpu/frv.opc')
-rw-r--r-- | cpu/frv.opc | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/cpu/frv.opc b/cpu/frv.opc index c708a60..fb9434e 100644 --- a/cpu/frv.opc +++ b/cpu/frv.opc @@ -40,11 +40,14 @@ /* -- opc.h */ -#undef CGEN_DIS_HASH_SIZE +#undef CGEN_DIS_HASH_SIZE #define CGEN_DIS_HASH_SIZE 128 -#undef CGEN_DIS_HASH +#undef CGEN_DIS_HASH #define CGEN_DIS_HASH(buffer, value) (((value) >> 18) & 127) +/* Allows reason codes to be output when assembler errors occur. */ +#define CGEN_VERBOSE_ASSEMBLER_ERRORS + /* Vliw support. */ #define FRV_VLIW_SIZE 4 /* fr500 has largest vliw size of 4. */ typedef CGEN_ATTR_VALUE_TYPE VLIW_COMBO[FRV_VLIW_SIZE]; @@ -601,6 +604,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) @@ -883,6 +888,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; +} /* -- */ /* -- dis.c */ |