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

Side by Side Diff: src/IceInstARM32.cpp

Issue 1397933002: Start incorporating the ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nit and add URL. Created 5 years, 2 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/IceGlobalContext.cpp ('k') | src/IceTargetLowering.h » ('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 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 assert(LR->hasReg()); 962 assert(LR->hasReg());
963 assert(LR->getRegNum() == RegARM32::Reg_lr); 963 assert(LR->getRegNum() == RegARM32::Reg_lr);
964 Ostream &Str = Func->getContext()->getStrEmit(); 964 Ostream &Str = Func->getContext()->getStrEmit();
965 Str << "\t" 965 Str << "\t"
966 << "bx" 966 << "bx"
967 << "\t"; 967 << "\t";
968 LR->emit(Func); 968 LR->emit(Func);
969 } 969 }
970 970
971 void InstARM32Ret::emitIAS(const Cfg *Func) const { 971 void InstARM32Ret::emitIAS(const Cfg *Func) const {
972 (void)Func; 972 ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
973 llvm_unreachable("Not yet implemented"); 973 Asm->bx(RegARM32::Encoded_Reg_lr);
974 } 974 }
975 975
976 void InstARM32Ret::dump(const Cfg *Func) const { 976 void InstARM32Ret::dump(const Cfg *Func) const {
977 if (!BuildDefs::dump()) 977 if (!BuildDefs::dump())
978 return; 978 return;
979 Ostream &Str = Func->getContext()->getStrDump(); 979 Ostream &Str = Func->getContext()->getStrDump();
980 Type Ty = (getSrcSize() == 1 ? IceType_void : getSrc(0)->getType()); 980 Type Ty = (getSrcSize() == 1 ? IceType_void : getSrc(0)->getType());
981 Str << "ret." << Ty << " "; 981 Str << "ret." << Ty << " ";
982 dumpSources(Func); 982 dumpSources(Func);
983 } 983 }
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 if (getShiftOp() != kNoShift) { 1388 if (getShiftOp() != kNoShift) {
1389 Str << ", " << InstARM32ShiftAttributes[getShiftOp()].EmitString << " "; 1389 Str << ", " << InstARM32ShiftAttributes[getShiftOp()].EmitString << " ";
1390 if (Func) 1390 if (Func)
1391 getShiftAmt()->dump(Func); 1391 getShiftAmt()->dump(Func);
1392 else 1392 else
1393 getShiftAmt()->dump(Str); 1393 getShiftAmt()->dump(Str);
1394 } 1394 }
1395 } 1395 }
1396 1396
1397 } // end of namespace Ice 1397 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | src/IceTargetLowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698