This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[m32c] cpu updates
- From: DJ Delorie <dj at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: Mon, 13 Mar 2006 23:21:43 -0500
- Subject: [m32c] cpu updates
* m32c.cpu (Bit3-S): New.
(btst:s): New.
* m32c.opc (parse_bit3_S): New.
Index: m32c.cpu
===================================================================
RCS file: /cvs/src/src/cpu/m32c.cpu,v
retrieving revision 1.12
diff -p -U3 -r1.12 m32c.cpu
--- m32c.cpu 14 Mar 2006 00:29:59 -0000 1.12
+++ m32c.cpu 14 Mar 2006 04:20:39 -0000
@@ -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
Index: m32c.opc
===================================================================
RCS file: /cvs/src/src/cpu/m32c.opc,v
retrieving revision 1.8
diff -p -U3 -r1.8 m32c.opc
--- m32c.opc 28 Oct 2005 19:33:06 -0000 1.8
+++ m32c.opc 14 Mar 2006 04:20:39 -0000
@@ -534,6 +534,24 @@ parse_imm3_S (CGEN_CPU_DESC cd, const ch
}
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,