SConstruct:
src/SConscript:
Add flags for Intel CC while i'm at it
src/base/compiler.hh:
the _Pragma stuff needst to be called this way unless someone happens to have a cleaner way
src/base/cprintf_formats.hh:
add std:: where appropriate
src/base/statistics.hh:
use this->map since icc was getting confused about std::map vs the locally defined map
src/cpu/static_inst.hh:
Add some more dummy returns where needed
src/mem/packet.hh:
add more dummy returns where needed
src/sim/host.hh:
use limits to come up with max tick
--HG--
extra : convert_revision :
08e9f7898b29fb9d063136529afb9b6abceab60c
env.Append(ENV = { 'M5_PLY' : Dir('ext/ply') })
env['GCC'] = False
env['SUNCC'] = False
+env['ICC'] = False
env['GCC'] = subprocess.Popen(env['CXX'] + ' --version', shell=True,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
close_fds=True).communicate()[0].find('GCC') >= 0
env['SUNCC'] = subprocess.Popen(env['CXX'] + ' -V', shell=True,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
close_fds=True).communicate()[0].find('Sun C++') >= 0
-if (env['GCC'] and env['SUNCC']):
- print 'Error: How can we have both g++ and Sun C++ at the same time?'
+env['ICC'] = subprocess.Popen(env['CXX'] + ' -V', shell=True,
+ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
+ close_fds=True).communicate()[0].find('Intel') >= 0
+if env['GCC'] + env['SUNCC'] env['ICC'] > 1:
+ print 'Error: How can we have two at the same time?'
Exit(1)
env.Append(CCFLAGS='-pipe')
env.Append(CCFLAGS='-fno-strict-aliasing')
env.Append(CCFLAGS=Split('-Wall -Wno-sign-compare -Werror -Wundef'))
+elif env['ICC']:
+ pass #Fix me... add warning flags once we clean up icc warnings
elif env['SUNCC']:
env.Append(CCFLAGS='-Qoption ccfe')
env.Append(CCFLAGS='-features=gcc')
# env.Append(CCFLAGS='-instances=semiexplicit')
else:
print 'Error: Don\'t know what compiler options to use for your compiler.'
- print ' Please fix SConstruct and try again.'
+ print ' Please fix SConstruct and src/SConscript and try again.'
Exit(1)
if sys.platform == 'cygwin':
ccflags['opt'] = '-g -O'
ccflags['fast'] = '-fast'
ccflags['prof'] = '-fast -g -pg'
+elif env['ICC']:
+ ccflags['debug'] = '-g -O0'
+ ccflags['opt'] = '-g -O'
+ ccflags['fast'] = '-xW -O3 -ipo -no-prec-div -static'
+ ccflags['prof'] = '-fast -g -pg'
else:
print 'Unknown compiler, please fix compiler options'
Exit(1)
// this doesn't do anything with sun cc, but why not
#define M5_ATTR_NORETURN __sun_attr__((__noreturn__))
#define M5_DUMMY_RETURN return (0);
-#define M5_PRAGMA_NORETURN(x) _Pragma("does_not_return(x)")
+#define DO_PRAGMA(x) _Pragma(#x)
+#define M5_PRAGMA_NORETURN(x) DO_PRAGMA(does_not_return(x))
#else
#error "Need to define compiler options in base/compiler.hh"
#endif
switch (fmt.base) {
case Format::hex:
- out.setf(ios::hex, ios::basefield);
+ out.setf(std::ios::hex, std::ios::basefield);
break;
case Format::oct:
- out.setf(ios::oct, ios::basefield);
+ out.setf(std::ios::oct, std::ios::basefield);
break;
case Format::dec:
- out.setf(ios::dec, ios::basefield);
+ out.setf(std::ios::dec, std::ios::basefield);
break;
}
if (fmt.alternate_form) {
if (!fmt.fill_zero)
- out.setf(ios::showbase);
+ out.setf(std::ios::showbase);
else {
switch (fmt.base) {
case Format::hex:
out.width(fmt.width);
if (fmt.flush_left && !fmt.fill_zero)
- out.setf(ios::left);
+ out.setf(std::ios::left);
if (fmt.print_sign)
- out.setf(ios::showpos);
+ out.setf(std::ios::showpos);
if (fmt.uppercase)
- out.setf(ios::uppercase);
+ out.setf(std::ios::uppercase);
out << data;
}
if (fmt.precision == 0)
fmt.precision = 1;
else
- out.setf(ios::scientific);
+ out.setf(std::ios::scientific);
out.precision(fmt.precision);
} else
out.width(fmt.width);
if (fmt.uppercase)
- out.setf(ios::uppercase);
+ out.setf(std::ios::uppercase);
break;
case Format::fixed:
if (fmt.width > 0)
out.width(fmt.width);
- out.setf(ios::fixed);
+ out.setf(std::ios::fixed);
out.precision(fmt.precision);
} else
if (fmt.width > 0)
if (fmt.width > 0)
out.width(fmt.width);
if (fmt.flush_left)
- out.setf(ios::left);
+ out.setf(std::ios::left);
out << data;
#endif
public:
Wrap()
{
- map(new Data<Child>(*this));
+ this->map(new Data<Child>(*this));
}
/**
{
panic("StaticInst::branchTarget() called on instruction "
"that is not a PC-relative branch.");
+ M5_DUMMY_RETURN
}
/**
panic("StaticInst::branchTarget() called on instruction "
"that is not an indirect branch.");
}
+ M5_DUMMY_RETURN
/**
* Return true if the instruction is a control transfer, and if so,
#include <cassert>
#include <list>
+#include "base/misc.hh"
#include "mem/request.hh"
#include "sim/host.hh"
#include "sim/root.hh"
+
struct Packet;
typedef Packet *PacketPtr;
typedef uint8_t* PacketDataPtr;
bool isNoAllocate() const { return (flags & NO_ALLOCATE) != 0; }
bool isCompressed() const { return (flags & COMPRESSED) != 0; }
- bool nic_pkt() { assert("Unimplemented\n" && 0); return false; }
+ bool nic_pkt() { panic("Unimplemented"); M5_DUMMY_RETURN }
/** Possible results of a packet's request. */
enum Result
#define __HOST_HH__
#include <inttypes.h>
+#include <limits>
+
/** uint64_t constant */
#define ULL(N) ((uint64_t)N##ULL)
*/
typedef int64_t Tick;
-const Tick MaxTick = (1LL << 63) - 1;
+const Tick MaxTick = std::numeric_limits<Tick>::max();
/**
* Address type