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

Unified Diff: src/IceInstARM32.cpp

Issue 1222943003: ARM32: Lower more integer intrinsics and test. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: move to TargetLowering Created 5 years, 5 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') | src/IceInstMIPS32.cpp » ('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 72178ac773619d2a661dbdb0ab6bd9129dec981b..e95f6b111579c374e0cc8d35d2b744f78f783bfc 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -80,18 +80,15 @@ CondARM32::Cond InstARM32::getOppositeCondition(CondARM32::Cond Cond) {
}
void InstARM32Pred::emitUnaryopGPR(const char *Opcode,
- const InstARM32Pred *Inst, const Cfg *Func) {
+ const InstARM32Pred *Inst, const Cfg *Func,
+ bool NeedsWidthSuffix) {
Ostream &Str = Func->getContext()->getStrEmit();
assert(Inst->getSrcSize() == 1);
Type SrcTy = Inst->getSrc(0)->getType();
- Type DestTy = Inst->getDest()->getType();
Str << "\t" << Opcode;
- // Sxt and Uxt need source type width letter to define the operation.
- // The other unary operations have the same source and dest type and
- // as a result need only one letter.
- if (SrcTy != DestTy)
+ if (NeedsWidthSuffix)
Str << getWidthString(SrcTy);
- Str << "\t";
+ Str << Inst->getPredicate() << "\t";
Inst->getDest()->emit(Func);
Str << ", ";
Inst->getSrc(0)->emit(Func);
@@ -358,7 +355,10 @@ InstARM32Umull::InstARM32Umull(Cfg *Func, Variable *DestLo, Variable *DestHi,
template <> const char *InstARM32Movt::Opcode = "movt";
// Unary ops
template <> const char *InstARM32Movw::Opcode = "movw";
+template <> const char *InstARM32Clz::Opcode = "clz";
template <> const char *InstARM32Mvn::Opcode = "mvn";
+template <> const char *InstARM32Rbit::Opcode = "rbit";
+template <> const char *InstARM32Rev::Opcode = "rev";
template <> const char *InstARM32Sxt::Opcode = "sxt"; // still requires b/h
template <> const char *InstARM32Uxt::Opcode = "uxt"; // still requires b/h
// Mov-like ops
« no previous file with comments | « src/IceInstARM32.h ('k') | src/IceInstMIPS32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698