[llvm-branch-commits] [llvm-branch] r259856 - Merging r259798, r259835:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Feb 4 16:46:12 PST 2016


Author: hans
Date: Thu Feb  4 18:46:12 2016
New Revision: 259856

URL: http://llvm.org/viewvc/llvm-project?rev=259856&view=rev
Log:
Merging r259798, r259835:

------------------------------------------------------------------------
r259798 | nemanjai | 2016-02-04 08:18:08 -0800 (Thu, 04 Feb 2016) | 9 lines

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.
------------------------------------------------------------------------

------------------------------------------------------------------------
r259835 | nemanjai | 2016-02-04 14:36:10 -0800 (Thu, 04 Feb 2016) | 3 lines

Provide a test case for rl259798
------------------------------------------------------------------------

Added:
    llvm/branches/release_38/test/CodeGen/PowerPC/inline-asm-s-modifier.ll
      - copied unchanged from r259835, llvm/trunk/test/CodeGen/PowerPC/inline-asm-s-modifier.ll
Modified:
    llvm/branches/release_38/   (props changed)
    llvm/branches/release_38/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp

Propchange: llvm/branches/release_38/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb  4 18:46:12 2016
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,257645,257648,257730,257775,257791,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177,259228,259236,259342,259346,259375,259645,259649,259695,259740
+/llvm/trunk:155241,257645,257648,257730,257775,257791,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177,259228,259236,259342,259346,259375,259645,259649,259695,259740,259798,259835

Modified: llvm/branches/release_38/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp?rev=259856&r1=259855&r2=259856&view=diff
==============================================================================
--- llvm/branches/release_38/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp (original)
+++ llvm/branches/release_38/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp Thu Feb  4 18:46:12 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-branch-commits mailing list