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

Side by Side Diff: src/IceTargetLoweringX8664.cpp

Issue 1773503003: Subzero: Control memory growth from local label fixups. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Attempt to fix -nonsfi -filetype=iasm -target=arm32 Created 4 years, 9 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/IceOperand.h ('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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 // By default, ConstantRelocatables are emitted (in textual output) as 616 // By default, ConstantRelocatables are emitted (in textual output) as
617 // 617 //
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(Func->getAssembler());
627 ReturnAddress->setRelocOffset(ReturnRelocOffset); 627 ReturnAddress->setRelocOffset(ReturnRelocOffset);
628 constexpr RelocOffsetT NoFixedOffset = 0; 628 constexpr RelocOffsetT NoFixedOffset = 0;
629 const IceString EmitString = ReturnAddress->getName(Func); 629 const IceString EmitString = ReturnAddress->getName(Func);
630 auto *ReturnReloc = llvm::cast<ConstantRelocatable>( 630 auto *ReturnReloc = ConstantRelocatable::create(
631 Ctx->getConstantSym(NoFixedOffset, {ReturnRelocOffset}, 631 Func->getAssembler(), IceType_i32,
632 Func->getFunctionName(), EmitString)); 632 RelocatableTuple(NoFixedOffset, {ReturnRelocOffset},
633 Func->getFunctionName(), EmitString));
633 /* AutoBundle scoping */ { 634 /* AutoBundle scoping */ {
634 std::unique_ptr<AutoBundle> Bundler; 635 std::unique_ptr<AutoBundle> Bundler;
635 if (CallTargetR == nullptr) { 636 if (CallTargetR == nullptr) {
636 Bundler = makeUnique<AutoBundle>(this, InstBundleLock::Opt_PadToEnd); 637 Bundler = makeUnique<AutoBundle>(this, InstBundleLock::Opt_PadToEnd);
637 _push(ReturnReloc); 638 _push(ReturnReloc);
638 } else { 639 } else {
639 Variable *T = makeReg(IceType_i32); 640 Variable *T = makeReg(IceType_i32);
640 Variable *T64 = makeReg(IceType_i64); 641 Variable *T64 = makeReg(IceType_i64);
641 Variable *r15 = 642 Variable *r15 =
642 getPhysicalRegister(Traits::RegisterSet::Reg_r15, IceType_i64); 643 getPhysicalRegister(Traits::RegisterSet::Reg_r15, IceType_i64);
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \ 806 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \
806 static_assert(_table1_##tag == _table2_##tag, \ 807 static_assert(_table1_##tag == _table2_##tag, \
807 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE"); 808 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE");
808 ICETYPE_TABLE 809 ICETYPE_TABLE
809 #undef X 810 #undef X
810 } // end of namespace dummy3 811 } // end of namespace dummy3
811 } // end of anonymous namespace 812 } // end of anonymous namespace
812 813
813 } // end of namespace X8664 814 } // end of namespace X8664
814 } // end of namespace Ice 815 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceOperand.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698