[Mesa-dev] [PATCH 1/3] u_cpu_detect: make arch and little_endian constants, add abi and x86-64

Luca Barbieri luca at luca-barbieri.com
Fri Aug 13 19:50:34 PDT 2010


I came up with yet another solution, which I believe is the right one.

We remove the arch/abi/endianness in u_cpu_detect.h, but add them as
inline function helpers in rtasm.
Currently they would return a constant, but could be changed if we
ever want rtasm to target anything but the current running CPU.

Most places outside of code generation will actually not even
parse/compile for the wrong architecture (they are inline assembly or
intrinsic usage), and thus can't use ifs, so this should work well.

Changes to replace PIPE_ARCH_* with commonly used macros can be done
separately if desired.


More information about the mesa-dev mailing list