void-packages/srcpkgs/cpufrequtils
Jürgen Buchmüller 973b27b91d cpufrequtils: handle i386 -fPIC case
One problem with the cpuid instruction is that it uses %ebx which,
when code is compiled as PIC for i386, is used as the PIC base register.
This patch tries to handle this case by replacing the second register (%1)
constraint with "=r", i.e. any (other) register, and swapping %ebx and %1
around the cpuid instruction.

This patch could use a test, preferably on real i686 hardware.
At least it needs some review and perhaps inspection of the generated
assembler output.

The idea and reasoning was taken from this comment:
http://gcc.gnu.org/ml/gcc-patches/2007-09/msg00324.html
2016-10-13 22:53:49 +02:00
..
patches cpufrequtils: handle i386 -fPIC case 2016-10-13 22:53:49 +02:00
template cpufrequtils: handle i386 -fPIC case 2016-10-13 22:53:49 +02:00