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 fault = read(xc, EA, Mem, 0); 127 int offset = EA & (dataSize - 1); 128 Mem = bits(Mem, (offset + dataSize) * 8 - 1, offset * 8); |
129 130 if(fault == NoFault) 131 { 132 %(code)s; 133 } 134 if(fault == NoFault) 135 { 136 %(op_wb)s; --- 10 unchanged lines hidden (view full) --- 147 Fault fault = NoFault; 148 Addr EA; 149 150 %(op_decl)s; 151 %(op_rd)s; 152 %(ea_code)s; 153 DPRINTF(X86, "%s : %s: The address is %#x\n", instMnem, mnemonic, EA); 154 |
155 int offset = EA & (dataSize - 1); 156 fault = read(xc, EA, Mem, offset); |
157 158 return fault; 159 } 160}}; 161 162def template MicroLoadCompleteAcc {{ 163 Fault %(class_name)s::completeAcc(PacketPtr pkt, 164 %(CPU_exec_context)s * xc, 165 Trace::InstRecord * traceData) const 166 { 167 Fault fault = NoFault; 168 169 %(op_decl)s; 170 %(op_rd)s; 171 172 Mem = pkt->get<typeof(Mem)>(); |
173 int offset = pkt->flags; 174 Mem = bits(Mem, (offset + dataSize) * 8 - 1, offset * 8); |
175 %(code)s; 176 177 if(fault == NoFault) 178 { 179 %(op_wb)s; 180 } 181 182 return fault; --- 13 unchanged lines hidden (view full) --- 196 %(op_rd)s; 197 %(ea_code)s; 198 DPRINTF(X86, "%s : %s: The address is %#x\n", instMnem, mnemonic, EA); 199 200 %(code)s; 201 202 if(fault == NoFault) 203 { |
204 Mem = Mem << ((EA & (dataSize - 1)) * 8); 205 fault = write(xc, Mem, EA, 0); 206 if(fault == NoFault) |
207 { |
208 %(op_wb)s; |
209 } 210 } |
211 212 return fault; 213 } 214}}; 215 216def template MicroStoreInitiateAcc {{ 217 Fault %(class_name)s::initiateAcc(%(CPU_exec_context)s * xc, 218 Trace::InstRecord * traceData) const --- 5 unchanged lines hidden (view full) --- 224 %(op_rd)s; 225 %(ea_code)s; 226 DPRINTF(X86, "%s : %s: The address is %#x\n", instMnem, mnemonic, EA); 227 228 %(code)s; 229 230 if(fault == NoFault) 231 { |
232 Mem = Mem << ((EA & (dataSize - 1)) * 8); 233 fault = write(xc, Mem, EA, 0); 234 if(fault == NoFault) |
235 { |
236 %(op_wb)s; |
237 } 238 } |
239 return fault; 240 } 241}}; 242 243def template MicroStoreCompleteAcc {{ 244 Fault %(class_name)s::completeAcc(PacketPtr, %(CPU_exec_context)s * xc, 245 Trace::InstRecord * traceData) const 246 { --- 195 unchanged lines hidden --- |