gem5: codebase patched to compile with ag++
This changes allows us to compile the gem5 simulator with ag++. It was tested with ag++ v0.8, built Apr 18 2013. Most of the changes are preprocessor directives like #ifndef __puma which have been inserted into the gem5 code. Unfortunately, a python script and a SWIG input file have been patched, too. Additionally, the CMake file has been updated. A single call to "make" now invokes the ag++ (instead of the g++) compiler front end. The new CMake target "gem5-allclean" should be used to clean the current project when building FailGem5. In addition to cleaning the Fail build directory, it also invokes "scons -c" in the gem5 build directory; that is, gem5 is cleaned as well. Change-Id: I20a92f025f34f626b81e30f2c873baeba189f83b
This commit is contained in:
@ -114,9 +114,12 @@ class InstRecord
|
||||
void setData(uint16_t d) { data.as_int = d; data_status = DataInt16; }
|
||||
void setData(uint8_t d) { data.as_int = d; data_status = DataInt8; }
|
||||
|
||||
// DanceOS modification
|
||||
#ifndef __puma // bug #375
|
||||
void setData(int64_t d) { setData((uint64_t)d); }
|
||||
void setData(int32_t d) { setData((uint32_t)d); }
|
||||
void setData(int16_t d) { setData((uint16_t)d); }
|
||||
#endif
|
||||
void setData(int8_t d) { setData((uint8_t)d); }
|
||||
|
||||
void setData(double d) { data.as_double = d; data_status = DataDouble; }
|
||||
|
||||
@ -198,7 +198,9 @@ Process::openInputFile(const string &filename)
|
||||
|
||||
if (fd == -1) {
|
||||
perror(NULL);
|
||||
#ifndef __puma // DanceOS (invalid operand to binary `<<')
|
||||
cerr << "unable to open \"" << filename << "\" for reading\n";
|
||||
#endif
|
||||
fatal("can't open input file");
|
||||
}
|
||||
|
||||
@ -213,7 +215,9 @@ Process::openOutputFile(const string &filename)
|
||||
|
||||
if (fd == -1) {
|
||||
perror(NULL);
|
||||
#ifndef __puma // DanceOS (invalid operand to binary `<<')
|
||||
cerr << "unable to open \"" << filename << "\" for writing\n";
|
||||
#endif
|
||||
fatal("can't open output file");
|
||||
}
|
||||
|
||||
|
||||
@ -796,7 +796,8 @@ cloneFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
|
||||
ctc->clearArchRegs();
|
||||
|
||||
// Arch-specific cloning code
|
||||
#if THE_ISA == ALPHA_ISA or THE_ISA == X86_ISA
|
||||
// #if THE_ISA == ALPHA_ISA or THE_ISA == X86_ISA
|
||||
#if THE_ISA == ALPHA_ISA || THE_ISA == X86_ISA // DanceOS: "or" replaced with "||"
|
||||
// Cloning the misc. regs for these archs is enough
|
||||
TheISA::copyMiscRegs(tc, ctc);
|
||||
#elif THE_ISA == SPARC_ISA
|
||||
|
||||
@ -934,6 +934,7 @@ fstatfsFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
|
||||
return -EBADF;
|
||||
|
||||
struct statfs hostBuf;
|
||||
int fstatfs(int fd, struct statfs *buf); // DanceOS (added forward decl.)
|
||||
int result = fstatfs(fd, &hostBuf);
|
||||
|
||||
if (result < 0)
|
||||
|
||||
@ -72,7 +72,9 @@ class VPtr
|
||||
return;
|
||||
|
||||
FSTranslatingPortProxy &proxy = tc->getVirtProxy();
|
||||
#ifndef __puma // DanceOS (no matching function for call to `readBlob')
|
||||
proxy.readBlob(ptr, buffer, sizeof(T));
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user