/// directive.
bool HasLCOMMDirective; // Defaults to false.
+ /// COMMDirectiveAlignmentIsInBytes - True is COMMDirective's optional
+ /// alignment is to be specified in bytes instead of log2(n).
+ bool COMMDirectiveAlignmentIsInBytes; // Defaults to true;
+
/// HasDotTypeDotSizeDirective - True if the target has .type and .size
/// directives, this is true for most ELF targets.
bool HasDotTypeDotSizeDirective; // Defaults to true.
}
bool hasLCOMMDirective() const { return HasLCOMMDirective; }
bool hasDotTypeDotSizeDirective() const {return HasDotTypeDotSizeDirective;}
+ bool getCOMMDirectiveAlignmentIsInBytes() const {
+ return COMMDirectiveAlignmentIsInBytes;
+ }
bool hasSingleParameterDotFile() const { return HasSingleParameterDotFile; }
bool hasNoDeadStrip() const { return HasNoDeadStrip; }
const char *getWeakRefDirective() const { return WeakRefDirective; }
GlobalDirective = "\t.globl\t";
SetDirective = 0;
HasLCOMMDirective = false;
+ COMMDirectiveAlignmentIsInBytes = true;
HasDotTypeDotSizeDirective = true;
HasSingleParameterDotFile = true;
HasNoDeadStrip = false;
MCAsmInfoCOFF::MCAsmInfoCOFF() {
GlobalPrefix = "_";
+ COMMDirectiveAlignmentIsInBytes = false;
HasLCOMMDirective = true;
HasDotTypeDotSizeDirective = false;
HasSingleParameterDotFile = false;
SupportsDebugInformation = true;
DwarfSectionOffsetDirective = "\t.secrel32\t";
}
-
HasSubsectionsViaSymbols = true;
AlignmentIsInBytes = false;
+ COMMDirectiveAlignmentIsInBytes = false;
InlineAsmStart = " InlineAsm Start";
InlineAsmEnd = " InlineAsm End";
unsigned ByteAlignment) {
OS << "\t.comm\t" << *Symbol << ',' << Size;
if (ByteAlignment != 0) {
- if (MAI.getAlignmentIsInBytes())
+ if (MAI.getCOMMDirectiveAlignmentIsInBytes())
OS << ',' << ByteAlignment;
else
OS << ',' << Log2_32(ByteAlignment);
}
ARMELFMCAsmInfo::ARMELFMCAsmInfo() {
+ // ".comm align is in bytes but .align is pow-2."
+ AlignmentIsInBytes = false;
+
Data64bitsDirective = 0;
CommentString = "@";
; no alignment
@c = global i16 2
-;ELF: .align 2
+;ELF: .align 1
;ELF: c:
;DARWIN: .align 1
;DARWIN: _c:
@d = global i32 3
-;ELF: .align 4
+;ELF: .align 2
;ELF: d:
;DARWIN: .align 2
;DARWIN: _d:
@e = global i64 4
-;ELF: .align 8
+;ELF: .align 3
;ELF: e
;DARWIN: .align 2
;DARWIN: _e:
@f = global float 5.0
-;ELF: .align 4
+;ELF: .align 2
;ELF: f:
;DARWIN: .align 2
;DARWIN: _f:
@g = global double 6.0
-;ELF: .align 8
+;ELF: .align 3
;ELF: g:
;DARWIN: .align 2
;DARWIN: _g:
; LinuxPIC: ldr r0, [r0]
; LinuxPIC: bx lr
-; LinuxPIC: .align 4
+; LinuxPIC: .align 2
; LinuxPIC: .LCPI1_0:
; LinuxPIC: .long _GLOBAL_OFFSET_TABLE_-(.LPC1_0+8)
-; LinuxPIC: .align 4
+; LinuxPIC: .align 2
; LinuxPIC: .LCPI1_1:
; LinuxPIC: .long G(GOT)