public inbox for sid@sourceware.org
 help / color / mirror / Atom feed
* doc fix for some CGEN macros
@ 2005-05-07  4:40 Jim Blandy
  0 siblings, 0 replies; only message in thread
From: Jim Blandy @ 2005-05-07  4:40 UTC (permalink / raw)
  To: sid


I've committed this.

2005-05-06  Jim Blandy  <jimb@redhat.com>

	* cgen-engine.h (EXTRACT_MSB0_INT, EXTRACT_MSB0_UINT)
	(EXTRACT_LSB0_INT, EXTRACT_LSB0_UINT): Doc fixes.

Index: sid/component/cgen-cpu/cgen-engine.h
===================================================================
RCS file: /cvs/cvsfiles/devo/sid/component/cgen-cpu/cgen-engine.h,v
retrieving revision 1.22
diff -c -p -r1.22 cgen-engine.h
*** sid/component/cgen-cpu/cgen-engine.h	21 Feb 2005 09:11:37 -0000	1.22
--- sid/component/cgen-cpu/cgen-engine.h	7 May 2005 04:35:17 -0000
*************** public:
*** 579,584 ****
--- 579,588 ----
  \f
  // Instruction field support macros.
  
+ /* Treating the TOTAL least significant bits of VAL as a field, and
+    numbering its leftmost bit zero, return the LENGTH-bit subfield
+    whose leftmost bit is START.
+    The '*INT' version sign-extends; the '*UINT' version doesn't.  */
  #define EXTRACT_MSB0_INT(val, total, start, length) \
  (((INT) (val) << ((sizeof (INT) * 8) - (total) + (start))) \
   >> ((sizeof (INT) * 8) - (length)))
*************** public:
*** 586,591 ****
--- 590,599 ----
  (((UINT) (val) << ((sizeof (UINT) * 8) - (total) + (start))) \
   >> ((sizeof (UINT) * 8) - (length)))
  
+ /* Treating the TOTAL least significant bits of VAL as a field, and
+    numbering its rightmost bit zero, return the LENGTH-bit subfield
+    whose leftmost bit is START.
+    The '*INT' version sign-extends; the '*UINT' version doesn't.  */
  #define EXTRACT_LSB0_INT(val, total, start, length) \
  (((INT) (val) << ((sizeof (INT) * 8) - (start) - 1)) \
   >> ((sizeof (INT) * 8) - (length)))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-05-07  4:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-07  4:40 doc fix for some CGEN macros Jim Blandy

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).