summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/SConscript5
-rw-r--r--src/base/compiler.hh3
-rw-r--r--src/base/cprintf_formats.hh22
-rw-r--r--src/base/statistics.hh2
-rw-r--r--src/cpu/static_inst.hh2
-rw-r--r--src/mem/packet.hh4
-rw-r--r--src/sim/host.hh4
7 files changed, 27 insertions, 15 deletions
diff --git a/src/SConscript b/src/SConscript
index a94682bc0..59b2ec42c 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -325,6 +325,11 @@ elif env['SUNCC']:
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)
diff --git a/src/base/compiler.hh b/src/base/compiler.hh
index 5f2e9d7af..dc23ed7b3 100644
--- a/src/base/compiler.hh
+++ b/src/base/compiler.hh
@@ -44,7 +44,8 @@
// 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
diff --git a/src/base/cprintf_formats.hh b/src/base/cprintf_formats.hh
index 3ea20446d..0af493217 100644
--- a/src/base/cprintf_formats.hh
+++ b/src/base/cprintf_formats.hh
@@ -84,21 +84,21 @@ _format_integer(std::ostream &out, const T &data, Format &fmt)
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:
@@ -122,13 +122,13 @@ _format_integer(std::ostream &out, const T &data, Format &fmt)
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;
}
@@ -148,7 +148,7 @@ _format_float(std::ostream &out, const T &data, Format &fmt)
if (fmt.precision == 0)
fmt.precision = 1;
else
- out.setf(ios::scientific);
+ out.setf(std::ios::scientific);
out.precision(fmt.precision);
} else
@@ -156,7 +156,7 @@ _format_float(std::ostream &out, const T &data, Format &fmt)
out.width(fmt.width);
if (fmt.uppercase)
- out.setf(ios::uppercase);
+ out.setf(std::ios::uppercase);
break;
case Format::fixed:
@@ -164,7 +164,7 @@ _format_float(std::ostream &out, const T &data, Format &fmt)
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)
@@ -216,7 +216,7 @@ _format_string(std::ostream &out, const T &data, Format &fmt)
if (fmt.width > 0)
out.width(fmt.width);
if (fmt.flush_left)
- out.setf(ios::left);
+ out.setf(std::ios::left);
out << data;
#endif
diff --git a/src/base/statistics.hh b/src/base/statistics.hh
index d8e8b4c15..2b1b327e5 100644
--- a/src/base/statistics.hh
+++ b/src/base/statistics.hh
@@ -398,7 +398,7 @@ class Wrap : public Child
public:
Wrap()
{
- map(new Data<Child>(*this));
+ this->map(new Data<Child>(*this));
}
/**
diff --git a/src/cpu/static_inst.hh b/src/cpu/static_inst.hh
index 5928eea76..416c8ab56 100644
--- a/src/cpu/static_inst.hh
+++ b/src/cpu/static_inst.hh
@@ -379,6 +379,7 @@ class StaticInst : public StaticInstBase
{
panic("StaticInst::branchTarget() called on instruction "
"that is not a PC-relative branch.");
+ M5_DUMMY_RETURN
}
/**
@@ -393,6 +394,7 @@ class StaticInst : public StaticInstBase
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,
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index 19251941f..15f605ca7 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -41,10 +41,12 @@
#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;
@@ -238,7 +240,7 @@ class Packet
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
diff --git a/src/sim/host.hh b/src/sim/host.hh
index 8b1ddbfe7..93a5fe7f2 100644
--- a/src/sim/host.hh
+++ b/src/sim/host.hh
@@ -38,6 +38,8 @@
#define __HOST_HH__
#include <inttypes.h>
+#include <limits>
+
/** uint64_t constant */
#define ULL(N) ((uint64_t)N##ULL)
@@ -56,7 +58,7 @@ typedef int64_t Counter;
*/
typedef int64_t Tick;
-const Tick MaxTick = (1LL << 63) - 1;
+const Tick MaxTick = std::numeric_limits<Tick>::max();
/**
* Address type