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

Side by Side Diff: src/IceInstX8664.cpp

Issue 1848303003: Simplify references to command line flags. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 4 years, 8 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/IceInstX8632.cpp ('k') | src/IceInstX86BaseImpl.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/IceInstX8664.cpp - X86-64 instruction implementation ---===// 1 //===- subzero/src/IceInstX8664.cpp - X86-64 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } else if (getOffset() == nullptr && Disp != 0) { 127 } else if (getOffset() == nullptr && Disp != 0) {
128 Str << Disp; 128 Str << Disp;
129 } else if (const auto *CI = llvm::dyn_cast<ConstantInteger32>(Offset)) { 129 } else if (const auto *CI = llvm::dyn_cast<ConstantInteger32>(Offset)) {
130 if (Base == nullptr || CI->getValue() || Disp != 0) 130 if (Base == nullptr || CI->getValue() || Disp != 0)
131 // Emit a non-zero offset without a leading '$'. 131 // Emit a non-zero offset without a leading '$'.
132 Str << CI->getValue() + Disp; 132 Str << CI->getValue() + Disp;
133 } else if (const auto *CR = llvm::dyn_cast<ConstantRelocatable>(Offset)) { 133 } else if (const auto *CR = llvm::dyn_cast<ConstantRelocatable>(Offset)) {
134 // TODO(sehr): ConstantRelocatable still needs updating for 134 // TODO(sehr): ConstantRelocatable still needs updating for
135 // rematerializable base/index and Disp. 135 // rematerializable base/index and Disp.
136 assert(Disp == 0); 136 assert(Disp == 0);
137 const bool UseNonsfi = Func->getContext()->getFlags().getUseNonsfi(); 137 const bool UseNonsfi = getFlags().getUseNonsfi();
138 CR->emitWithoutPrefix(Target, UseNonsfi ? "@GOTOFF" : ""); 138 CR->emitWithoutPrefix(Target, UseNonsfi ? "@GOTOFF" : "");
139 assert(!UseNonsfi); 139 assert(!UseNonsfi);
140 if (Base == nullptr && Index == nullptr) { 140 if (Base == nullptr && Index == nullptr) {
141 // rip-relative addressing. 141 // rip-relative addressing.
142 if (NeedSandboxing) { 142 if (NeedSandboxing) {
143 Str << "(%rip)"; 143 Str << "(%rip)";
144 } else { 144 } else {
145 Str << "(%eip)"; 145 Str << "(%eip)";
146 } 146 }
147 } 147 }
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 Var->dump(Func); 353 Var->dump(Func);
354 else 354 else
355 Var->dump(Str); 355 Var->dump(Str);
356 Str << ")"; 356 Str << ")";
357 } 357 }
358 358
359 } // namespace X8664 359 } // namespace X8664
360 } // end of namespace Ice 360 } // end of namespace Ice
361 361
362 X86INSTS_DEFINE_STATIC_DATA(X8664, X8664::Traits) 362 X86INSTS_DEFINE_STATIC_DATA(X8664, X8664::Traits)
OLDNEW
« no previous file with comments | « src/IceInstX8632.cpp ('k') | src/IceInstX86BaseImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698