aboutsummaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2006-03-14 04:20:53 +0000
committerDJ Delorie <dj@redhat.com>2006-03-14 04:20:53 +0000
commit43aa3bb1d43045f9a60a2a91be8766582a4aab42 (patch)
treed8eebe37788ebc435b3a8451e94398c6d9d37a32 /cpu
parent727b6b4b411c55d0d6719556bcf6a5da5c54adb6 (diff)
downloadgdb-43aa3bb1d43045f9a60a2a91be8766582a4aab42.zip
gdb-43aa3bb1d43045f9a60a2a91be8766582a4aab42.tar.gz
gdb-43aa3bb1d43045f9a60a2a91be8766582a4aab42.tar.bz2
* m32c.cpu (Bit3-S): New.
(btst:s): New. * m32c.opc (parse_bit3_S): New.
Diffstat (limited to 'cpu')
-rw-r--r--cpu/ChangeLog4
-rw-r--r--cpu/m32c.cpu9
-rw-r--r--cpu/m32c.opc18
3 files changed, 30 insertions, 1 deletions
diff --git a/cpu/ChangeLog b/cpu/ChangeLog
index 39739d5..2a888e0 100644
--- a/cpu/ChangeLog
+++ b/cpu/ChangeLog
@@ -1,5 +1,9 @@
2006-03-13 DJ Delorie <dj@redhat.com>
+ * m32c.cpu (Bit3-S): New.
+ (btst:s): New.
+ * m32c.opc (parse_bit3_S): New.
+
* m32c.cpu (decimal-subtraction16-insn): Add second operand.
(btst): Add optional :G suffix for MACH32.
(or.b:S): New.
diff --git a/cpu/m32c.cpu b/cpu/m32c.cpu
index 538d25c..a645a48 100644
--- a/cpu/m32c.cpu
+++ b/cpu/m32c.cpu
@@ -2026,6 +2026,10 @@
h-sint DFLT f-imm3-S
((parse "imm3_S")) () ()
)
+(define-full-operand Bit3-S "3 bit bit number" (m32c-isa)
+ h-sint DFLT f-imm3-S
+ ((parse "bit3_S")) () ()
+)
;-------------------------------------------------------------
; Bit numbers
@@ -7568,7 +7572,10 @@
(+ (f-0-4 #xD) bit32-16-Unprefixed (f-7-1 #x0) (f-10-3 #x0))
btst-sem)
-; fixme: add btst.s
+(dni btst.s "btst:s" ((machine 32))
+ "btst:s ${Bit3-S},${Dsp-8-u16}"
+ (+ (f-0-2 #x0) (f-4-3 #x5) Bit3-S Dsp-8-u16)
+ () ())
;-------------------------------------------------------------
; btstc
diff --git a/cpu/m32c.opc b/cpu/m32c.opc
index 6235326..f664e9a 100644
--- a/cpu/m32c.opc
+++ b/cpu/m32c.opc
@@ -534,6 +534,24 @@ parse_imm3_S (CGEN_CPU_DESC cd, const char **strp,
}
static const char *
+parse_bit3_S (CGEN_CPU_DESC cd, const char **strp,
+ int opindex, signed long *valuep)
+{
+ const char *errmsg = 0;
+ signed long value;
+
+ errmsg = cgen_parse_signed_integer (cd, strp, opindex, & value);
+ if (errmsg)
+ return errmsg;
+
+ if (value < 0 || value > 7)
+ return _("immediate is out of range 0-7");
+
+ *valuep = value;
+ return 0;
+}
+
+static const char *
parse_lab_5_3 (CGEN_CPU_DESC cd,
const char **strp,
int opindex ATTRIBUTE_UNUSED,