forked from OSchip/llvm-project
[MC][Target][XCOFF] Consolidate MCAsmInfo XCOFF defaults; NFC
The setting of `MCAsmInfo` properties for XCOFF got split between `MCAsmInfoXCOFF` and `PPCXCOFFMCAsmInfo`. Except for the properties that are dependent on the target information being passed via the constructor, the properties being set in `PPCXCOFFMCAsmInfo` had no fundamental reason for being treated as specific for XCOFF on PowerPC. Indeed, the property that might be considered more specific to PowerPC, `NeedsFunctionDescriptors`, was set in `MCAsmInfoXCOFF`. XCOFF being specific to PowerPC anyway, this patch consolidates the setting of the properties into `MCAsmInfoXCOFF` except for the cases that are dependent on the information provided via the `PPCXCOFFMCAsmInfo` constructor. This patch also reorders the assignments to the fields to match the declaration order in `MCAsmInfo`.
This commit is contained in:
parent
5d806e254e
commit
a3515ab8af
|
@ -14,17 +14,21 @@ void MCAsmInfoXCOFF::anchor() {}
|
|||
|
||||
MCAsmInfoXCOFF::MCAsmInfoXCOFF() {
|
||||
IsLittleEndian = false;
|
||||
HasDotTypeDotSizeDirective = false;
|
||||
HasDotExternDirective = true;
|
||||
COMMDirectiveAlignmentIsInBytes = false;
|
||||
LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
|
||||
SupportsQuotedNames = false;
|
||||
UseDotAlignForAlignment = true;
|
||||
ZeroDirective = "\t.space\t";
|
||||
ZeroDirectiveSupportsNonZeroValue = false;
|
||||
AsciiDirective = nullptr; // not supported
|
||||
AscizDirective = nullptr; // not supported
|
||||
NeedsFunctionDescriptors = true;
|
||||
HasDotLGloblDirective = true;
|
||||
Data64bitsDirective = "\t.llong\t";
|
||||
SupportsQuotedNames = false;
|
||||
COMMDirectiveAlignmentIsInBytes = false;
|
||||
LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
|
||||
HasDotTypeDotSizeDirective = false;
|
||||
HasDotExternDirective = true;
|
||||
HasDotLGloblDirective = true;
|
||||
SymbolsHaveSMC = true;
|
||||
UseIntegratedAssembler = false;
|
||||
NeedsFunctionDescriptors = true;
|
||||
}
|
||||
|
||||
bool MCAsmInfoXCOFF::isAcceptableChar(char C) const {
|
||||
|
|
|
@ -58,8 +58,4 @@ void PPCXCOFFMCAsmInfo::anchor() {}
|
|||
PPCXCOFFMCAsmInfo::PPCXCOFFMCAsmInfo(bool Is64Bit, const Triple &T) {
|
||||
assert(!IsLittleEndian && "Little-endian XCOFF not supported.");
|
||||
CodePointerSize = CalleeSaveStackSlotSize = Is64Bit ? 8 : 4;
|
||||
ZeroDirective = "\t.space\t";
|
||||
ZeroDirectiveSupportsNonZeroValue = false;
|
||||
SymbolsHaveSMC = true;
|
||||
UseIntegratedAssembler = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue