From 244c76250f1f88e9a4ada14a4671a1770d938d5a Mon Sep 17 00:00:00 2001 From: Hannu Hanhi Date: Sat, 24 Oct 2020 20:52:54 +0300 Subject: [PATCH 1/2] Use SSE3 in 32-bit x86 binaries --- src/CMakeLists.txt | 1 + src/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3409c49d3..3514fb477 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -549,6 +549,7 @@ if(${SRB2_CONFIG_USEASM}) endif() set(SRB2_USEASM ON) add_definitions(-DUSEASM) + set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -msse3 -mfpmath=sse) else() set(SRB2_USEASM OFF) add_definitions(-DNONX86 -DNORUSEASM) diff --git a/src/Makefile b/src/Makefile index 2fe0b26cd..5d5db056f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -277,7 +277,7 @@ OPTS += -DCOMPVERSION ifndef NONX86 ifndef GCC29 - ARCHOPTS?=-march=pentium + ARCHOPTS?=-msse3 -mfpmath=sse else ARCHOPTS?=-mpentium endif From 54cc9db7a5de4bda6b0b01883009b8340e8f2d92 Mon Sep 17 00:00:00 2001 From: Hannu Hanhi Date: Sat, 31 Oct 2020 18:04:44 +0200 Subject: [PATCH 2/2] Fix CMake SSE3 flag --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3514fb477..f201e43ea 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -549,7 +549,7 @@ if(${SRB2_CONFIG_USEASM}) endif() set(SRB2_USEASM ON) add_definitions(-DUSEASM) - set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -msse3 -mfpmath=sse) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse3 -mfpmath=sse") else() set(SRB2_USEASM OFF) add_definitions(-DNONX86 -DNORUSEASM)