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

Side by Side Diff: src/IceTargetLoweringX8664.cpp

Issue 1691193002: Subzero: Prototype to make use of RegNumT::No Register more concise (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: changes suggested by stichnot Created 4 years, 10 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/IceTargetLoweringX8632Traits.h ('k') | src/IceTargetLoweringX8664Traits.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/IceTargetLoweringX8664.cpp - x86-64 lowering -----------===// 1 //===- subzero/src/IceTargetLoweringX8664.cpp - x86-64 lowering -----------===//
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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 if (Offset != nullptr) { 412 if (Offset != nullptr) {
413 if (const auto *CR = llvm::dyn_cast<ConstantRelocatable>(Offset)) { 413 if (const auto *CR = llvm::dyn_cast<ConstantRelocatable>(Offset)) {
414 NeedsLea = CR->getName() != "" || CR->getOffset() < 0; 414 NeedsLea = CR->getName() != "" || CR->getOffset() < 0;
415 } else if (const auto *Imm = llvm::dyn_cast<ConstantInteger32>(Offset)) { 415 } else if (const auto *Imm = llvm::dyn_cast<ConstantInteger32>(Offset)) {
416 NeedsLea = Imm->getValue() < 0; 416 NeedsLea = Imm->getValue() < 0;
417 } else { 417 } else {
418 llvm::report_fatal_error("Unexpected Offset type."); 418 llvm::report_fatal_error("Unexpected Offset type.");
419 } 419 }
420 } 420 }
421 421
422 auto RegNum = RegNumT::NoRegister; 422 RegNumT RegNum, RegNum32;
423 auto RegNum32 = RegNumT::NoRegister;
424 if (T != nullptr) { 423 if (T != nullptr) {
425 if (T->hasReg()) { 424 if (T->hasReg()) {
426 RegNum = Traits::getGprForType(IceType_i64, T->getRegNum()); 425 RegNum = Traits::getGprForType(IceType_i64, T->getRegNum());
427 RegNum32 = Traits::getGprForType(IceType_i32, RegNum); 426 RegNum32 = Traits::getGprForType(IceType_i32, RegNum);
428 // At this point, if T was assigned to rsp/rbp, then we would have already 427 // At this point, if T was assigned to rsp/rbp, then we would have already
429 // made this the ZeroReg. 428 // made this the ZeroReg.
430 assert(RegNum != Traits::RegisterSet::Reg_rsp); 429 assert(RegNum != Traits::RegisterSet::Reg_rsp);
431 assert(RegNum != Traits::RegisterSet::Reg_rbp); 430 assert(RegNum != Traits::RegisterSet::Reg_rbp);
432 } 431 }
433 432
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \ 805 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \
807 static_assert(_table1_##tag == _table2_##tag, \ 806 static_assert(_table1_##tag == _table2_##tag, \
808 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE"); 807 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE");
809 ICETYPE_TABLE 808 ICETYPE_TABLE
810 #undef X 809 #undef X
811 } // end of namespace dummy3 810 } // end of namespace dummy3
812 } // end of anonymous namespace 811 } // end of anonymous namespace
813 812
814 } // end of namespace X8664 813 } // end of namespace X8664
815 } // end of namespace Ice 814 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8632Traits.h ('k') | src/IceTargetLoweringX8664Traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698