Files
clang-p2996/clang/test/CodeGen/sparcv8-inline-asm.c
James Y Knight eb96e44aea [SPARC] Support 'f' and 'e' inline asm constraints.
Patch by Patrick Boettcher.

Differential Revision: https://reviews.llvm.org/D29117

llvm-svn: 302913
2017-05-12 16:01:23 +00:00

12 lines
393 B
C

// 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;
}