Re: Any libraries for vector mask and vector population count?
- From: "FX" <coudert@xxxxxxxxxxxxx>
- Date: Sun, 6 Apr 2008 19:48:00 +0000 (UTC)
no compiler support
I'm not sure exactly what you mean by that:
$ cat a.c
int foo(int i) { return __builtin_popcount (i); }
$ gcc -S a.c -msse4
$ cat a.s
.text
..globl _foo
_foo:
pushl %ebp
movl %esp, %ebp
subl $8, %esp
movl 8(%ebp), %eax
popcntl %eax, %eax
leave
ret
.subsections_via_symbols
There clearly is a popcntl opcode used. If you don't specify -msse4, you get a
call to a function in the GCC support library (libgcc).
$ gcc -v
Using built-in specs.
Target: i386-apple-darwin8.10.1
Configured with: /tmp/gfortran-20080221/ibin/../gcc/configure --prefix=/usr/local/gfortran --enable-languages=c,fortran --with-gmp=/tmp/gfortran-20080221/gfortran_libs --enable-bootstrap
Thread model: posix
gcc version 4.4.0 20080221 (experimental) [trunk revision 132519] (GCC)
--
FX
.
- Follow-Ups:
- References:
- Any libraries for vector mask and vector population count?
- From: Dan
- Re: Any libraries for vector mask and vector population count?
- From: Tim Prince
- Re: Any libraries for vector mask and vector population count?
- From: Tim Prince
- Any libraries for vector mask and vector population count?
- Prev by Date: Re: Fortran 77 parser
- Next by Date: Re: Fortran 77 parser
- Previous by thread: Re: Any libraries for vector mask and vector population count?
- Next by thread: Re: Any libraries for vector mask and vector population count?
- Index(es):
Relevant Pages
|
|