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 1414483008: Add CMP(register) and CMP(Immediate) to ARM integerated 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
Index: src/IceInstARM32.cpp
diff --git a/src/IceInstARM32.cpp b/src/IceInstARM32.cpp
index a0d9618a615084c5caf5aa62cb513ddc83cb10ab..49452c14a36ce076cf173229595c9e2c3ed09293 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -491,6 +491,19 @@ InstARM32Mov::InstARM32Mov(Cfg *Func, Variable *Dest, Operand *Src,
}
}
+template <InstARM32::InstKindARM32 K>
+void InstARM32CmpLike<K>::emitIAS(const Cfg *Func) const {
+ emitUsingTextFixup(Func);
+}
+
+template <> void InstARM32Cmp::emitIAS(const Cfg *Func) const {
+ assert(getSrcSize() == 2);
+ ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
+ Asm->cmp(getSrc(0), getSrc(1), getPredicate());
+ if (Asm->needsTextFixup())
+ emitUsingTextFixup(Func);
+}
+
InstARM32Vcmp::InstARM32Vcmp(Cfg *Func, Variable *Src0, Variable *Src1,
CondARM32::Cond Predicate)
: InstARM32Pred(Func, InstARM32::Vcmp, 2, nullptr, Predicate) {
@@ -1551,4 +1564,7 @@ template class InstARM32UnaryopGPR<InstARM32::Sxt, true>;
template class InstARM32UnaryopGPR<InstARM32::Uxt, true>;
template class InstARM32UnaryopFP<InstARM32::Vsqrt>;
+template class InstARM32CmpLike<InstARM32::Cmp>;
+template class InstARM32CmpLike<InstARM32::Tst>;
+
} // end of namespace Ice

Powered by Google App Engine
This is Rietveld 408576698