Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: src/IceInstARM32.cpp

Issue 1619703008: Fix vldrd/vstrd handling of immediate offsets in ARM. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix issues in last patch. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | tests_lit/assembler/arm32/vldr.vstr.imm.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceInstARM32.cpp - ARM32 instruction implementation ----===// 1 //===- subzero/src/IceInstARM32.cpp - ARM32 instruction implementation ----===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 } 1365 }
1366 Str << VectorMarker << "\t"; 1366 Str << VectorMarker << "\t";
1367 getDest()->emit(Func); 1367 getDest()->emit(Func);
1368 Str << ", "; 1368 Str << ", ";
1369 getSrc(0)->emit(Func); 1369 getSrc(0)->emit(Func);
1370 } 1370 }
1371 1371
1372 template <> void InstARM32Ldr::emitIAS(const Cfg *Func) const { 1372 template <> void InstARM32Ldr::emitIAS(const Cfg *Func) const {
1373 assert(getSrcSize() == 1); 1373 assert(getSrcSize() == 1);
1374 Variable *Dest = getDest(); 1374 Variable *Dest = getDest();
1375 Type DestTy = Dest->getType(); 1375 const Type DestTy = Dest->getType();
1376 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); 1376 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
1377 if (isScalarFloatingType(DestTy)) { 1377 if (isScalarFloatingType(DestTy)) {
1378 if (DestTy == IceType_f32) 1378 switch (DestTy) {
1379 default:
1380 // TODO(kschimpf) Does this happen?
1381 Asm->setNeedsTextFixup();
1382 break;
1383 case IceType_f32:
1379 Asm->vldrs(Dest, getSrc(0), getPredicate(), Func->getTarget()); 1384 Asm->vldrs(Dest, getSrc(0), getPredicate(), Func->getTarget());
1380 else 1385 break;
1386 case IceType_f64:
1381 Asm->vldrd(Dest, getSrc(0), getPredicate(), Func->getTarget()); 1387 Asm->vldrd(Dest, getSrc(0), getPredicate(), Func->getTarget());
1388 break;
1389 }
1382 } else if (isVectorType(DestTy)) 1390 } else if (isVectorType(DestTy))
1383 // TODO(kschimpf) Handle case. 1391 // TODO(kschimpf) Handle case.
1384 Asm->setNeedsTextFixup(); 1392 Asm->setNeedsTextFixup();
1385 else 1393 else
1386 Asm->ldr(Dest, getSrc(0), getPredicate(), Func->getTarget()); 1394 Asm->ldr(Dest, getSrc(0), getPredicate(), Func->getTarget());
1387 if (Asm->needsTextFixup()) 1395 if (Asm->needsTextFixup())
1388 emitUsingTextFixup(Func); 1396 emitUsingTextFixup(Func);
1389 } 1397 }
1390 1398
1391 template <> void InstARM32Ldrex::emit(const Cfg *Func) const { 1399 template <> void InstARM32Ldrex::emit(const Cfg *Func) const {
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1670 getSrc(0)->emit(Func); 1678 getSrc(0)->emit(Func);
1671 Str << ", "; 1679 Str << ", ";
1672 getSrc(1)->emit(Func); 1680 getSrc(1)->emit(Func);
1673 } 1681 }
1674 1682
1675 void InstARM32Str::emitIAS(const Cfg *Func) const { 1683 void InstARM32Str::emitIAS(const Cfg *Func) const {
1676 assert(getSrcSize() == 2); 1684 assert(getSrcSize() == 2);
1677 Type Ty = getSrc(0)->getType(); 1685 Type Ty = getSrc(0)->getType();
1678 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); 1686 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
1679 if (isScalarFloatingType(Ty)) { 1687 if (isScalarFloatingType(Ty)) {
1680 if (Ty == IceType_f32) 1688 switch (Ty) {
1689 default:
1690 // TODO(kschimpf) Does this happen?
1691 Asm->setNeedsTextFixup();
1692 break;
1693 case IceType_f32:
1681 Asm->vstrs(getSrc(0), getSrc(1), getPredicate(), Func->getTarget()); 1694 Asm->vstrs(getSrc(0), getSrc(1), getPredicate(), Func->getTarget());
1682 else 1695 break;
1696 case IceType_f64:
1683 Asm->vstrd(getSrc(0), getSrc(1), getPredicate(), Func->getTarget()); 1697 Asm->vstrd(getSrc(0), getSrc(1), getPredicate(), Func->getTarget());
1698 break;
1699 }
1684 } else if (isVectorType(Ty)) 1700 } else if (isVectorType(Ty))
1685 // TODO(kschimpf) Handle case. 1701 // TODO(kschimpf) Handle case.
1686 Asm->setNeedsTextFixup(); 1702 Asm->setNeedsTextFixup();
1687 else 1703 else
1688 Asm->str(getSrc(0), getSrc(1), getPredicate(), Func->getTarget()); 1704 Asm->str(getSrc(0), getSrc(1), getPredicate(), Func->getTarget());
1689 if (Asm->needsTextFixup()) 1705 if (Asm->needsTextFixup())
1690 emitUsingTextFixup(Func); 1706 emitUsingTextFixup(Func);
1691 } 1707 }
1692 1708
1693 void InstARM32Str::dump(const Cfg *Func) const { 1709 void InstARM32Str::dump(const Cfg *Func) const {
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
2234 2250
2235 template class InstARM32FourAddrGPR<InstARM32::Mla>; 2251 template class InstARM32FourAddrGPR<InstARM32::Mla>;
2236 template class InstARM32FourAddrGPR<InstARM32::Mls>; 2252 template class InstARM32FourAddrGPR<InstARM32::Mls>;
2237 2253
2238 template class InstARM32CmpLike<InstARM32::Cmn>; 2254 template class InstARM32CmpLike<InstARM32::Cmn>;
2239 template class InstARM32CmpLike<InstARM32::Cmp>; 2255 template class InstARM32CmpLike<InstARM32::Cmp>;
2240 template class InstARM32CmpLike<InstARM32::Tst>; 2256 template class InstARM32CmpLike<InstARM32::Tst>;
2241 2257
2242 } // end of namespace ARM32 2258 } // end of namespace ARM32
2243 } // end of namespace Ice 2259 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | tests_lit/assembler/arm32/vldr.vstr.imm.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698