ldstop.isa (4867:2de05bc73640) ldstop.isa (5002:1b540e93ad34)
1// Copyright (c) 2007 The Hewlett-Packard Development Company
2// All rights reserved.
3//
4// Redistribution and use of this software in source and binary forms,
5// with or without modification, are permitted provided that the
6// following conditions are met:
7//
8// The software must be used only for Non-Commercial Use which means any

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

118 Fault fault = NoFault;
119 Addr EA;
120
121 %(op_decl)s;
122 %(op_rd)s;
123 %(ea_code)s;
124 DPRINTF(X86, "%s : %s: The address is %#x\n", instMnem, mnemonic, EA);
125
1// Copyright (c) 2007 The Hewlett-Packard Development Company
2// All rights reserved.
3//
4// Redistribution and use of this software in source and binary forms,
5// with or without modification, are permitted provided that the
6// following conditions are met:
7//
8// The software must be used only for Non-Commercial Use which means any

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

118 Fault fault = NoFault;
119 Addr EA;
120
121 %(op_decl)s;
122 %(op_rd)s;
123 %(ea_code)s;
124 DPRINTF(X86, "%s : %s: The address is %#x\n", instMnem, mnemonic, EA);
125
126 Twin64_t alignedMem;
127 fault = read(xc, EA, alignedMem, 0);
128 int offset = EA & (dataSize - 1);
129 if(dataSize != 8 || !offset)
130 {
131 Mem = bits(alignedMem.a,
132 (offset + dataSize) * 8 - 1, offset * 8);
133 }
134 else
135 {
136 Mem = alignedMem.b << (dataSize - offset) * 8;
137 Mem |= bits(alignedMem.a, dataSize * 8 - 1, offset * 8);
138 }
126 fault = read(xc, EA, Mem, 0);
139
140 if(fault == NoFault)
141 {
142 %(code)s;
143 }
144 if(fault == NoFault)
145 {
146 %(op_wb)s;

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

157 Fault fault = NoFault;
158 Addr EA;
159
160 %(op_decl)s;
161 %(op_rd)s;
162 %(ea_code)s;
163 DPRINTF(X86, "%s : %s: The address is %#x\n", instMnem, mnemonic, EA);
164
127
128 if(fault == NoFault)
129 {
130 %(code)s;
131 }
132 if(fault == NoFault)
133 {
134 %(op_wb)s;

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

145 Fault fault = NoFault;
146 Addr EA;
147
148 %(op_decl)s;
149 %(op_rd)s;
150 %(ea_code)s;
151 DPRINTF(X86, "%s : %s: The address is %#x\n", instMnem, mnemonic, EA);
152
165 int offset = EA & (dataSize - 1);
166 Twin64_t alignedMem;
167 fault = read(xc, EA, alignedMem, offset);
153 fault = read(xc, EA, Mem, 0);
168
169 return fault;
170 }
171}};
172
173def template MicroLoadCompleteAcc {{
174 Fault %(class_name)s::completeAcc(PacketPtr pkt,
175 %(CPU_exec_context)s * xc,
176 Trace::InstRecord * traceData) const
177 {
178 Fault fault = NoFault;
179
180 %(op_decl)s;
181 %(op_rd)s;
182
154
155 return fault;
156 }
157}};
158
159def template MicroLoadCompleteAcc {{
160 Fault %(class_name)s::completeAcc(PacketPtr pkt,
161 %(CPU_exec_context)s * xc,
162 Trace::InstRecord * traceData) const
163 {
164 Fault fault = NoFault;
165
166 %(op_decl)s;
167 %(op_rd)s;
168
183 Twin64_t alignedMem = pkt->get<Twin64_t>();
184 int offset = pkt->req->getFlags();
185 if(dataSize != 8 || !offset)
186 {
187 Mem = bits(alignedMem.a,
188 (offset + dataSize) * 8 - 1, offset * 8);
189 }
190 else
191 {
192 Mem = alignedMem.b << (dataSize - offset) * 8;
193 Mem |= bits(alignedMem.a, dataSize * 8 - 1, offset * 8);
194 }
169 Mem = pkt->get<typeof(Mem)>();
170
195 %(code)s;
196
197 if(fault == NoFault)
198 {
199 %(op_wb)s;
200 }
201
202 return fault;

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

216 %(op_rd)s;
217 %(ea_code)s;
218 DPRINTF(X86, "%s : %s: The address is %#x\n", instMnem, mnemonic, EA);
219
220 %(code)s;
221
222 if(fault == NoFault)
223 {
171 %(code)s;
172
173 if(fault == NoFault)
174 {
175 %(op_wb)s;
176 }
177
178 return fault;

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

192 %(op_rd)s;
193 %(ea_code)s;
194 DPRINTF(X86, "%s : %s: The address is %#x\n", instMnem, mnemonic, EA);
195
196 %(code)s;
197
198 if(fault == NoFault)
199 {
224 int offset = EA & (dataSize - 1);
225
226 Twin64_t alignedMem;
227 alignedMem.a = Mem << (offset * 8);
228 alignedMem.b =
229 bits(Mem, dataSize * 8 - 1, (dataSize - offset) * 8);
230
231 fault = write(xc, alignedMem, EA, 0);
200 fault = write(xc, Mem, EA, 0);
232 if(fault == NoFault)
233 {
234 %(op_wb)s;
235 }
236 }
237
238 return fault;
239 }

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

250 %(op_rd)s;
251 %(ea_code)s;
252 DPRINTF(X86, "%s : %s: The address is %#x\n", instMnem, mnemonic, EA);
253
254 %(code)s;
255
256 if(fault == NoFault)
257 {
201 if(fault == NoFault)
202 {
203 %(op_wb)s;
204 }
205 }
206
207 return fault;
208 }

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

219 %(op_rd)s;
220 %(ea_code)s;
221 DPRINTF(X86, "%s : %s: The address is %#x\n", instMnem, mnemonic, EA);
222
223 %(code)s;
224
225 if(fault == NoFault)
226 {
258 int offset = EA & (dataSize - 1);
259
260 Twin64_t alignedMem;
261 alignedMem.a = Mem << (offset * 8);
262 alignedMem.b =
263 bits(Mem, dataSize * 8 - 1, (dataSize - offset) * 8);
264
265 fault = write(xc, alignedMem, EA, 0);
227 fault = write(xc, Mem, EA, 0);
266 if(fault == NoFault)
267 {
268 %(op_wb)s;
269 }
270 }
271 return fault;
272 }
273}};

--- 200 unchanged lines hidden ---
228 if(fault == NoFault)
229 {
230 %(op_wb)s;
231 }
232 }
233 return fault;
234 }
235}};

--- 200 unchanged lines hidden ---