Commit be11c4e9 authored by kasperl@chromium.org's avatar kasperl@chromium.org

Patch by Craig Schlenter. See http://codereview.chromium.org/118153

Change stack alignment on linux to 16 bytes to keep gcc 4.4 happy. 
This fixes the mksnapshot segfault without requiring -fno-tree-vectorize
which just avoided the problem by not generating code with movdqa.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 0a0ede07
...@@ -44,10 +44,10 @@ if ANDROID_TOP is None: ...@@ -44,10 +44,10 @@ if ANDROID_TOP is None:
ANDROID_TOP="" ANDROID_TOP=""
# TODO: Sort these issues out properly but as a temporary solution for gcc 4.4 # TODO: Sort these issues out properly but as a temporary solution for gcc 4.4
# on linux we need these compiler flags to avoid a mksnapshot segfault, avoid # on linux we need these compiler flags to avoid crashes in the v8 test suite
# crashes in the v8 test suite and avoid dtoa.c strict aliasing issues # and avoid dtoa.c strict aliasing issues
if os.environ.get('GCC_VERSION') == '44': if os.environ.get('GCC_VERSION') == '44':
GCC_EXTRA_CCFLAGS = ['-fno-tree-vectorize', '-fno-tree-vrp'] GCC_EXTRA_CCFLAGS = ['-fno-tree-vrp']
GCC_DTOA_EXTRA_CCFLAGS = ['-fno-strict-aliasing'] GCC_DTOA_EXTRA_CCFLAGS = ['-fno-strict-aliasing']
else: else:
GCC_EXTRA_CCFLAGS = [] GCC_EXTRA_CCFLAGS = []
......
...@@ -88,10 +88,15 @@ double OS::nan_value() { ...@@ -88,10 +88,15 @@ double OS::nan_value() {
int OS::ActivationFrameAlignment() { int OS::ActivationFrameAlignment() {
// Floating point code runs faster if the stack is 8-byte aligned. #ifdef V8_TARGET_ARCH_ARM
// On EABI ARM targets this is required for fp correctness in the // On EABI ARM targets this is required for fp correctness in the
// runtime system. // runtime system.
return 8; return 8;
#else
// With gcc 4.4 the tree vectorization optimiser can generate code
// that requires 16 byte alignment such as movdqa on x86.
return 16;
#endif
} }
......
...@@ -307,8 +307,6 @@ ...@@ -307,8 +307,6 @@
'cflags': [ 'cflags': [
# Avoid gcc 4.4 strict aliasing issues in dtoa.c # Avoid gcc 4.4 strict aliasing issues in dtoa.c
'-fno-strict-aliasing', '-fno-strict-aliasing',
# Avoid gcc 4.4 mksnapshot segfault.
'-fno-tree-vectorize',
# Avoid crashes with gcc 4.4 in the v8 test suite. # Avoid crashes with gcc 4.4 in the v8 test suite.
'-fno-tree-vrp', '-fno-tree-vrp',
], ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment