summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authorscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-14 04:07:59 +0000
committerscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-14 04:07:59 +0000
commit234aab27f9922c8ae5512abe74875ca5f5469d79 (patch)
tree84f3aac297ceae8d75a2fca28241467f798cbd21 /third_party
parent91d8e627bc2a9a5085e088f5372f78508f3e3a88 (diff)
downloadchromium_src-234aab27f9922c8ae5512abe74875ca5f5469d79.zip
chromium_src-234aab27f9922c8ae5512abe74875ca5f5469d79.tar.gz
chromium_src-234aab27f9922c8ae5512abe74875ca5f5469d79.tar.bz2
Revert 206289 "Removed patch to GCC-style assembly in third_part..."
Caused compile failure on Linux. FAILED: gcc -MMD -MF obj/third_party/lzma_sdk/lzma_sdk.CpuArch.o.d -D_FILE_OFFSET_BITS=64 -DUSE_LINUX_BREAKPAD -DCHROMIUM_BUILD -DCOMPONENT_BUILD -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_NSS=1 -DUSE_X11=1 -DENABLE_ONE_CLICK_SIGNIN -DGTK_DISABLE_SINGLE_INCLUDES=1 -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_INPUT_SPEECH -DENABLE_NOTIFICATIONS -DENABLE_GPU=1 -DENABLE_EGLIMAGE=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_BACKGROUND=1 -DENABLE_AUTOMATION=1 -DENABLE_GOOGLE_NOW=1 -DENABLE_LANGUAGE_DETECTION=1 -DENABLE_PRINTING=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_MANAGED_USERS=1 -D_7ZIP_ST -D_LZMA_PROB32 -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -I../../third_party/lzma_sdk -fstack-protector --param=ssp-buffer-size=4 -pthread -fno-exceptions -fno-strict-aliasing -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-format -Wno-unused-result -m32 -mmmx -march=pentium4 -msse2 -mfpmath=sse -O0 -g -c ../../third_party/lzma_sdk/CpuArch.c -o obj/third_party/lzma_sdk/lzma_sdk.CpuArch.o ../../third_party/lzma_sdk/CpuArch.c: In function 'MyCPUID': ../../third_party/lzma_sdk/CpuArch.c:75:3:error: inconsistent operand constraints in an 'asm' ninja: build stopped: subcommand failed. > 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 TBR=waffles@chromium.org Review URL: https://codereview.chromium.org/16869006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206297 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, 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) ,