https://bugs.llvm.org/show_bug.cgi?id=43157
Bug ID: 43157
Summary: __float128 can't be passed into an inline asm block's
'x' input
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedb...@nondot.org
Reporter: g...@canishe.com
CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
llvm-...@redking.me.uk, spatel+l...@rotateright.com
The following code (adapted from glibc) compiles under gcc but not clang:
# define math_force_eval(x) \
do { \
if (sizeof (x) <= sizeof (double) \
|| __builtin_types_compatible_p (__typeof (x), __float128)) \
__asm __volatile ("" : : "x" (x)); \
else \
__asm __volatile ("" : : "f" (x)); \
} while (0)
void foo(__float128 x) {
__float128 bar = x * 1.5;
math_force_eval(bar); // <-- couldn't allocate input reg for constraint 'x'
}
The issue appears to be in X86TargetLowering::getRegForInlineAsmConstraint,
which has a switch statement covering many other number types and the comment
"TODO: Handle f128 and i128 in FR128RegClass after it is tested well."
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs