[llvm] r259798 - Enable the %s modifier in inline asm template string

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 10:33:16 PST 2016


Hi Nemanja,

Please add a test case.

 -Hal

----- Original Message -----
> From: "Nemanja Ivanovic via llvm-commits" <llvm-commits at lists.llvm.org>
> To: llvm-commits at lists.llvm.org
> Sent: Thursday, February 4, 2016 10:18:08 AM
> Subject: [llvm] r259798 - Enable the %s modifier in inline asm template string
> 
> 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;
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory


More information about the llvm-commits mailing list