GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > PBS / V2-10-6
Constituent: pbs     Tag: sun-gcc
#include "PBI/Inline.h"
#include "PBI/Unions.h"
#include "PBI/Attribute.h"
#include "PBI/Endianness.h"
#include "PBS/impl/BSWP.ih.xx-xxx-xxx"
Include dependency graph for BSWP.ih:
This graph shows which files directly or indirectly include this file:
Defines | |
#define | _AT __attribute__((unused)) |
Abbreviation for the attributes of the BSWP inlines. | |
Functions | |
BSWP__EXP_PROTO unsigned int | BSWP__swap16 (unsigned short int val) _AT |
Byte swaps a 16 bit word. | |
BSWP__EXP_PROTO unsigned int | BSWP__swap16l (unsigned short int val) _AT |
Ensures that the little endian input 16 bit word val is transformed to the host representation. | |
BSWP__EXP_PROTO unsigned int | BSWP__swap16b (unsigned short int val) _AT |
Ensures that the big endian input 16 bit word val is transformed to the host representation. | |
BSWP__EXP_PROTO unsigned int | BSWP__load16 (const unsigned short int *src) _AT |
Loads a byte swapped version of the 16 bit integer from memory. | |
BSWP__EXP_PROTO unsigned int | BSWP__load16l (const unsigned short int *src) _AT |
Loads the host representation of the known little endian 16 bit integer byte from memory. | |
BSWP__EXP_PROTO unsigned int | BSWP__load16b (const unsigned short int *src) _AT |
Loads the host representation of the known big endian 16 bit integer byte from memory. | |
BSWP__EXP_PROTO unsigned int | BSWP__load16x (const unsigned short int *src, unsigned int offset) _AT |
Loads a byte swapped version of the 16 bit integer from memory. | |
BSWP__EXP_PROTO unsigned int | BSWP__load16lx (const unsigned short int *src, unsigned int offset) _AT |
Loads the host representation of the known little endian 16 bit integer byte from memory. | |
BSWP__EXP_PROTO unsigned int | BSWP__load16bx (const unsigned short int *src, unsigned int offset) _AT |
Loads the host representation of the known bige endian 16 bit integer byte from memory. | |
BSWP__EXP_PROTO void | BSWP__store16 (unsigned short int *dst, unsigned short int val) _AT |
Stores a byte swapped version of the 16 bit integer to memory. | |
BSWP__EXP_PROTO void | BSWP__store16l (unsigned short int *dst, unsigned short int val) _AT |
Stores the host representation of val into memory as a 16 bit little endian integer. | |
BSWP__EXP_PROTO void | BSWP__store16b (unsigned short int *dst, unsigned short int val) _AT |
Stores the host representation of val into memory as a 16 bit big endian integer. | |
BSWP__EXP_PROTO void | BSWP__store16x (unsigned short int *dst, unsigned int offset, unsigned short int val) _AT |
Stores a byte swapped version of the 16 bit integer to memory. | |
BSWP__EXP_PROTO void | BSWP__store16lx (unsigned short int *dst, unsigned int offset, unsigned short int val) _AT |
Stores the host representation of val into memory as a 16 bit little endian integer. | |
BSWP__EXP_PROTO void | BSWP__store16bx (unsigned short int *dst, unsigned int offset, unsigned short int val) _AT |
Stores the host representation of val into memory as a 16 bit big endian integer. | |
BSWP__EXP_PROTO unsigned int | BSWP__swap16_lclXbig (unsigned short int val) _AT |
Byte swaps a 16 bit word; local representation <=> big. | |
BSWP__EXP_PROTO unsigned int | BSWP__swap16_lclXlittle (unsigned short int val) _AT |
Byte swaps a 32 bit word; local representation <=> little. | |
BSWP__EXP_PROTO unsigned int | BSWP__swap32 (unsigned int val) _AT |
Byte swaps a 32 bit word. | |
BSWP__EXP_PROTO unsigned int | BSWP__swap32l (unsigned int val) _AT |
Ensures that the little endian input 32 bit word val is transformed to the host representation. | |
BSWP__EXP_PROTO unsigned int | BSWP__swap32b (unsigned int val) _AT |
Ensures that the big endian input 16 bit word val is transformed to the host representation. | |
BSWP__EXP_PROTO unsigned int | BSWP__load32 (const unsigned int *src) _AT |
Loads a byte swapped version of the 32 bit integer from memory. | |
BSWP__EXP_PROTO unsigned int | BSWP__load32l (const unsigned int *src) _AT |
Loads the host representation of the known little endian 32 bit integer byte from memory. | |
BSWP__EXP_PROTO unsigned int | BSWP__load32b (const unsigned int *src) _AT |
Loads the host representation of the known big endian 32 bit integer byte from memory. | |
BSWP__EXP_PROTO unsigned int | BSWP__load32x (const unsigned int *src, unsigned int offset) _AT |
Loads a byte swapped version of the 32 bit integer from memory after applying the specified offset. | |
BSWP__EXP_PROTO unsigned int | BSWP__load32lx (const unsigned int *src, unsigned int offset) _AT |
Loads the host representation of the known little endian 32 bit integer byte from memory. | |
BSWP__EXP_PROTO unsigned int | BSWP__load32bx (const unsigned int *src, unsigned int offset) _AT |
Loads the host representation of the known bige endian 32 bit integer byte from memory. | |
BSWP__EXP_PROTO void | BSWP__store32 (unsigned int *dst, unsigned int val) _AT |
Stores a byte swapped version of the 32 bit integer to memory. | |
BSWP__EXP_PROTO void | BSWP__store32l (unsigned int *dst, unsigned int val) _AT |
Stores the host representation of val into memory as a 32 bit little endian integer. | |
BSWP__EXP_PROTO void | BSWP__store32b (unsigned int *dst, unsigned int val) _AT |
Stores the host representation of val into memory as a 32 bit big endian integer. | |
BSWP__EXP_PROTO void | BSWP__store32x (unsigned int *dst, unsigned int offset, unsigned int val) _AT |
Stores a byte swapped version of the 32 bit integer to memory after a byte offset has been applied. | |
BSWP__EXP_PROTO void | BSWP__store32lx (unsigned int *dst, unsigned int offset, unsigned int val) _AT |
Stores the host representation of val into memory as a 32 bit little endian integer. | |
BSWP__EXP_PROTO void | BSWP__store32bx (unsigned int *dst, unsigned int offset, unsigned int val) _AT |
Stores the host representation of val into memory as a 32 bit big endian integer. | |
BSWP__EXP_PROTO unsigned int | BSWP__swap32_lclXbig (unsigned int val) _AT |
Byte swaps a 32 bit word; local representation <=> big. | |
BSWP__EXP_PROTO unsigned int | BSWP__swap32_lclXlittle (unsigned int val) _AT |
Byte swaps a 32 bit word; local representation <=> little. | |
BSWP__EXP_PROTO unsigned long long int | BSWP__swap64 (unsigned long long int val) _AT |
Byte swaps a 64 bit word. | |
BSWP__EXP_PROTO unsigned long long int | BSWP__swap64l (unsigned long long int val) _AT |
Ensures that the little endian input 64 bit word val is transformed to the host representation. | |
BSWP__EXP_PROTO unsigned long long int | BSWP__swap64b (unsigned long long int val) _AT |
Ensures that the big endian input 64 bit word val is transformed to the host representation. | |
BSWP__EXP_PROTO unsigned long long int | BSWP__load64 (const unsigned long long int *src) _AT |
Loads a byte swapped version of the 64 bit integer from memory. | |
BSWP__EXP_PROTO unsigned long long int | BSWP__load64l (const unsigned long long int *src) _AT |
Loads the host representation of the known little endian 64 bit integer byte from memory. | |
BSWP__EXP_PROTO unsigned long long int | BSWP__load64b (const unsigned long long int *src) _AT |
Loads the host representation of the known big endian 64 bit integer byte from memory. | |
BSWP__EXP_PROTO unsigned long long int | BSWP__load64x (const unsigned long long int *src, unsigned int offset) _AT |
Loads a byte swapped version of the 64 bit integer from memory. | |
BSWP__EXP_PROTO unsigned long long int | BSWP__load64lx (const unsigned long long int *src, unsigned int offset) _AT |
Loads the host representation of the known little endian 64 bit integer byte from memory. | |
BSWP__EXP_PROTO unsigned long long int | BSWP__load64bx (const unsigned long long int *src, unsigned int offset) _AT |
Loads the host representation of the known bige endian 64 bit integer byte from memory. | |
BSWP__EXP_PROTO void | BSWP__store64 (unsigned long long int *dst, unsigned long long int val) _AT |
Stores a byte swapped version of the 64 bit integer to memory. | |
BSWP__EXP_PROTO void | BSWP__store64l (unsigned long long int *dst, unsigned long long int val) _AT |
Stores the host representation of val into memory as a 64 bit little endian integer. | |
BSWP__EXP_PROTO void | BSWP__store64b (unsigned long long int *dst, unsigned long long int val) _AT |
Stores the host representation of val into memory as a 64 bit big endian integer. | |
BSWP__EXP_PROTO void | BSWP__store64x (unsigned long long int *dst, unsigned int offset, unsigned long long int val) _AT |
Stores a byte swapped version of the 64 bit integer to memory. | |
BSWP__EXP_PROTO void | BSWP__store64lx (unsigned long long int *dst, unsigned int offset, unsigned long long int val) _AT |
Stores the host representation of val into memory as a 64 bit little endian integer. | |
BSWP__EXP_PROTO void | BSWP__store64bx (unsigned long long int *dst, unsigned int offset, unsigned long long int val) _AT |
Stores the host representation of val into memory as a 64 bit big endian integer. | |
BSWP__EXP_PROTO unsigned long long int | BSWP__swap64_lclXbig (unsigned long long int val) _AT |
Byte swaps a 64 bit word; local representation <=> big. | |
BSWP__EXP_PROTO unsigned long long int | BSWP__swap64_lclXlittle (unsigned long long int val) _AT |
Byte swaps a 32 bit word; local representation <=> little. |
CVS $Id: BSWP.ih,v 1.8 2005/10/01 01:00:11 russell Exp $
SYNOPSIS
This provides a generic interface to the inline byte swapping. These routines are inspired by the PPC instructions that perform byte swapping operations.
The PPC provides three sets of instuctions, one that operates on 16 bit values one that operates on 32 bit values and one that operates on 64 bit values. All three sets have five instructions. The first two byte swaps the data as in loads it from memory, while the second one byte swaps the data as it stores it in memory. These instructions come in two flavors, a straight addressing mode and an indexed addressing mode. The final two do the byteswapping as immediate value. This final one is provided only in this sense of completing the complement of operations. Unfortunately there is no instruction to byte swap a value already in a register. All 6 of these instructions are made available as inline functions.
In addition to splitting the routines into 16, 32 and 64 bit versions, the routines can be split along another axis, single and array versions. The array versions are really just convenience routines in that all they do is wrap the single word routines in a loop. Since this is a common thing to do, they are also provided, although only in a callable form (see BSWP.h).
The single word swapping routines have only an inline implementation. This is because these routines are so simple and efficiency is a major design driver, there is no reason to use a callable version.
|
Loads a byte swapped version of the 16 bit integer from memory.
|
Here is the call graph for this function:
|
Loads the host representation of the known big endian 16 bit integer byte from memory.
|
|
Loads the host representation of the known bige endian 16 bit integer byte from memory.
|
|
Loads the host representation of the known little endian 16 bit integer byte from memory.
|
Here is the call graph for this function:
|
Loads the host representation of the known little endian 16 bit integer byte from memory.
|
Here is the call graph for this function:
|
Loads a byte swapped version of the 16 bit integer from memory.
|
Here is the call graph for this function:
|
Loads a byte swapped version of the 32 bit integer from memory.
|
Here is the call graph for this function:
|
Loads the host representation of the known big endian 32 bit integer byte from memory.
|
|
Loads the host representation of the known bige endian 32 bit integer byte from memory.
|
|
Loads the host representation of the known little endian 32 bit integer byte from memory.
|
Here is the call graph for this function:
|
Loads the host representation of the known little endian 32 bit integer byte from memory.
|
Here is the call graph for this function:
|
Loads a byte swapped version of the 32 bit integer from memory after applying the specified offset.
|
Here is the call graph for this function:
|
Loads a byte swapped version of the 64 bit integer from memory.
|
Here is the call graph for this function:
|
Loads the host representation of the known big endian 64 bit integer byte from memory.
|
|
Loads the host representation of the known bige endian 64 bit integer byte from memory.
|
|
Loads the host representation of the known little endian 64 bit integer byte from memory.
|
Here is the call graph for this function:
|
Loads the host representation of the known little endian 64 bit integer byte from memory.
|
Here is the call graph for this function:
|
Loads a byte swapped version of the 64 bit integer from memory.
|
Here is the call graph for this function:
|
Stores a byte swapped version of the 16 bit integer to memory.
|
Here is the call graph for this function:
|
Stores the host representation of val into memory as a 16 bit big endian integer.
|
|
Stores the host representation of val into memory as a 16 bit big endian integer.
|
|
Stores the host representation of val into memory as a 16 bit little endian integer.
|
Here is the call graph for this function:
|
Stores the host representation of val into memory as a 16 bit little endian integer.
|
Here is the call graph for this function:
|
Stores a byte swapped version of the 16 bit integer to memory.
|
Here is the call graph for this function:
|
Stores a byte swapped version of the 32 bit integer to memory.
|
Here is the call graph for this function:
|
Stores the host representation of val into memory as a 32 bit big endian integer.
|
|
Stores the host representation of val into memory as a 32 bit big endian integer.
|
|
Stores the host representation of val into memory as a 32 bit little endian integer.
|
Here is the call graph for this function:
|
Stores the host representation of val into memory as a 32 bit little endian integer.
|
Here is the call graph for this function:
|
Stores a byte swapped version of the 32 bit integer to memory after a byte offset has been applied.
|
Here is the call graph for this function:
|
Stores a byte swapped version of the 64 bit integer to memory.
|
Here is the call graph for this function:
|
Stores the host representation of val into memory as a 64 bit big endian integer.
|
|
Stores the host representation of val into memory as a 64 bit big endian integer.
|
|
Stores the host representation of val into memory as a 64 bit little endian integer.
|
Here is the call graph for this function:
|
Stores the host representation of val into memory as a 64 bit little endian integer.
|
Here is the call graph for this function:
|
Stores a byte swapped version of the 64 bit integer to memory.
|
Here is the call graph for this function:
|
Byte swaps a 16 bit word.
|
|
Byte swaps a 16 bit word; local representation <=> big.
If the local target machine representation is big endian, then this routine is a NOOP.
|
|
Byte swaps a 32 bit word; local representation <=> little.
If the local target machine representation is little endian, then this routine is a NOOP.
|
Here is the call graph for this function:
|
Ensures that the big endian input 16 bit word val is transformed to the host representation.
|
|
Ensures that the little endian input 16 bit word val is transformed to the host representation.
|
Here is the call graph for this function:
|
Byte swaps a 32 bit word.
|
|
Byte swaps a 32 bit word; local representation <=> big.
If the local target machine representation is big endian, then this routine is a NOOP.
|
|
Byte swaps a 32 bit word; local representation <=> little.
If the local target machine representation is little endian, then this routine is a NOOP.
|
Here is the call graph for this function:
|
Ensures that the big endian input 16 bit word val is transformed to the host representation.
|
|
Ensures that the little endian input 32 bit word val is transformed to the host representation.
|
Here is the call graph for this function:
|
Byte swaps a 64 bit word.
|
Here is the call graph for this function:
|
Byte swaps a 64 bit word; local representation <=> big.
If the local target machine representation is big endian, then this routine is a NOOP. |
|
Byte swaps a 32 bit word; local representation <=> little.
If the local target machine representation is little endian, then this routine is a NOOP. |
Here is the call graph for this function:
|
Ensures that the big endian input 64 bit word val is transformed to the host representation.
|
|
Ensures that the little endian input 64 bit word val is transformed to the host representation.
|
Here is the call graph for this function: