microldstop.hh (5002:1b540e93ad34) microldstop.hh (5727:8b9aaeac5bab)
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use of this software in source and binary forms,
6 * with or without modification, are permitted provided that the
7 * following conditions are met:
8 *

--- 45 unchanged lines hidden (view full) ---

54 *
55 * Authors: Gabe Black
56 */
57
58#ifndef __ARCH_X86_INSTS_MICROLDSTOP_HH__
59#define __ARCH_X86_INSTS_MICROLDSTOP_HH__
60
61#include "arch/x86/insts/microop.hh"
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use of this software in source and binary forms,
6 * with or without modification, are permitted provided that the
7 * following conditions are met:
8 *

--- 45 unchanged lines hidden (view full) ---

54 *
55 * Authors: Gabe Black
56 */
57
58#ifndef __ARCH_X86_INSTS_MICROLDSTOP_HH__
59#define __ARCH_X86_INSTS_MICROLDSTOP_HH__
60
61#include "arch/x86/insts/microop.hh"
62#include "mem/packet.hh"
62
63namespace X86ISA
64{
65 /**
66 * Base class for load and store ops
67 */
68 class LdStOp : public X86MicroopBase
69 {

--- 74 unchanged lines hidden (view full) ---

144 case 8:
145 fault = xc->write((uint64_t&)Mem, EA, flags, 0);
146 break;
147 default:
148 panic("Bad operand size %d for write at %#x.\n", dataSize, EA);
149 }
150 return fault;
151 }
63
64namespace X86ISA
65{
66 /**
67 * Base class for load and store ops
68 */
69 class LdStOp : public X86MicroopBase
70 {

--- 74 unchanged lines hidden (view full) ---

145 case 8:
146 fault = xc->write((uint64_t&)Mem, EA, flags, 0);
147 break;
148 default:
149 panic("Bad operand size %d for write at %#x.\n", dataSize, EA);
150 }
151 return fault;
152 }
153
154 uint64_t
155 get(PacketPtr pkt) const
156 {
157 switch(dataSize)
158 {
159 case 1:
160 return pkt->get<uint8_t>();
161 case 2:
162 return pkt->get<uint16_t>();
163 case 4:
164 return pkt->get<uint32_t>();
165 case 8:
166 return pkt->get<uint64_t>();
167 default:
168 panic("Bad operand size %d for read at %#x.\n",
169 dataSize, pkt->getAddr());
170 }
171 }
152 };
153}
154
155#endif //__ARCH_X86_INSTS_MICROLDSTOP_HH__
172 };
173}
174
175#endif //__ARCH_X86_INSTS_MICROLDSTOP_HH__