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

Unified Diff: src/IceInstARM32.cpp

Issue 1564393002: Add VCMP{s,sz,d,dz} Instructions to ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. 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/IceInstARM32.h ('k') | tests_lit/assembler/arm32/vcmp.ll » ('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 b4214bc77da3477590d61fec99f2ec626321a1fd..075dd4d2c84e1eca9a24b6d6e6901be937feea1d 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -1864,6 +1864,39 @@ void InstARM32Vcmp::emit(const Cfg *Func) const {
getSrc(1)->emit(Func);
}
+void InstARM32Vcmp::emitIAS(const Cfg *Func) const {
+ assert(getSrcSize() == 2);
+ const Operand *Src0 = getSrc(0);
+ const Type Ty = Src0->getType();
+ const Operand *Src1 = getSrc(1);
+ const CondARM32::Cond Cond = getPredicate();
+ auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
+ if (llvm::isa<OperandARM32FlexFpZero>(Src1)) {
+ switch (Ty) {
+ case IceType_f32:
+ Asm->vcmpsz(Src0, Cond);
+ break;
+ case IceType_f64:
+ Asm->vcmpdz(Src0, Cond);
+ break;
+ default:
+ llvm::report_fatal_error("Vcvt on non floating value");
+ }
+ } else {
+ switch (Ty) {
+ case IceType_f32:
+ Asm->vcmps(Src0, Src1, Cond);
+ break;
+ case IceType_f64:
+ Asm->vcmpd(Src0, Src1, Cond);
+ break;
+ default:
+ llvm::report_fatal_error("Vcvt on non floating value");
+ }
+ }
+ assert(!Asm->needsTextFixup());
+}
+
void InstARM32Vcmp::dump(const Cfg *Func) const {
if (!BuildDefs::dump())
return;
« no previous file with comments | « src/IceInstARM32.h ('k') | tests_lit/assembler/arm32/vcmp.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698