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

Side by Side Diff: src/IceInstARM32.cpp

Issue 1418313003: Handle branch relative to pc in ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 5 years, 1 month 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/IceInstARM32.h ('k') | tests_lit/assembler/arm32/branch-mult-fwd.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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 Str << getTargetTrue()->getAsmName(); 727 Str << getTargetTrue()->getAsmName();
728 if (getTargetFalse()) { 728 if (getTargetFalse()) {
729 Str << "\n\t" 729 Str << "\n\t"
730 << "b" 730 << "b"
731 << "\t" << getTargetFalse()->getAsmName(); 731 << "\t" << getTargetFalse()->getAsmName();
732 } 732 }
733 } 733 }
734 } 734 }
735 } 735 }
736 736
737 void InstARM32Br::emitIAS(const Cfg *Func) const {
738 ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
739 if (Label) {
740 Asm->b(Asm->getOrCreateLocalLabel(Label->getNumber()), getPredicate());
741 } else if (isUnconditionalBranch()) {
742 Asm->b(Asm->getOrCreateCfgNodeLabel(getTargetFalse()->getIndex()),
743 getPredicate());
744 } else {
745 Asm->b(Asm->getOrCreateCfgNodeLabel(getTargetTrue()->getIndex()),
746 getPredicate());
747 Asm->b(Asm->getOrCreateCfgNodeLabel(getTargetFalse()->getIndex()),
748 CondARM32::AL);
749 }
750 if (Asm->needsTextFixup())
751 emitUsingTextFixup(Func);
752 }
753
737 void InstARM32Br::dump(const Cfg *Func) const { 754 void InstARM32Br::dump(const Cfg *Func) const {
738 if (!BuildDefs::dump()) 755 if (!BuildDefs::dump())
739 return; 756 return;
740 Ostream &Str = Func->getContext()->getStrDump(); 757 Ostream &Str = Func->getContext()->getStrDump();
741 Str << "br "; 758 Str << "br ";
742 759
743 if (getPredicate() == CondARM32::AL) { 760 if (getPredicate() == CondARM32::AL) {
744 Str << "label %" 761 Str << "label %"
745 << (Label ? Label->getName(Func) : getTargetFalse()->getName()); 762 << (Label ? Label->getName(Func) : getTargetFalse()->getName());
746 return; 763 return;
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 template class InstARM32ThreeAddrGPR<InstARM32::Udiv>; 1441 template class InstARM32ThreeAddrGPR<InstARM32::Udiv>;
1425 1442
1426 template class InstARM32ThreeAddrFP<InstARM32::Vadd>; 1443 template class InstARM32ThreeAddrFP<InstARM32::Vadd>;
1427 template class InstARM32ThreeAddrFP<InstARM32::Vdiv>; 1444 template class InstARM32ThreeAddrFP<InstARM32::Vdiv>;
1428 template class InstARM32ThreeAddrFP<InstARM32::Vmul>; 1445 template class InstARM32ThreeAddrFP<InstARM32::Vmul>;
1429 template class InstARM32ThreeAddrFP<InstARM32::Vsub>; 1446 template class InstARM32ThreeAddrFP<InstARM32::Vsub>;
1430 1447
1431 template class InstARM32TwoAddrGPR<InstARM32::Movt>; 1448 template class InstARM32TwoAddrGPR<InstARM32::Movt>;
1432 1449
1433 } // end of namespace Ice 1450 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInstARM32.h ('k') | tests_lit/assembler/arm32/branch-mult-fwd.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698