本文整理汇总了C++中MCSectionData::setBundleLockState方法的典型用法代码示例。如果您正苦于以下问题:C++ MCSectionData::setBundleLockState方法的具体用法?C++ MCSectionData::setBundleLockState怎么用?C++ MCSectionData::setBundleLockState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MCSectionData
的用法示例。
在下文中一共展示了MCSectionData::setBundleLockState方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EmitBundleUnlock
void MCELFStreamer::EmitBundleUnlock() {
MCSectionData *SD = getCurrentSectionData();
// Sanity checks
if (!getAssembler().isBundlingEnabled())
report_fatal_error(".bundle_unlock forbidden when bundling is disabled");
else if (!SD->isBundleLocked())
report_fatal_error(".bundle_unlock without matching lock");
else if (SD->isBundleGroupBeforeFirstInst())
report_fatal_error("Empty bundle-locked group is forbidden");
// When the -mc-relax-all flag is used, we emit instructions to fragments
// stored on a stack. When the bundle unlock is emited, we pop a fragment
// from the stack a merge it to the one below.
if (getAssembler().getRelaxAll()) {
assert(!BundleGroups.empty() && "There are no bundle groups");
MCDataFragment *DF = BundleGroups.back();
// FIXME: Use BundleGroups to track the lock state instead.
SD->setBundleLockState(MCSectionData::NotBundleLocked);
// FIXME: Use more separate fragments for nested groups.
if (!SD->isBundleLocked()) {
mergeFragment(getOrCreateDataFragment(), DF);
BundleGroups.pop_back();
delete DF;
}
if (SD->getBundleLockState() != MCSectionData::BundleLockedAlignToEnd)
getOrCreateDataFragment()->setAlignToBundleEnd(false);
} else
SD->setBundleLockState(MCSectionData::NotBundleLocked);
}
示例2: EmitBundleUnlock
void MCELFStreamer::EmitBundleUnlock() {
MCSectionData *SD = getCurrentSectionData();
// Sanity checks
if (!getAssembler().isBundlingEnabled())
report_fatal_error(".bundle_unlock forbidden when bundling is disabled");
else if (!SD->isBundleLocked())
report_fatal_error(".bundle_unlock without matching lock");
else if (SD->isBundleGroupBeforeFirstInst())
report_fatal_error("Empty bundle-locked group is forbidden");
SD->setBundleLockState(MCSectionData::NotBundleLocked);
}
示例3: EmitBundleLock
void MCELFStreamer::EmitBundleLock(bool AlignToEnd) {
MCSectionData *SD = getCurrentSectionData();
// Sanity checks
//
if (!getAssembler().isBundlingEnabled())
report_fatal_error(".bundle_lock forbidden when bundling is disabled");
if (!SD->isBundleLocked())
SD->setBundleGroupBeforeFirstInst(true);
SD->setBundleLockState(AlignToEnd ? MCSectionData::BundleLockedAlignToEnd :
MCSectionData::BundleLocked);
}
示例4: EmitBundleLock
void MCELFStreamer::EmitBundleLock(bool AlignToEnd) {
MCSectionData *SD = getCurrentSectionData();
// Sanity checks
//
if (!getAssembler().isBundlingEnabled())
report_fatal_error(".bundle_lock forbidden when bundling is disabled");
if (!SD->isBundleLocked())
SD->setBundleGroupBeforeFirstInst(true);
if (getAssembler().getRelaxAll() && !SD->isBundleLocked()) {
// TODO: drop the lock state and set directly in the fragment
MCDataFragment *DF = new MCDataFragment();
BundleGroups.push_back(DF);
}
SD->setBundleLockState(AlignToEnd ? MCSectionData::BundleLockedAlignToEnd :
MCSectionData::BundleLocked);
}