While I'm waiting for legion to run make m5 compile with a few more compilers
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
This commit is contained in:
parent
5c7bf74c07
commit
02bd40d552
8 changed files with 36 additions and 18 deletions
12
SConstruct
12
SConstruct
|
@ -209,14 +209,18 @@ if False:
|
||||||
env.Append(ENV = { 'M5_PLY' : Dir('ext/ply') })
|
env.Append(ENV = { 'M5_PLY' : Dir('ext/ply') })
|
||||||
env['GCC'] = False
|
env['GCC'] = False
|
||||||
env['SUNCC'] = False
|
env['SUNCC'] = False
|
||||||
|
env['ICC'] = False
|
||||||
env['GCC'] = subprocess.Popen(env['CXX'] + ' --version', shell=True,
|
env['GCC'] = subprocess.Popen(env['CXX'] + ' --version', shell=True,
|
||||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
|
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
|
||||||
close_fds=True).communicate()[0].find('GCC') >= 0
|
close_fds=True).communicate()[0].find('GCC') >= 0
|
||||||
env['SUNCC'] = subprocess.Popen(env['CXX'] + ' -V', shell=True,
|
env['SUNCC'] = subprocess.Popen(env['CXX'] + ' -V', shell=True,
|
||||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
|
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
|
||||||
close_fds=True).communicate()[0].find('Sun C++') >= 0
|
close_fds=True).communicate()[0].find('Sun C++') >= 0
|
||||||
if (env['GCC'] and env['SUNCC']):
|
env['ICC'] = subprocess.Popen(env['CXX'] + ' -V', shell=True,
|
||||||
print 'Error: How can we have both g++ and Sun C++ at the same time?'
|
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)
|
Exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
@ -225,6 +229,8 @@ if env['GCC']:
|
||||||
env.Append(CCFLAGS='-pipe')
|
env.Append(CCFLAGS='-pipe')
|
||||||
env.Append(CCFLAGS='-fno-strict-aliasing')
|
env.Append(CCFLAGS='-fno-strict-aliasing')
|
||||||
env.Append(CCFLAGS=Split('-Wall -Wno-sign-compare -Werror -Wundef'))
|
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']:
|
elif env['SUNCC']:
|
||||||
env.Append(CCFLAGS='-Qoption ccfe')
|
env.Append(CCFLAGS='-Qoption ccfe')
|
||||||
env.Append(CCFLAGS='-features=gcc')
|
env.Append(CCFLAGS='-features=gcc')
|
||||||
|
@ -234,7 +240,7 @@ elif env['SUNCC']:
|
||||||
# env.Append(CCFLAGS='-instances=semiexplicit')
|
# env.Append(CCFLAGS='-instances=semiexplicit')
|
||||||
else:
|
else:
|
||||||
print 'Error: Don\'t know what compiler options to use for your compiler.'
|
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)
|
Exit(1)
|
||||||
|
|
||||||
if sys.platform == 'cygwin':
|
if sys.platform == 'cygwin':
|
||||||
|
|
|
@ -325,6 +325,11 @@ elif env['SUNCC']:
|
||||||
ccflags['opt'] = '-g -O'
|
ccflags['opt'] = '-g -O'
|
||||||
ccflags['fast'] = '-fast'
|
ccflags['fast'] = '-fast'
|
||||||
ccflags['prof'] = '-fast -g -pg'
|
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:
|
else:
|
||||||
print 'Unknown compiler, please fix compiler options'
|
print 'Unknown compiler, please fix compiler options'
|
||||||
Exit(1)
|
Exit(1)
|
||||||
|
|
|
@ -44,7 +44,8 @@
|
||||||
// this doesn't do anything with sun cc, but why not
|
// this doesn't do anything with sun cc, but why not
|
||||||
#define M5_ATTR_NORETURN __sun_attr__((__noreturn__))
|
#define M5_ATTR_NORETURN __sun_attr__((__noreturn__))
|
||||||
#define M5_DUMMY_RETURN return (0);
|
#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
|
#else
|
||||||
#error "Need to define compiler options in base/compiler.hh"
|
#error "Need to define compiler options in base/compiler.hh"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -84,21 +84,21 @@ _format_integer(std::ostream &out, const T &data, Format &fmt)
|
||||||
|
|
||||||
switch (fmt.base) {
|
switch (fmt.base) {
|
||||||
case Format::hex:
|
case Format::hex:
|
||||||
out.setf(ios::hex, ios::basefield);
|
out.setf(std::ios::hex, std::ios::basefield);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Format::oct:
|
case Format::oct:
|
||||||
out.setf(ios::oct, ios::basefield);
|
out.setf(std::ios::oct, std::ios::basefield);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Format::dec:
|
case Format::dec:
|
||||||
out.setf(ios::dec, ios::basefield);
|
out.setf(std::ios::dec, std::ios::basefield);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fmt.alternate_form) {
|
if (fmt.alternate_form) {
|
||||||
if (!fmt.fill_zero)
|
if (!fmt.fill_zero)
|
||||||
out.setf(ios::showbase);
|
out.setf(std::ios::showbase);
|
||||||
else {
|
else {
|
||||||
switch (fmt.base) {
|
switch (fmt.base) {
|
||||||
case Format::hex:
|
case Format::hex:
|
||||||
|
@ -122,13 +122,13 @@ _format_integer(std::ostream &out, const T &data, Format &fmt)
|
||||||
out.width(fmt.width);
|
out.width(fmt.width);
|
||||||
|
|
||||||
if (fmt.flush_left && !fmt.fill_zero)
|
if (fmt.flush_left && !fmt.fill_zero)
|
||||||
out.setf(ios::left);
|
out.setf(std::ios::left);
|
||||||
|
|
||||||
if (fmt.print_sign)
|
if (fmt.print_sign)
|
||||||
out.setf(ios::showpos);
|
out.setf(std::ios::showpos);
|
||||||
|
|
||||||
if (fmt.uppercase)
|
if (fmt.uppercase)
|
||||||
out.setf(ios::uppercase);
|
out.setf(std::ios::uppercase);
|
||||||
|
|
||||||
out << data;
|
out << data;
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ _format_float(std::ostream &out, const T &data, Format &fmt)
|
||||||
if (fmt.precision == 0)
|
if (fmt.precision == 0)
|
||||||
fmt.precision = 1;
|
fmt.precision = 1;
|
||||||
else
|
else
|
||||||
out.setf(ios::scientific);
|
out.setf(std::ios::scientific);
|
||||||
|
|
||||||
out.precision(fmt.precision);
|
out.precision(fmt.precision);
|
||||||
} else
|
} else
|
||||||
|
@ -156,7 +156,7 @@ _format_float(std::ostream &out, const T &data, Format &fmt)
|
||||||
out.width(fmt.width);
|
out.width(fmt.width);
|
||||||
|
|
||||||
if (fmt.uppercase)
|
if (fmt.uppercase)
|
||||||
out.setf(ios::uppercase);
|
out.setf(std::ios::uppercase);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Format::fixed:
|
case Format::fixed:
|
||||||
|
@ -164,7 +164,7 @@ _format_float(std::ostream &out, const T &data, Format &fmt)
|
||||||
if (fmt.width > 0)
|
if (fmt.width > 0)
|
||||||
out.width(fmt.width);
|
out.width(fmt.width);
|
||||||
|
|
||||||
out.setf(ios::fixed);
|
out.setf(std::ios::fixed);
|
||||||
out.precision(fmt.precision);
|
out.precision(fmt.precision);
|
||||||
} else
|
} else
|
||||||
if (fmt.width > 0)
|
if (fmt.width > 0)
|
||||||
|
@ -216,7 +216,7 @@ _format_string(std::ostream &out, const T &data, Format &fmt)
|
||||||
if (fmt.width > 0)
|
if (fmt.width > 0)
|
||||||
out.width(fmt.width);
|
out.width(fmt.width);
|
||||||
if (fmt.flush_left)
|
if (fmt.flush_left)
|
||||||
out.setf(ios::left);
|
out.setf(std::ios::left);
|
||||||
|
|
||||||
out << data;
|
out << data;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -398,7 +398,7 @@ class Wrap : public Child
|
||||||
public:
|
public:
|
||||||
Wrap()
|
Wrap()
|
||||||
{
|
{
|
||||||
map(new Data<Child>(*this));
|
this->map(new Data<Child>(*this));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -379,6 +379,7 @@ class StaticInst : public StaticInstBase
|
||||||
{
|
{
|
||||||
panic("StaticInst::branchTarget() called on instruction "
|
panic("StaticInst::branchTarget() called on instruction "
|
||||||
"that is not a PC-relative branch.");
|
"that is not a PC-relative branch.");
|
||||||
|
M5_DUMMY_RETURN
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -393,6 +394,7 @@ class StaticInst : public StaticInstBase
|
||||||
panic("StaticInst::branchTarget() called on instruction "
|
panic("StaticInst::branchTarget() called on instruction "
|
||||||
"that is not an indirect branch.");
|
"that is not an indirect branch.");
|
||||||
}
|
}
|
||||||
|
M5_DUMMY_RETURN
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if the instruction is a control transfer, and if so,
|
* Return true if the instruction is a control transfer, and if so,
|
||||||
|
|
|
@ -41,10 +41,12 @@
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
|
#include "base/misc.hh"
|
||||||
#include "mem/request.hh"
|
#include "mem/request.hh"
|
||||||
#include "sim/host.hh"
|
#include "sim/host.hh"
|
||||||
#include "sim/root.hh"
|
#include "sim/root.hh"
|
||||||
|
|
||||||
|
|
||||||
struct Packet;
|
struct Packet;
|
||||||
typedef Packet *PacketPtr;
|
typedef Packet *PacketPtr;
|
||||||
typedef uint8_t* PacketDataPtr;
|
typedef uint8_t* PacketDataPtr;
|
||||||
|
@ -238,7 +240,7 @@ class Packet
|
||||||
bool isNoAllocate() const { return (flags & NO_ALLOCATE) != 0; }
|
bool isNoAllocate() const { return (flags & NO_ALLOCATE) != 0; }
|
||||||
bool isCompressed() const { return (flags & COMPRESSED) != 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. */
|
/** Possible results of a packet's request. */
|
||||||
enum Result
|
enum Result
|
||||||
|
|
|
@ -38,6 +38,8 @@
|
||||||
#define __HOST_HH__
|
#define __HOST_HH__
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
#include <limits>
|
||||||
|
|
||||||
|
|
||||||
/** uint64_t constant */
|
/** uint64_t constant */
|
||||||
#define ULL(N) ((uint64_t)N##ULL)
|
#define ULL(N) ((uint64_t)N##ULL)
|
||||||
|
@ -56,7 +58,7 @@ typedef int64_t Counter;
|
||||||
*/
|
*/
|
||||||
typedef int64_t Tick;
|
typedef int64_t Tick;
|
||||||
|
|
||||||
const Tick MaxTick = (1LL << 63) - 1;
|
const Tick MaxTick = std::numeric_limits<Tick>::max();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Address type
|
* Address type
|
||||||
|
|
Loading…
Reference in a new issue