mcize lcomm, simplify .comm, extend both to support 64-bit sizes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94299 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-01-23 07:47:02 +00:00
parent f9f93e4388
commit 9eb158d5b4
11 changed files with 46 additions and 31 deletions

View File

@@ -191,15 +191,10 @@ namespace llvm {
/// the assembler to set the value of a variable to some expression.
const char *SetDirective; // Defaults to null.
/// LCOMMDirective - This is the name of a directive (if supported) that can
/// be used to efficiently declare a local (internal) block of zero
/// initialized data in the .bss/.data section. The syntax expected is:
/// @verbatim <LCOMMDirective> SYMBOLNAME LENGTHINBYTES
/// @endverbatim
const char *LCOMMDirective; // Defaults to null.
/// HasLCOMMDirective - This is true if the target supports the .lcomm
/// directive.
bool HasLCOMMDirective; // Defaults to false.
const char *COMMDirective; // Defaults to "\t.comm\t".
/// COMMDirectiveTakesAlignment - True if COMMDirective take a third
/// argument that specifies the alignment of the declaration.
bool COMMDirectiveTakesAlignment; // Defaults to true.
@@ -404,12 +399,7 @@ namespace llvm {
const char *getSetDirective() const {
return SetDirective;
}
const char *getLCOMMDirective() const {
return LCOMMDirective;
}
const char *getCOMMDirective() const {
return COMMDirective;
}
bool hasLCOMMDirective() const { return HasLCOMMDirective; }
bool getCOMMDirectiveTakesAlignment() const {
return COMMDirectiveTakesAlignment;
}

View File

@@ -129,15 +129,21 @@ namespace llvm {
/// @param DescValue - The value to set into the n_desc field.
virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) = 0;
/// EmitCommonSymbol - Emit a common or local common symbol.
/// EmitCommonSymbol - Emit a common symbol.
///
/// @param Symbol - The common symbol to emit.
/// @param Size - The size of the common symbol.
/// @param ByteAlignment - The alignment of the symbol if
/// non-zero. This must be a power of 2 on some targets.
virtual void EmitCommonSymbol(MCSymbol *Symbol, unsigned Size,
/// non-zero. This must be a power of 2.
virtual void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
unsigned ByteAlignment) = 0;
/// EmitLocalCommonSymbol - Emit a local common (.lcomm) symbol.
///
/// @param Symbol - The common symbol to emit.
/// @param Size - The size of the common symbol.
virtual void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size) = 0;
/// EmitZerofill - Emit a the zerofill section and an option symbol.
///
/// @param Section - The zerofill section to create and or to put the symbol