Hahnfeld added a comment.

In https://reviews.llvm.org/D47849#1192321, @gtbercea wrote:

> > IIRC you started to work on this to fix the problem with inline assembly 
> > (see https://reviews.llvm.org/D47849#1125019). AFAICS this patch fixes 
> > declarations of math functions but you still cannot include `math.h` which 
> > most "correct" codes do.
>
> I'm not sure what you mean by this. This patch enables me to include math.h.


`math.c`:

  #include <math.h>

executed commands:

   $ clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda -c math.c -O2
  In file included from math.c:1:
  In file included from /usr/include/math.h:413:
  /usr/include/bits/mathinline.h:131:43: error: invalid input constraint 'x' in 
asm
    __asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
                                            ^
  /usr/include/bits/mathinline.h:143:43: error: invalid input constraint 'x' in 
asm
    __asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
                                            ^
  2 errors generated.


Repository:
  rC Clang

https://reviews.llvm.org/D47849



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to