mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
Move bundle info from MCSectionData to MCSection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238143 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -548,27 +548,10 @@ public:
|
||||
typedef FragmentListType::const_reverse_iterator const_reverse_iterator;
|
||||
typedef FragmentListType::reverse_iterator reverse_iterator;
|
||||
|
||||
/// \brief Express the state of bundle locked groups while emitting code.
|
||||
enum BundleLockStateType {
|
||||
NotBundleLocked,
|
||||
BundleLocked,
|
||||
BundleLockedAlignToEnd
|
||||
};
|
||||
|
||||
private:
|
||||
FragmentListType Fragments;
|
||||
MCSection *Section;
|
||||
|
||||
/// \brief Keeping track of bundle-locked state.
|
||||
BundleLockStateType BundleLockState;
|
||||
|
||||
/// \brief Current nesting depth of bundle_lock directives.
|
||||
unsigned BundleLockNestingDepth;
|
||||
|
||||
/// \brief We've seen a bundle_lock directive but not its first instruction
|
||||
/// yet.
|
||||
bool BundleGroupBeforeFirstInst;
|
||||
|
||||
/// \name Assembler Backend Data
|
||||
/// @{
|
||||
//
|
||||
@@ -618,20 +601,6 @@ public:
|
||||
|
||||
iterator getSubsectionInsertionPoint(unsigned Subsection);
|
||||
|
||||
bool isBundleLocked() const { return BundleLockState != NotBundleLocked; }
|
||||
|
||||
BundleLockStateType getBundleLockState() const { return BundleLockState; }
|
||||
|
||||
void setBundleLockState(BundleLockStateType NewState);
|
||||
|
||||
bool isBundleGroupBeforeFirstInst() const {
|
||||
return BundleGroupBeforeFirstInst;
|
||||
}
|
||||
|
||||
void setBundleGroupBeforeFirstInst(bool IsFirst) {
|
||||
BundleGroupBeforeFirstInst = IsFirst;
|
||||
}
|
||||
|
||||
void dump();
|
||||
|
||||
/// @}
|
||||
|
||||
@@ -31,6 +31,13 @@ class MCSection {
|
||||
public:
|
||||
enum SectionVariant { SV_COFF = 0, SV_ELF, SV_MachO };
|
||||
|
||||
/// \brief Express the state of bundle locked groups while emitting code.
|
||||
enum BundleLockStateType {
|
||||
NotBundleLocked,
|
||||
BundleLocked,
|
||||
BundleLockedAlignToEnd
|
||||
};
|
||||
|
||||
private:
|
||||
MCSection(const MCSection &) = delete;
|
||||
void operator=(const MCSection &) = delete;
|
||||
@@ -44,6 +51,16 @@ private:
|
||||
/// The index of this section in the layout order.
|
||||
unsigned LayoutOrder;
|
||||
|
||||
/// \brief Keeping track of bundle-locked state.
|
||||
BundleLockStateType BundleLockState = NotBundleLocked;
|
||||
|
||||
/// \brief Current nesting depth of bundle_lock directives.
|
||||
unsigned BundleLockNestingDepth = 0;
|
||||
|
||||
/// \brief We've seen a bundle_lock directive but not its first instruction
|
||||
/// yet.
|
||||
bool BundleGroupBeforeFirstInst = false;
|
||||
|
||||
protected:
|
||||
MCSection(SectionVariant V, SectionKind K, MCSymbol *Begin)
|
||||
: Begin(Begin), Variant(V), Kind(K) {}
|
||||
@@ -77,6 +94,17 @@ public:
|
||||
unsigned getLayoutOrder() const { return LayoutOrder; }
|
||||
void setLayoutOrder(unsigned Value) { LayoutOrder = Value; }
|
||||
|
||||
BundleLockStateType getBundleLockState() const { return BundleLockState; }
|
||||
void setBundleLockState(BundleLockStateType NewState);
|
||||
bool isBundleLocked() const { return BundleLockState != NotBundleLocked; }
|
||||
|
||||
bool isBundleGroupBeforeFirstInst() const {
|
||||
return BundleGroupBeforeFirstInst;
|
||||
}
|
||||
void setBundleGroupBeforeFirstInst(bool IsFirst) {
|
||||
BundleGroupBeforeFirstInst = IsFirst;
|
||||
}
|
||||
|
||||
virtual void PrintSwitchToSection(const MCAsmInfo &MAI, raw_ostream &OS,
|
||||
const MCExpr *Subsection) const = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user