summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>2016-02-04 16:18:08 +0000
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>2016-02-04 16:18:08 +0000
commite8cbae32e966b7c66072aa0edd950a718217eccf (patch)
tree3e2f9ceb0c5eae832d7754f47ce905690b9f73cc /llvm/lib/CodeGen
parentc455e2f4411bd736ab46feaa03b9bfbc1916b23a (diff)
downloadbcm5719-llvm-e8cbae32e966b7c66072aa0edd950a718217eccf.tar.gz
bcm5719-llvm-e8cbae32e966b7c66072aa0edd950a718217eccf.zip
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. llvm-svn: 259798
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
index 9d040407b6a..2ce6c182235 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
@@ -555,6 +555,11 @@ bool AsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
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;
OpenPOWER on IntegriCloud