parent
7b51496975
commit
7cbbd28c67
|
@ -189,11 +189,6 @@ namespace llvm {
|
||||||
|
|
||||||
//===--- Alignment Information ----------------------------------------===//
|
//===--- Alignment Information ----------------------------------------===//
|
||||||
|
|
||||||
/// AlignDirective - The directive used to emit round up to an alignment
|
|
||||||
/// boundary.
|
|
||||||
///
|
|
||||||
const char *AlignDirective; // Defaults to "\t.align\t"
|
|
||||||
|
|
||||||
/// AlignmentIsInBytes - If this is true (the default) then the asmprinter
|
/// AlignmentIsInBytes - If this is true (the default) then the asmprinter
|
||||||
/// emits ".align N" directives, where N is the number of bytes to align to.
|
/// emits ".align N" directives, where N is the number of bytes to align to.
|
||||||
/// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
|
/// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
|
||||||
|
@ -456,9 +451,6 @@ namespace llvm {
|
||||||
const char *getAscizDirective() const {
|
const char *getAscizDirective() const {
|
||||||
return AscizDirective;
|
return AscizDirective;
|
||||||
}
|
}
|
||||||
const char *getAlignDirective() const {
|
|
||||||
return AlignDirective;
|
|
||||||
}
|
|
||||||
bool getAlignmentIsInBytes() const {
|
bool getAlignmentIsInBytes() const {
|
||||||
return AlignmentIsInBytes;
|
return AlignmentIsInBytes;
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,6 @@ MCAsmInfo::MCAsmInfo() {
|
||||||
Data64bitsDirective = "\t.quad\t";
|
Data64bitsDirective = "\t.quad\t";
|
||||||
SunStyleELFSectionSwitchSyntax = false;
|
SunStyleELFSectionSwitchSyntax = false;
|
||||||
UsesELFSectionDirectiveForBSS = false;
|
UsesELFSectionDirectiveForBSS = false;
|
||||||
AlignDirective = "\t.align\t";
|
|
||||||
AlignmentIsInBytes = true;
|
AlignmentIsInBytes = true;
|
||||||
TextAlignFillValue = 0;
|
TextAlignFillValue = 0;
|
||||||
GPRel64Directive = 0;
|
GPRel64Directive = 0;
|
||||||
|
|
|
@ -781,12 +781,19 @@ void MCAsmStreamer::EmitValueToAlignment(unsigned ByteAlignment, int64_t Value,
|
||||||
// emit alignments as a power of two if possible.
|
// emit alignments as a power of two if possible.
|
||||||
if (isPowerOf2_32(ByteAlignment)) {
|
if (isPowerOf2_32(ByteAlignment)) {
|
||||||
switch (ValueSize) {
|
switch (ValueSize) {
|
||||||
default: llvm_unreachable("Invalid size for machine code value!");
|
default:
|
||||||
case 1: OS << MAI->getAlignDirective(); break;
|
llvm_unreachable("Invalid size for machine code value!");
|
||||||
// FIXME: use MAI for this!
|
case 1:
|
||||||
case 2: OS << ".p2alignw "; break;
|
OS << "\t.align\t";
|
||||||
case 4: OS << ".p2alignl "; break;
|
break;
|
||||||
case 8: llvm_unreachable("Unsupported alignment size!");
|
case 2:
|
||||||
|
OS << ".p2alignw ";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
OS << ".p2alignl ";
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
llvm_unreachable("Unsupported alignment size!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MAI->getAlignmentIsInBytes())
|
if (MAI->getAlignmentIsInBytes())
|
||||||
|
|
|
@ -40,7 +40,6 @@ AMDGPUMCAsmInfo::AMDGPUMCAsmInfo(StringRef &TT) : MCAsmInfo() {
|
||||||
UsesELFSectionDirectiveForBSS = true;
|
UsesELFSectionDirectiveForBSS = true;
|
||||||
|
|
||||||
//===--- Alignment Information ----------------------------------------===//
|
//===--- Alignment Information ----------------------------------------===//
|
||||||
AlignDirective = ".align\t";
|
|
||||||
AlignmentIsInBytes = true;
|
AlignmentIsInBytes = true;
|
||||||
TextAlignFillValue = 0;
|
TextAlignFillValue = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue