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

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: Update Dart files and fix nits. 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
Index: src/IceInstARM32.cpp
diff --git a/src/IceInstARM32.cpp b/src/IceInstARM32.cpp
index 82a92e6f132f8ecf07e11f7b2e9820199fe08f7b..9958cbdcd759911d808b6d488eb7489b887dd907 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -1174,6 +1174,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);
@@ -1567,6 +1578,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;

Powered by Google App Engine
This is Rietveld 408576698