This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]