diff options
-rw-r--r-- | third_party/lzma_sdk/CpuArch.c | 6 | ||||
-rw-r--r-- | third_party/lzma_sdk/README.chromium | 3 | ||||
-rw-r--r-- | third_party/lzma_sdk/chromium.patch | 10 |
3 files changed, 14 insertions, 5 deletions
diff --git a/third_party/lzma_sdk/CpuArch.c b/third_party/lzma_sdk/CpuArch.c index 260cc1f..f8df6b2 100644 --- a/third_party/lzma_sdk/CpuArch.c +++ b/third_party/lzma_sdk/CpuArch.c @@ -73,9 +73,11 @@ static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d) #else __asm__ __volatile__ ( - "cpuid" + "mov %%ebx, %%edi\n" + "cpuid\n" + "xchg %%edi, %%ebx\n" : "=a" (*a) , - "=b" (*b) , + "=D" (*b) , "=c" (*c) , "=d" (*d) : "0" (function)) ; diff --git a/third_party/lzma_sdk/README.chromium b/third_party/lzma_sdk/README.chromium index eced88a..c9ea02f 100644 --- a/third_party/lzma_sdk/README.chromium +++ b/third_party/lzma_sdk/README.chromium @@ -15,8 +15,5 @@ proper file paths and generate a static lib. The patch in chromium.patch was applied to CpuArch.c to fix compile error on 32bit Linux. -2013-06-10: Removed chromium.patch and the associated changes, which caused a -runtime segmentation fault. - An #include <stdlib.h> needs to be added to CpuArch.h to avoid a warning on Win32. diff --git a/third_party/lzma_sdk/chromium.patch b/third_party/lzma_sdk/chromium.patch new file mode 100644 index 0000000..319a840 --- /dev/null +++ b/third_party/lzma_sdk/chromium.patch @@ -0,0 +1,10 @@ +76,78c76 +< "mov %%ebx, %%edi\n" +< "cpuid\n" +< "xchg %%edi, %%ebx\n" +--- +> "cpuid" +80c78 +< "=D" (*b) , +--- +> "=b" (*b) , |