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/IceAssemblerARM32.cpp

Issue 1611293003: Add vcvt.s32.f32 instruction to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix not. Created 4 years, 11 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/IceAssemblerARM32.h ('k') | src/IceInstARM32.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceAssemblerARM32.cpp
diff --git a/src/IceAssemblerARM32.cpp b/src/IceAssemblerARM32.cpp
index 8d456ef6839c0734dbb67d372dac832118fe3a79..6090e1d2dbfade9ea569d85c79dae7f6f7798d4d 100644
--- a/src/IceAssemblerARM32.cpp
+++ b/src/IceAssemblerARM32.cpp
@@ -2133,7 +2133,7 @@ void AssemblerARM32::emitVFPsd(CondARM32::Cond Cond, IValueT Opcode, IValueT Sd,
void AssemblerARM32::vcvtsd(const Operand *OpSd, const Operand *OpDm,
CondARM32::Cond Cond) {
- constexpr const char *Vcvtsd = "vctsd";
+ constexpr const char *Vcvtsd = "vcvtsd";
IValueT Sd = encodeSRegister(OpSd, "Sd", Vcvtsd);
IValueT Dm = encodeDRegister(OpDm, "Dm", Vcvtsd);
constexpr IValueT VcvtsdOpcode =
@@ -2141,6 +2141,21 @@ void AssemblerARM32::vcvtsd(const Operand *OpSd, const Operand *OpDm,
emitVFPsd(Cond, VcvtsdOpcode, Sd, Dm);
}
+void AssemblerARM32::vcvtis(const Operand *OpSd, const Operand *OpSm,
+ CondARM32::Cond Cond) {
+ // VCVT (between floating-point and integer, Floating-point)
+ // - ARM Section A8.8.306, encoding A1:
+ // vcvt<c>.s32.f32 <Sd>, <Sm>
+ //
+ // cccc11101D111101dddd10101M0mmmm where cccc=Cond, ddddD=Sd, and mmmmM=Sm.
+ constexpr const char *Vcvtis = "vcvtis";
+ IValueT Sd = encodeSRegister(OpSd, "Sd", Vcvtis);
+ IValueT Sm = encodeSRegister(OpSm, "Sm", Vcvtis);
+ constexpr IValueT VcvtsiOpcode = B23 | B21 | B20 | B19 | B18 | B16 | B7 | B6;
+ constexpr IValueT S0 = 0;
+ emitVFPsss(Cond, VcvtsiOpcode, Sd, S0, Sm);
+}
+
void AssemblerARM32::emitVFPds(CondARM32::Cond Cond, IValueT Opcode, IValueT Dd,
IValueT Sm) {
assert(Dd < RegARM32::getNumDRegs());
« no previous file with comments | « src/IceAssemblerARM32.h ('k') | src/IceInstARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698