#define __ARCH_POWER_ISA_TRAITS_HH__
#include "base/types.hh"
+#include "cpu/static_inst_fwd.hh"
+
+namespace LittleEndianGuest {}
namespace PowerISA
{
-const ByteOrder GuestByteOrder = ByteOrder::big;
+const ByteOrder GuestByteOrder = ByteOrder::little;
+using namespace LittleEndianGuest;
+
+StaticInstPtr decodeInst(ExtMachInst);
const Addr PageShift = 12;
const Addr PageBytes = ULL(1) << PageShift;
} else if (emach == EM_RISCV) {
arch = (eclass == ELFCLASS64) ? Riscv64 : Riscv32;
} else if (emach == EM_PPC && eclass == ELFCLASS32) {
+ fatal("The binary you're trying to load is compiled for 32-bit "
+ "Power.\ngem5 only supports 64-bit Power. Please "
+ "recompile your binary.\n");
+ } else if (emach == EM_PPC64 && eclass == ELFCLASS64) {
arch = Power;
- if (edata != ELFDATA2MSB) {
+ if (edata != ELFDATA2LSB) {
fatal("The binary you're trying to load is compiled for "
- "little endian Power.\ngem5 only supports big "
+ "big endian Power.\ngem5 only supports little "
"endian Power. Please recompile your binary.\n");
}
- } else if (emach == 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", emach);
}