diff options
author | Reid Kleckner <reid@kleckner.net> | 2014-03-27 00:00:03 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2014-03-27 00:00:03 +0000 |
commit | 185940a765d000eae24d381567b1f7a24ae6a44a (patch) | |
tree | 9522a67b6dc2b11dc120dc3769d089a51aa009c4 /clang/test/CodeGen/ms-inline-asm.c | |
parent | 6ff4f89af321ebbe18f519b9e211ad045bdc0d82 (diff) | |
download | bcm5719-llvm-185940a765d000eae24d381567b1f7a24ae6a44a.tar.gz bcm5719-llvm-185940a765d000eae24d381567b1f7a24ae6a44a.zip |
MS asm: Filter out fpsw clobbers
When parsing MS inline assembly, we note that fpsw is an implicit def of
most x87 FP operations, and add it to the clobber list. However, we
don't recognize fpsw as a gcc register name, and we assert. Clang
always adds an fpsr clobber, which means the same thing to LLVM, so we
can just use that.
This test case was broken by my LLVM change r196939.
Reviewers: echristo
Differential Revision: http://llvm-reviews.chandlerc.com/D2993
llvm-svn: 204878
Diffstat (limited to 'clang/test/CodeGen/ms-inline-asm.c')
-rw-r--r-- | clang/test/CodeGen/ms-inline-asm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/CodeGen/ms-inline-asm.c b/clang/test/CodeGen/ms-inline-asm.c index 318d509cfa4..6395e428ed6 100644 --- a/clang/test/CodeGen/ms-inline-asm.c +++ b/clang/test/CodeGen/ms-inline-asm.c @@ -460,3 +460,12 @@ void t39() { // CHECK: call void asm sideeffect inteldialect "mov eax, [eax] .4", "~{eax},~{dirflag},~{fpsr},~{flags}"() // CHECK: call void asm sideeffect inteldialect "mov eax, fs:[$$0] .4", "~{eax},~{dirflag},~{fpsr},~{flags}"() } + +void t40(float a) { + int i; + __asm fld a + __asm fistp i + // CHECK-LABEL: define void @t40 + // CHECK: call void asm sideeffect inteldialect "fld dword ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(float* {{.*}}) + // CHECK: call void asm sideeffect inteldialect "fistp dword ptr $0", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* {{.*}}) +} |