GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > IPBS / V0-0-1

Constituent: pbs     Tag: i845e


Interface   Data Structures   File List   Data Fields   Globals  

BSWP.ih.little_endian File Reference

Implements the little endian versions of the BSWP routines. More...


Functions

BSWP__EXP_FNC unsigned int BSWP__swap16_lclXlittle (unsigned short int val)
 Byte swaps a 32 bit word; local representation <=> little.
BSWP__EXP_FNC unsigned int BSWP__swap16_lclXbig (unsigned short int val)
 Byte swaps a 16 bit word; local representation <=> big.
BSWP__EXP_FNC unsigned int BSWP__swap16l (unsigned short int val)
 Ensures that the little endian input 16 bit word val is transformed to the host representation.
BSWP__EXP_FNC unsigned int BSWP__swap16b (unsigned short int val)
 Ensures that the big endian input 16 bit word val is transformed to the host representation.
BSWP__EXP_FNC unsigned int BSWP__load16l (const unsigned short int *src)
 Loads the host representation of the known little endian 16 bit integer byte from memory.
BSWP__EXP_FNC unsigned int BSWP__load16b (const unsigned short int *src)
 Loads the host representation of the known big endian 16 bit integer byte from memory.
BSWP__EXP_FNC unsigned int BSWP__load16lx (const unsigned short int *src, unsigned int offset)
 Loads the host representation of the known little endian 16 bit integer byte from memory.
BSWP__EXP_FNC unsigned int BSWP__load16bx (const unsigned short int *src, unsigned int offset)
 Loads the host representation of the known bige endian 16 bit integer byte from memory.
BSWP__EXP_FNC void BSWP__store16l (unsigned short int *dst, unsigned short int val)
 Stores the host representation of val into memory as a 16 bit little endian integer.
BSWP__EXP_FNC void BSWP__store16b (unsigned short int *dst, unsigned short int val)
 Stores the host representation of val into memory as a 16 bit big endian integer.
BSWP__EXP_FNC void BSWP__store16lx (unsigned short int *dst, unsigned int offset, unsigned short int val)
 Stores the host representation of val into memory as a 16 bit little endian integer.
BSWP__EXP_FNC void BSWP__store16bx (unsigned short int *dst, unsigned int offset, unsigned short int val)
 Stores the host representation of val into memory as a 16 bit big endian integer.
BSWP__EXP_FNC unsigned int BSWP__swap32_lclXlittle (unsigned int val)
 Byte swaps a 32 bit word; local representation <=> little.
BSWP__EXP_FNC unsigned int BSWP__swap32_lclXbig (unsigned int val)
 Byte swaps a 32 bit word; local representation <=> big.
BSWP__EXP_FNC unsigned int BSWP__swap32l (unsigned int val)
 Ensures that the little endian input 32 bit word val is transformed to the host representation.
BSWP__EXP_FNC unsigned int BSWP__swap32b (unsigned int val)
 Ensures that the big endian input 16 bit word val is transformed to the host representation.
BSWP__EXP_FNC unsigned int BSWP__load32l (const unsigned int *src)
 Loads the host representation of the known little endian 32 bit integer byte from memory.
BSWP__EXP_FNC unsigned int BSWP__load32b (const unsigned int *src)
 Loads the host representation of the known big endian 32 bit integer byte from memory.
BSWP__EXP_FNC unsigned int BSWP__load32lx (const unsigned int *src, unsigned int offset)
 Loads the host representation of the known little endian 32 bit integer byte from memory.
BSWP__EXP_FNC unsigned int BSWP__load32bx (const unsigned int *src, unsigned int offset)
 Loads the host representation of the known bige endian 32 bit integer byte from memory.
BSWP__EXP_FNC void BSWP__store32l (unsigned int *dst, unsigned int val)
 Stores the host representation of val into memory as a 32 bit little endian integer.
BSWP__EXP_FNC void BSWP__store32b (unsigned int *dst, unsigned int val)
 Stores the host representation of val into memory as a 32 bit big endian integer.
BSWP__EXP_FNC void BSWP__store32lx (unsigned int *dst, unsigned int offset, unsigned int val)
 Stores the host representation of val into memory as a 32 bit little endian integer.
BSWP__EXP_FNC void BSWP__store32bx (unsigned int *dst, unsigned int offset, unsigned int val)
 Stores the host representation of val into memory as a 32 bit big endian integer.
BSWP__EXP_FNC unsigned long
long int 
BSWP__swap64_lclXbig (unsigned long long int val)
 Byte swaps a 64 bit word; local representation <=> big.
BSWP__EXP_FNC unsigned long
long int 
BSWP__swap64_lclXlittle (unsigned long long int val)
 Byte swaps a 32 bit word; local representation <=> little.
BSWP__EXP_FNC unsigned long
long int 
BSWP__swap64l (unsigned long long int val)
 Ensures that the little endian input 64 bit word val is transformed to the host representation.
BSWP__EXP_FNC unsigned long
long int 
BSWP__swap64b (unsigned long long int val)
 Ensures that the big endian input 64 bit word val is transformed to the host representation.
BSWP__EXP_FNC unsigned long
long int 
BSWP__load64l (const unsigned long long int *src)
 Loads the host representation of the known little endian 64 bit integer byte from memory.
BSWP__EXP_FNC unsigned long
long int 
BSWP__load64b (const unsigned long long int *src)
 Loads the host representation of the known big endian 64 bit integer byte from memory.
BSWP__EXP_FNC unsigned long
long int 
BSWP__load64lx (const unsigned long long int *src, unsigned int offset)
 Loads the host representation of the known little endian 64 bit integer byte from memory.
BSWP__EXP_FNC unsigned long
long int 
BSWP__load64bx (const unsigned long long int *src, unsigned int offset)
 Loads the host representation of the known bige endian 64 bit integer byte from memory.
BSWP__EXP_FNC void BSWP__store64l (unsigned long long int *dst, unsigned long long int val)
 Stores the host representation of val into memory as a 64 bit little endian integer.
BSWP__EXP_FNC void BSWP__store64b (unsigned long long int *dst, unsigned long long int val)
 Stores the host representation of val into memory as a 64 bit big endian integer.
BSWP__EXP_FNC void BSWP__store64lx (unsigned long long int *dst, unsigned int offset, unsigned long long int val)
 Stores the host representation of val into memory as a 64 bit little endian integer.
BSWP__EXP_FNC void BSWP__store64bx (unsigned long long int *dst, unsigned int offset, unsigned long long int val)
 Stores the host representation of val into memory as a 64 bit big endian integer.


Detailed Description

Implements the little endian versions of the BSWP routines.

Author:
JJRussell - russell@slac.stanford.edu
    CVS $Id: BSWP.ih.little_endian,v 1.1.1.1 2006/02/10 21:45:37 saxton Exp $

This portion of the BSWP.ih file was split off for managerial and user impact reasons. As one can see, it is fairly large, and, as one might expect, there is a very similar looking file for the big endian implementation. By splitting these off, the poor user who includes the BSWP.ih will only have half as many lines pulled into his file. Hopefully the smaller size include files will benefit both the maintainers of the BSWP.ih and its users.


Function Documentation

unsigned int BSWP__load16b const unsigned short int *  src  ) 
 

Loads the host representation of the known big endian 16 bit integer byte from memory.

Parameters:
src The address of the known bit endian 16 bit integer to load
Returns:
The host representation of the big endian 16 bit integer
This routine should be used when loading a known big endian 16 bit values from memory and the caller wishes that value to be in the host's representation.

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

Loads the host representation of the known bige endian 16 bit integer byte from memory.

Parameters:
src The address of the known big endian 16 bit integer to load.
offset The byte offset from the source
Returns:
The host representation of the big endian 16 bit integer
This routine should be used when loading a known big endian 16 bit value from memory. and the caller wishes that value to be in the host's representation. If the offset is known to be a constant, it is marginally more efficient to use BSWP__load16l().

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__load16l const unsigned short int *  src  ) 
 

Loads the host representation of the known little endian 16 bit integer byte from memory.

Parameters:
src The address of the known little endian 16 bit integer to load
Returns:
The host representation of the little endian 16 bit integer
This routine should be used when loading a known little endian 16 bit values from memory and the caller wishes that value to be in the host's representation.

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

Loads the host representation of the known little endian 16 bit integer byte from memory.

Parameters:
src The address of the known little endian 16 bit integer to load.
offset The byte offset from the source
Returns:
The host representation of the little endian 16 bit integer
This routine should be used when loading a known little endian 16 bit value from memory. and the caller wishes that value to be in the host's representation. If the offset is known to be a constant, it is marginally more efficient to use BSWP__load16l().

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__load32b const unsigned int *  src  ) 
 

Loads the host representation of the known big endian 32 bit integer byte from memory.

Parameters:
src The address of the known bit endian 32 bit integer to load
Returns:
The host representation of the big endian 32 bit integer
This routine should be used when loading a known big endian 32 bit values from memory and the caller wishes that value to be in the host's representation.

unsigned int BSWP__load32bx const unsigned int *  src,
unsigned int  offset
 

Loads the host representation of the known bige endian 32 bit integer byte from memory.

Parameters:
src The address of the known big endian 32 bit integer to load.
offset The byte offset from the source
Returns:
The host representation of the big endian 32 bit integer
This routine should be used when loading a known big endian 32 bit value from memory. and the caller wishes that value to be in the host's representation. If the offset is known to be a constant, it is marginally more efficient to use BSWP__load32l().

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__load32l const unsigned int *  src  ) 
 

Loads the host representation of the known little endian 32 bit integer byte from memory.

Parameters:
src The address of the known little endian 32 bit integer to load
Returns:
The host representation of the little endian 32 bit integer
This routine should be used when loading a known little endian 32 bit values from memory and the caller wishes that value to be in the host's representation.

unsigned int BSWP__load32lx const unsigned int *  src,
unsigned int  offset
 

Loads the host representation of the known little endian 32 bit integer byte from memory.

Parameters:
src The address of the known little endian 32 bit integer to load.
offset The byte offset from the source
Returns:
The host representation of the little endian 32 bit integer
This routine should be used when loading a known little endian 32 bit value from memory. and the caller wishes that value to be in the host's representation. If the offset is known to be a constant, it is marginally more efficient to use BSWP__load32l().

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 long long int BSWP__load64b const unsigned long long int *  src  ) 
 

Loads the host representation of the known big endian 64 bit integer byte from memory.

Parameters:
src The address of the known bit endian 64 bit integer to load
Returns:
The host representation of the big endian 64 bit integer
This routine should be used when loading a known big endian 64 bit values from memory and the caller wishes that value to be in the host's representation.

unsigned long long int BSWP__load64bx const unsigned long long int *  src,
unsigned int  offset
 

Loads the host representation of the known bige endian 64 bit integer byte from memory.

Parameters:
src The address of the known big endian 64 bit integer to load.
offset The byte offset from the source
Returns:
The host representation of the big endian 64 bit integer
This routine should be used when loading a known big endian 64 bit value from memory. and the caller wishes that value to be in the host's representation. If the offset is known to be a constant, it is marginally more efficient to use BSWP__load64l().

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 long long int BSWP__load64l const unsigned long long int *  src  ) 
 

Loads the host representation of the known little endian 64 bit integer byte from memory.

Parameters:
src The address of the known little endian 64 bit integer to load
Returns:
The host representation of the little endian 64 bit integer
This routine should be used when loading a known little endian 64 bit values from memory and the caller wishes that value to be in the host's representation.

unsigned int BSWP__load64lx const unsigned long long int *  src,
unsigned int  offset
 

Loads the host representation of the known little endian 64 bit integer byte from memory.

Parameters:
src The address of the known little endian 64 bit integer to load.
offset The byte offset from the source
Returns:
The host representation of the little endian 64 bit integer
This routine should be used when loading a known little endian 64 bit value from memory. and the caller wishes that value to be in the host's representation. If the offset is known to be a constant, it is marginally more efficient to use BSWP__load64l().

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__store16b unsigned short int *  dst,
unsigned short int  val
 

Stores the host representation of val into memory as a 16 bit big endian integer.

Parameters:
dst The address of the destination word
val The 16 bit integer to store as a big endian 16 bit integer.
This routine should be used when storing the host's representation of a 16 bit into memory as a little endian 16 bit integer.

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

Stores the host representation of val into memory as a 16 bit big endian integer.

Parameters:
dst The address of the destination word
offset A byte offset to apply to dst.
val The big endian 16 bit integer to store
This routine should be used when storing the host's representation of a 16 bit integer into memory. If the value is already in a register, then use BSWP__swap16b(). If the offset is known to be a constant, it is marginally more efficient to use BSWP__store16b().

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__store16l unsigned short int *  dst,
unsigned short int  val
 

Stores the host representation of val into memory as a 16 bit little endian integer.

Parameters:
dst The address of the destination word
val The 16 bit integer to store as a little endian 16 bit integer.
This routine should be used when storing the host's representation of a 16 bit integer into memory as a little endian 16 bit integer.

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

Stores the host representation of val into memory as a 16 bit little endian integer.

Parameters:
dst The address of the destination word
offset A byte offset to apply to dst.
val The little endian 16 bitword to store
This routine should be used when storing the host's representation of a 16 bit integer into memory. If the value is already in a register, then use BSWP__swapl(). If the offset is known to be a constant, it is marginally more efficient to use BSWP__store16l().

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__store32b unsigned int *  dst,
unsigned int  val
 

Stores the host representation of val into memory as a 32 bit big endian integer.

Parameters:
dst The address of the destination word
val The 32 bit integer to store as a big endian 32 bit integer.
This routine should be used when storing the host's representation of a 32 bit into memory as a little endian 16 bit integer.

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

Stores the host representation of val into memory as a 32 bit big endian integer.

Parameters:
dst The address of the destination word
offset A byte offset to apply to dst.
val The big endian 32 bit integer to store
This routine should be used when storing the host's representation of a 32 bit integer into memory. If the value is already in a register, then use BSWP__swap32b(). If the offset is known to be a constant, it is marginally more efficient to use BSWP__store32b().

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__store32l unsigned int *  dst,
unsigned int  val
 

Stores the host representation of val into memory as a 32 bit little endian integer.

Parameters:
dst The address of the destination word
val The 32 bit integer to store as a little endian 32 bit integer.
This routine should be used when storing the host's representation of a 3s bit integer into memory as a little endian 16 bit integer.

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

Stores the host representation of val into memory as a 32 bit little endian integer.

Parameters:
dst The address of the destination word
offset A byte offset to apply to dst.
val The little endian 32 bitword to store
This routine should be used when storing the host's representation of a 32 bit integer into memory. If the value is already in a register, then use BSWP__swapl(). If the offset is known to be a constant, it is marginally more efficient to use BSWP__store32l().

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__store64b unsigned long long int *  dst,
unsigned long long int  val
 

Stores the host representation of val into memory as a 64 bit big endian integer.

Parameters:
dst The address of the destination word
val The 64 bit integer to store as a big endian 64 bit integer.
This routine should be used when storing the host's representation of a 64 bit into memory as a little endian 64 bit integer.

void BSWP__store64bx unsigned long long int *  dst,
unsigned int  offset,
unsigned long long int  val
 

Stores the host representation of val into memory as a 64 bit big endian integer.

Parameters:
dst The address of the destination word
offset A byte offset to apply to dst.
val The big endian 64 bit integer to store
This routine should be used when storing the host's representation of a 64 bit integer into memory. If the value is already in a register, then use BSWP__swap64b(). If the offset is known to be a constant, it is marginally more efficient to use BSWP__store64b().

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__store64l unsigned long long int *  dst,
unsigned long long int  val
 

Stores the host representation of val into memory as a 64 bit little endian integer.

Parameters:
dst The address of the destination word
val The 64 bit integer to store as a little endian 64 bit integer.
This routine should be used when storing the host's representation of a 64 bit integer into memory as a little endian 64 bit integer.

void BSWP__store64lx unsigned long long int *  dst,
unsigned int  offset,
unsigned long long int  val
 

Stores the host representation of val into memory as a 64 bit little endian integer.

Parameters:
dst The address of the destination word
offset A byte offset to apply to dst.
val The little endian 64 bitword to store
This routine should be used when storing the host's representation of a 64 bit integer into memory. If the value is already in a register, then use BSWP__swapl(). If the offset is known to be a constant, it is marginally more efficient to use BSWP__store64l().

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_lclXbig unsigned short int  val  ) 
 

Byte swaps a 16 bit word; local representation <=> big.

Parameters:
val The 16 bit word transform from/to the local representation to/from big endian representation
Returns:
The appropriately byte-swapped value of the 16 bit integer
This routine is used to swap a source word in the local target machine representation's into a big endian representation. Due to the symmetrical nature of the translation, it also works the other way, i.e. swapping a source word in a big endian representation into the local target machine's representation.

If the local target machine representation is big endian, then this routine is a NOOP.

Warning:
This routine is being deprecated. The new name is BSWP__swap16b().

unsigned int BSWP__swap16_lclXlittle unsigned short int  val  ) 
 

Byte swaps a 32 bit word; local representation <=> little.

Parameters:
val The 16 bit word transform from/to the local representation to/from little endian representation
Returns:
The appropriately byte-swapped value of the 16 bit integer
This routine is used to swap a source word in the local target machine representation's into a little endian representation. Due to the symmetrical nature of the translation, it also works the other way, i.e. swapping a source word in a little endian representation into the local target machine's representation.

If the local target machine representation is little endian, then this routine is a NOOP.

Warning:
This routine is being deprecated. The new name is BSWP__swap16l().

unsigned int BSWP__swap16b unsigned short int  val  ) 
 

Ensures that the big endian input 16 bit word val is transformed to the host representation.

Parameters:
val The big endian 16 bit value
Returns:
The host representation of the big endian val
This routine returns the host representation of known big endian 16 bit value, already in a register. The routines BSWP__load16b(), BSWP__store16b() or BSWP__store16xb() should by used when loading or storing known big endian 16 bit quantities from/into memory.

unsigned int BSWP__swap16l unsigned short int  val  ) 
 

Ensures that the little endian input 16 bit word val is transformed to the host representation.

Parameters:
val The little endian 16 bit value
Returns:
The host representation of the little endian val
This routine returns the host representation of known little endian 16 bit value, already in a register. The routines BSWP__load16l(), BSWP__store16l() or BSWP__store16xl() should by used when loading or storing known little endian 16 bit quantities from/into memory.

unsigned int BSWP__swap32_lclXbig unsigned int  val  ) 
 

Byte swaps a 32 bit word; local representation <=> big.

Parameters:
val The 32 bit word transform from/to the local representation to/from big endian representation
Returns:
The appropriately byte-swapped value of the 32 bit integer
This routine is used to swap a source word in the local target machine representation's into a big endian representation. Due to the symmetrical nature of the translation, it also works the other way, i.e. swapping a source word in a big endian representation into the local target machine's representation.

If the local target machine representation is big endian, then this routine is a NOOP.

Warning:
This routine is being deprecated. The new name is BSWP__swap32b().

unsigned int BSWP__swap32_lclXlittle unsigned int  val  ) 
 

Byte swaps a 32 bit word; local representation <=> little.

Parameters:
val The 32 bit word transform from/to the local representation to/from little endian representation
Returns:
The appropriately byte-swapped value of the 32 bit integer
This routine is used to swap a source word in the local target machine representation's into a little endian representation. Due to the symmetrical nature of the translation, it also works the other way, i.e. swapping a source word in a little endian representation into the local target machine's representation.

If the local target machine representation is little endian, then this routine is a NOOP.

Warning:
This routine is being deprecated. The new name is BSWP__swap32l().

unsigned int BSWP__swap32b unsigned int  val  ) 
 

Ensures that the big endian input 16 bit word val is transformed to the host representation.

Parameters:
val The big endian 32 bit value
Returns:
The host representation of the big endian val
This routine returns the host representation of known big endian 32 bit value, already in a register. The routines BSWP__load32b(), BSWP__store32b() or BSWP__store32xb() should by used when loading or storing known big endian 32 bit quantities from/into memory.

unsigned int BSWP__swap32l unsigned int  val  ) 
 

Ensures that the little endian input 32 bit word val is transformed to the host representation.

Parameters:
val The little endian 32 bit value
Returns:
The host representation of the little endian val
This routine returns the host representation of known little endian 32 bit value, already in a register. The routines BSWP__load32l(), BSWP__store32l() or BSWP__store32xl() should by used when loading or storing known little endian 32 bit quantities from/into memory.

unsigned long long int BSWP__swap64_lclXbig unsigned long long int  val  ) 
 

Byte swaps a 64 bit word; local representation <=> big.

Parameters:
val The 64 bit word transform from/to the local representation to/from big endian representation
Returns:
The appropriately byte-swapped value of the 64 bit integer
This routine is used to swap a source word in the local target machine representation's into a big endian representation. Due to the symmetrical nature of the translation, it also works the other way, i.e. swapping a source word in a big endian representation into the local target machine's representation.

If the local target machine representation is big endian, then this routine is a NOOP.

unsigned long long int BSWP__swap64_lclXlittle unsigned long long int  val  ) 
 

Byte swaps a 32 bit word; local representation <=> little.

Parameters:
val The 64 bit word transform from/to the local representation to/from little endian representation
Returns:
The appropriately byte-swapped value of the 64 bit integer
This routine is used to swap a source word in the local target machine representation's into a little endian representation. Due to the symmetrical nature of the translation, it also works the other way, i.e. swapping a source word in a little endian representation into the local target machine's representation.

If the local target machine representation is little endian, then this routine is a NOOP.

unsigned long long int BSWP__swap64b unsigned long long int  val  ) 
 

Ensures that the big endian input 64 bit word val is transformed to the host representation.

Parameters:
val The big endian 64 bit value
Returns:
The host representation of the big endian val
This routine returns the host representation of known big endian 64 bit value, already in a register. The routines BSWP__load64b(), BSWP__store64b() or BSWP__store64xb() should by used when loading or storing known big endian 64 bit quantities from/into memory.

unsigned long long int BSWP__swap64l unsigned long long int  val  ) 
 

Ensures that the little endian input 64 bit word val is transformed to the host representation.

Parameters:
val The little endian 64 bit value
Returns:
The host representation of the little endian val
This routine returns the host representation of known little endian 64 bit value, already in a register. The routines BSWP__load64l(), BSWP__store64l() or BSWP__store64xl() should by used when loading or storing known little endian 64 bit quantities from/into memory.


Generated on Fri Feb 10 20:20:54 2006 by  doxygen 1.4.4