ldr64.isa (12386:2bf5fb25a5f1) ldr64.isa (12527:264a2d7e5c1d)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2011-2014 ARM Limited
4// All rights reserved
5//
6// The license below extends only to copyright in the software and shall
7// not be construed as granting a license to any other intellectual
8// property including but not limited to intellectual property relating

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

223 def emit(self):
224 self.buildEACode()
225
226 # Code that actually handles the access
227 if self.flavor == "fp":
228 if self.size == 4:
229 accCode = '''
230 uint64_t data = cSwap(Mem_ud, isBigEndian64(xc->tcBase()));
1// -*- mode:c++ -*-
2
3// Copyright (c) 2011-2014 ARM Limited
4// All rights reserved
5//
6// The license below extends only to copyright in the software and shall
7// not be construed as granting a license to any other intellectual
8// property including but not limited to intellectual property relating

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

223 def emit(self):
224 self.buildEACode()
225
226 # Code that actually handles the access
227 if self.flavor == "fp":
228 if self.size == 4:
229 accCode = '''
230 uint64_t data = cSwap(Mem_ud, isBigEndian64(xc->tcBase()));
231 AA64FpDestP0_uw = (uint32_t)data;
231 AA64FpDestP0_uw = isBigEndian64(xc->tcBase())
232 ? (data >> 32)
233 : (uint32_t)data;
232 AA64FpDestP1_uw = 0;
233 AA64FpDestP2_uw = 0;
234 AA64FpDestP3_uw = 0;
234 AA64FpDestP1_uw = 0;
235 AA64FpDestP2_uw = 0;
236 AA64FpDestP3_uw = 0;
235 AA64FpDest2P0_uw = (data >> 32);
237 AA64FpDest2P0_uw = isBigEndian64(xc->tcBase())
238 ? (uint32_t)data
239 : (data >> 32);
236 AA64FpDest2P1_uw = 0;
237 AA64FpDest2P2_uw = 0;
238 AA64FpDest2P3_uw = 0;
239 '''
240 elif self.size == 8:
241 accCode = '''
240 AA64FpDest2P1_uw = 0;
241 AA64FpDest2P2_uw = 0;
242 AA64FpDest2P3_uw = 0;
243 '''
244 elif self.size == 8:
245 accCode = '''
242 AA64FpDestP0_uw = (uint32_t)Mem_tud[0];
243 AA64FpDestP1_uw = (uint32_t)(Mem_tud[0] >> 32);
246 uint64_t data_a = cSwap(Mem_tud[0],
247 isBigEndian64(xc->tcBase()));
248 uint64_t data_b = cSwap(Mem_tud[1],
249 isBigEndian64(xc->tcBase()));
250 AA64FpDestP0_uw = (uint32_t)data_a;
251 AA64FpDestP1_uw = (uint32_t)(data_a >> 32);
244 AA64FpDestP2_uw = 0;
245 AA64FpDestP3_uw = 0;
252 AA64FpDestP2_uw = 0;
253 AA64FpDestP3_uw = 0;
246 AA64FpDest2P0_uw = (uint32_t)Mem_tud[1];
247 AA64FpDest2P1_uw = (uint32_t)(Mem_tud[1] >> 32);
254 AA64FpDest2P0_uw = (uint32_t)data_b;
255 AA64FpDest2P1_uw = (uint32_t)(data_b >> 32);
248 AA64FpDest2P2_uw = 0;
249 AA64FpDest2P3_uw = 0;
250 '''
251 else:
252 if self.sign:
253 if self.size == 4:
254 accCode = '''
255 uint64_t data = cSwap(Mem_ud,
256 isBigEndian64(xc->tcBase()));
256 AA64FpDest2P2_uw = 0;
257 AA64FpDest2P3_uw = 0;
258 '''
259 else:
260 if self.sign:
261 if self.size == 4:
262 accCode = '''
263 uint64_t data = cSwap(Mem_ud,
264 isBigEndian64(xc->tcBase()));
257 XDest = sext<32>((uint32_t)data);
258 XDest2 = sext<32>(data >> 32);
265 XDest = isBigEndian64(xc->tcBase())
266 ? sext<32>(data >> 32)
267 : sext<32>((uint32_t)data);
268 XDest2 = isBigEndian64(xc->tcBase())
269 ? sext<32>((uint32_t)data)
270 : sext<32>(data >> 32);
259 '''
260 elif self.size == 8:
261 accCode = '''
271 '''
272 elif self.size == 8:
273 accCode = '''
262 XDest = Mem_tud[0];
263 XDest2 = Mem_tud[1];
274 XDest = cSwap(Mem_tud[0],
275 isBigEndian64(xc->tcBase()));
276 XDest2 = cSwap(Mem_tud[1],
277 isBigEndian64(xc->tcBase()));
264 '''
265 else:
266 if self.size == 4:
267 accCode = '''
268 uint64_t data = cSwap(Mem_ud,
269 isBigEndian64(xc->tcBase()));
278 '''
279 else:
280 if self.size == 4:
281 accCode = '''
282 uint64_t data = cSwap(Mem_ud,
283 isBigEndian64(xc->tcBase()));
270 XDest = (uint32_t)data;
271 XDest2 = data >> 32;
284 XDest = isBigEndian64(xc->tcBase())
285 ? (data >> 32)
286 : (uint32_t)data;
287 XDest2 = isBigEndian64(xc->tcBase())
288 ? (uint32_t)data
289 : (data >> 32);
272 '''
273 elif self.size == 8:
274 accCode = '''
290 '''
291 elif self.size == 8:
292 accCode = '''
275 XDest = Mem_tud[0];
276 XDest2 = Mem_tud[1];
293 XDest = cSwap(Mem_tud[0],
294 isBigEndian64(xc->tcBase()));
295 XDest2 = cSwap(Mem_tud[1],
296 isBigEndian64(xc->tcBase()));
277 '''
278 self.codeBlobs["memacc_code"] = accCode
279
280 # Push it out to the output files
281 wbDecl = None
282 if self.writeback and not self.micro:
283 wbDecl = self.wbDecl
284 self.emitHelper(self.base, wbDecl)

--- 163 unchanged lines hidden ---
297 '''
298 self.codeBlobs["memacc_code"] = accCode
299
300 # Push it out to the output files
301 wbDecl = None
302 if self.writeback and not self.micro:
303 wbDecl = self.wbDecl
304 self.emitHelper(self.base, wbDecl)

--- 163 unchanged lines hidden ---