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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | tests_lit/assembler/arm32/load-store.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstARM32.cpp
diff --git a/src/IceInstARM32.cpp b/src/IceInstARM32.cpp
index c4d9ebc10a72bb751f177c6bde3775d9d943f48b..2e22484b7a1b45d9e7f110ec29c2c011a64afa6d 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -617,13 +617,28 @@ void InstARM32Mov::emitIASSingleDestSingleSource(const Cfg *Func) const {
// Note: Loop is used so that we can short circuit using break.
do {
if (Dest->hasReg()) {
- Type DestTy = Dest->getType();
+ const Type DestTy = Dest->getType();
const bool DestIsVector = isVectorType(DestTy);
const bool DestIsScalarFP = isScalarFloatingType(DestTy);
const bool CoreVFPMove = isMoveBetweenCoreAndVFPRegisters(Dest, Src0);
if (DestIsVector || DestIsScalarFP || CoreVFPMove)
break;
- Asm->mov(Dest, Src0, getPredicate());
+ if (isMemoryAccess(Src0)) {
+ // TODO(kschimpf) Figure out how to do ldr on CoreVPFMove? (see
+ // emitSingleDestSingleSource, local variable LoadOpcode).
+ Asm->ldr(Dest, Src0, getPredicate());
+ } else {
+ Asm->mov(Dest, Src0, getPredicate());
+ }
+ return;
+ } else {
+ const Type Src0Type = Src0->getType();
+ const bool Src0IsVector = isVectorType(Src0Type);
+ const bool Src0IsScalarFP = isScalarFloatingType(Src0Type);
+ const bool CoreVFPMove = isMoveBetweenCoreAndVFPRegisters(Dest, Src0);
+ if (Src0IsVector || Src0IsScalarFP || CoreVFPMove)
+ break;
+ Asm->str(Src0, Dest, getPredicate());
return;
}
} while (0);
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | tests_lit/assembler/arm32/load-store.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698