mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-12 17:25:49 +00:00
eliminate MCAsmInfo::NeedsSet: we now just use .set on any platform
that has it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94581 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -47,17 +47,6 @@ namespace llvm {
|
|||||||
/// emitted in Static relocation model.
|
/// emitted in Static relocation model.
|
||||||
bool HasStaticCtorDtorReferenceInStaticMode; // Default is false.
|
bool HasStaticCtorDtorReferenceInStaticMode; // Default is false.
|
||||||
|
|
||||||
/// NeedsSet - True if target asm treats expressions in data directives
|
|
||||||
/// as linktime-relocatable. For assembly-time computation, we need to
|
|
||||||
/// use a .set. Thus:
|
|
||||||
/// .set w, x-y
|
|
||||||
/// .long w
|
|
||||||
/// is computed at assembly time, while
|
|
||||||
/// .long x-y
|
|
||||||
/// is relocated if the relative locations of x and y change at linktime.
|
|
||||||
/// We want both these things in different places.
|
|
||||||
bool NeedsSet; // Defaults to false.
|
|
||||||
|
|
||||||
/// MaxInstLength - This is the maximum possible length of an instruction,
|
/// MaxInstLength - This is the maximum possible length of an instruction,
|
||||||
/// which is needed to compute the size of an inline asm.
|
/// which is needed to compute the size of an inline asm.
|
||||||
unsigned MaxInstLength; // Defaults to 4.
|
unsigned MaxInstLength; // Defaults to 4.
|
||||||
@@ -321,9 +310,6 @@ namespace llvm {
|
|||||||
bool hasStaticCtorDtorReferenceInStaticMode() const {
|
bool hasStaticCtorDtorReferenceInStaticMode() const {
|
||||||
return HasStaticCtorDtorReferenceInStaticMode;
|
return HasStaticCtorDtorReferenceInStaticMode;
|
||||||
}
|
}
|
||||||
bool needsSet() const {
|
|
||||||
return NeedsSet;
|
|
||||||
}
|
|
||||||
unsigned getMaxInstLength() const {
|
unsigned getMaxInstLength() const {
|
||||||
return MaxInstLength;
|
return MaxInstLength;
|
||||||
}
|
}
|
||||||
|
@@ -195,13 +195,12 @@ void DwarfPrinter::EmitReference(const MCSymbol *Sym, bool IsPCRelative,
|
|||||||
if (IsPCRelative) O << "-" << MAI->getPCSymbol();
|
if (IsPCRelative) O << "-" << MAI->getPCSymbol();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// EmitDifference - Emit the difference between two labels. Some assemblers do
|
/// EmitDifference - Emit the difference between two labels. If this assembler
|
||||||
/// not behave with absolute expressions with data directives, so there is an
|
/// supports .set, we emit a .set of a temporary and then use it in the .word.
|
||||||
/// option (needsSet) to use an intermediary set expression.
|
|
||||||
void DwarfPrinter::EmitDifference(const char *TagHi, unsigned NumberHi,
|
void DwarfPrinter::EmitDifference(const char *TagHi, unsigned NumberHi,
|
||||||
const char *TagLo, unsigned NumberLo,
|
const char *TagLo, unsigned NumberLo,
|
||||||
bool IsSmall) {
|
bool IsSmall) {
|
||||||
if (MAI->needsSet()) {
|
if (MAI->getSetDirective() != 0) {
|
||||||
O << "\t.set\t";
|
O << "\t.set\t";
|
||||||
PrintLabelName("set", SetCounter, Flavor);
|
PrintLabelName("set", SetCounter, Flavor);
|
||||||
O << ",";
|
O << ",";
|
||||||
@@ -232,7 +231,7 @@ void DwarfPrinter::EmitSectionOffset(const char* Label, const char* Section,
|
|||||||
else
|
else
|
||||||
printAbsolute = MAI->isAbsoluteDebugSectionOffsets();
|
printAbsolute = MAI->isAbsoluteDebugSectionOffsets();
|
||||||
|
|
||||||
if (MAI->needsSet() && useSet) {
|
if (MAI->getSetDirective() != 0 && useSet) {
|
||||||
O << "\t.set\t";
|
O << "\t.set\t";
|
||||||
PrintLabelName("set", SetCounter, Flavor);
|
PrintLabelName("set", SetCounter, Flavor);
|
||||||
O << ",";
|
O << ",";
|
||||||
|
@@ -138,9 +138,7 @@ public:
|
|||||||
void EmitReference(const MCSymbol *Sym, bool IsPCRelative = false,
|
void EmitReference(const MCSymbol *Sym, bool IsPCRelative = false,
|
||||||
bool Force32Bit = false) const;
|
bool Force32Bit = false) const;
|
||||||
|
|
||||||
/// EmitDifference - Emit the difference between two labels. Some
|
/// EmitDifference - Emit the difference between two labels.
|
||||||
/// assemblers do not behave with absolute expressions with data directives,
|
|
||||||
/// so there is an option (needsSet) to use an intermediary set expression.
|
|
||||||
void EmitDifference(const DWLabel &LabelHi, const DWLabel &LabelLo,
|
void EmitDifference(const DWLabel &LabelHi, const DWLabel &LabelLo,
|
||||||
bool IsSmall = false) {
|
bool IsSmall = false) {
|
||||||
EmitDifference(LabelHi.getTag(), LabelHi.getNumber(),
|
EmitDifference(LabelHi.getTag(), LabelHi.getNumber(),
|
||||||
|
@@ -22,7 +22,6 @@ MCAsmInfo::MCAsmInfo() {
|
|||||||
HasSubsectionsViaSymbols = false;
|
HasSubsectionsViaSymbols = false;
|
||||||
HasMachoZeroFillDirective = false;
|
HasMachoZeroFillDirective = false;
|
||||||
HasStaticCtorDtorReferenceInStaticMode = false;
|
HasStaticCtorDtorReferenceInStaticMode = false;
|
||||||
NeedsSet = false;
|
|
||||||
MaxInstLength = 4;
|
MaxInstLength = 4;
|
||||||
PCSymbol = "$";
|
PCSymbol = "$";
|
||||||
SeparatorChar = ';';
|
SeparatorChar = ';';
|
||||||
|
@@ -21,7 +21,6 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() {
|
|||||||
GlobalPrefix = "_";
|
GlobalPrefix = "_";
|
||||||
PrivateGlobalPrefix = "L";
|
PrivateGlobalPrefix = "L";
|
||||||
LinkerPrivateGlobalPrefix = "l";
|
LinkerPrivateGlobalPrefix = "l";
|
||||||
NeedsSet = true;
|
|
||||||
AllowQuotesInName = true;
|
AllowQuotesInName = true;
|
||||||
HasSingleParameterDotFile = false;
|
HasSingleParameterDotFile = false;
|
||||||
HasSubsectionsViaSymbols = true;
|
HasSubsectionsViaSymbols = true;
|
||||||
|
@@ -31,7 +31,6 @@ SPULinuxMCAsmInfo::SPULinuxMCAsmInfo(const Target &T, const StringRef &TT) {
|
|||||||
HasDotLocAndDotFile = true;
|
HasDotLocAndDotFile = true;
|
||||||
|
|
||||||
SupportsDebugInformation = true;
|
SupportsDebugInformation = true;
|
||||||
NeedsSet = true;
|
|
||||||
|
|
||||||
// Exception handling is not supported on CellSPU (think about it: you only
|
// Exception handling is not supported on CellSPU (think about it: you only
|
||||||
// have 256K for code+data. Would you support exception handling?)
|
// have 256K for code+data. Would you support exception handling?)
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
; RUN: llc < %s -mtriple=i686-pc-linux-gnu -asm-verbose=false -o %t
|
; RUN: llc < %s -mtriple=i686-pc-linux-gnu -asm-verbose=false -o %t
|
||||||
; RUN: grep set %t | count 7
|
; RUN: grep set %t | count 23
|
||||||
; RUN: grep globl %t | count 6
|
; RUN: grep globl %t | count 6
|
||||||
; RUN: grep weak %t | count 1
|
; RUN: grep weak %t | count 1
|
||||||
; RUN: grep hidden %t | count 1
|
; RUN: grep hidden %t | count 1
|
||||||
|
Reference in New Issue
Block a user