GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > PBS / V2-10-14

Constituent: pbs_boot     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

BSWP.ih.xx-ppc-gcc File Reference

Implements the PPC/GCC version of the inline BSWP routines. More...


Functions

BSWP__EXP_FNC unsigned int BSWP__swap16 (unsigned short int val)
 Byte swaps a 16 bit word.
BSWP__EXP_FNC unsigned int BSWP__load16 (const unsigned short int *src)
 Loads a byte swapped version of the 16 bit integer from memory.
BSWP__EXP_FNC unsigned int BSWP__load16x (const unsigned short int *src, unsigned int offset)
 Loads a byte swapped version of the 16 bit integer from memory.
BSWP__EXP_FNC void BSWP__store16 (unsigned short int *dst, unsigned short int val)
 Stores a byte swapped version of the 16 bit integer to memory.
BSWP__EXP_FNC void BSWP__store16x (unsigned short int *dst, unsigned int offset, unsigned short int val)
 Stores a byte swapped version of the 16 bit integer to memory.
BSWP__EXP_FNC unsigned int BSWP__swap32 (unsigned int val)
 Byte swaps a 32 bit word.
BSWP__EXP_FNC unsigned int BSWP__load32 (const unsigned int *src)
 Loads a byte swapped version of the 32 bit integer from memory.
BSWP__EXP_FNC unsigned int BSWP__load32x (const unsigned int *src, unsigned int offset)
 Loads a byte swapped version of the 32 bit integer from memory after applying the specified offset.
BSWP__EXP_FNC void BSWP__store32 (unsigned int *dst, unsigned int val)
 Stores a byte swapped version of the 32 bit integer to memory.
BSWP__EXP_FNC void BSWP__store32x (unsigned int *dst, unsigned int offset, unsigned int val)
 Stores a byte swapped version of the 32 bit integer to memory after a byte offset has been applied.


Detailed Description

Implements the PPC/GCC version of the inline BSWP routines.

Author:
JJRussell - russell@slac.stanford.edu
    CVS $Id: BSWP.ih.xx-ppc-gcc,v 1.3 2004/12/07 16:13:06 russell Exp $

Function Documentation

unsigned int BSWP__load16 const unsigned short int *  src  ) 
 

Loads a byte swapped version of the 16 bit integer from memory.

Parameters:
src The address of the 16 bit integer to load
Returns:
The byte-swapped value of the 16 bit integer
This routine should be used when loading 16 bit byte-swapped value from memory.

unsigned int BSWP__load16x const unsigned short int *  src,
unsigned int  offset
 

Loads a byte swapped version of the 16 bit integer from memory.

Parameters:
src The address of the 16 bit integer to load
offset The byte offset from the source
Returns:
The byte-swapped value of the 16 bit integer
This routine should be used when loading 16 bit byte-swapped value from memory. If the offset is known to be a constant, it is marginally more efficient to use BSWP__load16().

Warning:
Note that offset is a byte offset and not an index. This is in keeping with the spirit that this instruction maps directly to the underlying instruction of the PPC.

unsigned int BSWP__load32 const unsigned int *  src  ) 
 

Loads a byte swapped version of the 32 bit integer from memory.

Parameters:
src The address of the 32 bit integer to load
Returns:
The byte-swapped value of the 32 bit integer
This routine should be used when loading 32 bit byte-swapped value from memory. If the value is already in a register, then use BSWP__swap32().

unsigned int BSWP__load32x const unsigned int *  src,
unsigned int  offset
 

Loads a byte swapped version of the 32 bit integer from memory after applying the specified offset.

Parameters:
src The address of the 32 bit integer to load
offset The byte offset to be applied.
Returns:
The byte-swapped value of the 32 bit integer
This routine should be used when loading 32 bit byte-swapped value from memory. If the value is already in a register, then use BSWP__swap32().

Warning:
Note that offset is a byte offset and not an index. This is in keeping with the spirit that this instruction maps directly to the underlying instruction of the PPC.

void BSWP__store16 unsigned short int *  dst,
unsigned short int  val
 

Stores a byte swapped version of the 16 bit integer to memory.

Parameters:
dst The address of the destination word
val The word to byte swap and store
This routine should be used when storing a 16 bit byte-swapped value into memory.

void BSWP__store16x unsigned short int *  dst,
unsigned int  offset,
unsigned short int  val
 

Stores a byte swapped version of the 16 bit integer to memory.

Parameters:
dst The address of the destination word
offset A byte offset to apply to dst.
val The word to byte swap and store
This routine should be used when storing a 16 bit byte-swapped value into memory. If the value is already in a register, then use BSWP__swap16(). If the offset is known to be a constant, it is marginally more efficient to use BSWP__store16().

Warning:
Note that offset is a byte offset and not an index. This is in keeping with the spirit that this instruction maps directly to the underlying instruction of the PPC.

void BSWP__store32 unsigned int *  dst,
unsigned int  val
 

Stores a byte swapped version of the 32 bit integer to memory.

Parameters:
dst The address of the destination word
val The word to byte swap and store
This routine should be used when storing a 32 bit byte-swapped value into memory. If the value is already in a register, then use BSWP__swap32().

void BSWP__store32x unsigned int *  dst,
unsigned int  offset,
unsigned int  val
 

Stores a byte swapped version of the 32 bit integer to memory after a byte offset has been applied.

Parameters:
dst The address of the destination word
offset The byte offset to be applied
val The word to byte swap and store
This routine should be used when storing a 32 bit byte-swapped value into memory. If the value is already in a register, then use BSWP__swap32(). If the offset is known to be a constant, it is marginally more efficient to use BSWP_store32().

Warning:
Note that offset is a byte offset and not an index. This is in keeping with the spirit that this instruction maps directly to the underlying instruction of the PPC.

unsigned int BSWP__swap16 unsigned short int  val  ) 
 

Byte swaps a 16 bit word.

Parameters:
val The 16 bit word to swap
Returns:
The byte-swapped value of the 16 bit integer
This routine should be used when byte-swapping 16 bit quantities that are already in registers. The routines BSWP__load16() and BSWP__store16 should by used when loading or storing 16 bit quantities from/into memory.

unsigned int BSWP__swap32 unsigned int  val  ) 
 

Byte swaps a 32 bit word.

Parameters:
val The 32 bit word to swap
Returns:
The byte-swapped value of the 32 bit integer
This routine should be used when byte-swapping 32 bit quantities that are already in registers. The routines BSWP__load32() and BSWP__store32 should by used when loading or storing 32 bit quantities from/into memory.


Generated on Wed Feb 14 18:04:27 2007 by  doxygen 1.4.4