summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2008-11-09 21:55:43 -0800
committerGabe Black <gblack@eecs.umich.edu>2008-11-09 21:55:43 -0800
commit8c15518f30a5e7ffe0f82acde714c11000bc3714 (patch)
treecdaec941e7c84a1b73b3a4174b503df080590dc6
parent909380f3ee576f915f52c6245c59d41050a46f49 (diff)
downloadgem5-8c15518f30a5e7ffe0f82acde714c11000bc3714.tar.xz
X86: Fix completeAcc get call.
-rw-r--r--src/arch/x86/insts/microldstop.hh20
-rw-r--r--src/arch/x86/isa/microops/ldstop.isa2
2 files changed, 21 insertions, 1 deletions
diff --git a/src/arch/x86/insts/microldstop.hh b/src/arch/x86/insts/microldstop.hh
index 5b1210d69..eccd37dc2 100644
--- a/src/arch/x86/insts/microldstop.hh
+++ b/src/arch/x86/insts/microldstop.hh
@@ -59,6 +59,7 @@
#define __ARCH_X86_INSTS_MICROLDSTOP_HH__
#include "arch/x86/insts/microop.hh"
+#include "mem/packet.hh"
namespace X86ISA
{
@@ -149,6 +150,25 @@ namespace X86ISA
}
return fault;
}
+
+ uint64_t
+ get(PacketPtr pkt) const
+ {
+ switch(dataSize)
+ {
+ case 1:
+ return pkt->get<uint8_t>();
+ case 2:
+ return pkt->get<uint16_t>();
+ case 4:
+ return pkt->get<uint32_t>();
+ case 8:
+ return pkt->get<uint64_t>();
+ default:
+ panic("Bad operand size %d for read at %#x.\n",
+ dataSize, pkt->getAddr());
+ }
+ }
};
}
diff --git a/src/arch/x86/isa/microops/ldstop.isa b/src/arch/x86/isa/microops/ldstop.isa
index cb63e7cd9..30a7c8801 100644
--- a/src/arch/x86/isa/microops/ldstop.isa
+++ b/src/arch/x86/isa/microops/ldstop.isa
@@ -194,7 +194,7 @@ def template MicroLoadCompleteAcc {{
%(op_decl)s;
%(op_rd)s;
- Mem = pkt->get<typeof(Mem)>();
+ Mem = get(pkt);
%(code)s;