[PATCH, i386]: Fix PR target/35553, -fkeep-inline-functions and -O errors our in SSE headers

Richard Guenther richard.guenther@gmail.com
Thu Mar 13 10:00:00 GMT 2008


On Thu, Mar 13, 2008 at 10:50 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> Hello!
>
>  It turns out that we need to switch definitions of SSE intrinsics with
>  immediate arguments from inline functions to macros for
>  -fkeep-inline-functions. Otherwise we error out with
>  "emmintrin.h:1382: error: mask must be an immediate" and similar
>  errors involving immediates.
>
>  Fixed by introducing __SSE_USE_INLINED_FUNC__ builtin define that is
>  defined when appropriate and by using this define through SSE headers.

Why not simply make these functions extern inline __attribute__((gnu_inline))?

Richard.

>  2008-03-13  Uros Bizjak  <ubizjak@gmail.com>
>
>         PR target/35553
>         * config/i386/i386.h (TARGET_CPU_CPP_BUILTINS): Define
>         __SSE_USE_INLINED_FUNC__ when using -flag-keep-inline-functions
>         together with optimization.
>         * config/i386/xmmintrin.h: Use __SSE_USE_INLINED_FUNC__ instead of
>         __OPTIMIZE__ to choose between inlined intrinsic SSE function having
>         immediate arguments and its equivalent macro definition.
>         * config/i386/bmintrin.h: Ditto.
>         * config/i386/smmintrin.h: Ditto.
>         * config/i386/tmmintrin.h: Ditto.
>         * config/i386/mmintrin-common.h: Ditto.
>         * config/i386/ammintrin.h: Ditto.
>         * config/i386/emmintrin.h: Ditto.
>
>  testsuite/ChangeLog:
>
>  2008-03-13  Uros Bizjak  <ubizjak@gmail.com>
>
>         PR target/35553
>         * g++.dg/other/i386-3.C: New test.
>
>  Tested on i686-pc-linux-gnu. Patch is committed to SVN mainline, will
>  commit to 4.3 branch when tests finish.
>
>  Uros.
>



More information about the Gcc-patches mailing list