#ifndef __ARCH_ALPHA_ISA_TRAITS_HH__
#define __ARCH_ALPHA_ISA_TRAITS_HH__
-namespace LittleEndianGuest {}
-
#include "arch/alpha/ipr.hh"
#include "arch/alpha/types.hh"
#include "base/types.hh"
namespace AlphaISA {
-using namespace LittleEndianGuest;
+const ByteOrder GuestByteOrder = LittleEndianByteOrder;
StaticInstPtr decodeInst(ExtMachInst);
#include "base/types.hh"
#include "cpu/static_inst_fwd.hh"
-namespace LittleEndianGuest {}
-
namespace ArmISA
{
- using namespace LittleEndianGuest;
+ const ByteOrder GuestByteOrder = LittleEndianByteOrder;
StaticInstPtr decodeInst(ExtMachInst);
#include "base/types.hh"
#include "cpu/static_inst_fwd.hh"
-namespace LittleEndianGuest {}
-
namespace MipsISA
{
-using namespace LittleEndianGuest;
+const ByteOrder GuestByteOrder = LittleEndianByteOrder;
StaticInstPtr decodeInst(ExtMachInst);
#include "params/MipsSystem.hh"
#include "sim/byteswap.hh"
-using namespace LittleEndianGuest;
-
MipsSystem::MipsSystem(Params *p) : System(p)
{
}
#include "base/types.hh"
#include "cpu/static_inst_fwd.hh"
-namespace BigEndianGuest {}
-
namespace PowerISA
{
-using namespace BigEndianGuest;
+const ByteOrder GuestByteOrder = BigEndianByteOrder;
StaticInstPtr decodeInst(ExtMachInst);
#include "base/types.hh"
#include "cpu/static_inst_fwd.hh"
-namespace LittleEndianGuest {}
-
namespace RiscvISA
{
-using namespace LittleEndianGuest;
+const ByteOrder GuestByteOrder = LittleEndianByteOrder;
const Addr PageShift = 12;
const Addr PageBytes = ULL(1) << PageShift;
#include "params/RiscvSystem.hh"
#include "sim/byteswap.hh"
-using namespace LittleEndianGuest;
-
RiscvSystem::RiscvSystem(Params *p)
: System(p),
_isBareMetal(p->bare_metal),
#include "base/types.hh"
#include "cpu/static_inst_fwd.hh"
-namespace BigEndianGuest {}
-
namespace SparcISA
{
-// This makes sure the big endian versions of certain functions are used.
-using namespace BigEndianGuest;
+
+const ByteOrder GuestByteOrder = BigEndianByteOrder;
const Addr PageShift = 13;
const Addr PageBytes = ULL(1) << PageShift;
#include "params/SparcSystem.hh"
#include "sim/byteswap.hh"
-using namespace BigEndianGuest;
-
namespace
{
#include "base/compiler.hh"
#include "base/types.hh"
-namespace LittleEndianGuest {}
-
namespace X86ISA
{
- //This makes sure the little endian version of certain functions
- //are used.
- using namespace LittleEndianGuest;
+ const ByteOrder GuestByteOrder = LittleEndianByteOrder;
const Addr PageShift = 12;
const Addr PageBytes = ULL(1) << PageShift;
#include "params/LinuxX86System.hh"
#include "sim/byteswap.hh"
-using namespace LittleEndianGuest;
using namespace X86ISA;
LinuxX86System::LinuxX86System(Params *p)
#include "cpu/thread_context.hh"
#include "params/X86System.hh"
-using namespace LittleEndianGuest;
using namespace X86ISA;
X86System::X86System(Params *p) :
betoh(value) : letoh(value);
}
-namespace BigEndianGuest
-{
- const ByteOrder GuestByteOrder = BigEndianByteOrder;
- template <typename T>
- inline T gtole(T value) {return betole(value);}
- template <typename T>
- inline T letog(T value) {return letobe(value);}
- template <typename T>
- inline T gtobe(T value) {return value;}
- template <typename T>
- inline T betog(T value) {return value;}
- template <typename T>
- inline T htog(T value) {return htobe(value);}
- template <typename T>
- inline T gtoh(T value) {return betoh(value);}
-}
-
-namespace LittleEndianGuest
-{
- const ByteOrder GuestByteOrder = LittleEndianByteOrder;
- template <typename T>
- inline T gtole(T value) {return value;}
- template <typename T>
- inline T letog(T value) {return value;}
- template <typename T>
- inline T gtobe(T value) {return letobe(value);}
- template <typename T>
- inline T betog(T value) {return betole(value);}
- template <typename T>
- inline T htog(T value) {return htole(value);}
- template <typename T>
- inline T gtoh(T value) {return letoh(value);}
-}
#endif // __SIM_BYTE_SWAP_HH__