printVisibility(Name, I->getVisibility());
- O << "\t.set\t" << *Name << ", " << *Target << '\n';
+ // Emit the directives as assignments aka .set:
+ OutStreamer.EmitAssignment(Name,
+ MCSymbolRefExpr::Create(Target, OutContext));
}
}
const MachineBasicBlock *MBB = JTBBs[ii];
if (!EmittedSets.insert(MBB)) continue;
- O << "\t.set\t"
- << *GetJTSetSymbol(JTI, MBB->getNumber()) << ','
- << *MBB->getSymbol(OutContext) << '-' << *Base << '\n';
+ // .set LJTSet, LBB32-base
+ const MCExpr *LHS =
+ MCSymbolRefExpr::Create(MBB->getSymbol(OutContext), OutContext);
+ OutStreamer.EmitAssignment(GetJTSetSymbol(JTI, MBB->getNumber()),
+ MCBinaryExpr::CreateSub(LHS, Base, OutContext));
}
}
const char *TagLo, unsigned NumberLo,
bool IsSmall) {
if (MAI->hasSetDirective()) {
+ // FIXME: switch to OutStreamer.EmitAssignment.
O << "\t.set\t";
PrintLabelName("set", SetCounter, Flavor);
O << ",";
printAbsolute = MAI->isAbsoluteDebugSectionOffsets();
if (MAI->hasSetDirective() && useSet) {
+ // FIXME: switch to OutStreamer.EmitAssignment.
O << "\t.set\t";
PrintLabelName("set", SetCounter, Flavor);
O << ",";
; RUN: llc < %s -mtriple=arm-linux-gnueabi -o %t
-; RUN: grep set %t | count 5
+; RUN: grep { = } %t | count 5
; RUN: grep globl %t | count 4
; RUN: grep weak %t | count 1
; RUN: llc < %s -mtriple=i686-pc-linux-gnu -asm-verbose=false -o %t
-; RUN: grep set %t | count 23
+; RUN: grep { = } %t | count 7
+; RUN: grep set %t | count 16
; RUN: grep globl %t | count 6
; RUN: grep weak %t | count 1
; RUN: grep hidden %t | count 1