GLAST/LAT >
DAQ and FSW >
FSW >
Doxygen Index >
PBS / V2-10-5
Constituent: pbs     Tag: rad750
Interface Data Structures File List Data Fields Globals
FFS.ih.xx-ppc-gcc File Reference
Implements the PPC/GCC version of the inline FFS routines.
More...
|
Functions |
FFS__LCL_FNC int | FFSL (unsigned int w) |
| Find first leading set bit in a 32-bit word, MSb = 0.
|
FFS__LCL_FNC int | FFSl (unsigned int w) |
| Find first leading set bit in a 32-bit word, LSb = 0.
|
FFS__LCL_FNC int | FFST (unsigned int w) |
| Find first trailing set bit in a 32-bit word, MSb = 0.
|
FFS__LCL_FNC int | FFSt (unsigned int w) |
| Find first trailing set bit in a 32-bit word, LSb = 0.
|
FFS__LCL_FNC int | CNTLZ (unsigned int w) |
| Counts the number of leading 0's in a 32 bit word.
|
FFS__LCL_FNC int | CNTTZ (unsigned int w) |
| Counts the number of trailing 0's in a 32 bit word.
|
Detailed Description
Implements the PPC/GCC version of the inline FFS routines.
- Author:
- JJRussell - russell@slac.stanford.edu
CVS $Id: FFS.ih.xx-ppc-gcc,v 1.4 2004/12/07 16:13:06 russell Exp $
Function Documentation
int CNTLZ |
( |
unsigned int |
w |
) |
|
|
|
Counts the number of leading 0's in a 32 bit word.
- Parameters:
-
w | The 32 bit word to be examined. |
- Returns:
- The number of leading 0's in a 32 bit word.
This routine examines a 32 bit longword, returning the count of leading 0s (left (MSb) to right (LSb)) If it finds a bit it returns a value in the range 0-31. This routine is almost a synomyn for FFSL, but it is protected against 0, returning 32 if the word is 0. |
Here is the call graph for this function:
int CNTTZ |
( |
unsigned int |
w |
) |
|
|
|
Counts the number of trailing 0's in a 32 bit word.
- Parameters:
-
w | The 32 bit word to be examined. |
- Returns:
- The number of trailing 0's in a 32 bit word.
This routine examines a 32 bit longword, returning the count of trailing 0s (left (MSb) to right (LSb)) If it finds a bit it returns a value in the range 0-31. This routine is almost a synomyn for FFSt, but it is protected against 0, returning 32 if the word is 0. |
Here is the call graph for this function:
int FFSl |
( |
unsigned int |
w |
) |
|
|
|
Find first leading set bit in a 32-bit word, LSb = 0.
- Parameters:
-
w | The 32 bit word to examined from the MSb to LSb for the first set bit. |
- Returns:
- The number of the first set bit in w, where LSb = 0
This routine examines a 32 bit longword from left (MSb) to right (LSb) looking for the first bit set. If it finds a bit it returns a value in the range 0-31. The routine is not protected against 0 as an input and the result is undefined. |
int FFSL |
( |
unsigned int |
w |
) |
|
|
|
Find first leading set bit in a 32-bit word, MSb = 0.
- Parameters:
-
w | The 32 bit word to examined from the MSb to LSb for the first set bit. |
- Returns:
- The number of the first set bit in w, where MSb = 0
This routine examines a 32 bit longword from left (MSb) to right (LSb) looking for the first bit set. If it finds a bit it returns a value in the range 0-31. The routine is not protected against 0 as an input and the result is undefined. |
int FFSt |
( |
unsigned int |
w |
) |
|
|
|
Find first trailing set bit in a 32-bit word, LSb = 0.
- Parameters:
-
w | The 32 bit word to examined from the LSb to MSb for the first set bit. |
- Returns:
- The number of the first set bit in w, where LSb = 0
This routine examines a 32 bit longword from right (MSb) to left (LSb) looking for the first bit set. If it finds a bit it returns a value in the range 0-31. The routine is not protected against 0 as an input and the result is undefined. |
int FFST |
( |
unsigned int |
w |
) |
|
|
|
Find first trailing set bit in a 32-bit word, MSb = 0.
- Parameters:
-
w | The 32 bit word to examined from the LSb to MSb for the first set bit. |
- Returns:
- The number of the first set bit in w, where MSb = 0
This routine examines a 32 bit longword from right (MSb) to left (LSb) looking for the first bit set. If it finds a bit it returns a value in the range 0-31. The routine is not protected against 0 as an input and the result is undefined. |
Generated on Tue Sep 13 21:36:01 2005 by
1.3.3