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

Side by Side Diff: src/IceCfgNode.cpp

Issue 1407273006: Generate block labels in the ARM hybrid assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nit. 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/IceAssemblerX86BaseImpl.h ('k') | src/IceInstARM32.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/IceCfgNode.cpp - Basic block (node) implementation -----===// 1 //===- subzero/src/IceCfgNode.cpp - Basic block (node) 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 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 }; 1177 };
1178 1178
1179 } // end of anonymous namespace 1179 } // end of anonymous namespace
1180 1180
1181 void CfgNode::emitIAS(Cfg *Func) const { 1181 void CfgNode::emitIAS(Cfg *Func) const {
1182 Func->setCurrentNode(this); 1182 Func->setCurrentNode(this);
1183 Assembler *Asm = Func->getAssembler<>(); 1183 Assembler *Asm = Func->getAssembler<>();
1184 // TODO(stichnot): When sandboxing, defer binding the node label until just 1184 // TODO(stichnot): When sandboxing, defer binding the node label until just
1185 // before the first instruction is emitted, to reduce the chance that a 1185 // before the first instruction is emitted, to reduce the chance that a
1186 // padding nop is a branch target. 1186 // padding nop is a branch target.
1187 Asm->bindCfgNodeLabel(getIndex()); 1187 Asm->bindCfgNodeLabel(this);
1188 for (const Inst &I : Phis) { 1188 for (const Inst &I : Phis) {
1189 if (I.isDeleted()) 1189 if (I.isDeleted())
1190 continue; 1190 continue;
1191 // Emitting a Phi instruction should cause an error. 1191 // Emitting a Phi instruction should cause an error.
1192 I.emitIAS(Func); 1192 I.emitIAS(Func);
1193 } 1193 }
1194 1194
1195 // Do the simple emission if not sandboxed. 1195 // Do the simple emission if not sandboxed.
1196 if (!Func->getContext()->getFlags().getUseSandboxing()) { 1196 if (!Func->getContext()->getFlags().getUseSandboxing()) {
1197 for (const Inst &I : Insts) { 1197 for (const Inst &I : Insts) {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 InstIntrinsicCall *Inst = InstIntrinsicCall::create( 1392 InstIntrinsicCall *Inst = InstIntrinsicCall::create(
1393 Func, 5, Func->makeVariable(IceType_i64), RMWI64Name, Info->Info); 1393 Func, 5, Func->makeVariable(IceType_i64), RMWI64Name, Info->Info);
1394 Inst->addArg(AtomicRMWOp); 1394 Inst->addArg(AtomicRMWOp);
1395 Inst->addArg(Counter); 1395 Inst->addArg(Counter);
1396 Inst->addArg(One); 1396 Inst->addArg(One);
1397 Inst->addArg(OrderAcquireRelease); 1397 Inst->addArg(OrderAcquireRelease);
1398 Insts.push_front(Inst); 1398 Insts.push_front(Inst);
1399 } 1399 }
1400 1400
1401 } // end of namespace Ice 1401 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceAssemblerX86BaseImpl.h ('k') | src/IceInstARM32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698