aboutsummaryrefslogtreecommitdiff
path: root/cpu/m32c.opc
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2005-10-26 14:59:12 +0000
committerDJ Delorie <dj@redhat.com>2005-10-26 14:59:12 +0000
commitf75eb1c00406df9d115a49dcf36c28dfef1478a6 (patch)
treefcf3521fe2f0638a87b654c609add945362d160d /cpu/m32c.opc
parentf1022c90ad7f6b94257c1b2fda3b46a5db9c9867 (diff)
downloadgdb-f75eb1c00406df9d115a49dcf36c28dfef1478a6.zip
gdb-f75eb1c00406df9d115a49dcf36c28dfef1478a6.tar.gz
gdb-f75eb1c00406df9d115a49dcf36c28dfef1478a6.tar.bz2
* m32c.cpu (f-dsp-8-s24, Dsp-8-s24): New.
(mov-dspsp-dst-defn, mov-src-dspsp-defn, mov16-dspsp-dst-defn, mov16-src-dspsp-defn, mov32-dspsp-dst-defn, mov32-src-dspsp-defn): dsp8[sp] is signed. (mov.WL:S #imm,A0/A1): dsp24 is signed (i.e. -0x800000..0xffffff). (mov.BW:S r0,r1): Fix typo r1l->r1. (tst): Allow :G suffix. * m32c.opc (parse_signed24): New, for -0x800000..0xffffff. * m32c-asm.c: Regenerate. * m32c-desc.c: Regenerate. * m32c-desc.h: Regenerate. * m32c-dis.c: Regenerate. * m32c-ibld.c: Regenerate. * m32c-opc.c: Regenerate. * m32c-opc.h: Regenerate.
Diffstat (limited to 'cpu/m32c.opc')
-rw-r--r--cpu/m32c.opc20
1 files changed, 20 insertions, 0 deletions
diff --git a/cpu/m32c.opc b/cpu/m32c.opc
index 19547ae..ef0ac3b 100644
--- a/cpu/m32c.opc
+++ b/cpu/m32c.opc
@@ -433,6 +433,26 @@ parse_unsigned24 (CGEN_CPU_DESC cd, const char **strp,
return 0;
}
+/* This should only be used for #imm->reg. */
+static const char *
+parse_signed24 (CGEN_CPU_DESC cd, const char **strp,
+ int opindex, signed long *valuep)
+{
+ const char *errmsg = 0;
+ signed long value;
+
+ PARSE_SIGNED;
+
+ if (value <= 0xffffff && value > 0x7fffff)
+ value -= 0x1000000;
+
+ if (value > 0xffffff)
+ return _("dsp:24 immediate is out of range");
+
+ *valuep = value;
+ return 0;
+}
+
static const char *
parse_signed32 (CGEN_CPU_DESC cd, const char **strp,
int opindex, signed long *valuep)