diff options
author | Eric Christopher <echristo@apple.com> | 2012-08-15 06:31:06 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-08-15 06:31:06 +0000 |
commit | dece8b325821acaa5b91e97cf03baf610f264e01 (patch) | |
tree | 283bcb692a64d06944d6f1d79dd70e47d6b54f18 | |
parent | 4fda501bd5cf99311ce068b335c08b2e39b794d0 (diff) |
Revert this to try to bring the i386 bots back.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161931 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/CGStmt.cpp | 24 | ||||
-rw-r--r-- | test/CodeGen/ms-inline-asm.c | 10 |
2 files changed, 6 insertions, 28 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp index d78908dee8..467c77945e 100644 --- a/lib/CodeGen/CGStmt.cpp +++ b/lib/CodeGen/CGStmt.cpp @@ -1691,36 +1691,14 @@ void CodeGenFunction::EmitMSAsmStmt(const MSAsmStmt &S) { 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); diff --git a/test/CodeGen/ms-inline-asm.c b/test/CodeGen/ms-inline-asm.c index fe0d3a5826..c08e53b64e 100644 --- a/test/CodeGen/ms-inline-asm.c +++ b/test/CodeGen/ms-inline-asm.c @@ -29,8 +29,8 @@ void t3() { 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 t4(void) { 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 @@ void t10() { 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 } |