It's typically better to use CPU registers to their full capacity. For a portable piece of code, it means using 64-bits arithmetic and storage on 64-bits CPU, and only 32-bits on 32-bits CPU (otherwise, 64-bits instructions will be emulated in 32-bits mode, resulting in devastating performances).
That means it's necessary to detect the size of CPU registers, typically at compile-time (since runtime tests are expensive).
For years now, I've used the simple heuristic sizeof(nativeRegisters) == sizeof(size_t).
It has worked fine for a lot of platforms, but it appears to be a wrong heuristic for linux x32 : in this case, size_t is only 32-bits, while registers could still handle 64-bits. It results in some lost performance opportunity (significant for my use case).
I would like to correctly detect the usable size of CPU registers even in such a situation.
I suspect I could try to find some compiler-specific macro to special-case x32 mode. But I was wondering if something more generic would exist, to cover more situations. For example another target would be OpenVMS 64-bits : there, native register size is 64-bits, but size_t is only 32-bits.