summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authorwaffles@chromium.org <waffles@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-14 03:49:21 +0000
committerwaffles@chromium.org <waffles@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-14 03:49:21 +0000
commitb5f5d16b76dd83cb9bc7da539f9574e0ed4025cb (patch)
tree1510295b0a7ee23a5f813e3c39089656950077ac /third_party
parentd9fc7e8651670ed1df8fe43434630e0c57b5ede2 (diff)
downloadchromium_src-b5f5d16b76dd83cb9bc7da539f9574e0ed4025cb.zip
chromium_src-b5f5d16b76dd83cb9bc7da539f9574e0ed4025cb.tar.gz
chromium_src-b5f5d16b76dd83cb9bc7da539f9574e0ed4025cb.tar.bz2
Removed patch to GCC-style assembly in third_party/lzma_sdk.
Previously, this code caused a segmentation fault under certain compilers using optimization; in particular the high 32 bits of EBX are zeroed as a result of the mov instruction. However, if the compiler is using EBX to store a 64-bit address (which proved to be the case for Courgette), this results in a segmentation fault. The following fixes were also considered and verified as working: `push $ebx` at the start of the modified assembly section and `pop $ebx` at the end. Add "ebx" to the clobber list of the instruction to prevent the compiler from depending upon it not being clobbered. However, I can't seem to verify that the build breaks on Linux x86 without this change; so I don't see why we need this patch. Therefore, I've simply removed it. BUG=248385 TBR=bashi@chromium.org Review URL: https://chromiumcodereview.appspot.com/16402015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206289 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/lzma_sdk/CpuArch.c6
-rw-r--r--third_party/lzma_sdk/README.chromium3
-rw-r--r--third_party/lzma_sdk/chromium.patch10
3 files changed, 5 insertions, 14 deletions
diff --git a/third_party/lzma_sdk/CpuArch.c b/third_party/lzma_sdk/CpuArch.c
index f8df6b2..260cc1f 100644
--- a/third_party/lzma_sdk/CpuArch.c
+++ b/third_party/lzma_sdk/CpuArch.c
@@ -73,11 +73,9 @@ static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d)
#else
__asm__ __volatile__ (
- "mov %%ebx, %%edi\n"
- "cpuid\n"
- "xchg %%edi, %%ebx\n"
+ "cpuid"
: "=a" (*a) ,
- "=D" (*b) ,
+ "=b" (*b) ,
"=c" (*c) ,
"=d" (*d)
: "0" (function)) ;
diff --git a/third_party/lzma_sdk/README.chromium b/third_party/lzma_sdk/README.chromium
index c9ea02f..eced88a 100644
--- a/third_party/lzma_sdk/README.chromium
+++ b/third_party/lzma_sdk/README.chromium
@@ -15,5 +15,8 @@ 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
deleted file mode 100644
index 319a840..0000000
--- a/third_party/lzma_sdk/chromium.patch
+++ /dev/null
@@ -1,10 +0,0 @@
-76,78c76
-< "mov %%ebx, %%edi\n"
-< "cpuid\n"
-< "xchg %%edi, %%ebx\n"
----
-> "cpuid"
-80c78
-< "=D" (*b) ,
----
-> "=b" (*b) ,