mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
don't mask out the small flag and then reapply it later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76666 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
27391795ac
commit
1ab78b03e8
@ -71,31 +71,17 @@ XCoreTargetAsmInfo::XCoreTargetAsmInfo(const XCoreTargetMachine &TM)
|
||||
unsigned XCoreTargetAsmInfo::
|
||||
SectionFlagsForGlobal(const GlobalValue *GV, const char* Name) const {
|
||||
unsigned Flags = ELFTargetAsmInfo::SectionFlagsForGlobal(GV, Name);
|
||||
// Mask out unsupported flags
|
||||
Flags &= ~SectionFlags::Small;
|
||||
|
||||
// Set CP / DP relative flags
|
||||
if (GV) {
|
||||
SectionKind::Kind Kind = SectionKindForGlobal(GV);
|
||||
switch (Kind) {
|
||||
case SectionKind::ThreadData:
|
||||
case SectionKind::ThreadBSS:
|
||||
case SectionKind::Data:
|
||||
case SectionKind::BSS:
|
||||
case SectionKind::SmallData:
|
||||
case SectionKind::SmallBSS:
|
||||
Flags |= SectionFlags::Small;
|
||||
break;
|
||||
case SectionKind::ROData:
|
||||
case SectionKind::RODataMergeStr:
|
||||
case SectionKind::SmallROData:
|
||||
if (Subtarget->isXS1A()) {
|
||||
if (Subtarget->isXS1A())
|
||||
Flags |= SectionFlags::Writeable;
|
||||
}
|
||||
Flags |=SectionFlags::Small;
|
||||
break;
|
||||
case SectionKind::RODataMergeConst:
|
||||
Flags |=SectionFlags::Small;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user