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

Side by Side Diff: src/IceInstX8664.cpp

Issue 1605103002: Subzero. X86. Refactors Address Mode formation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: make format 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 | « no previous file | 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/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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 } else { 263 } else {
264 llvm_unreachable("Unexpected offset type"); 264 llvm_unreachable("Unexpected offset type");
265 } 265 }
266 } 266 }
267 267
268 // Now convert to the various possible forms. 268 // Now convert to the various possible forms.
269 if (getBase() && getIndex()) { 269 if (getBase() && getIndex()) {
270 const bool NeedSandboxing = Target->needSandboxing(); 270 const bool NeedSandboxing = Target->needSandboxing();
271 (void)NeedSandboxing; 271 (void)NeedSandboxing;
272 assert(!NeedSandboxing || IsLeaAddr || 272 assert(!NeedSandboxing || IsLeaAddr ||
273 (getBase()->getRegNum() == Traits::RegisterSet::Reg_r15)); 273 (getBase()->getRegNum() == Traits::RegisterSet::Reg_r15) ||
274 (getBase()->getRegNum() == Traits::RegisterSet::Reg_rsp) ||
275 (getBase()->getRegNum() == Traits::RegisterSet::Reg_rbp));
274 return X8664::Traits::Address(getEncodedGPR(getBase()->getRegNum()), 276 return X8664::Traits::Address(getEncodedGPR(getBase()->getRegNum()),
275 getEncodedGPR(getIndex()->getRegNum()), 277 getEncodedGPR(getIndex()->getRegNum()),
276 X8664::Traits::ScaleFactor(getShift()), Disp, 278 X8664::Traits::ScaleFactor(getShift()), Disp,
277 Fixup); 279 Fixup);
278 } 280 }
279 281
280 if (getBase()) { 282 if (getBase()) {
281 return X8664::Traits::Address(getEncodedGPR(getBase()->getRegNum()), Disp, 283 return X8664::Traits::Address(getEncodedGPR(getBase()->getRegNum()), Disp,
282 Fixup); 284 Fixup);
283 } 285 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 Var->dump(Func); 333 Var->dump(Func);
332 else 334 else
333 Var->dump(Str); 335 Var->dump(Str);
334 Str << ")"; 336 Str << ")";
335 } 337 }
336 338
337 } // namespace X8664 339 } // namespace X8664
338 } // end of namespace Ice 340 } // end of namespace Ice
339 341
340 X86INSTS_DEFINE_STATIC_DATA(X8664, X8664::Traits) 342 X86INSTS_DEFINE_STATIC_DATA(X8664, X8664::Traits)
OLDNEW
« no previous file with comments | « no previous file | src/IceTargetLowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698