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 = isBigEndian64(xc->tcBase()) 232 ? (data >> 32) 233 : (uint32_t)data; |
234 AA64FpDestP1_uw = 0; 235 AA64FpDestP2_uw = 0; 236 AA64FpDestP3_uw = 0; |
237 AA64FpDest2P0_uw = isBigEndian64(xc->tcBase()) 238 ? (uint32_t)data 239 : (data >> 32); |
240 AA64FpDest2P1_uw = 0; 241 AA64FpDest2P2_uw = 0; 242 AA64FpDest2P3_uw = 0; 243 ''' 244 elif self.size == 8: 245 accCode = ''' |
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); |
252 AA64FpDestP2_uw = 0; 253 AA64FpDestP3_uw = 0; |
254 AA64FpDest2P0_uw = (uint32_t)data_b; 255 AA64FpDest2P1_uw = (uint32_t)(data_b >> 32); |
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())); |
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); |
271 ''' 272 elif self.size == 8: 273 accCode = ''' |
274 XDest = cSwap(Mem_tud[0], 275 isBigEndian64(xc->tcBase())); 276 XDest2 = cSwap(Mem_tud[1], 277 isBigEndian64(xc->tcBase())); |
278 ''' 279 else: 280 if self.size == 4: 281 accCode = ''' 282 uint64_t data = cSwap(Mem_ud, 283 isBigEndian64(xc->tcBase())); |
284 XDest = isBigEndian64(xc->tcBase()) 285 ? (data >> 32) 286 : (uint32_t)data; 287 XDest2 = isBigEndian64(xc->tcBase()) 288 ? (uint32_t)data 289 : (data >> 32); |
290 ''' 291 elif self.size == 8: 292 accCode = ''' |
293 XDest = cSwap(Mem_tud[0], 294 isBigEndian64(xc->tcBase())); 295 XDest2 = cSwap(Mem_tud[1], 296 isBigEndian64(xc->tcBase())); |
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 --- |