On Tue, Feb 25, 2025 at 8:19 AM Tom Kacvinsky <tkacv...@gmail.com> wrote:
> Hi Kyrylo, > > On Tue, Feb 25, 2025 at 4:01 AM Kyrylo Tkachov <ktkac...@nvidia.com> > wrote: > > > On 24 Feb 2025, at 20:40, Tom Kacvinsky via Gcc <gcc@gcc.gnu.org> wrote: >> > >> > I am trying to find where the aarch64 SIMD built in types are defined in >> > GCC. >> > For instance, __Int8x8_t. I see some code in gcc/config/aarch64 for >> these, >> > but >> > then it goes deeper into internals of gcc that I don't quite follow. >> > >> > Any help pointing to where I should look would be appreciated. >> > >> >> The logic for defining them is in aarch64-builtins.cc . The information >> about them is tracked in aarch64_simd_type_info structs. >> There’s some preprocessor machinery at work so it may not be obvious how >> it works from a first read. >> There are user-level typedefs in arm_private_neon_types.h that is later >> included standard ACLE headers like arm_neon.h and arm_sve.h >> What particular information are you looking for? >> > > I have been playing around with a front end that doesn't have these types > defined so I was looking > to see how they were defined by GCC so I could add them with something > similar to GCC's -include > option. > I realized it doesn't matter if I get the front end to match up the built-in aarch64 types, it will generate code that will eventually barf when compiled because of "conflicting" typedefs from the generated code and the built-in typedefs from GCC. It was worth a shot, though. Thanks for the help - I was able to follow along the basic gist of the code by expanding the macros using -E instead of -c for the compile commands. Tom