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

Side by Side Diff: src/IceTargetLoweringX8664.cpp

Issue 1852713004: Subzero: Fix a cleanup error after the IceString removal CL. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: 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 | « Makefile.standalone ('k') | no next file » | 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 // NeedLea below.) 399 // NeedLea below.)
400 if (Shift == 0 && isAssignedToRspOrRbp(Index) && ZeroReg == RebasePtr) { 400 if (Shift == 0 && isAssignedToRspOrRbp(Index) && ZeroReg == RebasePtr) {
401 ZeroReg = Index; 401 ZeroReg = Index;
402 } else { 402 } else {
403 T = Index; 403 T = Index;
404 Shift = Mem->getShift(); 404 Shift = Mem->getShift();
405 } 405 }
406 } 406 }
407 } 407 }
408 408
409 // NeedsLea is a flags indicating whether Mem needs to be materialized to a 409 // NeedsLea is a flag indicating whether Mem needs to be materialized to a GPR
410 // GPR prior to being used. A LEA is needed if Mem.Offset is a constant 410 // prior to being used. A LEA is needed if Mem.Offset is a constant
411 // relocatable, or if Mem.Offset is negative. In both these cases, the LEA is 411 // relocatable, or if Mem.Offset is negative. In both these cases, the LEA is
412 // needed to ensure the sandboxed memory operand will only use the lower 412 // needed to ensure the sandboxed memory operand will only use the lower
413 // 32-bits of T+Offset. 413 // 32-bits of T+Offset.
414 bool NeedsLea = false; 414 bool NeedsLea = false;
415 if (Offset != nullptr) { 415 if (Offset != nullptr) {
416 if (const auto *CR = llvm::dyn_cast<ConstantRelocatable>(Offset)) { 416 if (llvm::isa<ConstantRelocatable>(Offset)) {
417 NeedsLea = CR->getOffset() < 0; 417 NeedsLea = true;
418 } else if (const auto *Imm = llvm::dyn_cast<ConstantInteger32>(Offset)) { 418 } else if (const auto *Imm = llvm::dyn_cast<ConstantInteger32>(Offset)) {
419 NeedsLea = Imm->getValue() < 0; 419 NeedsLea = Imm->getValue() < 0;
420 } else { 420 } else {
421 llvm::report_fatal_error("Unexpected Offset type."); 421 llvm::report_fatal_error("Unexpected Offset type.");
422 } 422 }
423 } 423 }
424 424
425 RegNumT RegNum, RegNum32; 425 RegNumT RegNum, RegNum32;
426 if (T != nullptr) { 426 if (T != nullptr) {
427 if (T->hasReg()) { 427 if (T->hasReg()) {
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \ 810 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \
811 static_assert(_table1_##tag == _table2_##tag, \ 811 static_assert(_table1_##tag == _table2_##tag, \
812 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE"); 812 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE");
813 ICETYPE_TABLE 813 ICETYPE_TABLE
814 #undef X 814 #undef X
815 } // end of namespace dummy3 815 } // end of namespace dummy3
816 } // end of anonymous namespace 816 } // end of anonymous namespace
817 817
818 } // end of namespace X8664 818 } // end of namespace X8664
819 } // end of namespace Ice 819 } // end of namespace Ice
OLDNEW
« no previous file with comments | « Makefile.standalone ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698