byteswap.hh (2778:1bd913a180a1) byteswap.hh (2779:b20a0595a0a3)
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
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"
39#include "sim/host.hh"
40
41// This lets us figure out what the byte order of the host system is
42#if defined(linux)
43#include <endian.h>
44// If this is a linux system, lets used the optimized definitions if they exist.
45// If one doesn't exist, we pretty much get what is listed below, so it all
46// works out

--- 128 unchanged lines hidden ---
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 ---