\hypertarget{BSWP_8ih}{
\section{BSWP.ih File Reference}
\label{BSWP_8ih}\index{BSWP.ih@{BSWP.ih}}
}
Byteswapping, inline versions. 

{\tt \#include \char`\"{}PBI/Inline.h\char`\"{}}\par
{\tt \#include \char`\"{}PBI/Unions.h\char`\"{}}\par
{\tt \#include \char`\"{}PBI/Attribute.h\char`\"{}}\par
{\tt \#include \char`\"{}PBI/Endianness.h\char`\"{}}\par
{\tt \#include \char`\"{}IPBS/impl/BSWP.ih.xx-xxx-xxx\char`\"{}}\par


Include dependency graph for BSWP.ih:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=155pt]{BSWP_8ih__incl}
\end{center}
\end{figure}


This graph shows which files directly or indirectly include this file:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=96pt]{BSWP_8ih__dep__incl}
\end{center}
\end{figure}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{BSWP_8ih_a0}{
\#define \hyperlink{BSWP_8ih_a0}{\_\-AT}~\_\-\_\-attribute\_\-\_\-((unused))}
\label{BSWP_8ih_a0}

\begin{CompactList}\small\item\em Abbreviation for the attributes of the BSWP inlines. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a1}{BSWP\_\-\_\-swap16} (unsigned short int val) \_\-AT
\begin{CompactList}\small\item\em Byte swaps a 16 bit word. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a2}{BSWP\_\-\_\-swap16l} (unsigned short int val) \_\-AT
\begin{CompactList}\small\item\em Ensures that the little endian input 16 bit word {\em val\/} is transformed to the host representation. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a3}{BSWP\_\-\_\-swap16b} (unsigned short int val) \_\-AT
\begin{CompactList}\small\item\em Ensures that the big endian input 16 bit word {\em val\/} is transformed to the host representation. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a4}{BSWP\_\-\_\-load16} (const unsigned short int $\ast$src) \_\-AT
\begin{CompactList}\small\item\em Loads a byte swapped version of the 16 bit integer from memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a5}{BSWP\_\-\_\-load16l} (const unsigned short int $\ast$src) \_\-AT
\begin{CompactList}\small\item\em Loads the host representation of the known little endian 16 bit integer byte from memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a6}{BSWP\_\-\_\-load16b} (const unsigned short int $\ast$src) \_\-AT
\begin{CompactList}\small\item\em Loads the host representation of the known big endian 16 bit integer byte from memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a7}{BSWP\_\-\_\-load16x} (const unsigned short int $\ast$src, unsigned int offset) \_\-AT
\begin{CompactList}\small\item\em Loads a byte swapped version of the 16 bit integer from memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a8}{BSWP\_\-\_\-load16lx} (const unsigned short int $\ast$src, unsigned int offset) \_\-AT
\begin{CompactList}\small\item\em Loads the host representation of the known little endian 16 bit integer byte from memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a9}{BSWP\_\-\_\-load16bx} (const unsigned short int $\ast$src, unsigned int offset) \_\-AT
\begin{CompactList}\small\item\em Loads the host representation of the known bige endian 16 bit integer byte from memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a10}{BSWP\_\-\_\-store16} (unsigned short int $\ast$dst, unsigned short int val) \_\-AT
\begin{CompactList}\small\item\em Stores a byte swapped version of the 16 bit integer to memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a11}{BSWP\_\-\_\-store16l} (unsigned short int $\ast$dst, unsigned short int val) \_\-AT
\begin{CompactList}\small\item\em Stores the host representation of {\em val\/} into memory as a 16 bit little endian integer. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a12}{BSWP\_\-\_\-store16b} (unsigned short int $\ast$dst, unsigned short int val) \_\-AT
\begin{CompactList}\small\item\em Stores the host representation of {\em val\/} into memory as a 16 bit big endian integer. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a13}{BSWP\_\-\_\-store16x} (unsigned short int $\ast$dst, unsigned int offset, unsigned short int val) \_\-AT
\begin{CompactList}\small\item\em Stores a byte swapped version of the 16 bit integer to memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a14}{BSWP\_\-\_\-store16lx} (unsigned short int $\ast$dst, unsigned int offset, unsigned short int val) \_\-AT
\begin{CompactList}\small\item\em Stores the host representation of {\em val\/} into memory as a 16 bit little endian integer. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a15}{BSWP\_\-\_\-store16bx} (unsigned short int $\ast$dst, unsigned int offset, unsigned short int val) \_\-AT
\begin{CompactList}\small\item\em Stores the host representation of {\em val\/} into memory as a 16 bit big endian integer. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a16}{BSWP\_\-\_\-swap16\_\-lcl\-Xbig} (unsigned short int val) \_\-AT
\begin{CompactList}\small\item\em Byte swaps a 16 bit word; local representation $<$=$>$ big. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a17}{BSWP\_\-\_\-swap16\_\-lcl\-Xlittle} (unsigned short int val) \_\-AT
\begin{CompactList}\small\item\em Byte swaps a 32 bit word; local representation $<$=$>$ little. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a18}{BSWP\_\-\_\-swap32} (unsigned int val) \_\-AT
\begin{CompactList}\small\item\em Byte swaps a 32 bit word. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a19}{BSWP\_\-\_\-swap32l} (unsigned int val) \_\-AT
\begin{CompactList}\small\item\em Ensures that the little endian input 32 bit word {\em val\/} is transformed to the host representation. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a20}{BSWP\_\-\_\-swap32b} (unsigned int val) \_\-AT
\begin{CompactList}\small\item\em Ensures that the big endian input 16 bit word {\em val\/} is transformed to the host representation. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a21}{BSWP\_\-\_\-load32} (const unsigned int $\ast$src) \_\-AT
\begin{CompactList}\small\item\em Loads a byte swapped version of the 32 bit integer from memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a22}{BSWP\_\-\_\-load32l} (const unsigned int $\ast$src) \_\-AT
\begin{CompactList}\small\item\em Loads the host representation of the known little endian 32 bit integer byte from memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a23}{BSWP\_\-\_\-load32b} (const unsigned int $\ast$src) \_\-AT
\begin{CompactList}\small\item\em Loads the host representation of the known big endian 32 bit integer byte from memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a24}{BSWP\_\-\_\-load32x} (const unsigned int $\ast$src, unsigned int offset) \_\-AT
\begin{CompactList}\small\item\em Loads a byte swapped version of the 32 bit integer from memory after applying the specified offset. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a25}{BSWP\_\-\_\-load32lx} (const unsigned int $\ast$src, unsigned int offset) \_\-AT
\begin{CompactList}\small\item\em Loads the host representation of the known little endian 32 bit integer byte from memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a26}{BSWP\_\-\_\-load32bx} (const unsigned int $\ast$src, unsigned int offset) \_\-AT
\begin{CompactList}\small\item\em Loads the host representation of the known bige endian 32 bit integer byte from memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a27}{BSWP\_\-\_\-store32} (unsigned int $\ast$dst, unsigned int val) \_\-AT
\begin{CompactList}\small\item\em Stores a byte swapped version of the 32 bit integer to memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a28}{BSWP\_\-\_\-store32l} (unsigned int $\ast$dst, unsigned int val) \_\-AT
\begin{CompactList}\small\item\em Stores the host representation of {\em val\/} into memory as a 32 bit little endian integer. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a29}{BSWP\_\-\_\-store32b} (unsigned int $\ast$dst, unsigned int val) \_\-AT
\begin{CompactList}\small\item\em Stores the host representation of {\em val\/} into memory as a 32 bit big endian integer. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a30}{BSWP\_\-\_\-store32x} (unsigned int $\ast$dst, unsigned int offset, unsigned int val) \_\-AT
\begin{CompactList}\small\item\em Stores a byte swapped version of the 32 bit integer to memory after a byte offset has been applied. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a31}{BSWP\_\-\_\-store32lx} (unsigned int $\ast$dst, unsigned int offset, unsigned int val) \_\-AT
\begin{CompactList}\small\item\em Stores the host representation of {\em val\/} into memory as a 32 bit little endian integer. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a32}{BSWP\_\-\_\-store32bx} (unsigned int $\ast$dst, unsigned int offset, unsigned int val) \_\-AT
\begin{CompactList}\small\item\em Stores the host representation of {\em val\/} into memory as a 32 bit big endian integer. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a33}{BSWP\_\-\_\-swap32\_\-lcl\-Xbig} (unsigned int val) \_\-AT
\begin{CompactList}\small\item\em Byte swaps a 32 bit word; local representation $<$=$>$ big. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned int \hyperlink{BSWP_8ih_a34}{BSWP\_\-\_\-swap32\_\-lcl\-Xlittle} (unsigned int val) \_\-AT
\begin{CompactList}\small\item\em Byte swaps a 32 bit word; local representation $<$=$>$ little. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int \hyperlink{BSWP_8ih_a35}{BSWP\_\-\_\-swap64} (unsigned long long int val) \_\-AT
\begin{CompactList}\small\item\em Byte swaps a 64 bit word. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int \hyperlink{BSWP_8ih_a36}{BSWP\_\-\_\-swap64l} (unsigned long long int val) \_\-AT
\begin{CompactList}\small\item\em Ensures that the little endian input 64 bit word {\em val\/} is transformed to the host representation. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int \hyperlink{BSWP_8ih_a37}{BSWP\_\-\_\-swap64b} (unsigned long long int val) \_\-AT
\begin{CompactList}\small\item\em Ensures that the big endian input 64 bit word {\em val\/} is transformed to the host representation. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int \hyperlink{BSWP_8ih_a38}{BSWP\_\-\_\-load64} (const unsigned long long int $\ast$src) \_\-AT
\begin{CompactList}\small\item\em Loads a byte swapped version of the 64 bit integer from memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int \hyperlink{BSWP_8ih_a39}{BSWP\_\-\_\-load64l} (const unsigned long long int $\ast$src) \_\-AT
\begin{CompactList}\small\item\em Loads the host representation of the known little endian 64 bit integer byte from memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int \hyperlink{BSWP_8ih_a40}{BSWP\_\-\_\-load64b} (const unsigned long long int $\ast$src) \_\-AT
\begin{CompactList}\small\item\em Loads the host representation of the known big endian 64 bit integer byte from memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int \hyperlink{BSWP_8ih_a41}{BSWP\_\-\_\-load64x} (const unsigned long long int $\ast$src, unsigned int offset) \_\-AT
\begin{CompactList}\small\item\em Loads a byte swapped version of the 64 bit integer from memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int \hyperlink{BSWP_8ih_a42}{BSWP\_\-\_\-load64lx} (const unsigned long long int $\ast$src, unsigned int offset) \_\-AT
\begin{CompactList}\small\item\em Loads the host representation of the known little endian 64 bit integer byte from memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int \hyperlink{BSWP_8ih_a43}{BSWP\_\-\_\-load64bx} (const unsigned long long int $\ast$src, unsigned int offset) \_\-AT
\begin{CompactList}\small\item\em Loads the host representation of the known bige endian 64 bit integer byte from memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a44}{BSWP\_\-\_\-store64} (unsigned long long int $\ast$dst, unsigned long long int val) \_\-AT
\begin{CompactList}\small\item\em Stores a byte swapped version of the 64 bit integer to memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a45}{BSWP\_\-\_\-store64l} (unsigned long long int $\ast$dst, unsigned long long int val) \_\-AT
\begin{CompactList}\small\item\em Stores the host representation of {\em val\/} into memory as a 64 bit little endian integer. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a46}{BSWP\_\-\_\-store64b} (unsigned long long int $\ast$dst, unsigned long long int val) \_\-AT
\begin{CompactList}\small\item\em Stores the host representation of {\em val\/} into memory as a 64 bit big endian integer. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a47}{BSWP\_\-\_\-store64x} (unsigned long long int $\ast$dst, unsigned int offset, unsigned long long int val) \_\-AT
\begin{CompactList}\small\item\em Stores a byte swapped version of the 64 bit integer to memory. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a48}{BSWP\_\-\_\-store64lx} (unsigned long long int $\ast$dst, unsigned int offset, unsigned long long int val) \_\-AT
\begin{CompactList}\small\item\em Stores the host representation of {\em val\/} into memory as a 64 bit little endian integer. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO void \hyperlink{BSWP_8ih_a49}{BSWP\_\-\_\-store64bx} (unsigned long long int $\ast$dst, unsigned int offset, unsigned long long int val) \_\-AT
\begin{CompactList}\small\item\em Stores the host representation of {\em val\/} into memory as a 64 bit big endian integer. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int \hyperlink{BSWP_8ih_a50}{BSWP\_\-\_\-swap64\_\-lcl\-Xbig} (unsigned long long int val) \_\-AT
\begin{CompactList}\small\item\em Byte swaps a 64 bit word; local representation $<$=$>$ big. \item\end{CompactList}\item 
BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int \hyperlink{BSWP_8ih_a51}{BSWP\_\-\_\-swap64\_\-lcl\-Xlittle} (unsigned long long int val) \_\-AT
\begin{CompactList}\small\item\em Byte swaps a 32 bit word; local representation $<$=$>$ little. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Byteswapping, inline versions. 

\begin{Desc}
\item[Author:]JJRussell - \href{mailto:russell@slac.stanford.edu}{\tt russell@slac.stanford.edu}\end{Desc}


\footnotesize\begin{verbatim}    CVS $Id: BSWP.ih,v 1.1.1.1 2006/02/10 21:45:35 saxton Exp $
\end{verbatim}
\normalsize


{\bf SYNOPSIS} \par
 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 \hyperlink{BSWP_8h}{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.

\subsection{Function Documentation}
\hypertarget{BSWP_8ih_a4}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load16@{BSWP\_\-\_\-load16}}
\index{BSWP__load16@{BSWP\_\-\_\-load16}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load16]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-load16 (const unsigned short int $\ast$ {\em src})}}
\label{BSWP_8ih_a4}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the 16 bit integer to load \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The byte-swapped value of the 16 bit integer\end{Desc}
This routine should be used when loading 16 bit byte-swapped value from memory.\hypertarget{BSWP_8ih_a6}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load16b@{BSWP\_\-\_\-load16b}}
\index{BSWP__load16b@{BSWP\_\-\_\-load16b}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load16b]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-load16b (const unsigned short int $\ast$ {\em src})}}
\label{BSWP_8ih_a6}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the known bit endian 16 bit integer to load \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the big endian 16 bit integer\end{Desc}
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.\hypertarget{BSWP_8ih_a9}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load16bx@{BSWP\_\-\_\-load16bx}}
\index{BSWP__load16bx@{BSWP\_\-\_\-load16bx}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load16bx]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-load16bx (const unsigned short int $\ast$ {\em src}, unsigned int {\em offset})}}
\label{BSWP_8ih_a9}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the known big endian 16 bit integer to load. \item[{\em offset}]The byte offset from the source \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the big endian 16 bit integer\end{Desc}
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 \hyperlink{BSWP_8ih_8little__endian_a4}{BSWP\_\-\_\-load16l()}.

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a5}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load16l@{BSWP\_\-\_\-load16l}}
\index{BSWP__load16l@{BSWP\_\-\_\-load16l}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load16l]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-load16l (const unsigned short int $\ast$ {\em src})}}
\label{BSWP_8ih_a5}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the known little endian 16 bit integer to load \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the little endian 16 bit integer\end{Desc}
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.\hypertarget{BSWP_8ih_a8}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load16lx@{BSWP\_\-\_\-load16lx}}
\index{BSWP__load16lx@{BSWP\_\-\_\-load16lx}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load16lx]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-load16lx (const unsigned short int $\ast$ {\em src}, unsigned int {\em offset})}}
\label{BSWP_8ih_a8}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the known little endian 16 bit integer to load. \item[{\em offset}]The byte offset from the source \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the little endian 16 bit integer\end{Desc}
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 \hyperlink{BSWP_8ih_8little__endian_a4}{BSWP\_\-\_\-load16l()}.

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a7}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load16x@{BSWP\_\-\_\-load16x}}
\index{BSWP__load16x@{BSWP\_\-\_\-load16x}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load16x]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-load16x (const unsigned short int $\ast$ {\em src}, unsigned int {\em offset})}}
\label{BSWP_8ih_a7}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the 16 bit integer to load \item[{\em offset}]The byte offset from the source \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The byte-swapped value of the 16 bit integer\end{Desc}
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 \hyperlink{BSWP_8ih_8xx-x86-gcc_a2}{BSWP\_\-\_\-load16()}.

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a21}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load32@{BSWP\_\-\_\-load32}}
\index{BSWP__load32@{BSWP\_\-\_\-load32}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load32]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-load32 (const unsigned int $\ast$ {\em src})}}
\label{BSWP_8ih_a21}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the 32 bit integer to load \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The byte-swapped value of the 32 bit integer\end{Desc}
This routine should be used when loading 32 bit byte-swapped value from memory. If the value is already in a register, then use {\em \hyperlink{BSWP_8ih_8xx-x86-gcc_a6}{BSWP\_\-\_\-swap32()}\/}.\hypertarget{BSWP_8ih_a23}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load32b@{BSWP\_\-\_\-load32b}}
\index{BSWP__load32b@{BSWP\_\-\_\-load32b}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load32b]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-load32b (const unsigned int $\ast$ {\em src})}}
\label{BSWP_8ih_a23}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the known bit endian 32 bit integer to load \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the big endian 32 bit integer\end{Desc}
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.\hypertarget{BSWP_8ih_a26}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load32bx@{BSWP\_\-\_\-load32bx}}
\index{BSWP__load32bx@{BSWP\_\-\_\-load32bx}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load32bx]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-load32bx (const unsigned int $\ast$ {\em src}, unsigned int {\em offset})}}
\label{BSWP_8ih_a26}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the known big endian 32 bit integer to load. \item[{\em offset}]The byte offset from the source \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the big endian 32 bit integer\end{Desc}
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 \hyperlink{BSWP_8ih_8little__endian_a16}{BSWP\_\-\_\-load32l()}.

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a22}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load32l@{BSWP\_\-\_\-load32l}}
\index{BSWP__load32l@{BSWP\_\-\_\-load32l}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load32l]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-load32l (const unsigned int $\ast$ {\em src})}}
\label{BSWP_8ih_a22}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the known little endian 32 bit integer to load \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the little endian 32 bit integer\end{Desc}
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.\hypertarget{BSWP_8ih_a25}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load32lx@{BSWP\_\-\_\-load32lx}}
\index{BSWP__load32lx@{BSWP\_\-\_\-load32lx}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load32lx]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-load32lx (const unsigned int $\ast$ {\em src}, unsigned int {\em offset})}}
\label{BSWP_8ih_a25}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the known little endian 32 bit integer to load. \item[{\em offset}]The byte offset from the source \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the little endian 32 bit integer\end{Desc}
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 \hyperlink{BSWP_8ih_8little__endian_a16}{BSWP\_\-\_\-load32l()}.

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a24}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load32x@{BSWP\_\-\_\-load32x}}
\index{BSWP__load32x@{BSWP\_\-\_\-load32x}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load32x]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-load32x (const unsigned int $\ast$ {\em src}, unsigned int {\em offset})}}
\label{BSWP_8ih_a24}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the 32 bit integer to load \item[{\em offset}]The byte offset to be applied. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The byte-swapped value of the 32 bit integer\end{Desc}
This routine should be used when loading 32 bit byte-swapped value from memory. If the value is already in a register, then use {\em \hyperlink{BSWP_8ih_8xx-x86-gcc_a6}{BSWP\_\-\_\-swap32()}\/}.

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a38}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load64@{BSWP\_\-\_\-load64}}
\index{BSWP__load64@{BSWP\_\-\_\-load64}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load64]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int BSWP\_\-\_\-load64 (const unsigned long long int $\ast$ {\em src})}}
\label{BSWP_8ih_a38}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the 64 bit integer to load \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The byte-swapped value of the 64 bit integer\end{Desc}
This routine should be used when loading 64 bit byte-swapped value from memory.\hypertarget{BSWP_8ih_a40}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load64b@{BSWP\_\-\_\-load64b}}
\index{BSWP__load64b@{BSWP\_\-\_\-load64b}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load64b]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int BSWP\_\-\_\-load64b (const unsigned long long int $\ast$ {\em src})}}
\label{BSWP_8ih_a40}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the known bit endian 64 bit integer to load \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the big endian 64 bit integer\end{Desc}
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.\hypertarget{BSWP_8ih_a43}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load64bx@{BSWP\_\-\_\-load64bx}}
\index{BSWP__load64bx@{BSWP\_\-\_\-load64bx}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load64bx]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int BSWP\_\-\_\-load64bx (const unsigned long long int $\ast$ {\em src}, unsigned int {\em offset})}}
\label{BSWP_8ih_a43}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the known big endian 64 bit integer to load. \item[{\em offset}]The byte offset from the source \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the big endian 64 bit integer\end{Desc}
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 \hyperlink{BSWP_8ih_8little__endian_a28}{BSWP\_\-\_\-load64l()}.

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a39}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load64l@{BSWP\_\-\_\-load64l}}
\index{BSWP__load64l@{BSWP\_\-\_\-load64l}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load64l]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int BSWP\_\-\_\-load64l (const unsigned long long int $\ast$ {\em src})}}
\label{BSWP_8ih_a39}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the known little endian 64 bit integer to load \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the little endian 64 bit integer\end{Desc}
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.\hypertarget{BSWP_8ih_a42}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load64lx@{BSWP\_\-\_\-load64lx}}
\index{BSWP__load64lx@{BSWP\_\-\_\-load64lx}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load64lx]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int BSWP\_\-\_\-load64lx (const unsigned long long int $\ast$ {\em src}, unsigned int {\em offset})}}
\label{BSWP_8ih_a42}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the known little endian 64 bit integer to load. \item[{\em offset}]The byte offset from the source \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the little endian 64 bit integer\end{Desc}
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 \hyperlink{BSWP_8ih_8little__endian_a28}{BSWP\_\-\_\-load64l()}.

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a41}{
\index{BSWP.ih@{BSWP.ih}!BSWP__load64x@{BSWP\_\-\_\-load64x}}
\index{BSWP__load64x@{BSWP\_\-\_\-load64x}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-load64x]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int BSWP\_\-\_\-load64x (const unsigned long long int $\ast$ {\em src}, unsigned int {\em offset})}}
\label{BSWP_8ih_a41}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em src}]The address of the 64 bit integer to load \item[{\em offset}]The byte offset from the source \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The byte-swapped value of the 64 bit integer\end{Desc}
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 \hyperlink{BSWP_8ih_8xx-x86-gcc_a12}{BSWP\_\-\_\-load64()}.

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a10}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store16@{BSWP\_\-\_\-store16}}
\index{BSWP__store16@{BSWP\_\-\_\-store16}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store16]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store16 (unsigned short int $\ast$ {\em dst}, unsigned short int {\em val})}}
\label{BSWP_8ih_a10}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em val}]The word to byte swap and store\end{description}
\end{Desc}
This routine should be used when storing a 16 bit byte-swapped value into memory.\hypertarget{BSWP_8ih_a12}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store16b@{BSWP\_\-\_\-store16b}}
\index{BSWP__store16b@{BSWP\_\-\_\-store16b}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store16b]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store16b (unsigned short int $\ast$ {\em dst}, unsigned short int {\em val})}}
\label{BSWP_8ih_a12}


Stores the host representation of {\em val\/} into memory as a 16 bit big endian integer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em val}]The 16 bit integer to store as a big endian 16 bit integer.\end{description}
\end{Desc}
This routine should be used when storing the host's representation of a 16 bit into memory as a little endian 16 bit integer.\hypertarget{BSWP_8ih_a15}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store16bx@{BSWP\_\-\_\-store16bx}}
\index{BSWP__store16bx@{BSWP\_\-\_\-store16bx}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store16bx]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store16bx (unsigned short int $\ast$ {\em dst}, unsigned int {\em offset}, unsigned short int {\em val})}}
\label{BSWP_8ih_a15}


Stores the host representation of {\em val\/} into memory as a 16 bit big endian integer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em offset}]A byte offset to apply to dst. \item[{\em val}]The big endian 16 bit integer to store\end{description}
\end{Desc}
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 {\em \hyperlink{BSWP_8ih_8little__endian_a3}{BSWP\_\-\_\-swap16b()}\/}. If the offset is known to be a constant, it is marginally more efficient to use \hyperlink{BSWP_8ih_8little__endian_a9}{BSWP\_\-\_\-store16b()}.

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a11}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store16l@{BSWP\_\-\_\-store16l}}
\index{BSWP__store16l@{BSWP\_\-\_\-store16l}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store16l]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store16l (unsigned short int $\ast$ {\em dst}, unsigned short int {\em val})}}
\label{BSWP_8ih_a11}


Stores the host representation of {\em val\/} into memory as a 16 bit little endian integer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em val}]The 16 bit integer to store as a little endian 16 bit integer.\end{description}
\end{Desc}
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.\hypertarget{BSWP_8ih_a14}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store16lx@{BSWP\_\-\_\-store16lx}}
\index{BSWP__store16lx@{BSWP\_\-\_\-store16lx}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store16lx]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store16lx (unsigned short int $\ast$ {\em dst}, unsigned int {\em offset}, unsigned short int {\em val})}}
\label{BSWP_8ih_a14}


Stores the host representation of {\em val\/} into memory as a 16 bit little endian integer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em offset}]A byte offset to apply to dst. \item[{\em val}]The little endian 16 bitword to store\end{description}
\end{Desc}
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 {\em BSWP\_\-\_\-swapl()\/}. If the offset is known to be a constant, it is marginally more efficient to use \hyperlink{BSWP_8ih_8little__endian_a8}{BSWP\_\-\_\-store16l()}.

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a13}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store16x@{BSWP\_\-\_\-store16x}}
\index{BSWP__store16x@{BSWP\_\-\_\-store16x}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store16x]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store16x (unsigned short int $\ast$ {\em dst}, unsigned int {\em offset}, unsigned short int {\em val})}}
\label{BSWP_8ih_a13}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em offset}]A byte offset to apply to dst. \item[{\em val}]The word to byte swap and store\end{description}
\end{Desc}
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 {\em \hyperlink{BSWP_8ih_8xx-x86-gcc_a1}{BSWP\_\-\_\-swap16()}\/}. If the offset is known to be a constant, it is marginally more efficient to use \hyperlink{BSWP_8ih_8xx-x86-gcc_a4}{BSWP\_\-\_\-store16()}.

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a27}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store32@{BSWP\_\-\_\-store32}}
\index{BSWP__store32@{BSWP\_\-\_\-store32}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store32]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store32 (unsigned int $\ast$ {\em dst}, unsigned int {\em val})}}
\label{BSWP_8ih_a27}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em val}]The word to byte swap and store\end{description}
\end{Desc}
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 {\em \hyperlink{BSWP_8ih_8xx-x86-gcc_a6}{BSWP\_\-\_\-swap32()}\/}.\hypertarget{BSWP_8ih_a29}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store32b@{BSWP\_\-\_\-store32b}}
\index{BSWP__store32b@{BSWP\_\-\_\-store32b}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store32b]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store32b (unsigned int $\ast$ {\em dst}, unsigned int {\em val})}}
\label{BSWP_8ih_a29}


Stores the host representation of {\em val\/} into memory as a 32 bit big endian integer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em val}]The 32 bit integer to store as a big endian 32 bit integer.\end{description}
\end{Desc}
This routine should be used when storing the host's representation of a 32 bit into memory as a little endian 16 bit integer.\hypertarget{BSWP_8ih_a32}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store32bx@{BSWP\_\-\_\-store32bx}}
\index{BSWP__store32bx@{BSWP\_\-\_\-store32bx}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store32bx]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store32bx (unsigned int $\ast$ {\em dst}, unsigned int {\em offset}, unsigned int {\em val})}}
\label{BSWP_8ih_a32}


Stores the host representation of {\em val\/} into memory as a 32 bit big endian integer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em offset}]A byte offset to apply to dst. \item[{\em val}]The big endian 32 bit integer to store\end{description}
\end{Desc}
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 {\em \hyperlink{BSWP_8ih_8little__endian_a15}{BSWP\_\-\_\-swap32b()}\/}. If the offset is known to be a constant, it is marginally more efficient to use \hyperlink{BSWP_8ih_8little__endian_a21}{BSWP\_\-\_\-store32b()}.

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a28}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store32l@{BSWP\_\-\_\-store32l}}
\index{BSWP__store32l@{BSWP\_\-\_\-store32l}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store32l]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store32l (unsigned int $\ast$ {\em dst}, unsigned int {\em val})}}
\label{BSWP_8ih_a28}


Stores the host representation of {\em val\/} into memory as a 32 bit little endian integer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em val}]The 32 bit integer to store as a little endian 32 bit integer.\end{description}
\end{Desc}
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.\hypertarget{BSWP_8ih_a31}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store32lx@{BSWP\_\-\_\-store32lx}}
\index{BSWP__store32lx@{BSWP\_\-\_\-store32lx}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store32lx]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store32lx (unsigned int $\ast$ {\em dst}, unsigned int {\em offset}, unsigned int {\em val})}}
\label{BSWP_8ih_a31}


Stores the host representation of {\em val\/} into memory as a 32 bit little endian integer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em offset}]A byte offset to apply to dst. \item[{\em val}]The little endian 32 bitword to store\end{description}
\end{Desc}
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 {\em BSWP\_\-\_\-swapl()\/}. If the offset is known to be a constant, it is marginally more efficient to use \hyperlink{BSWP_8ih_8little__endian_a20}{BSWP\_\-\_\-store32l()}.

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a30}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store32x@{BSWP\_\-\_\-store32x}}
\index{BSWP__store32x@{BSWP\_\-\_\-store32x}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store32x]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store32x (unsigned int $\ast$ {\em dst}, unsigned int {\em offset}, unsigned int {\em val})}}
\label{BSWP_8ih_a30}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em offset}]The byte offset to be applied \item[{\em val}]The word to byte swap and store\end{description}
\end{Desc}
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 {\em \hyperlink{BSWP_8ih_8xx-x86-gcc_a6}{BSWP\_\-\_\-swap32()}\/}. If the offset is known to be a constant, it is marginally more efficient to use BSWP\_\-store32().

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a44}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store64@{BSWP\_\-\_\-store64}}
\index{BSWP__store64@{BSWP\_\-\_\-store64}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store64]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store64 (unsigned long long int $\ast$ {\em dst}, unsigned long long int {\em val})}}
\label{BSWP_8ih_a44}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em val}]The word to byte swap and store\end{description}
\end{Desc}
This routine should be used when storing a 64 bit byte-swapped value into memory.\hypertarget{BSWP_8ih_a46}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store64b@{BSWP\_\-\_\-store64b}}
\index{BSWP__store64b@{BSWP\_\-\_\-store64b}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store64b]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store64b (unsigned long long int $\ast$ {\em dst}, unsigned long long int {\em val})}}
\label{BSWP_8ih_a46}


Stores the host representation of {\em val\/} into memory as a 64 bit big endian integer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em val}]The 64 bit integer to store as a big endian 64 bit integer.\end{description}
\end{Desc}
This routine should be used when storing the host's representation of a 64 bit into memory as a little endian 64 bit integer.\hypertarget{BSWP_8ih_a49}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store64bx@{BSWP\_\-\_\-store64bx}}
\index{BSWP__store64bx@{BSWP\_\-\_\-store64bx}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store64bx]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store64bx (unsigned long long int $\ast$ {\em dst}, unsigned int {\em offset}, unsigned long long int {\em val})}}
\label{BSWP_8ih_a49}


Stores the host representation of {\em val\/} into memory as a 64 bit big endian integer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em offset}]A byte offset to apply to dst. \item[{\em val}]The big endian 64 bit integer to store\end{description}
\end{Desc}
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 {\em \hyperlink{BSWP_8ih_8little__endian_a27}{BSWP\_\-\_\-swap64b()}\/}. If the offset is known to be a constant, it is marginally more efficient to use \hyperlink{BSWP_8ih_8little__endian_a33}{BSWP\_\-\_\-store64b()}.

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a45}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store64l@{BSWP\_\-\_\-store64l}}
\index{BSWP__store64l@{BSWP\_\-\_\-store64l}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store64l]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store64l (unsigned long long int $\ast$ {\em dst}, unsigned long long int {\em val})}}
\label{BSWP_8ih_a45}


Stores the host representation of {\em val\/} into memory as a 64 bit little endian integer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em val}]The 64 bit integer to store as a little endian 64 bit integer.\end{description}
\end{Desc}
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.\hypertarget{BSWP_8ih_a48}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store64lx@{BSWP\_\-\_\-store64lx}}
\index{BSWP__store64lx@{BSWP\_\-\_\-store64lx}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store64lx]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store64lx (unsigned long long int $\ast$ {\em dst}, unsigned int {\em offset}, unsigned long long int {\em val})}}
\label{BSWP_8ih_a48}


Stores the host representation of {\em val\/} into memory as a 64 bit little endian integer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em offset}]A byte offset to apply to dst. \item[{\em val}]The little endian 64 bitword to store\end{description}
\end{Desc}
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 {\em BSWP\_\-\_\-swapl()\/}. If the offset is known to be a constant, it is marginally more efficient to use \hyperlink{BSWP_8ih_8little__endian_a32}{BSWP\_\-\_\-store64l()}.

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a47}{
\index{BSWP.ih@{BSWP.ih}!BSWP__store64x@{BSWP\_\-\_\-store64x}}
\index{BSWP__store64x@{BSWP\_\-\_\-store64x}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-store64x]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO void BSWP\_\-\_\-store64x (unsigned long long int $\ast$ {\em dst}, unsigned int {\em offset}, unsigned long long int {\em val})}}
\label{BSWP_8ih_a47}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dst}]The address of the destination word \item[{\em offset}]A byte offset to apply to dst. \item[{\em val}]The word to byte swap and store\end{description}
\end{Desc}
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 {\em \hyperlink{BSWP_8ih_8xx-x86-gcc_a11}{BSWP\_\-\_\-swap64()}\/}. If the offset is known to be a constant, it is marginally more efficient to use BSWP\_\-store64().

\begin{Desc}
\item[Warning:]Note that {\em 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.\end{Desc}
\hypertarget{BSWP_8ih_a1}{
\index{BSWP.ih@{BSWP.ih}!BSWP__swap16@{BSWP\_\-\_\-swap16}}
\index{BSWP__swap16@{BSWP\_\-\_\-swap16}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-swap16]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-swap16 (unsigned short int {\em val})}}
\label{BSWP_8ih_a1}


Byte swaps a 16 bit word. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]The 16 bit word to swap \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The byte-swapped value of the 16 bit integer\end{Desc}
This routine should be used when byte-swapping 16 bit quantities that are already in registers. The routines \hyperlink{BSWP_8ih_8xx-x86-gcc_a2}{BSWP\_\-\_\-load16()} and BSWP\_\-\_\-store16 should by used when loading or storing 16 bit quantities from/into memory.\hypertarget{BSWP_8ih_a16}{
\index{BSWP.ih@{BSWP.ih}!BSWP__swap16_lclXbig@{BSWP\_\-\_\-swap16\_\-lclXbig}}
\index{BSWP__swap16_lclXbig@{BSWP\_\-\_\-swap16\_\-lclXbig}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-swap16\_\-lclXbig]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-swap16\_\-lcl\-Xbig (unsigned short int {\em val})}}
\label{BSWP_8ih_a16}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]The 16 bit word transform from/to the local representation to/from big endian representation \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The appropriately byte-swapped value of the 16 bit integer\end{Desc}
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.

\begin{Desc}
\item[Warning:]This routine is being deprecated. The new name is \hyperlink{BSWP_8ih_8little__endian_a3}{BSWP\_\-\_\-swap16b()}.\end{Desc}
\hypertarget{BSWP_8ih_a17}{
\index{BSWP.ih@{BSWP.ih}!BSWP__swap16_lclXlittle@{BSWP\_\-\_\-swap16\_\-lclXlittle}}
\index{BSWP__swap16_lclXlittle@{BSWP\_\-\_\-swap16\_\-lclXlittle}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-swap16\_\-lclXlittle]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-swap16\_\-lcl\-Xlittle (unsigned short int {\em val})}}
\label{BSWP_8ih_a17}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]The 16 bit word transform from/to the local representation to/from little endian representation \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The appropriately byte-swapped value of the 16 bit integer\end{Desc}
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.

\begin{Desc}
\item[Warning:]This routine is being deprecated. The new name is \hyperlink{BSWP_8ih_8little__endian_a2}{BSWP\_\-\_\-swap16l()}.\end{Desc}
\hypertarget{BSWP_8ih_a3}{
\index{BSWP.ih@{BSWP.ih}!BSWP__swap16b@{BSWP\_\-\_\-swap16b}}
\index{BSWP__swap16b@{BSWP\_\-\_\-swap16b}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-swap16b]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-swap16b (unsigned short int {\em val})}}
\label{BSWP_8ih_a3}


Ensures that the big endian input 16 bit word {\em val\/} is transformed to the host representation. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]The big endian 16 bit value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the big endian {\em val\/} \end{Desc}
This routine returns the host representation of known big endian 16 bit value, already in a register. The routines \hyperlink{BSWP_8ih_8little__endian_a5}{BSWP\_\-\_\-load16b()}, \hyperlink{BSWP_8ih_8little__endian_a9}{BSWP\_\-\_\-store16b()} or BSWP\_\-\_\-store16xb() should by used when loading or storing known big endian 16 bit quantities from/into memory.\hypertarget{BSWP_8ih_a2}{
\index{BSWP.ih@{BSWP.ih}!BSWP__swap16l@{BSWP\_\-\_\-swap16l}}
\index{BSWP__swap16l@{BSWP\_\-\_\-swap16l}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-swap16l]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-swap16l (unsigned short int {\em val})}}
\label{BSWP_8ih_a2}


Ensures that the little endian input 16 bit word {\em val\/} is transformed to the host representation. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]The little endian 16 bit value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the little endian {\em val\/} \end{Desc}
This routine returns the host representation of known little endian 16 bit value, already in a register. The routines \hyperlink{BSWP_8ih_8little__endian_a4}{BSWP\_\-\_\-load16l()}, \hyperlink{BSWP_8ih_8little__endian_a8}{BSWP\_\-\_\-store16l()} or BSWP\_\-\_\-store16xl() should by used when loading or storing known little endian 16 bit quantities from/into memory.\hypertarget{BSWP_8ih_a18}{
\index{BSWP.ih@{BSWP.ih}!BSWP__swap32@{BSWP\_\-\_\-swap32}}
\index{BSWP__swap32@{BSWP\_\-\_\-swap32}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-swap32]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-swap32 (unsigned int {\em val})}}
\label{BSWP_8ih_a18}


Byte swaps a 32 bit word. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]The 32 bit word to swap \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The byte-swapped value of the 32 bit integer\end{Desc}
This routine should be used when byte-swapping 32 bit quantities that are already in registers. The routines \hyperlink{BSWP_8ih_8xx-x86-gcc_a7}{BSWP\_\-\_\-load32()} and BSWP\_\-\_\-store32 should by used when loading or storing 32 bit quantities from/into memory.\hypertarget{BSWP_8ih_a33}{
\index{BSWP.ih@{BSWP.ih}!BSWP__swap32_lclXbig@{BSWP\_\-\_\-swap32\_\-lclXbig}}
\index{BSWP__swap32_lclXbig@{BSWP\_\-\_\-swap32\_\-lclXbig}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-swap32\_\-lclXbig]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-swap32\_\-lcl\-Xbig (unsigned int {\em val})}}
\label{BSWP_8ih_a33}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]The 32 bit word transform from/to the local representation to/from big endian representation \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The appropriately byte-swapped value of the 32 bit integer\end{Desc}
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.

\begin{Desc}
\item[Warning:]This routine is being deprecated. The new name is \hyperlink{BSWP_8ih_8little__endian_a15}{BSWP\_\-\_\-swap32b()}.\end{Desc}
\hypertarget{BSWP_8ih_a34}{
\index{BSWP.ih@{BSWP.ih}!BSWP__swap32_lclXlittle@{BSWP\_\-\_\-swap32\_\-lclXlittle}}
\index{BSWP__swap32_lclXlittle@{BSWP\_\-\_\-swap32\_\-lclXlittle}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-swap32\_\-lclXlittle]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-swap32\_\-lcl\-Xlittle (unsigned int {\em val})}}
\label{BSWP_8ih_a34}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]The 32 bit word transform from/to the local representation to/from little endian representation \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The appropriately byte-swapped value of the 32 bit integer\end{Desc}
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.

\begin{Desc}
\item[Warning:]This routine is being deprecated. The new name is \hyperlink{BSWP_8ih_8little__endian_a14}{BSWP\_\-\_\-swap32l()}.\end{Desc}
\hypertarget{BSWP_8ih_a20}{
\index{BSWP.ih@{BSWP.ih}!BSWP__swap32b@{BSWP\_\-\_\-swap32b}}
\index{BSWP__swap32b@{BSWP\_\-\_\-swap32b}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-swap32b]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-swap32b (unsigned int {\em val})}}
\label{BSWP_8ih_a20}


Ensures that the big endian input 16 bit word {\em val\/} is transformed to the host representation. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]The big endian 32 bit value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the big endian {\em val\/} \end{Desc}
This routine returns the host representation of known big endian 32 bit value, already in a register. The routines \hyperlink{BSWP_8ih_8little__endian_a17}{BSWP\_\-\_\-load32b()}, \hyperlink{BSWP_8ih_8little__endian_a21}{BSWP\_\-\_\-store32b()} or BSWP\_\-\_\-store32xb() should by used when loading or storing known big endian 32 bit quantities from/into memory.\hypertarget{BSWP_8ih_a19}{
\index{BSWP.ih@{BSWP.ih}!BSWP__swap32l@{BSWP\_\-\_\-swap32l}}
\index{BSWP__swap32l@{BSWP\_\-\_\-swap32l}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-swap32l]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned int BSWP\_\-\_\-swap32l (unsigned int {\em val})}}
\label{BSWP_8ih_a19}


Ensures that the little endian input 32 bit word {\em val\/} is transformed to the host representation. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]The little endian 32 bit value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the little endian {\em val\/} \end{Desc}
This routine returns the host representation of known little endian 32 bit value, already in a register. The routines \hyperlink{BSWP_8ih_8little__endian_a16}{BSWP\_\-\_\-load32l()}, \hyperlink{BSWP_8ih_8little__endian_a20}{BSWP\_\-\_\-store32l()} or BSWP\_\-\_\-store32xl() should by used when loading or storing known little endian 32 bit quantities from/into memory.\hypertarget{BSWP_8ih_a35}{
\index{BSWP.ih@{BSWP.ih}!BSWP__swap64@{BSWP\_\-\_\-swap64}}
\index{BSWP__swap64@{BSWP\_\-\_\-swap64}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-swap64]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int BSWP\_\-\_\-swap64 (unsigned long long int {\em val})}}
\label{BSWP_8ih_a35}


Byte swaps a 64 bit word. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]The 64 bit word to swap \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The byte-swapped value of the 64 bit integer\end{Desc}
This routine should be used when byte-swapping 64 bit quantities that are already in registers. The routines \hyperlink{BSWP_8ih_8xx-x86-gcc_a12}{BSWP\_\-\_\-load64()} and BSWP\_\-\_\-store64 should by used when loading or storing 64 bit quantities from/into memory.\hypertarget{BSWP_8ih_a50}{
\index{BSWP.ih@{BSWP.ih}!BSWP__swap64_lclXbig@{BSWP\_\-\_\-swap64\_\-lclXbig}}
\index{BSWP__swap64_lclXbig@{BSWP\_\-\_\-swap64\_\-lclXbig}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-swap64\_\-lclXbig]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int BSWP\_\-\_\-swap64\_\-lcl\-Xbig (unsigned long long int {\em val})}}
\label{BSWP_8ih_a50}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]The 64 bit word transform from/to the local representation to/from big endian representation \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The appropriately byte-swapped value of the 64 bit integer\end{Desc}
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.\hypertarget{BSWP_8ih_a51}{
\index{BSWP.ih@{BSWP.ih}!BSWP__swap64_lclXlittle@{BSWP\_\-\_\-swap64\_\-lclXlittle}}
\index{BSWP__swap64_lclXlittle@{BSWP\_\-\_\-swap64\_\-lclXlittle}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-swap64\_\-lclXlittle]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int BSWP\_\-\_\-swap64\_\-lcl\-Xlittle (unsigned long long int {\em val})}}
\label{BSWP_8ih_a51}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]The 64 bit word transform from/to the local representation to/from little endian representation \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The appropriately byte-swapped value of the 64 bit integer\end{Desc}
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.\hypertarget{BSWP_8ih_a37}{
\index{BSWP.ih@{BSWP.ih}!BSWP__swap64b@{BSWP\_\-\_\-swap64b}}
\index{BSWP__swap64b@{BSWP\_\-\_\-swap64b}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-swap64b]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int BSWP\_\-\_\-swap64b (unsigned long long int {\em val})}}
\label{BSWP_8ih_a37}


Ensures that the big endian input 64 bit word {\em val\/} is transformed to the host representation. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]The big endian 64 bit value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the big endian {\em val\/} \end{Desc}
This routine returns the host representation of known big endian 64 bit value, already in a register. The routines \hyperlink{BSWP_8ih_8little__endian_a29}{BSWP\_\-\_\-load64b()}, \hyperlink{BSWP_8ih_8little__endian_a33}{BSWP\_\-\_\-store64b()} or BSWP\_\-\_\-store64xb() should by used when loading or storing known big endian 64 bit quantities from/into memory.\hypertarget{BSWP_8ih_a36}{
\index{BSWP.ih@{BSWP.ih}!BSWP__swap64l@{BSWP\_\-\_\-swap64l}}
\index{BSWP__swap64l@{BSWP\_\-\_\-swap64l}!BSWP.ih@{BSWP.ih}}
\subsubsection[BSWP\_\-\_\-swap64l]{\setlength{\rightskip}{0pt plus 5cm}BSWP\_\-\_\-EXP\_\-PROTO unsigned long long int BSWP\_\-\_\-swap64l (unsigned long long int {\em val})}}
\label{BSWP_8ih_a36}


Ensures that the little endian input 64 bit word {\em val\/} is transformed to the host representation. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em val}]The little endian 64 bit value \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The host representation of the little endian {\em val\/} \end{Desc}
This routine returns the host representation of known little endian 64 bit value, already in a register. The routines \hyperlink{BSWP_8ih_8little__endian_a28}{BSWP\_\-\_\-load64l()}, \hyperlink{BSWP_8ih_8little__endian_a32}{BSWP\_\-\_\-store64l()} or BSWP\_\-\_\-store64xl() should by used when loading or storing known little endian 64 bit quantities from/into memory.