mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Partial code for emitting thread local bss data.
llvm-svn: 104197
This commit is contained in:
parent
e7a42798bc
commit
1a7bc06b28
@ -303,6 +303,7 @@ namespace llvm {
|
|||||||
// Accessors.
|
// Accessors.
|
||||||
//
|
//
|
||||||
bool hasMachoZeroFillDirective() const { return HasMachoZeroFillDirective; }
|
bool hasMachoZeroFillDirective() const { return HasMachoZeroFillDirective; }
|
||||||
|
bool hasMachoTBSSDirective() const { return HasMachoTBSSDirective; }
|
||||||
bool hasStaticCtorDtorReferenceInStaticMode() const {
|
bool hasStaticCtorDtorReferenceInStaticMode() const {
|
||||||
return HasStaticCtorDtorReferenceInStaticMode;
|
return HasStaticCtorDtorReferenceInStaticMode;
|
||||||
}
|
}
|
||||||
|
@ -310,6 +310,13 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
|
|||||||
OutStreamer.EmitZerofill(TheSection, GVSym, Size, 1 << AlignLog);
|
OutStreamer.EmitZerofill(TheSection, GVSym, Size, 1 << AlignLog);
|
||||||
return;
|
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);
|
OutStreamer.SwitchSection(TheSection);
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ using namespace llvm;
|
|||||||
MCAsmInfo::MCAsmInfo() {
|
MCAsmInfo::MCAsmInfo() {
|
||||||
HasSubsectionsViaSymbols = false;
|
HasSubsectionsViaSymbols = false;
|
||||||
HasMachoZeroFillDirective = false;
|
HasMachoZeroFillDirective = false;
|
||||||
|
HasMachoTBSSDirective = false;
|
||||||
HasStaticCtorDtorReferenceInStaticMode = false;
|
HasStaticCtorDtorReferenceInStaticMode = false;
|
||||||
MaxInstLength = 4;
|
MaxInstLength = 4;
|
||||||
PCSymbol = "$";
|
PCSymbol = "$";
|
||||||
|
@ -35,6 +35,7 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() {
|
|||||||
WeakRefDirective = "\t.weak_reference ";
|
WeakRefDirective = "\t.weak_reference ";
|
||||||
ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
|
ZeroDirective = "\t.space\t"; // ".space N" emits N zeros.
|
||||||
HasMachoZeroFillDirective = true; // Uses .zerofill
|
HasMachoZeroFillDirective = true; // Uses .zerofill
|
||||||
|
HasMachoTBSSDirective = true; // Uses .tbss
|
||||||
HasStaticCtorDtorReferenceInStaticMode = true;
|
HasStaticCtorDtorReferenceInStaticMode = true;
|
||||||
|
|
||||||
HiddenVisibilityAttr = MCSA_PrivateExtern;
|
HiddenVisibilityAttr = MCSA_PrivateExtern;
|
||||||
|
Loading…
Reference in New Issue
Block a user