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

Unified Diff: src/IceInstARM32.cpp

Issue 1431453002: Add new form of ldr/str (immediate) to 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/IceInstARM32.h ('k') | tests_lit/assembler/arm32/global-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 7f04c199340cd9e70f3d17f6b530ce45e9b4df8a..d6d6f63bbb369e7df058c0dbc98ed326a829ffb7 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -847,6 +847,11 @@ void InstARM32Label::dump(const Cfg *Func) const {
Str << getName(Func) << ":";
}
+template <InstARM32::InstKindARM32 K>
+void InstARM32LoadBase<K>::emitIAS(const Cfg *Func) const {
+ emitUsingTextFixup(Func);
+}
+
template <> void InstARM32Ldr::emit(const Cfg *Func) const {
if (!BuildDefs::dump())
return;
@@ -868,6 +873,20 @@ template <> void InstARM32Ldr::emit(const Cfg *Func) const {
getSrc(0)->emit(Func);
}
+template <> void InstARM32Ldr::emitIAS(const Cfg *Func) const {
+ assert(getSrcSize() == 1);
+ Variable *Dest = getDest();
+ Type DestTy = Dest->getType();
+ ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
+ if (isVectorType(DestTy) || isScalarFloatingType(DestTy))
+ // TODO(kschimpf) Handle case.
+ Asm->setNeedsTextFixup();
+ else
+ Asm->ldr(Dest, getSrc(0), getPredicate());
+ if (Asm->needsTextFixup())
+ emitUsingTextFixup(Func);
+}
+
template <> void InstARM32Ldrex::emit(const Cfg *Func) const {
if (!BuildDefs::dump())
return;
@@ -1097,6 +1116,19 @@ void InstARM32Str::emit(const Cfg *Func) const {
getSrc(1)->emit(Func);
}
+void InstARM32Str::emitIAS(const Cfg *Func) const {
+ assert(getSrcSize() == 2);
+ Type Ty = getSrc(0)->getType();
+ ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
+ if (isVectorType(Ty) || isScalarFloatingType(Ty))
+ // TODO(kschimpf) Handle case.
+ Asm->setNeedsTextFixup();
+ else
+ Asm->str(getSrc(0), getSrc(1), getPredicate());
+ if (Asm->needsTextFixup())
+ emitUsingTextFixup(Func);
+}
+
void InstARM32Str::dump(const Cfg *Func) const {
if (!BuildDefs::dump())
return;
@@ -1460,6 +1492,9 @@ template class InstARM32ThreeAddrFP<InstARM32::Vdiv>;
template class InstARM32ThreeAddrFP<InstARM32::Vmul>;
template class InstARM32ThreeAddrFP<InstARM32::Vsub>;
+template class InstARM32LoadBase<InstARM32::Ldr>;
+template class InstARM32LoadBase<InstARM32::Ldrex>;
+
template class InstARM32TwoAddrGPR<InstARM32::Movt>;
} // end of namespace Ice
« no previous file with comments | « src/IceInstARM32.h ('k') | tests_lit/assembler/arm32/global-load-store.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698