[llvm] r181054 - [PowerPC] Avoid using '$' in generated assembler code

Ulrich Weigand ulrich.weigand at de.ibm.com
Fri May 3 12:53:04 PDT 2013


Author: uweigand
Date: Fri May  3 14:53:04 2013
New Revision: 181054

URL: http://llvm.org/viewvc/llvm-project?rev=181054&view=rev
Log:

[PowerPC] Avoid using '$' in generated assembler code

PowerPC assemblers are supposed to support a stand-alone '$' symbol
as an alternative of '.' to refer to the current PC.  This does not
work in the LLVM assembler parser yet.

To avoid bootstrap failures when using the LLVM assembler as system
assembler, this patch modifies the assembler source code generated
by LLVM to avoid using '$' (and simply use '.' instead).


Modified:
    llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp

Modified: llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp?rev=181054&r1=181053&r2=181054&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp Fri May  3 14:53:04 2013
@@ -151,8 +151,8 @@ void PPCInstPrinter::printBranchOperand(
     return printOperand(MI, OpNo, O);
 
   // Branches can take an immediate operand.  This is used by the branch
-  // selection pass to print $+8, an eight byte displacement from the PC.
-  O << "$+";
+  // selection pass to print .+8, an eight byte displacement from the PC.
+  O << ".+";
   printAbsAddrOperand(MI, OpNo, O);
 }
 





More information about the llvm-commits mailing list