| 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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 // ConstantName + Offset | 618 // ConstantName + Offset |
| 619 // | 619 // |
| 620 // ReturnReloc has an offset that is only known during binary emission. | 620 // ReturnReloc has an offset that is only known during binary emission. |
| 621 // Therefore, we set a custom emit string for ReturnReloc that will be | 621 // Therefore, we set a custom emit string for ReturnReloc that will be |
| 622 // used instead. In this particular case, the code will be emitted as | 622 // used instead. In this particular case, the code will be emitted as |
| 623 // | 623 // |
| 624 // push .after_call | 624 // push .after_call |
| 625 InstX86Label *ReturnAddress = InstX86Label::create(Func, this); | 625 InstX86Label *ReturnAddress = InstX86Label::create(Func, this); |
| 626 auto *ReturnRelocOffset = RelocOffset::create(Ctx); | 626 auto *ReturnRelocOffset = RelocOffset::create(Ctx); |
| 627 ReturnAddress->setRelocOffset(ReturnRelocOffset); | 627 ReturnAddress->setRelocOffset(ReturnRelocOffset); |
| 628 constexpr bool SuppressMangling = true; | |
| 629 constexpr RelocOffsetT NoFixedOffset = 0; | 628 constexpr RelocOffsetT NoFixedOffset = 0; |
| 630 const IceString EmitString = ReturnAddress->getName(Func); | 629 const IceString EmitString = ReturnAddress->getName(Func); |
| 631 auto *ReturnReloc = llvm::cast<ConstantRelocatable>( | 630 auto *ReturnReloc = llvm::cast<ConstantRelocatable>( |
| 632 Ctx->getConstantSym(NoFixedOffset, {ReturnRelocOffset}, | 631 Ctx->getConstantSym(NoFixedOffset, {ReturnRelocOffset}, |
| 633 Ctx->mangleName(Func->getFunctionName()), | 632 Func->getFunctionName(), EmitString)); |
| 634 EmitString, SuppressMangling)); | |
| 635 /* AutoBundle scoping */ { | 633 /* AutoBundle scoping */ { |
| 636 std::unique_ptr<AutoBundle> Bundler; | 634 std::unique_ptr<AutoBundle> Bundler; |
| 637 if (CallTargetR == nullptr) { | 635 if (CallTargetR == nullptr) { |
| 638 Bundler = makeUnique<AutoBundle>(this, InstBundleLock::Opt_PadToEnd); | 636 Bundler = makeUnique<AutoBundle>(this, InstBundleLock::Opt_PadToEnd); |
| 639 _push(ReturnReloc); | 637 _push(ReturnReloc); |
| 640 } else { | 638 } else { |
| 641 Variable *T = makeReg(IceType_i32); | 639 Variable *T = makeReg(IceType_i32); |
| 642 Variable *T64 = makeReg(IceType_i64); | 640 Variable *T64 = makeReg(IceType_i64); |
| 643 Variable *r15 = | 641 Variable *r15 = |
| 644 getPhysicalRegister(Traits::RegisterSet::Reg_r15, IceType_i64); | 642 getPhysicalRegister(Traits::RegisterSet::Reg_r15, IceType_i64); |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \ | 805 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \ |
| 808 static_assert(_table1_##tag == _table2_##tag, \ | 806 static_assert(_table1_##tag == _table2_##tag, \ |
| 809 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE"); | 807 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE"); |
| 810 ICETYPE_TABLE | 808 ICETYPE_TABLE |
| 811 #undef X | 809 #undef X |
| 812 } // end of namespace dummy3 | 810 } // end of namespace dummy3 |
| 813 } // end of anonymous namespace | 811 } // end of anonymous namespace |
| 814 | 812 |
| 815 } // end of namespace X8664 | 813 } // end of namespace X8664 |
| 816 } // end of namespace Ice | 814 } // end of namespace Ice |
| OLD | NEW |