[llvm] r259798 - Enable the %s modifier in inline asm template string
Nemanja Ivanovic via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 4 08:18:08 PST 2016
Author: nemanjai
Date: Thu Feb 4 10:18:08 2016
New Revision: 259798
URL: http://llvm.org/viewvc/llvm-project?rev=259798&view=rev
Log:
Enable the %s modifier in inline asm template string
This patch corresponds to review:
http://reviews.llvm.org/D16847
There are some files in glibc that use the output operand modifier even though
it was deprecated in GCC. This patch just adds support for it to prevent issues
with such files.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp?rev=259798&r1=259797&r2=259798&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp Thu Feb 4 10:18:08 2016
@@ -555,6 +555,11 @@ bool AsmPrinter::PrintAsmOperand(const M
return true;
O << -MO.getImm();
return false;
+ case 's': // The GCC deprecated s modifier
+ if (MO.getType() != MachineOperand::MO_Immediate)
+ return true;
+ O << ((32 - MO.getImm()) & 31);
+ return false;
}
}
return true;
More information about the llvm-commits
mailing list