diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-16 19:47:09 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-16 19:47:09 +0000 |
commit | 2410013d9382b8129702fa3a3bf19a370ae7afc3 (patch) | |
tree | df038b6418b19d03437950dcee799c1483c6246a /test/CodeGen/sparcv8-inline-asm.c | |
parent | 0a5fb09b599c1bdea3cd11168bb8f4ff4040316e (diff) |
Diffstat (limited to 'test/CodeGen/sparcv8-inline-asm.c')
-rw-r--r-- | test/CodeGen/sparcv8-inline-asm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/sparcv8-inline-asm.c b/test/CodeGen/sparcv8-inline-asm.c new file mode 100644 index 000000000000..711a2a0afbb0 --- /dev/null +++ b/test/CodeGen/sparcv8-inline-asm.c @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -triple sparc-unknown-unknown -emit-llvm %s -o - | FileCheck %s + +// CHECK: define float @fabsf(float %a) +// CHECK: %{{.*}} = call float asm sideeffect "fabss $1, $0;", "=e,f"(float %{{.*}}) #1 +float fabsf(float a) { + float res; + __asm __volatile__("fabss %1, %0;" + : /* reg out*/ "=e"(res) + : /* reg in */ "f"(a)); + return res; +} |