[patch] Move the popcnt intrinsics to a separate file

Sebastian Pop sebpop@gmail.com
Fri Dec 4 17:16:00 GMT 2009


On Fri, Dec 4, 2009 at 04:21, Jakub Jelinek <jakub@redhat.com> wrote:
> The patch as committed doesn't unfortunately work:
>
> unsigned short s, t;
> int foo (void)
> {
>  return __builtin_clzs (6);
> }
>
> void bar (void)
> {
>  s = __builtin_clzs (t);
> }
>
> ./cc1 -mabm y.c -quiet
> y.c: In function ‘foo’:
> y.c:4:25: internal compiler error: in ix86_expand_special_args_builtin, at
> config/i386/i386.c:23818
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
>
> Furthermore, abmintrin.h isn't mentioned in config.gcc, so using x86intrin.h
> with -mabm fails, and, when that is fixed, including x86intrin.h fails
> with -msse4.2 -mabm, because some inlines are defined in both smmintrin.h
> and x86intrin.h.
>
> Adding testcases for each single builtin that is added is really desirable.
>

Sorry for not having tested this.  Next time I will add testcases.

> The following patch fixes these issues, but has been only tested with
> make check-gcc RUNTESTFLAGS=i386.exp

Thanks for fixing these issues.
I will give this patch a full test on amd64-linux.

Sebastian



More information about the Gcc-patches mailing list