aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-26 20:20:43 +0000
committerChris Lattner <sabre@nondot.org>2010-01-26 20:20:43 +0000
commit1fd0182a85e201f0b92773d9edaae8869fa190df (patch)
tree2b26338011ae895a46df1ec241cda607f2ca8667 /lib/CodeGen
parent3036c9be66d46f9c44cf75f7c6d449653b8c0892 (diff)
downloadexternal_llvm-1fd0182a85e201f0b92773d9edaae8869fa190df.zip
external_llvm-1fd0182a85e201f0b92773d9edaae8869fa190df.tar.gz
external_llvm-1fd0182a85e201f0b92773d9edaae8869fa190df.tar.bz2
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
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfPrinter.cpp9
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfPrinter.h4
2 files changed, 5 insertions, 8 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
index f2f444a..28e0d97 100644
--- a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
@@ -195,13 +195,12 @@ void DwarfPrinter::EmitReference(const MCSymbol *Sym, bool IsPCRelative,
if (IsPCRelative) O << "-" << MAI->getPCSymbol();
}
-/// EmitDifference - Emit the difference between two labels. Some assemblers do
-/// not behave with absolute expressions with data directives, so there is an
-/// option (needsSet) to use an intermediary set expression.
+/// EmitDifference - Emit the difference between two labels. If this assembler
+/// supports .set, we emit a .set of a temporary and then use it in the .word.
void DwarfPrinter::EmitDifference(const char *TagHi, unsigned NumberHi,
const char *TagLo, unsigned NumberLo,
bool IsSmall) {
- if (MAI->needsSet()) {
+ if (MAI->getSetDirective() != 0) {
O << "\t.set\t";
PrintLabelName("set", SetCounter, Flavor);
O << ",";
@@ -232,7 +231,7 @@ void DwarfPrinter::EmitSectionOffset(const char* Label, const char* Section,
else
printAbsolute = MAI->isAbsoluteDebugSectionOffsets();
- if (MAI->needsSet() && useSet) {
+ if (MAI->getSetDirective() != 0 && useSet) {
O << "\t.set\t";
PrintLabelName("set", SetCounter, Flavor);
O << ",";
diff --git a/lib/CodeGen/AsmPrinter/DwarfPrinter.h b/lib/CodeGen/AsmPrinter/DwarfPrinter.h
index 86fe2ab..31aa69a 100644
--- a/lib/CodeGen/AsmPrinter/DwarfPrinter.h
+++ b/lib/CodeGen/AsmPrinter/DwarfPrinter.h
@@ -138,9 +138,7 @@ public:
void EmitReference(const MCSymbol *Sym, bool IsPCRelative = false,
bool Force32Bit = false) const;
- /// EmitDifference - Emit the difference between two labels. Some
- /// assemblers do not behave with absolute expressions with data directives,
- /// so there is an option (needsSet) to use an intermediary set expression.
+ /// EmitDifference - Emit the difference between two labels.
void EmitDifference(const DWLabel &LabelHi, const DWLabel &LabelLo,
bool IsSmall = false) {
EmitDifference(LabelHi.getTag(), LabelHi.getNumber(),