Skip to content

Commit 25907e6

Browse files
authored
Merge pull request #101 from xianyi/develop
rebase
2 parents a85ac71 + 9789375 commit 25907e6

File tree

6 files changed

+44
-2
lines changed

6 files changed

+44
-2
lines changed

Makefile.x86

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,19 @@ LIBATLAS = -L$(ATLASPATH)/32 -lcblas -lf77blas -latlas -lm
5454
else
5555
LIBATLAS = -L$(ATLASPATH)/32 -lptf77blas -lptatlas -lpthread -lm
5656
endif
57+
58+
ifdef HAVE_SSE3
59+
ifndef DYNAMIC_ARCH
60+
CCOMMON_OPT += -msse3
61+
FCOMMON_OPT += -msse3
62+
ifdef HAVE_SSSE3
63+
CCOMMON_OPT += -mssse3
64+
FCOMMON_OPT += -mssse3
65+
endif
66+
ifdef HAVE_SSE4_1
67+
CCOMMON_OPT += -msse4.1
68+
FCOMMON_OPT += -msse4.1
69+
endif
70+
endif
71+
endif
72+

cmake/cc.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,19 @@ if (NOT DYNAMIC_ARCH)
124124
if (HAVE_AVX)
125125
set (CCOMMON_OPT "${CCOMMON_OPT} -mavx")
126126
endif ()
127+
if (HAVE_SSE)
128+
set (CCOMMON_OPT "${CCOMMON_OPT} -msse")
129+
endif ()
130+
if (HAVE_SSE2)
131+
set (CCOMMON_OPT "${CCOMMON_OPT} -msse2")
132+
endif ()
127133
if (HAVE_SSE3)
128134
set (CCOMMON_OPT "${CCOMMON_OPT} -msse3")
129135
endif ()
130136
if (HAVE_SSSE3)
131137
set (CCOMMON_OPT "${CCOMMON_OPT} -mssse3")
132138
endif ()
139+
if (HAVE_SSE4_1)
140+
set (CCOMMON_OPT "${CCOMMON_OPT} -msse4.1")
141+
endif ()
133142
endif()

cmake/system.cmake

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,21 @@ if (DEFINED TARGET)
7070
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx2")
7171
endif()
7272
endif()
73+
if (DEFINED HAVE_SSE)
74+
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse")
75+
endif()
76+
if (DEFINED HAVE_SSE2)
77+
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse2")
78+
endif()
7379
if (DEFINED HAVE_SSE3)
7480
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse3")
7581
endif()
82+
if (DEFINED HAVE_SSSE3)
83+
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mssse3")
84+
endif()
85+
if (DEFINED HAVE_SSE4_1)
86+
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse4.1")
87+
endif()
7688
endif()
7789

7890
if (DEFINED TARGET)

kernel/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ endif
4545

4646
ifdef TARGET_CORE
4747
ifeq ($(TARGET_CORE), $(filter $(TARGET_CORE),PRESCOTT CORE2 PENRYN DUNNINGTON ATOM NANO SANDYBRIDGE HASWELL NEHALEM ZEN BARCELONA BOBCAT BULLDOZER PILEDRIVER EXCAVATOR STEAMROLLER OPTERON_SSE3))
48-
override CFLAGS += -msse3 -mssse3 -msse4.1
48+
override CFLAGS += -msse -msse2 -msse3 -mssse3 -msse4.1
49+
endif
50+
ifeq ($(TARGET_CORE), $(filter $(TARGET_CORE),KATMAI COPPERMINE BANIAS NORTHWOOD ATHLON OPTERON))
51+
override CFLAGS += -msse -msse2
4952
endif
5053
ifeq ($(TARGET_CORE), COOPERLAKE)
5154
override CFLAGS += -DBUILD_KERNEL -DTABLE_NAME=gotoblas_$(TARGET_CORE)

kernel/setparam-ref.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ static void init_parameter(void) {
11641164
TABLE_NAME.xgemm3m_q = QGEMM_DEFAULT_Q;
11651165
#endif
11661166

1167-
#if (CORE_KATMAI) || (CORE_COPPERMINE) || (CORE_BANIAS) || (CORE_YONAH) || (CORE_ATHLON)
1167+
#if defined(CORE_KATMAI) || defined(CORE_COPPERMINE) || defined(CORE_BANIAS) || defined(CORE_YONAH) || defined(CORE_ATHLON)
11681168

11691169
#ifdef DEBUG
11701170
fprintf(stderr, "Katmai, Coppermine, Banias, Athlon\n");

kernel/x86_64/iamax_sse.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
#define MAXPS maxps
5252
#define MAXSS maxss
5353
#ifdef USE_MIN
54+
#undef MAXPS
55+
#undef MAXSS
5456
#define MAXPS minps
5557
#define MAXSS minss
5658
#endif

0 commit comments

Comments
 (0)