| OLD | NEW |
| 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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 | 405 |
| 406 // NeedsLea is a flags indicating whether Mem needs to be materialized to a | 406 // NeedsLea is a flags indicating whether Mem needs to be materialized to a |
| 407 // GPR prior to being used. A LEA is needed if Mem.Offset is a constant | 407 // GPR prior to being used. A LEA is needed if Mem.Offset is a constant |
| 408 // relocatable, or if Mem.Offset is negative. In both these cases, the LEA is | 408 // relocatable, or if Mem.Offset is negative. In both these cases, the LEA is |
| 409 // needed to ensure the sandboxed memory operand will only use the lower | 409 // needed to ensure the sandboxed memory operand will only use the lower |
| 410 // 32-bits of T+Offset. | 410 // 32-bits of T+Offset. |
| 411 bool NeedsLea = false; | 411 bool NeedsLea = false; |
| 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::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 int32_t RegNum = Variable::NoRegister; | 422 int32_t RegNum = Variable::NoRegister; |
| 423 int32_t RegNum32 = Variable::NoRegister; | 423 int32_t RegNum32 = Variable::NoRegister; |
| 424 if (T != nullptr) { | 424 if (T != nullptr) { |
| 425 if (T->hasReg()) { | 425 if (T->hasReg()) { |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \ | 806 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \ |
| 807 static_assert(_table1_##tag == _table2_##tag, \ | 807 static_assert(_table1_##tag == _table2_##tag, \ |
| 808 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE"); | 808 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE"); |
| 809 ICETYPE_TABLE | 809 ICETYPE_TABLE |
| 810 #undef X | 810 #undef X |
| 811 } // end of namespace dummy3 | 811 } // end of namespace dummy3 |
| 812 } // end of anonymous namespace | 812 } // end of anonymous namespace |
| 813 | 813 |
| 814 } // end of namespace X8664 | 814 } // end of namespace X8664 |
| 815 } // end of namespace Ice | 815 } // end of namespace Ice |
| OLD | NEW |