diff options
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/bigint.hh | 13 | ||||
-rw-r--r-- | src/base/loader/elf_object.cc | 9 | ||||
-rw-r--r-- | src/base/loader/object_file.hh | 3 | ||||
-rw-r--r-- | src/base/stats/mysql.cc | 5 | ||||
-rw-r--r-- | src/base/stats/mysql.hh | 10 |
5 files changed, 28 insertions, 12 deletions
diff --git a/src/base/bigint.hh b/src/base/bigint.hh index aa60eeb04..d533e662a 100644 --- a/src/base/bigint.hh +++ b/src/base/bigint.hh @@ -42,9 +42,22 @@ struct m5_twin64_t { } }; +struct m5_twin32_t { + uint32_t a; + uint32_t b; + inline m5_twin32_t& operator=(const uint32_t x) + { + a = x; + b = x; + return *this; + } +}; + + // This is for twin loads (two 64 bit values), not 1 128 bit value (as far as // endian conversion is concerned! typedef m5_twin64_t Twin64_t; +typedef m5_twin32_t Twin32_t; #endif // __BASE_BIGINT_HH__ diff --git a/src/base/loader/elf_object.cc b/src/base/loader/elf_object.cc index d59affe85..b56dc5aa6 100644 --- a/src/base/loader/elf_object.cc +++ b/src/base/loader/elf_object.cc @@ -78,9 +78,14 @@ ElfObject::tryFile(const string &fname, int fd, size_t len, uint8_t *data) //just assume if it wasn't something else and it's 64 bit, that's //what it must be. if (ehdr.e_machine == EM_SPARC64 || - ehdr.e_machine == EM_SPARC || + (ehdr.e_machine == EM_SPARC && + ehdr.e_ident[EI_CLASS] == ELFCLASS64)|| ehdr.e_machine == EM_SPARCV9) { - arch = ObjectFile::SPARC; + arch = ObjectFile::SPARC64; + } else if (ehdr.e_machine == EM_SPARC32PLUS || + (ehdr.e_machine == EM_SPARC && + ehdr.e_ident[EI_CLASS] == ELFCLASS32)) { + arch = ObjectFile::SPARC32; } else if (ehdr.e_machine == EM_MIPS && ehdr.e_ident[EI_CLASS] == ELFCLASS32) { arch = ObjectFile::Mips; diff --git a/src/base/loader/object_file.hh b/src/base/loader/object_file.hh index 18e6482be..49c7363e6 100644 --- a/src/base/loader/object_file.hh +++ b/src/base/loader/object_file.hh @@ -47,7 +47,8 @@ class ObjectFile enum Arch { UnknownArch, Alpha, - SPARC, + SPARC64, + SPARC32, Mips }; diff --git a/src/base/stats/mysql.cc b/src/base/stats/mysql.cc index d4035986b..39a687fff 100644 --- a/src/base/stats/mysql.cc +++ b/src/base/stats/mysql.cc @@ -930,7 +930,7 @@ MySql::visit(const FormulaData &data) bool initMySQL(string host, string user, string password, string database, - string name, string sample, string project) + string project, string name, string sample) { extern list<Output *> OutputList; static MySql mysql; @@ -938,9 +938,6 @@ initMySQL(string host, string user, string password, string database, if (mysql.connected()) return false; - if (user.empty()) - user = username(); - mysql.connect(host, user, password, database, name, sample, project); OutputList.push_back(&mysql); diff --git a/src/base/stats/mysql.hh b/src/base/stats/mysql.hh index 52f93ac61..0ce381c2f 100644 --- a/src/base/stats/mysql.hh +++ b/src/base/stats/mysql.hh @@ -187,15 +187,15 @@ class MySql : public Output void configure(const FormulaData &data); }; -bool initMySQL(std::string host, std::string database, std::string user = "", - std::string passwd = "", std::string name = "test", - std::string sample = "0", std::string project = "test"); +bool initMySQL(std::string host, std::string database, std::string user, + std::string passwd, std::string project, std::string name, + std::string sample); #if !USE_MYSQL inline bool initMySQL(std::string host, std::string user, std::string password, - std::string database, std::string name, std::string sample, - std::string project) + std::string database, std::string project, std::string name, + std::string sample) { return false; } |