2019-07-10 03:21:01 +08:00
|
|
|
//===- MC/MCAsmInfoXCOFF.cpp - XCOFF asm properties ------------ *- C++ -*-===//
|
|
|
|
//
|
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "llvm/MC/MCAsmInfoXCOFF.h"
|
|
|
|
|
|
|
|
using namespace llvm;
|
|
|
|
|
|
|
|
void MCAsmInfoXCOFF::anchor() {}
|
|
|
|
|
|
|
|
MCAsmInfoXCOFF::MCAsmInfoXCOFF() {
|
|
|
|
IsLittleEndian = false;
|
|
|
|
HasDotTypeDotSizeDirective = false;
|
2019-07-23 03:15:29 +08:00
|
|
|
COMMDirectiveAlignmentIsInBytes = false;
|
Enable assembly output of local commons for AIX
Summary:
This patch enable assembly output of local commons for AIX using .lcomm
directives. Adds a EmitXCOFFLocalCommonSymbol to MCStreamer so we can emit the
AIX version of .lcomm assembly directives which include a csect name. Handle the
case of BSS locals in PPCAIXAsmPrinter by using EmitXCOFFLocalCommonSymbol. Adds
a test for generating .lcomm on AIX Targets.
Reviewers: cebowleratibm, hubert.reinterpretcast, Xiangling_L, jasonliu, sfertile
Reviewed By: sfertile
Subscribers: wuzish, nemanjai, hiraditya, kbarton, MaskRay, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64825
llvm-svn: 368306
2019-08-08 23:40:35 +08:00
|
|
|
LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
|
[PowerPC][AIX] Adds support for writing the .data section in assembly files
Summary:
Adds support for generating the .data section in assembly files for global variables with a non-zero initialization. The support for writing the .data section in XCOFF object files will be added in a follow-on patch. Any relocations are not included in this patch.
Reviewers: hubert.reinterpretcast, sfertile, jasonliu, daltenty, Xiangling_L
Reviewed by: hubert.reinterpretcast
Subscribers: nemanjai, hiraditya, kbarton, MaskRay, jsji, wuzish, shchenz, DiggerLin, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66154
llvm-svn: 369869
2019-08-25 23:17:25 +08:00
|
|
|
UseDotAlignForAlignment = true;
|
|
|
|
AsciiDirective = nullptr; // not supported
|
|
|
|
AscizDirective = nullptr; // not supported
|
2019-09-27 03:38:32 +08:00
|
|
|
NeedsFunctionDescriptors = true;
|
|
|
|
HasDotLGloblDirective = true;
|
[PowerPC][AIX] Adds support for writing the .data section in assembly files
Summary:
Adds support for generating the .data section in assembly files for global variables with a non-zero initialization. The support for writing the .data section in XCOFF object files will be added in a follow-on patch. Any relocations are not included in this patch.
Reviewers: hubert.reinterpretcast, sfertile, jasonliu, daltenty, Xiangling_L
Reviewed by: hubert.reinterpretcast
Subscribers: nemanjai, hiraditya, kbarton, MaskRay, jsji, wuzish, shchenz, DiggerLin, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66154
llvm-svn: 369869
2019-08-25 23:17:25 +08:00
|
|
|
Data64bitsDirective = "\t.llong\t";
|
2019-09-27 03:38:32 +08:00
|
|
|
SupportsQuotedNames = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool MCAsmInfoXCOFF::isValidUnquotedName(StringRef Name) const {
|
|
|
|
// FIXME: Remove this function when we stop using "TOC[TC0]" as a symbol name.
|
|
|
|
if (Name.equals("TOC[TC0]"))
|
|
|
|
return true;
|
|
|
|
|
|
|
|
return MCAsmInfo::isValidUnquotedName(Name);
|
2019-07-10 03:21:01 +08:00
|
|
|
}
|