From d9f39c8ce75aac84c88b32392c2967344362906b Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Wed, 23 Sep 2009 08:34:21 -0700 Subject: arch: nuke arch/isa_specific.hh and move stuff to generated config/the_isa.hh --- src/base/cp_annotate.cc | 1 + src/base/cp_annotate.hh | 1 + src/base/remote_gdb.cc | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/base') diff --git a/src/base/cp_annotate.cc b/src/base/cp_annotate.cc index 0aba2d999..4e138a6dd 100644 --- a/src/base/cp_annotate.cc +++ b/src/base/cp_annotate.cc @@ -35,6 +35,7 @@ #include "base/loader/object_file.hh" #include "base/output.hh" #include "base/trace.hh" +#include "config/the_isa.hh" #include "cpu/thread_context.hh" #include "sim/arguments.hh" #include "sim/core.hh" diff --git a/src/base/cp_annotate.hh b/src/base/cp_annotate.hh index 05d8129d0..4248c070a 100644 --- a/src/base/cp_annotate.hh +++ b/src/base/cp_annotate.hh @@ -41,6 +41,7 @@ #include "base/trace.hh" #include "base/types.hh" #include "config/cp_annotate.hh" +#include "config/the_isa.hh" #include "sim/serialize.hh" #include "sim/startup.hh" #include "sim/system.hh" diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc index 6c301b10e..c54379c23 100644 --- a/src/base/remote_gdb.cc +++ b/src/base/remote_gdb.cc @@ -131,9 +131,9 @@ #include "base/remote_gdb.hh" #include "base/socket.hh" #include "base/trace.hh" +#include "config/the_isa.hh" #include "cpu/thread_context.hh" #include "cpu/static_inst.hh" -//#include "mem/physical.hh" #include "mem/port.hh" #include "mem/translating_port.hh" #include "sim/system.hh" -- cgit v1.2.3 From 835a55e7f347697815fc43851b2dd5a8642d21c4 Mon Sep 17 00:00:00 2001 From: "Timothy M. Jones" Date: Tue, 27 Oct 2009 09:24:39 -0700 Subject: POWER: Add support for the Power ISA This adds support for the 32-bit, big endian Power ISA. This supports both integer and floating point instructions based on the Power ISA Book I v2.06. --- src/base/loader/elf_object.cc | 13 +++++++++++++ src/base/loader/object_file.hh | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'src/base') diff --git a/src/base/loader/elf_object.cc b/src/base/loader/elf_object.cc index 15ad88f76..60f0f99b4 100644 --- a/src/base/loader/elf_object.cc +++ b/src/base/loader/elf_object.cc @@ -97,6 +97,19 @@ ElfObject::tryFile(const string &fname, int fd, size_t len, uint8_t *data) arch = ObjectFile::Alpha; } else if (ehdr.e_machine == EM_ARM) { arch = ObjectFile::Arm; + } else if (ehdr.e_machine == EM_PPC && + ehdr.e_ident[EI_CLASS] == ELFCLASS32) { + if (ehdr.e_ident[EI_DATA] == ELFDATA2MSB) { + arch = ObjectFile::Power; + } else { + fatal("The binary you're trying to load is compiled for " + "little endian Power.\nM5 only supports big " + "endian Power. Please recompile your binary.\n"); + } + } else if (ehdr.e_machine == EM_PPC64) { + fatal("The binary you're trying to load is compiled for 64-bit " + "Power. M5\n only supports 32-bit Power. Please " + "recompile your binary.\n"); } else { warn("Unknown architecture: %d\n", ehdr.e_machine); arch = ObjectFile::UnknownArch; diff --git a/src/base/loader/object_file.hh b/src/base/loader/object_file.hh index e511451b7..b08f1c633 100644 --- a/src/base/loader/object_file.hh +++ b/src/base/loader/object_file.hh @@ -52,7 +52,8 @@ class ObjectFile Mips, X86_64, I386, - Arm + Arm, + Power }; enum OpSys { -- cgit v1.2.3 From 2c5fe6f95e64a5a97d56cccc6b8b5417cdd981ae Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Wed, 4 Nov 2009 16:57:01 -0800 Subject: build: fix compile problems pointed out by gcc 4.4 --- src/base/bigint.cc | 4 ++-- src/base/bigint.hh | 5 +++-- src/base/inet.cc | 1 + src/base/remote_gdb.cc | 1 + src/base/types.hh | 1 + 5 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/base') diff --git a/src/base/bigint.cc b/src/base/bigint.cc index ce9942c9c..d741e1f7b 100644 --- a/src/base/bigint.cc +++ b/src/base/bigint.cc @@ -28,10 +28,10 @@ * Authors: Gabe Black */ -#include "base/bigint.hh" - #include +#include "base/bigint.hh" + using namespace std; ostream & operator << (ostream & os, const Twin64_t & t) diff --git a/src/base/bigint.hh b/src/base/bigint.hh index d60684231..a4e8738d3 100644 --- a/src/base/bigint.hh +++ b/src/base/bigint.hh @@ -28,10 +28,11 @@ * Authors: Ali Saidi */ -#include "base/misc.hh" - #include +#include "base/misc.hh" +#include "base/types.hh" + #ifndef __BASE_BIGINT_HH__ #define __BASE_BIGINT_HH__ // Create a couple of large int types for atomic reads diff --git a/src/base/inet.cc b/src/base/inet.cc index 898a189ef..1a280e993 100644 --- a/src/base/inet.cc +++ b/src/base/inet.cc @@ -28,6 +28,7 @@ * Authors: Nathan Binkert */ +#include #include #include diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc index c54379c23..68747b3d1 100644 --- a/src/base/remote_gdb.cc +++ b/src/base/remote_gdb.cc @@ -118,6 +118,7 @@ #include +#include #include #include diff --git a/src/base/types.hh b/src/base/types.hh index 1a6db9fbb..0c10fac64 100644 --- a/src/base/types.hh +++ b/src/base/types.hh @@ -55,6 +55,7 @@ typedef int64_t Counter; * @note using an unsigned breaks the cache. */ typedef int64_t Tick; +typedef uint64_t UTick; const Tick MaxTick = LL(0x7fffffffffffffff); -- cgit v1.2.3