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

Side by Side Diff: src/IceInstARM32.cpp

Issue 1402403002: Handle stack spills in ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 5 years, 2 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
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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 Operand *Src0 = getSrc(0); 616 Operand *Src0 = getSrc(0);
617 // Note: Loop is used so that we can short circuit using break. 617 // Note: Loop is used so that we can short circuit using break.
618 do { 618 do {
619 if (Dest->hasReg()) { 619 if (Dest->hasReg()) {
620 Type DestTy = Dest->getType(); 620 Type DestTy = Dest->getType();
621 const bool DestIsVector = isVectorType(DestTy); 621 const bool DestIsVector = isVectorType(DestTy);
622 const bool DestIsScalarFP = isScalarFloatingType(DestTy); 622 const bool DestIsScalarFP = isScalarFloatingType(DestTy);
623 const bool CoreVFPMove = isMoveBetweenCoreAndVFPRegisters(Dest, Src0); 623 const bool CoreVFPMove = isMoveBetweenCoreAndVFPRegisters(Dest, Src0);
624 if (DestIsVector || DestIsScalarFP || CoreVFPMove) 624 if (DestIsVector || DestIsScalarFP || CoreVFPMove)
625 break; 625 break;
626 Asm->mov(Dest, Src0, getPredicate()); 626 if (isMemoryAccess(Src0)) {
627 // TODO(kschimpf) Figure out how to do ldr on CoreVPFMove? (see
628 // emitSingleDestSingleSource, local variable LoadOpcode).
629 Asm->ldr(Dest, Src0, getPredicate());
630 } else {
631 Asm->mov(Dest, Src0, getPredicate());
632 }
633 return;
634 } else {
635 Type Src0Type = Src0->getType();
636 const bool Src0IsVector = isVectorType(Src0Type);
637 const bool Src0IsScalarFP = isScalarFloatingType(Src0Type);
638 const bool CoreVFPMove = isMoveBetweenCoreAndVFPRegisters(Dest, Src0);
639 if (Src0IsVector || Src0IsScalarFP || CoreVFPMove)
640 break;
641 Asm->str(Src0, Dest, getPredicate());
627 return; 642 return;
628 } 643 }
629 } while (0); 644 } while (0);
630 llvm_unreachable("not yet implemented"); 645 llvm_unreachable("not yet implemented");
631 } 646 }
632 647
633 void InstARM32Mov::emit(const Cfg *Func) const { 648 void InstARM32Mov::emit(const Cfg *Func) const {
634 if (!BuildDefs::dump()) 649 if (!BuildDefs::dump())
635 return; 650 return;
636 assert(!(isMultiDest() && isMultiSource()) && "Invalid vmov type."); 651 assert(!(isMultiDest() && isMultiSource()) && "Invalid vmov type.");
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
1453 template class InstARM32ThreeAddrGPR<InstARM32::Sbc>; 1468 template class InstARM32ThreeAddrGPR<InstARM32::Sbc>;
1454 template class InstARM32ThreeAddrGPR<InstARM32::Sdiv>; 1469 template class InstARM32ThreeAddrGPR<InstARM32::Sdiv>;
1455 template class InstARM32ThreeAddrGPR<InstARM32::Sub>; 1470 template class InstARM32ThreeAddrGPR<InstARM32::Sub>;
1456 template class InstARM32ThreeAddrGPR<InstARM32::Udiv>; 1471 template class InstARM32ThreeAddrGPR<InstARM32::Udiv>;
1457 template class InstARM32ThreeAddrFP<InstARM32::Vadd>; 1472 template class InstARM32ThreeAddrFP<InstARM32::Vadd>;
1458 template class InstARM32ThreeAddrFP<InstARM32::Vdiv>; 1473 template class InstARM32ThreeAddrFP<InstARM32::Vdiv>;
1459 template class InstARM32ThreeAddrFP<InstARM32::Vmul>; 1474 template class InstARM32ThreeAddrFP<InstARM32::Vmul>;
1460 template class InstARM32ThreeAddrFP<InstARM32::Vsub>; 1475 template class InstARM32ThreeAddrFP<InstARM32::Vsub>;
1461 1476
1462 } // end of namespace Ice 1477 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698