1/* 2 * Copyright (c) 2004 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 22 unchanged lines hidden (view full) --- 31 32//The purpose of this file is to provide endainness conversion utility 33//functions. Depending on the endianness of the guest system, either 34//the LittleEndianGuest or BigEndianGuest namespace is used. 35 36#ifndef __SIM_BYTE_SWAP_HH__ 37#define __SIM_BYTE_SWAP_HH__ 38 |
39#include "base/misc.hh" |
40#include "sim/host.hh" 41 42// This lets us figure out what the byte order of the host system is 43#if defined(linux) 44#include <endian.h> 45// If this is a linux system, lets used the optimized definitions if they exist. 46// If one doesn't exist, we pretty much get what is listed below, so it all 47// works out --- 128 unchanged lines hidden --- |