core-util, cpu-x86: use __get_cpuid() instead of homegrown assembly
authorTanu Kaskinen <tanuk@iki.fi>
Wed, 22 Nov 2017 15:14:10 +0000 (17:14 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Wed, 6 Dec 2017 23:06:48 +0000 (01:06 +0200)
commitc8bd93c5a764940abd280901a2b56af18ece24b0
treebaa7cefcbb02dd19f3493ac6ed4ea947df168580
parent2062fc8b0e69f383cfd4c4773bf8b9dcef20e035
core-util, cpu-x86: use __get_cpuid() instead of homegrown assembly

The get_cpuid() function in cpu-x86.c was buggy on x86-64. When building
without optimizations, the homegrown assembly code overwrote the
beginning of the function argument list on the stack. That happened to
work fine on regular x86-64, but caused crashing with the x32 ABI.

At least GCC and clang provide cpuid.h, which has the __get_cpuid()
function that can be used instead of the homegrown assembly.

The PA_REG_* constants can be removed as well, because they're not used
any more.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=103656
configure.ac
src/pulsecore/core-util.c
src/pulsecore/cpu-x86.c
src/pulsecore/cpu-x86.h