gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Functions | Variables
byteswap.hh File Reference
#include "base/bigint.hh"
#include "base/types.hh"
#include <machine/endian.h>

Go to the source code of this file.

Namespaces

 BigEndianGuest
 
 LittleEndianGuest
 

Functions

uint64_t swap_byte64 (uint64_t x)
 
uint32_t swap_byte32 (uint32_t x)
 
uint16_t swap_byte16 (uint16_t x)
 
template<typename T >
swap_byte (T x)
 
template<>
Twin64_t swap_byte< Twin64_t > (Twin64_t x)
 
template<>
Twin32_t swap_byte< Twin32_t > (Twin32_t x)
 
template<typename T >
betole (T value)
 
template<typename T >
letobe (T value)
 
template<typename T >
htole (T value)
 
template<typename T >
letoh (T value)
 
template<typename T >
htobe (T value)
 
template<typename T >
betoh (T value)
 
template<typename T >
BigEndianGuest::gtole (T value)
 
template<typename T >
BigEndianGuest::letog (T value)
 
template<typename T >
BigEndianGuest::gtobe (T value)
 
template<typename T >
BigEndianGuest::betog (T value)
 
template<typename T >
BigEndianGuest::htog (T value)
 
template<typename T >
BigEndianGuest::gtoh (T value)
 
template<typename T >
LittleEndianGuest::gtole (T value)
 
template<typename T >
LittleEndianGuest::letog (T value)
 
template<typename T >
LittleEndianGuest::gtobe (T value)
 
template<typename T >
LittleEndianGuest::betog (T value)
 
template<typename T >
LittleEndianGuest::htog (T value)
 
template<typename T >
LittleEndianGuest::gtoh (T value)
 

Variables

const ByteOrder HostByteOrder = BigEndianByteOrder
 
const ByteOrder BigEndianGuest::GuestByteOrder = BigEndianByteOrder
 
const ByteOrder LittleEndianGuest::GuestByteOrder = LittleEndianByteOrder
 

Function Documentation

template<typename T >
T betoh ( value)
inline
template<typename T >
T betole ( value)
inline

Definition at line 144 of file byteswap.hh.

References swap_byte().

Referenced by LittleEndianGuest::betog(), and BigEndianGuest::gtole().

template<typename T >
T htobe ( value)
inline
template<typename T >
T htole ( value)
inline
template<typename T >
T letobe ( value)
inline

Definition at line 145 of file byteswap.hh.

References swap_byte().

Referenced by LittleEndianGuest::gtobe(), and BigEndianGuest::letog().

template<typename T >
T letoh ( value)
inline
template<typename T >
T swap_byte ( x)
inline
uint16_t swap_byte16 ( uint16_t  x)
inline

Definition at line 96 of file byteswap.hh.

References X86ISA::x.

Referenced by swap_byte().

uint32_t swap_byte32 ( uint32_t  x)
inline

Definition at line 82 of file byteswap.hh.

References X86ISA::x.

Referenced by swap_byte().

uint64_t swap_byte64 ( uint64_t  x)
inline

Definition at line 63 of file byteswap.hh.

References ULL, and X86ISA::x.

Referenced by swap_byte().

template<>
Twin32_t swap_byte< Twin32_t > ( Twin32_t  x)
inline

Definition at line 135 of file byteswap.hh.

References swap_byte(), and X86ISA::x.

template<>
Twin64_t swap_byte< Twin64_t > ( Twin64_t  x)
inline

Definition at line 127 of file byteswap.hh.

References swap_byte(), and X86ISA::x.

Variable Documentation

const ByteOrder HostByteOrder = BigEndianByteOrder

Definition at line 150 of file byteswap.hh.


Generated on Fri Jun 9 2017 13:03:59 for gem5 by doxygen 1.8.6