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

Side by Side Diff: src/IceInstARM32.cpp

Issue 1641753003: Fix issues raised in CL 1645683003 by stichnot. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: 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') | no next file » | 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 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 void InstARM32Mov::emitMultiDestSingleSource(const Cfg *Func) const { 1060 void InstARM32Mov::emitMultiDestSingleSource(const Cfg *Func) const {
1061 if (!BuildDefs::dump()) 1061 if (!BuildDefs::dump())
1062 return; 1062 return;
1063 Ostream &Str = Func->getContext()->getStrEmit(); 1063 Ostream &Str = Func->getContext()->getStrEmit();
1064 Variable *DestLo = getDest(); 1064 Variable *DestLo = getDest();
1065 Variable *DestHi = getDestHi(); 1065 Variable *DestHi = getDestHi();
1066 auto *Src = llvm::cast<Variable>(getSrc(0)); 1066 auto *Src = llvm::cast<Variable>(getSrc(0));
1067 1067
1068 assert(DestHi->hasReg()); 1068 assert(DestHi->hasReg());
1069 assert(DestLo->hasReg()); 1069 assert(DestLo->hasReg());
1070 assert(llvm::isa<Variable>(Src) && Src->hasReg()); 1070 assert(Src->hasReg());
1071 1071
1072 Str << "\t" 1072 Str << "\t"
1073 "vmov" << getPredicate() << "\t"; 1073 "vmov" << getPredicate() << "\t";
1074 DestLo->emit(Func); 1074 DestLo->emit(Func);
1075 Str << ", "; 1075 Str << ", ";
1076 DestHi->emit(Func); 1076 DestHi->emit(Func);
1077 Str << ", "; 1077 Str << ", ";
1078 Src->emit(Func); 1078 Src->emit(Func);
1079 } 1079 }
1080 1080
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 1160
1161 void InstARM32Mov::emitIASScalarVFPMove(const Cfg *Func) const { 1161 void InstARM32Mov::emitIASScalarVFPMove(const Cfg *Func) const {
1162 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); 1162 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
1163 Operand *Src0 = getSrc(0); 1163 Operand *Src0 = getSrc(0);
1164 Variable *Dest = getDest(); 1164 Variable *Dest = getDest();
1165 switch (Dest->getType()) { 1165 switch (Dest->getType()) {
1166 default: 1166 default:
1167 assert(false && "Do not know how to emit scalar FP move for type."); 1167 assert(false && "Do not know how to emit scalar FP move for type.");
1168 break; 1168 break;
1169 case IceType_f32: 1169 case IceType_f32:
1170 if (llvm::isa<Variable>(Src0)) { 1170 if (const auto *Var = llvm::dyn_cast<Variable>(Src0)) {
1171 Asm->vmovss(Dest, Src0, getPredicate()); 1171 Asm->vmovss(Dest, Var, getPredicate());
1172 return; 1172 return;
1173 } else if (const auto *FpImm = 1173 } else if (const auto *FpImm =
1174 llvm::dyn_cast<OperandARM32FlexFpImm>(Src0)) { 1174 llvm::dyn_cast<OperandARM32FlexFpImm>(Src0)) {
1175 Asm->vmovs(Dest, FpImm, getPredicate()); 1175 Asm->vmovs(Dest, FpImm, getPredicate());
1176 return; 1176 return;
1177 } 1177 }
1178 assert(!Asm->needsTextFixup()); 1178 assert(!Asm->needsTextFixup());
1179 return; 1179 return;
1180 case IceType_f64: 1180 case IceType_f64:
1181 if (llvm::isa<Variable>(Src0)) { 1181 if (const auto *Var = llvm::dyn_cast<Variable>(Src0)) {
1182 Asm->vmovdd(Dest, Src0, getPredicate()); 1182 Asm->vmovdd(Dest, Var, getPredicate());
1183 return; 1183 return;
1184 } else if (const auto *FpImm = 1184 } else if (const auto *FpImm =
1185 llvm::dyn_cast<OperandARM32FlexFpImm>(Src0)) { 1185 llvm::dyn_cast<OperandARM32FlexFpImm>(Src0)) {
1186 Asm->vmovd(Dest, FpImm, getPredicate()); 1186 Asm->vmovd(Dest, FpImm, getPredicate());
1187 return; 1187 return;
1188 } 1188 }
1189 assert(!Asm->needsTextFixup()); 1189 assert(!Asm->needsTextFixup());
1190 return; 1190 return;
1191 } 1191 }
1192 // TODO(kschimpf) Handle register to register move. 1192 // TODO(kschimpf) Handle register to register move.
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2373 2373
2374 template class InstARM32FourAddrGPR<InstARM32::Mla>; 2374 template class InstARM32FourAddrGPR<InstARM32::Mla>;
2375 template class InstARM32FourAddrGPR<InstARM32::Mls>; 2375 template class InstARM32FourAddrGPR<InstARM32::Mls>;
2376 2376
2377 template class InstARM32CmpLike<InstARM32::Cmn>; 2377 template class InstARM32CmpLike<InstARM32::Cmn>;
2378 template class InstARM32CmpLike<InstARM32::Cmp>; 2378 template class InstARM32CmpLike<InstARM32::Cmp>;
2379 template class InstARM32CmpLike<InstARM32::Tst>; 2379 template class InstARM32CmpLike<InstARM32::Tst>;
2380 2380
2381 } // end of namespace ARM32 2381 } // end of namespace ARM32
2382 } // end of namespace Ice 2382 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698