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

Constituent: pbs_boot     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

BSWP_boot.h File Reference

Byteswapping, function prototypes, for boot code callable versions. More...

This graph shows which files directly or indirectly include this file:


Functions

unsigned int BSWP_swap16 (unsigned short int w)
 Byte swaps a 16 bit word.
unsigned int BSWP_load16 (const unsigned short int *src)
 Loads a byte swapped version of the 16 bit integer 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.
void BSWP_store16 (unsigned short int *dst, unsigned short int w)
 Stores a byte swapped version of the 16 bit integer to memory.
void BSWP_store16x (unsigned short int *dst, unsigned int offset, unsigned short int w)
 Stores a byte swapped version of the 16 bit integer to memory.
unsigned int BSWP_swap32 (unsigned int w)
 Byte swaps a 32 bit word.
unsigned int BSWP_load32 (const unsigned int *src)
 Loads a byte swapped version of the 32 bit integer from memory.
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.
void BSWP_store32 (unsigned int *dst, unsigned int w)
 Stores a byte swapped version of the 32 bit integer to memory.
void BSWP_store32x (unsigned int *dst, unsigned int offset, unsigned int w)
 Stores a byte swapped version of the 32 bit integer to memory after a byte offset has been applied.

Detailed Description

Byteswapping, function prototypes, for boot code callable versions.

Author:
JJRussell - russell@slac.stanford.edu
    CVS $Id: BSWP_boot.h,v 1.1 2003/08/20 17:37:00 russell Exp $

SYNOPSIS
The BSWP routines provide efficient and uniform methods of performing various byte swap operations on arrays of 16 and 32 bit integers. These routines use the inline routines of BSWP.ih to implement the byteswapping. The PPC platform uses theseinline routines map directly onto the hardware instructions used to load and store both 16 and 32 bit byteswapped quantities to and from memory.


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  w
 

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

Parameters:
dst The address of the destination word
w 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  w
 

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

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

Parameters:
dst The address of the destination word
w 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  w
 

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

Byte swaps a 16 bit word.

Parameters:
w 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  w  ) 
 

Byte swaps a 32 bit word.

Parameters:
w 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 Fri Feb 9 04:04:57 2007 by  doxygen 1.4.4