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

Unified Diff: src/IceInstARM32.cpp

Issue 1647683002: Add vmov between integers and floats in ARM 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/IceAssemblerARM32.cpp ('k') | tests_lit/assembler/arm32/vmov-f2i.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 9ca108508243094173de152c7b6492038afb20b3..0bfa540907795b7732e111aa39b8c084147b75bf 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -1209,15 +1209,30 @@ void InstARM32Mov::emitIASCoreVFPMove(const Cfg *Func) const {
// Move register to register.
Variable *Dest = getDest();
+ // TODO(kschimpf) Consider merging methods emitIAS.. methods into
+ // a single case statement.
switch (Dest->getType()) {
default:
// TODO(kschimpf): Fill this out more.
return Asm->setNeedsTextFixup();
+ case IceType_i1:
+ case IceType_i8:
+ case IceType_i16:
+ case IceType_i32:
+ assert(Src0->getType() == IceType_f32 && "Expected int to float move");
+ Asm->vmovrs(Dest, Src0, getPredicate());
+ return;
+ case IceType_i64:
+ assert(false && "i64 to float moves not handled here!");
+ return;
case IceType_f32:
switch (Src0->getType()) {
default:
- // TODO(kschimpf): Fill this out more?
- return Asm->setNeedsTextFixup();
+ assert(false && "Expected float to int move");
+ return;
+ case IceType_i1:
+ case IceType_i8:
+ case IceType_i16:
case IceType_i32:
return Asm->vmovsr(Dest, Src0, getPredicate());
}
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | tests_lit/assembler/arm32/vmov-f2i.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698