On 17 May 2013 14:18, Arnd Bergmann arnd@arndb.de wrote:
I wonder if it would be easier to just use the gcc built-ins or inline assembly rather than the intrinsics, if including the header is such a pain.
Using the __builtins directly is not the way to go imo. The various intrinsic types also go by completely different __builtin names and the mapping of functions and parameters is not 1 to 1, so it is very cumbersome to use in that way. Also, we will be coding against the implementation and not against the published interface.
Some alternatives: - #define the double #include guard used by GCC's internal stdint.h (the one that does #include_next on the actual stdint.h) before including arm_neon.h. This is more of a hack but less of a kludge. - add an empty stdint.h - convince the GCC guys to supply some way of including the arm_neon.h header without doing any other includes (isn't it bad form anyway to include standard headers automatically if the user hasn't asked for it?)
In the mean time, inline asm is feasible for the particular implementation I am looking at.
Regards, Ard.