Fixed crash on opening 7z/LZMA archives, x64 only

With Position Independent Code (PIC) enabled on x64, non-MSVC compilers use wrong inline assembly for cpuid
This commit is contained in:
alexey.lysiuk 2014-08-13 22:46:08 +03:00
parent f482dc094d
commit b461000795
1 changed files with 3 additions and 3 deletions

View File

@ -70,9 +70,9 @@ static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d)
*c = c2;
*d = d2;
#elif __PIC__
#elif defined __PIC__ && defined __i386__
/* GCC or Clang WITH position-independent code generation */
/* GCC or Clang WITH position-independent code generation, i386 only */
__asm__ __volatile__ (
"xchgl %%ebx, %1\n"
@ -86,7 +86,7 @@ static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d)
#else
/* GCC or Clang WITHOUT position-independent code generation */
/* GCC or Clang WITHOUT position-independent code generation, or x86_64 */
__asm__ __volatile__ (
"cpuid"