1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

Add 118023 back, but with proper spelling for .uleb128/.sleb128.

llvm-svn: 118254
This commit is contained in:
Rafael Espindola 2010-11-04 18:17:08 +00:00
parent 618eefb925
commit 3f4a79b243
2 changed files with 10 additions and 9 deletions

View File

@ -36,9 +36,8 @@ void AsmPrinter::EmitSLEB128(int Value, const char *Desc) const {
if (isVerbose() && Desc)
OutStreamer.AddComment(Desc);
if (MAI->hasLEB128() && OutStreamer.hasRawTextSupport()) {
// FIXME: MCize.
OutStreamer.EmitRawText("\t.sleb128\t" + Twine(Value));
if (MAI->hasLEB128()) {
OutStreamer.EmitSLEB128IntValue(Value);
return;
}
@ -60,10 +59,10 @@ void AsmPrinter::EmitULEB128(unsigned Value, const char *Desc,
unsigned PadTo) const {
if (isVerbose() && Desc)
OutStreamer.AddComment(Desc);
if (MAI->hasLEB128() && PadTo == 0 && OutStreamer.hasRawTextSupport()) {
// FIXME: MCize.
OutStreamer.EmitRawText("\t.uleb128\t" + Twine(Value));
// FIXME: Should we add a PadTo option to the streamer?
if (MAI->hasLEB128() && PadTo == 0) {
OutStreamer.EmitULEB128IntValue(Value);
return;
}

View File

@ -512,12 +512,14 @@ void MCAsmStreamer::EmitValue(const MCExpr *Value, unsigned Size,
}
void MCAsmStreamer::EmitULEB128Value(const MCExpr *Value, unsigned AddrSpace) {
OS << ".uleb " << *Value;
assert(MAI.hasLEB128() && "Cannot print a .uleb");
OS << ".uleb128 " << *Value;
EmitEOL();
}
void MCAsmStreamer::EmitSLEB128Value(const MCExpr *Value, unsigned AddrSpace) {
OS << ".sleb " << *Value;
assert(MAI.hasLEB128() && "Cannot print a .sleb");
OS << ".sleb128 " << *Value;
EmitEOL();
}