mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-15 13:40:33 +00:00
Partial code for emitting thread local bss data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104197 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ff9244a1f1
commit
c1a887d76d
@ -303,6 +303,7 @@ namespace llvm {
|
||||
// Accessors.
|
||||
//
|
||||
bool hasMachoZeroFillDirective() const { return HasMachoZeroFillDirective; }
|
||||
bool hasMachoTBSSDirective() const { return HasMachoTBSSDirective; }
|
||||
bool hasStaticCtorDtorReferenceInStaticMode() const {
|
||||
return HasStaticCtorDtorReferenceInStaticMode;
|
||||
}
|
||||
|
@ -310,6 +310,13 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
|
||||
OutStreamer.EmitZerofill(TheSection, GVSym, Size, 1 << AlignLog);
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle the tbss directive on darwin which is a thread local bss directive
|
||||
// like zerofill.
|
||||
if (GVKind.isThreadBSS() && MAI->hasMachoTBSSDirective()) {
|
||||
OutStreamer.EmitTBSSSymbol(TheSection, GVSym, Size, 1 << AlignLog);
|
||||
return;
|
||||
}
|
||||
|
||||
OutStreamer.SwitchSection(TheSection);
|
||||
|
||||
|
@ -21,6 +21,7 @@ using namespace llvm;
|
||||
MCAsmInfo::MCAsmInfo() {
|
||||
HasSubsectionsViaSymbols = false;
|
||||
HasMachoZeroFillDirective = false;
|
||||
HasMachoTBSSDirective = false;
|
||||
HasStaticCtorDtorReferenceInStaticMode = false;
|
||||
MaxInstLength = 4;
|
||||
PCSymbol = "$";
|
||||
|
@ -35,6 +35,7 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() {
|
||||
WeakRefDirective = "\t.weak_reference ";
|
||||
ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
|
||||
HasMachoZeroFillDirective = true; // Uses .zerofill
|
||||
HasMachoTBSSDirective = true; // Uses .tbss
|
||||
HasStaticCtorDtorReferenceInStaticMode = true;
|
||||
|
||||
HiddenVisibilityAttr = MCSA_PrivateExtern;
|
||||
|
Loading…
x
Reference in New Issue
Block a user