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

Unified Diff: src/IceInstARM32.cpp

Issue 1516863003: Add various forms of LDREX/STREX to ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix latest issues. Created 5 years 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/ldrex-strex.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 07b4429bd2841d9a7b11c2f4e878794c1dd7b2d9..ba12862bddf1f7d27f342734cf4188d20a4112fb 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -1181,6 +1181,17 @@ template <> void InstARM32Ldrex::emit(const Cfg *Func) const {
getSrc(0)->emit(Func);
}
+template <> void InstARM32Ldrex::emitIAS(const Cfg *Func) const {
+ assert(getSrcSize() == 1);
+ assert(getDest()->hasReg());
+ Variable *Dest = getDest();
+ assert(isScalarIntegerType(Dest->getType()));
+ auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
+ Asm->ldrex(Dest, getSrc(0), getPredicate(), Func->getTarget());
+ if (Asm->needsTextFixup())
+ emitUsingTextFixup(Func);
+}
+
template <InstARM32::InstKindARM32 K>
void InstARM32TwoAddrGPR<K>::emitIAS(const Cfg *Func) const {
emitUsingTextFixup(Func);
@@ -1582,6 +1593,16 @@ void InstARM32Strex::emit(const Cfg *Func) const {
emitSources(Func);
}
+void InstARM32Strex::emitIAS(const Cfg *Func) const {
+ assert(getSrcSize() == 2);
+ const Operand *Src0 = getSrc(0);
+ assert(isScalarIntegerType(Src0->getType()));
+ auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
+ Asm->strex(Dest, Src0, getSrc(1), getPredicate(), Func->getTarget());
+ if (Asm->needsTextFixup())
+ emitUsingTextFixup(Func);
+}
+
void InstARM32Strex::dump(const Cfg *Func) const {
if (!BuildDefs::dump())
return;
« no previous file with comments | « src/IceInstARM32.h ('k') | tests_lit/assembler/arm32/ldrex-strex.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698