[cfe-commits] r161931 - in /cfe/trunk: lib/CodeGen/CGStmt.cpp test/CodeGen/ms-inline-asm.c

Chad Rosier mcrosier at apple.com
Wed Aug 15 09:20:17 PDT 2012


Thanks, Eric.  Looking now..

On Aug 14, 2012, at 11:31 PM, Eric Christopher wrote:

> Author: echristo
> Date: Wed Aug 15 01:31:06 2012
> New Revision: 161931
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=161931&view=rev
> Log:
> Revert this to try to bring the i386 bots back.
> 
> Modified:
>    cfe/trunk/lib/CodeGen/CGStmt.cpp
>    cfe/trunk/test/CodeGen/ms-inline-asm.c
> 
> Modified: cfe/trunk/lib/CodeGen/CGStmt.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmt.cpp?rev=161931&r1=161930&r2=161931&view=diff
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CGStmt.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGStmt.cpp Wed Aug 15 01:31:06 2012
> @@ -1691,36 +1691,14 @@
> 
>   std::vector<llvm::Value*> Args;
>   std::vector<llvm::Type *> ArgTypes;
> -  std::string Constraints;
> 
> -  // Clobbers
> -  for (unsigned i = 0, e = S.getNumClobbers(); i != e; ++i) {
> -    StringRef Clobber = S.getClobber(i);
> -
> -    if (Clobber != "memory" && Clobber != "cc")
> -      Clobber = Target.getNormalizedGCCRegisterName(Clobber);
> -
> -    if (i != 0)
> -      Constraints += ',';
> -
> -    Constraints += "~{";
> -    Constraints += Clobber;
> -    Constraints += '}';
> -  }
> -
> -  // Add machine specific clobbers
>   std::string MachineClobbers = Target.getClobbers();
> -  if (!MachineClobbers.empty()) {
> -    if (!Constraints.empty())
> -      Constraints += ',';
> -    Constraints += MachineClobbers;
> -  }
> 
>   llvm::FunctionType *FTy =
>     llvm::FunctionType::get(VoidTy, ArgTypes, false);
> 
>   llvm::InlineAsm *IA =
> -    llvm::InlineAsm::get(FTy, *S.getAsmString(), Constraints, true);
> +    llvm::InlineAsm::get(FTy, *S.getAsmString(), MachineClobbers, true);
>   llvm::CallInst *Result = Builder.CreateCall(IA, Args);
>   Result->addAttribute(~0, llvm::Attribute::NoUnwind);
>   Result->addAttribute(~0, llvm::Attribute::IANSDialect);
> 
> Modified: cfe/trunk/test/CodeGen/ms-inline-asm.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm.c?rev=161931&r1=161930&r2=161931&view=diff
> ==============================================================================
> --- cfe/trunk/test/CodeGen/ms-inline-asm.c (original)
> +++ cfe/trunk/test/CodeGen/ms-inline-asm.c Wed Aug 15 01:31:06 2012
> @@ -29,8 +29,8 @@
> 
> void t4(void) {
> // CHECK: @t4
> -// CHECK: call void asm sideeffect "mov ebx, eax", "~{ebx},~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect
> -// CHECK: call void asm sideeffect "mov ecx, ebx", "~{ecx},~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect
> +// CHECK: call void asm sideeffect "mov ebx, eax", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect
> +// CHECK: call void asm sideeffect "mov ecx, ebx", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect
> // CHECK: ret void
>   __asm mov ebx, eax
>   __asm mov ecx, ebx
> @@ -38,8 +38,8 @@
> 
> void t5(void) {
> // CHECK: @t5
> -// CHECK: call void asm sideeffect "mov ebx, eax", "~{ebx},~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect
> -// CHECK: call void asm sideeffect "mov ecx, ebx", "~{ecx},~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect
> +// CHECK: call void asm sideeffect "mov ebx, eax", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect
> +// CHECK: call void asm sideeffect "mov ecx, ebx", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect
> // CHECK: ret void
>   __asm mov ebx, eax __asm mov ecx, ebx
> }
> @@ -83,5 +83,5 @@
>     pop ebx
>   }
> // CHECK: t10
> -// CHECK: call void asm sideeffect "push ebx\0Amov ebx, 0x07\0Apop ebx", "~{ebx},~{ebx},~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect
> +// CHECK: call void asm sideeffect "push ebx\0Amov ebx, 0x07\0Apop ebx", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect
> }
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list