ldr64.isa (10346:d96b61d843b2) ldr64.isa (12386:2bf5fb25a5f1)
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

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

193 isBigEndian64(xc->tcBase()));
194 AA64FpDestP0_uw = (uint32_t)data;
195 AA64FpDestP1_uw = (data >> 32);
196 AA64FpDestP2_uw = 0;
197 AA64FpDestP3_uw = 0;
198 '''
199 elif self.size == 16:
200 accCode = '''
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

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

193 isBigEndian64(xc->tcBase()));
194 AA64FpDestP0_uw = (uint32_t)data;
195 AA64FpDestP1_uw = (data >> 32);
196 AA64FpDestP2_uw = 0;
197 AA64FpDestP3_uw = 0;
198 '''
199 elif self.size == 16:
200 accCode = '''
201 Twin64_t data = cSwap(Mem%s,
202 isBigEndian64(xc->tcBase()));
203
204
205 AA64FpDestP0_uw = (uint32_t)data.a;
206 AA64FpDestP1_uw = (data.a >> 32);
207 AA64FpDestP2_uw = (uint32_t)data.b;
208 AA64FpDestP3_uw = (data.b >> 32);
201 auto data = cSwap(Mem%s, isBigEndian64(xc->tcBase()));
202 AA64FpDestP0_uw = (uint32_t)data[0];
203 AA64FpDestP1_uw = (data[0] >> 32);
204 AA64FpDestP2_uw = (uint32_t)data[1];
205 AA64FpDestP3_uw = (data[1] >> 32);
209 '''
210 elif self.flavor == "widen" or self.size == 8:
211 accCode = "XDest = cSwap(Mem%s, isBigEndian64(xc->tcBase()));"
212 else:
213 accCode = "WDest = cSwap(Mem%s, isBigEndian64(xc->tcBase()));"
214
215 accCode = accCode % buildMemSuffix(self.sign, self.size)
216

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

237 AA64FpDestP3_uw = 0;
238 AA64FpDest2P0_uw = (data >> 32);
239 AA64FpDest2P1_uw = 0;
240 AA64FpDest2P2_uw = 0;
241 AA64FpDest2P3_uw = 0;
242 '''
243 elif self.size == 8:
244 accCode = '''
206 '''
207 elif self.flavor == "widen" or self.size == 8:
208 accCode = "XDest = cSwap(Mem%s, isBigEndian64(xc->tcBase()));"
209 else:
210 accCode = "WDest = cSwap(Mem%s, isBigEndian64(xc->tcBase()));"
211
212 accCode = accCode % buildMemSuffix(self.sign, self.size)
213

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

234 AA64FpDestP3_uw = 0;
235 AA64FpDest2P0_uw = (data >> 32);
236 AA64FpDest2P1_uw = 0;
237 AA64FpDest2P2_uw = 0;
238 AA64FpDest2P3_uw = 0;
239 '''
240 elif self.size == 8:
241 accCode = '''
245 AA64FpDestP0_uw = (uint32_t)Mem_tud.a;
246 AA64FpDestP1_uw = (uint32_t)(Mem_tud.a >> 32);
242 AA64FpDestP0_uw = (uint32_t)Mem_tud[0];
243 AA64FpDestP1_uw = (uint32_t)(Mem_tud[0] >> 32);
247 AA64FpDestP2_uw = 0;
248 AA64FpDestP3_uw = 0;
244 AA64FpDestP2_uw = 0;
245 AA64FpDestP3_uw = 0;
249 AA64FpDest2P0_uw = (uint32_t)Mem_tud.b;
250 AA64FpDest2P1_uw = (uint32_t)(Mem_tud.b >> 32);
246 AA64FpDest2P0_uw = (uint32_t)Mem_tud[1];
247 AA64FpDest2P1_uw = (uint32_t)(Mem_tud[1] >> 32);
251 AA64FpDest2P2_uw = 0;
252 AA64FpDest2P3_uw = 0;
253 '''
254 else:
255 if self.sign:
256 if self.size == 4:
257 accCode = '''
258 uint64_t data = cSwap(Mem_ud,
259 isBigEndian64(xc->tcBase()));
260 XDest = sext<32>((uint32_t)data);
261 XDest2 = sext<32>(data >> 32);
262 '''
263 elif self.size == 8:
264 accCode = '''
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()));
257 XDest = sext<32>((uint32_t)data);
258 XDest2 = sext<32>(data >> 32);
259 '''
260 elif self.size == 8:
261 accCode = '''
265 XDest = Mem_tud.a;
266 XDest2 = Mem_tud.b;
262 XDest = Mem_tud[0];
263 XDest2 = Mem_tud[1];
267 '''
268 else:
269 if self.size == 4:
270 accCode = '''
271 uint64_t data = cSwap(Mem_ud,
272 isBigEndian64(xc->tcBase()));
273 XDest = (uint32_t)data;
274 XDest2 = data >> 32;
275 '''
276 elif self.size == 8:
277 accCode = '''
264 '''
265 else:
266 if self.size == 4:
267 accCode = '''
268 uint64_t data = cSwap(Mem_ud,
269 isBigEndian64(xc->tcBase()));
270 XDest = (uint32_t)data;
271 XDest2 = data >> 32;
272 '''
273 elif self.size == 8:
274 accCode = '''
278 XDest = Mem_tud.a;
279 XDest2 = Mem_tud.b;
275 XDest = Mem_tud[0];
276 XDest2 = Mem_tud[1];
280 '''
281 self.codeBlobs["memacc_code"] = accCode
282
283 # Push it out to the output files
284 wbDecl = None
285 if self.writeback and not self.micro:
286 wbDecl = self.wbDecl
287 self.emitHelper(self.base, wbDecl)

--- 163 unchanged lines hidden ---
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 ---