summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2004-01-06 19:18:43 +0000
committerAlexandre Oliva <aoliva@redhat.com>2004-01-06 19:18:43 +0000
commitdd2afa21cdeb4e9a02dfbe93c471e6e0a8494551 (patch)
tree99ded382d44187700e3bd977608a60bc7f44f103
parent7fcb9713295084c9a8b737690d4d97d9e63d4130 (diff)
downloadgdb-dd2afa21cdeb4e9a02dfbe93c471e6e0a8494551.tar.gz
2003-12-19 Alexandre Oliva <aoliva@redhat.com>
* frv-asm.c (parse_ulo16, parse_uhi16, parse_d12): Fix some cut&paste errors in shifting/truncating numerical operands. 2003-08-04 Alexandre Oliva <aoliva@redhat.com> * frv-asm.c (parse_ulo16): Parse gotofflo and gotofffuncdesclo. (parse_uslo16): Likewise. (parse_uhi16): Parse gotoffhi and gotofffuncdeschi. (parse_d12): Parse gotoff12 and gotofffuncdesc12. (parse_s12): Likewise. 2003-08-04 Alexandre Oliva <aoliva@redhat.com> * frv-asm.c (parse_ulo16): Parse gotlo and gotfuncdesclo. (parse_uslo16): Likewise. (parse_uhi16): Parse gothi and gotfuncdeschi. (parse_d12): Parse got12 and gotfuncdesc12. (parse_s12): Likewise.
-rw-r--r--opcodes/ChangeLog18
-rw-r--r--opcodes/frv-asm.c276
2 files changed, 293 insertions, 1 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 90c75dc24f3..18b99f12b35 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,21 @@
+2004-01-06 Alexandre Oliva <aoliva@redhat.com>
+
+ 2003-12-19 Alexandre Oliva <aoliva@redhat.com>
+ * frv-asm.c (parse_ulo16, parse_uhi16, parse_d12): Fix some
+ cut&paste errors in shifting/truncating numerical operands.
+ 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
+ * frv-asm.c (parse_ulo16): Parse gotofflo and gotofffuncdesclo.
+ (parse_uslo16): Likewise.
+ (parse_uhi16): Parse gotoffhi and gotofffuncdeschi.
+ (parse_d12): Parse gotoff12 and gotofffuncdesc12.
+ (parse_s12): Likewise.
+ 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
+ * frv-asm.c (parse_ulo16): Parse gotlo and gotfuncdesclo.
+ (parse_uslo16): Likewise.
+ (parse_uhi16): Parse gothi and gotfuncdeschi.
+ (parse_d12): Parse got12 and gotfuncdesc12.
+ (parse_s12): Likewise.
+
2004-01-02 Albert Bartoszko <albar@nt.kegel.com.pl>
* msp430-dis.c (msp430_doubleoperand): Check for an 'add'
diff --git a/opcodes/frv-asm.c b/opcodes/frv-asm.c
index 678a250d6db..145b56a2a79 100644
--- a/opcodes/frv-asm.c
+++ b/opcodes/frv-asm.c
@@ -110,7 +110,66 @@ parse_ulo16 (cd, strp, opindex, valuep)
++*strp;
if (errmsg == NULL
&& result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
- value >>= 16;
+ value &= 0xffff;
+ *valuep = value;
+ return errmsg;
+ }
+ else if (strncasecmp (*strp + 1, "gotlo(", 6) == 0)
+ {
+ *strp += 7;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_FRV_GOTLO,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value &= 0xffff;
+ *valuep = value;
+ return errmsg;
+ }
+ else if (strncasecmp (*strp + 1, "gotfuncdesclo(", 14) == 0)
+ {
+ *strp += 15;
+ errmsg = cgen_parse_address (cd, strp, opindex,
+ BFD_RELOC_FRV_FUNCDESC_GOTLO,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value &= 0xffff;
+ *valuep = value;
+ return errmsg;
+ }
+ else if (strncasecmp (*strp + 1, "gotofflo(", 9) == 0)
+ {
+ *strp += 10;
+ errmsg = cgen_parse_address (cd, strp, opindex,
+ BFD_RELOC_FRV_GOTOFFLO,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value &= 0xffff;
+ *valuep = value;
+ return errmsg;
+ }
+ else if (strncasecmp (*strp + 1, "gotofffuncdesclo(", 17) == 0)
+ {
+ *strp += 18;
+ errmsg = cgen_parse_address (cd, strp, opindex,
+ BFD_RELOC_FRV_FUNCDESC_GOTOFFLO,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value &= 0xffff;
*valuep = value;
return errmsg;
}
@@ -159,6 +218,65 @@ parse_uslo16 (cd, strp, opindex, valuep)
*valuep = value;
return errmsg;
}
+ else if (strncasecmp (*strp + 1, "gotlo(", 6) == 0)
+ {
+ *strp += 7;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_FRV_GOTLO,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value &= 0xffff;
+ *valuep = value;
+ return errmsg;
+ }
+ else if (strncasecmp (*strp + 1, "gotfuncdesclo(", 14) == 0)
+ {
+ *strp += 15;
+ errmsg = cgen_parse_address (cd, strp, opindex,
+ BFD_RELOC_FRV_FUNCDESC_GOTLO,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value &= 0xffff;
+ *valuep = value;
+ return errmsg;
+ }
+ else if (strncasecmp (*strp + 1, "gotofflo(", 9) == 0)
+ {
+ *strp += 10;
+ errmsg = cgen_parse_address (cd, strp, opindex,
+ BFD_RELOC_FRV_GOTOFFLO,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value &= 0xffff;
+ *valuep = value;
+ return errmsg;
+ }
+ else if (strncasecmp (*strp + 1, "gotofffuncdesclo(", 17) == 0)
+ {
+ *strp += 18;
+ errmsg = cgen_parse_address (cd, strp, opindex,
+ BFD_RELOC_FRV_FUNCDESC_GOTOFFLO,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value &= 0xffff;
+ *valuep = value;
+ return errmsg;
+ }
}
return cgen_parse_unsigned_integer (cd, strp, opindex, valuep);
}
@@ -204,6 +322,65 @@ parse_uhi16 (cd, strp, opindex, valuep)
*valuep = value;
return errmsg;
}
+ else if (strncasecmp (*strp + 1, "gothi(", 6) == 0)
+ {
+ *strp += 7;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_FRV_GOTHI,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value >>= 16;
+ *valuep = value;
+ return errmsg;
+ }
+ else if (strncasecmp (*strp + 1, "gotfuncdeschi(", 14) == 0)
+ {
+ *strp += 15;
+ errmsg = cgen_parse_address (cd, strp, opindex,
+ BFD_RELOC_FRV_FUNCDESC_GOTHI,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value >>= 16;
+ *valuep = value;
+ return errmsg;
+ }
+ else if (strncasecmp (*strp + 1, "gotoffhi(", 9) == 0)
+ {
+ *strp += 10;
+ errmsg = cgen_parse_address (cd, strp, opindex,
+ BFD_RELOC_FRV_GOTOFFHI,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value >>= 16;
+ *valuep = value;
+ return errmsg;
+ }
+ else if (strncasecmp (*strp + 1, "gotofffuncdeschi(", 17) == 0)
+ {
+ *strp += 18;
+ errmsg = cgen_parse_address (cd, strp, opindex,
+ BFD_RELOC_FRV_FUNCDESC_GOTOFFHI,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value >>= 16;
+ *valuep = value;
+ return errmsg;
+ }
}
return cgen_parse_unsigned_integer (cd, strp, opindex, valuep);
}
@@ -286,6 +463,53 @@ parse_d12 (cd, strp, opindex, valuep)
*valuep = value;
return errmsg;
}
+ else if (strncasecmp (*strp + 1, "got12(", 6) == 0)
+ {
+ *strp += 7;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_FRV_GOT12,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ *valuep = value;
+ return errmsg;
+ }
+ else if (strncasecmp (*strp + 1, "gotfuncdesc12(", 14) == 0)
+ {
+ *strp += 15;
+ errmsg = cgen_parse_address (cd, strp, opindex,
+ BFD_RELOC_FRV_FUNCDESC_GOT12,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ *valuep = value;
+ return errmsg;
+ }
+ else if (strncasecmp (*strp + 1, "gotoff12(", 9) == 0)
+ {
+ *strp += 10;
+ errmsg = cgen_parse_address (cd, strp, opindex,
+ BFD_RELOC_FRV_GOTOFF12,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ *valuep = value;
+ return errmsg;
+ }
+ else if (strncasecmp (*strp + 1, "gotofffuncdesc12(", 17) == 0)
+ {
+ *strp += 18;
+ errmsg = cgen_parse_address (cd, strp, opindex,
+ BFD_RELOC_FRV_FUNCDESC_GOTOFF12,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ *valuep = value;
+ return errmsg;
+ }
}
return cgen_parse_signed_integer (cd, strp, opindex, valuep);
}
@@ -314,6 +538,56 @@ parse_s12 (cd, strp, opindex, valuep)
*valuep = value;
return errmsg;
}
+ else if ((**strp == '#' || **strp == '%')
+ && strncasecmp (*strp + 1, "got12(", 6) == 0)
+ {
+ *strp += 7;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_FRV_GOT12,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ *valuep = value;
+ return errmsg;
+ }
+ else if ((**strp == '#' || **strp == '%')
+ && strncasecmp (*strp + 1, "gotfuncdesc12(", 14) == 0)
+ {
+ *strp += 15;
+ errmsg = cgen_parse_address (cd, strp, opindex,
+ BFD_RELOC_FRV_FUNCDESC_GOT12,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ *valuep = value;
+ return errmsg;
+ }
+ else if ((**strp == '#' || **strp == '%')
+ && strncasecmp (*strp + 1, "gotoff12(", 9) == 0)
+ {
+ *strp += 10;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_FRV_GOTOFF12,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ *valuep = value;
+ return errmsg;
+ }
+ else if ((**strp == '#' || **strp == '%')
+ && strncasecmp (*strp + 1, "gotofffuncdesc12(", 17) == 0)
+ {
+ *strp += 18;
+ errmsg = cgen_parse_address (cd, strp, opindex,
+ BFD_RELOC_FRV_FUNCDESC_GOTOFF12,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ *valuep = value;
+ return errmsg;
+ }
else
{
if (**strp == '#')