public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [m32c] cpu updates
@ 2006-03-14  4:22 DJ Delorie
  2006-03-14  9:37 ` Andreas Schwab
  0 siblings, 1 reply; 4+ messages in thread
From: DJ Delorie @ 2006-03-14  4:22 UTC (permalink / raw)
  To: binutils


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [m32c] cpu updates
  2006-03-14  4:22 [m32c] cpu updates DJ Delorie
@ 2006-03-14  9:37 ` Andreas Schwab
  2006-03-14 16:12   ` DJ Delorie
  2006-03-14 16:46   ` Frank Ch. Eigler
  0 siblings, 2 replies; 4+ messages in thread
From: Andreas Schwab @ 2006-03-14  9:37 UTC (permalink / raw)
  To: DJ Delorie; +Cc: binutils

DJ Delorie <dj@redhat.com> writes:

> @@ -2026,6 +2026,10 @@
>    h-sint DFLT f-imm3-S
>    ((parse "imm3_S")) () ()
>  )
> +(define-full-operand Bit3-S "3 bit bit number" (m32c-isa)

s/bit bit/bit/

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [m32c] cpu updates
  2006-03-14  9:37 ` Andreas Schwab
@ 2006-03-14 16:12   ` DJ Delorie
  2006-03-14 16:46   ` Frank Ch. Eigler
  1 sibling, 0 replies; 4+ messages in thread
From: DJ Delorie @ 2006-03-14 16:12 UTC (permalink / raw)
  To: schwab; +Cc: binutils


> > +(define-full-operand Bit3-S "3 bit bit number" (m32c-isa)
> 
> s/bit bit/bit/

No, the field is 3 bits wide, and the value is the index of a bit in
the operand byte.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [m32c] cpu updates
  2006-03-14  9:37 ` Andreas Schwab
  2006-03-14 16:12   ` DJ Delorie
@ 2006-03-14 16:46   ` Frank Ch. Eigler
  1 sibling, 0 replies; 4+ messages in thread
From: Frank Ch. Eigler @ 2006-03-14 16:46 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: binutils

Andreas Schwab <schwab@suse.de> writes:

> > +(define-full-operand Bit3-S "3 bit bit number" (m32c-isa)
> 
> s/bit bit/bit/

Actually, no, it's a 3-bit bit number.

- FChE

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-03-14 16:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-14  4:22 [m32c] cpu updates DJ Delorie
2006-03-14  9:37 ` Andreas Schwab
2006-03-14 16:12   ` DJ Delorie
2006-03-14 16:46   ` Frank Ch. Eigler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).