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

Unified Diff: src/IceInstARM32.h

Issue 1330933002: Implements int2fp, fp2int, and fp2fp conversions for ARM32. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 5 years, 3 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/IceConverter.cpp ('k') | src/IceInstARM32.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstARM32.h
diff --git a/src/IceInstARM32.h b/src/IceInstARM32.h
index 66d571236b9d0c64208b20cdb23f8b9d2ef3ca3c..55bb2120ac9a9395e9e204ec9dfac94a42ad49d6 100644
--- a/src/IceInstARM32.h
+++ b/src/IceInstARM32.h
@@ -322,6 +322,7 @@ public:
Umull,
Uxt,
Vadd,
+ Vcvt,
Vdiv,
Vldr,
Vmov,
@@ -1093,6 +1094,31 @@ private:
Variable *DestHi;
};
+/// Handles fp2int, int2fp, and fp2fp conversions.
+class InstARM32Vcvt final : public InstARM32Pred {
+ InstARM32Vcvt() = delete;
+ InstARM32Vcvt(const InstARM32Vcvt &) = delete;
+ InstARM32Vcvt &operator=(const InstARM32Vcvt &) = delete;
+
+public:
+ enum VcvtVariant { S2si, S2ui, Si2s, Ui2s, D2si, D2ui, Si2d, Ui2d, S2d, D2s };
+ static InstARM32Vcvt *create(Cfg *Func, Variable *Dest, Variable *Src,
+ VcvtVariant Variant, CondARM32::Cond Predicate) {
+ return new (Func->allocate<InstARM32Vcvt>())
+ InstARM32Vcvt(Func, Dest, Src, Variant, Predicate);
+ }
+ void emit(const Cfg *Func) const override;
+ void emitIAS(const Cfg *Func) const override;
+ void dump(const Cfg *Func) const override;
+ static bool classof(const Inst *Inst) { return isClassof(Inst, Vcvt); }
+
+private:
+ InstARM32Vcvt(Cfg *Func, Variable *Dest, Variable *Src, VcvtVariant Variant,
+ CondARM32::Cond Predicate);
+
+ const VcvtVariant Variant;
+};
+
// Declare partial template specializations of emit() methods that
// already have default implementations. Without this, there is the
// possibility of ODR violations and link errors.
« no previous file with comments | « src/IceConverter.cpp ('k') | src/IceInstARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698