doc fix for some CGEN macros

Jim Blandy <[email protected]>
Newsgroups gmane.comp.emulators.sid.devel
Message-ID <[email protected]>
I've committed this.

2005-05-06  Jim Blandy  <[email protected]>

	* 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 ----
  
  // 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)))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.