Commit 0424edcb by Nicolas Capens Committed by Nicolas Capens

Don't generate (S)SSE3 instructions in static code.

-march=core2 implies support for both the SSE3 and SSSE3 instruction set extensions. Chrome should run on CPUs with only SSE2 as well. Also, make use of SSE on x86-32 for floating-point operations, to be consistent with x86-64, and don't favor any specific architecture for tuning. Bug chromium:797763 Change-Id: Ia17428734460ed855f3aa0f83c6d2f6b3775094c Reviewed-on: https://swiftshader-review.googlesource.com/15688Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 7bc079c2
...@@ -74,13 +74,16 @@ config("swiftshader_config") { ...@@ -74,13 +74,16 @@ config("swiftshader_config") {
cflags += [ cflags += [
"-m64", "-m64",
"-fPIC", "-fPIC",
"-march=core2", "-march=x86-64",
"-mtune=generic",
] ]
} else { # 32 bit version } else { # 32 bit version
cflags += [ cflags += [
"-m32", "-m32",
"-msse2", "-msse2",
"-march=i686", "-mfpmath=sse",
"-march=pentium4",
"-mtune=generic",
] ]
} }
......
...@@ -166,12 +166,15 @@ else() ...@@ -166,12 +166,15 @@ else()
if(ARCH EQUAL "x86") if(ARCH EQUAL "x86")
set_cpp_flag("-m32") set_cpp_flag("-m32")
set_cpp_flag("-msse2") set_cpp_flag("-msse2")
set_cpp_flag("-march=i686") set_cpp_flag("-mfpmath=sse")
set_cpp_flag("-march=pentium4")
set_cpp_flag("-mtune=generic")
endif() endif()
if(ARCH EQUAL "x86_64") if(ARCH EQUAL "x86_64")
set_cpp_flag("-m64") set_cpp_flag("-m64")
set_cpp_flag("-fPIC") set_cpp_flag("-fPIC")
set_cpp_flag("-march=core2") set_cpp_flag("-march=x86-64")
set_cpp_flag("-mtune=generic")
endif() endif()
# Use -g3 to have even more debug info # Use -g3 to have even more debug info
......
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