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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | tests_lit/assembler/arm32/vmov-f2i.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceInstARM32.cpp - ARM32 instruction implementation ----===// 1 //===- subzero/src/IceInstARM32.cpp - ARM32 instruction implementation ----===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 1202
1203 void InstARM32Mov::emitIASCoreVFPMove(const Cfg *Func) const { 1203 void InstARM32Mov::emitIASCoreVFPMove(const Cfg *Func) const {
1204 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); 1204 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
1205 Operand *Src0 = getSrc(0); 1205 Operand *Src0 = getSrc(0);
1206 if (!llvm::isa<Variable>(Src0)) 1206 if (!llvm::isa<Variable>(Src0))
1207 // TODO(kschimpf) Handle moving constants into registers. 1207 // TODO(kschimpf) Handle moving constants into registers.
1208 return Asm->setNeedsTextFixup(); 1208 return Asm->setNeedsTextFixup();
1209 1209
1210 // Move register to register. 1210 // Move register to register.
1211 Variable *Dest = getDest(); 1211 Variable *Dest = getDest();
1212 // TODO(kschimpf) Consider merging methods emitIAS.. methods into
1213 // a single case statement.
1212 switch (Dest->getType()) { 1214 switch (Dest->getType()) {
1213 default: 1215 default:
1214 // TODO(kschimpf): Fill this out more. 1216 // TODO(kschimpf): Fill this out more.
1215 return Asm->setNeedsTextFixup(); 1217 return Asm->setNeedsTextFixup();
1218 case IceType_i1:
1219 case IceType_i8:
1220 case IceType_i16:
1221 case IceType_i32:
1222 assert(Src0->getType() == IceType_f32 && "Expected int to float move");
1223 Asm->vmovrs(Dest, Src0, getPredicate());
1224 return;
1225 case IceType_i64:
1226 assert(false && "i64 to float moves not handled here!");
1227 return;
1216 case IceType_f32: 1228 case IceType_f32:
1217 switch (Src0->getType()) { 1229 switch (Src0->getType()) {
1218 default: 1230 default:
1219 // TODO(kschimpf): Fill this out more? 1231 assert(false && "Expected float to int move");
1220 return Asm->setNeedsTextFixup(); 1232 return;
1233 case IceType_i1:
1234 case IceType_i8:
1235 case IceType_i16:
1221 case IceType_i32: 1236 case IceType_i32:
1222 return Asm->vmovsr(Dest, Src0, getPredicate()); 1237 return Asm->vmovsr(Dest, Src0, getPredicate());
1223 } 1238 }
1224 } 1239 }
1225 } 1240 }
1226 1241
1227 void InstARM32Mov::emitIASSingleDestSingleSource(const Cfg *Func) const { 1242 void InstARM32Mov::emitIASSingleDestSingleSource(const Cfg *Func) const {
1228 Variable *Dest = getDest(); 1243 Variable *Dest = getDest();
1229 Operand *Src0 = getSrc(0); 1244 Operand *Src0 = getSrc(0);
1230 1245
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
2379 2394
2380 template class InstARM32FourAddrGPR<InstARM32::Mla>; 2395 template class InstARM32FourAddrGPR<InstARM32::Mla>;
2381 template class InstARM32FourAddrGPR<InstARM32::Mls>; 2396 template class InstARM32FourAddrGPR<InstARM32::Mls>;
2382 2397
2383 template class InstARM32CmpLike<InstARM32::Cmn>; 2398 template class InstARM32CmpLike<InstARM32::Cmn>;
2384 template class InstARM32CmpLike<InstARM32::Cmp>; 2399 template class InstARM32CmpLike<InstARM32::Cmp>;
2385 template class InstARM32CmpLike<InstARM32::Tst>; 2400 template class InstARM32CmpLike<InstARM32::Tst>;
2386 2401
2387 } // end of namespace ARM32 2402 } // end of namespace ARM32
2388 } // end of namespace Ice 2403 } // end of namespace Ice
OLDNEW
« 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