diff options
Diffstat (limited to 'src/arch/x86/insts/microldstop.hh')
-rw-r--r-- | src/arch/x86/insts/microldstop.hh | 20 |
1 files changed, 20 insertions, 0 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()); + } + } }; } |