byteswap.hh (10839:10cac0f0f419) byteswap.hh (11800:54436a1784dc)
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;

--- 24 unchanged lines hidden (view full) ---

33//The purpose of this file is to provide endainness conversion utility
34//functions. Depending on the endianness of the guest system, either
35//the LittleEndianGuest or BigEndianGuest namespace is used.
36
37#ifndef __SIM_BYTE_SWAP_HH__
38#define __SIM_BYTE_SWAP_HH__
39
40#include "base/bigint.hh"
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;

--- 24 unchanged lines hidden (view full) ---

33//The purpose of this file is to provide endainness conversion utility
34//functions. Depending on the endianness of the guest system, either
35//the LittleEndianGuest or BigEndianGuest namespace is used.
36
37#ifndef __SIM_BYTE_SWAP_HH__
38#define __SIM_BYTE_SWAP_HH__
39
40#include "base/bigint.hh"
41#include "base/misc.hh"
42#include "base/types.hh"
43
44// This lets us figure out what the byte order of the host system is
45#if defined(__linux__)
46#include <endian.h>
47// If this is a linux system, lets used the optimized definitions if they exist.
48// If one doesn't exist, we pretty much get what is listed below, so it all
49// works out

--- 150 unchanged lines hidden ---
41#include "base/types.hh"
42
43// This lets us figure out what the byte order of the host system is
44#if defined(__linux__)
45#include <endian.h>
46// If this is a linux system, lets used the optimized definitions if they exist.
47// If one doesn't exist, we pretty much get what is listed below, so it all
48// works out

--- 150 unchanged lines hidden ---