diff options
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; +} |