This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/60847] x86 BMI intrinsics not recognized


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60847

Sanjay Patel <spatel at rotateright dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |c

--- Comment #3 from Sanjay Patel <spatel at rotateright dot com> ---
Here's the evidence of the extra leading underscore being the cause of the bug:

$ cat bmi.c
#include <x86intrin.h>
int foo(int a) { return __blsmsk_u32(a); }
int foo2(int a) { return __blsr_u32(a); }

$ gcc -O1 bmi.c -mbmi -S -o -
    .text
    .globl _foo
_foo:
LFB2449:
    blsmsk    %edi, %eax
    ret
LFE2449:
    .globl _foo2
_foo2:
LFB2450:
    blsr    %edi, %eax
    ret


Thanks to Craig Topper for noticing the underscore problem. Corresponding bug
in LLVM where this was first noted is here:
http://llvm.org/bugs/show_bug.cgi?id=19431


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]