Workaround PIC limitations in cpuid.
authorIsaac Dunham <ibid.ag@gmail.com>
Thu, 28 Aug 2014 20:05:07 +0000 (13:05 -0700)
committerIsaac Dunham <ibid.ag@gmail.com>
Thu, 28 Aug 2014 20:05:07 +0000 (13:05 -0700)
commitdb7e6366cd86b57cd0712293968938058288bde0
treeb5fd2436e559db4d4326384affdde368292fe307
parent2702323f7d8b77c74cc0425f6c2f9e05d0d5926e
Workaround PIC limitations in cpuid.

cpuid uses register ebx, but ebx is reserved in PIC.
So save ebx, swap ebx & edi, and return edi.

Copied from Igor Pavlov's equivalent fix for 7zip (in CpuArch.c),
which is public domain and thus OK license-wise.
cpuid_x86.c