00001 /***************************************************************************** 00002 00003 The following code is derived, directly or indirectly, from the SystemC 00004 source code Copyright (c) 1996-2014 by all Contributors. 00005 All Rights reserved. 00006 00007 The contents of this file are subject to the restrictions and limitations 00008 set forth in the SystemC Open Source License (the "License"); 00009 You may not use this file except in compliance with such restrictions and 00010 limitations. You may obtain instructions on how to receive a copy of the 00011 License at http://www.accellera.org/. Software distributed by Contributors 00012 under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 00013 ANY KIND, either express or implied. See the License for the specific 00014 language governing rights and limitations under the License. 00015 00016 *****************************************************************************/ 00017 00018 /***************************************************************************** 00019 00020 sc_machine.h -- Machine-dependent Environment Settings 00021 00022 Original Author: Andy Goodrich, Forte Design Systems, Inc. 00023 00024 CHANGE LOG AT END OF FILE 00025 *****************************************************************************/ 00026 00027 00028 #ifndef SC_MACHINE_H 00029 #define SC_MACHINE_H 00030 00031 #include <climits> 00032 #include "sysc/packages/boost/detail/endian.hpp" 00033 00034 // ---------------------------------------------------------------------------- 00035 // Little or big endian machine? 00036 // ---------------------------------------------------------------------------- 00037 00038 #if defined( SC_BOOST_LITTLE_ENDIAN ) 00039 # define SC_LITTLE_ENDIAN 00040 #elif defined( SC_BOOST_BIG_ENDIAN ) 00041 # define SC_BIG_ENDIAN 00042 #else 00043 # error "Could not detect the endianness of the CPU." 00044 #endif 00045 00046 // ---------------------------------------------------------------------------- 00047 // Are long data types 32-bit or 64-bit? 00048 // ---------------------------------------------------------------------------- 00049 00050 #if ULONG_MAX > 0xffffffffUL 00051 # define SC_LONG_64 00052 #endif 00053 00054 // $Log: sc_machine.h,v $ 00055 // Revision 1.5 2011/08/26 22:58:23 acg 00056 // Torsten Maehne: changes for endian detection. 00057 // 00058 // Revision 1.4 2011/08/26 20:46:18 acg 00059 // Andy Goodrich: moved the modification log to the end of the file to 00060 // eliminate source line number skew when check-ins are done. 00061 // 00062 // Revision 1.3 2011/02/18 20:38:44 acg 00063 // Andy Goodrich: Updated Copyright notice. 00064 // 00065 // Revision 1.2 2010/09/06 16:35:09 acg 00066 // Andy Goodrich: changed i386 to __i386__ in ifdef. 00067 // 00068 // Revision 1.1.1.1 2006/12/15 20:20:06 acg 00069 // SystemC 2.3 00070 // 00071 // Revision 1.3 2006/01/13 18:53:10 acg 00072 // Andy Goodrich: Added $Log command so that CVS comments are reproduced in 00073 // the source. 00074 // 00075 00076 #endif // !defined(SC_MACHINE_H)