GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> IPBS / V0-0-2 > pbs / i845e


Interface   Data Structures   File List   Data Fields   Globals  

BSWP.ih.xx-x86-gcc File Reference

Implements the x86 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.
BSWP__EXP_FNC unsigned long
long int 
BSWP__swap64 (unsigned long long int val)
 Byte swaps a 64 bit word.
BSWP__EXP_FNC unsigned long
long int 
BSWP__load64 (const unsigned long long int *src)
 Loads a byte swapped version of the 64 bit integer from memory.
BSWP__EXP_FNC unsigned long
long int 
BSWP__load64x (const unsigned long long int *src, unsigned int offset)
 Loads a byte swapped version of the 64 bit integer from memory.
BSWP__EXP_FNC void BSWP__store64 (unsigned long long int *dst, unsigned long long int val)
 Stores a byte swapped version of the 64 bit integer to memory.
BSWP__EXP_FNC void BSWP__store64x (unsigned long long int *dst, unsigned int offset, unsigned long long int val)
 Stores a byte swapped version of the 64 bit integer to memory.


Detailed Description

Implements the x86 version of the inline BSWP routines.

Author:
JJRussell - russell@slac.stanford.edu

    CVS $Id: BSWP.ih.xx-x86-gcc,v 1.1.1.1 2006/02/10 21:45:37 saxton 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.

References BSWP__swap16().

Referenced by BSWP__load16b().

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.

References BSWP__swap16().

Referenced by BSWP__load16bx(), and BSWP_swap16N().

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

References BSWP__swap32().

Referenced by BSWP__load32b().

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.

References BSWP__swap32().

Referenced by BSWP__load32bx(), and BSWP_swap32N().

BSWP__EXP_FNC unsigned long long int BSWP__load64 ( const unsigned long long int *  src  ) 

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

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

Referenced by BSWP__load64b(), and BSWP__load64x().

BSWP__EXP_FNC unsigned long long int BSWP__load64x ( const unsigned long long int *  src,
unsigned int  offset 
)

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

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

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.

References BSWP__load64().

Referenced by BSWP__load64bx(), and BSWP_swap64N().

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.

References BSWP__swap16().

Referenced by BSWP__store16b().

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.

References BSWP__swap16().

Referenced by BSWP__store16bx().

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

References BSWP__swap32().

Referenced by BSWP__store32b().

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.

References BSWP__swap32().

Referenced by BSWP__store32bx().

BSWP__EXP_FNC void BSWP__store64 ( unsigned long long int *  dst,
unsigned long long int  val 
)

Stores a byte swapped version of the 64 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 64 bit byte-swapped value into memory.

Referenced by BSWP__store64b().

BSWP__EXP_FNC void BSWP__store64x ( unsigned long long int *  dst,
unsigned int  offset,
unsigned long long int  val 
)

Stores a byte swapped version of the 64 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 64 bit byte-swapped value into memory. If the value is already in a register, then use BSWP__swap64(). If the offset is known to be a constant, it is marginally more efficient to use BSWP_store64().

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 an underlying pair of PPC instructions.

References BSWP__swap64().

Referenced by BSWP__store64bx().

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.

Referenced by BSWP__load16(), BSWP__load16x(), BSWP__store16(), BSWP__store16x(), BSWP__swap16_lclXbig(), and BSWP__swap16b().

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.

Referenced by BSWP__load32(), BSWP__load32x(), BSWP__store32(), BSWP__store32x(), BSWP__swap32_lclXlittle(), and BSWP__swap32b().

BSWP__EXP_FNC unsigned long long int BSWP__swap64 ( unsigned long long int  val  ) 

Byte swaps a 64 bit word.

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

Referenced by BSWP__store64x(), BSWP__swap64_lclXlittle(), and BSWP__swap64b().


Generated on Wed Nov 21 21:23:51 2012 by  doxygen 1.5.8