commit
abea977ded
|
@ -144,9 +144,10 @@ endif
|
||||||
|
|
||||||
# On x86_64 build getarch with march=native. This is required to detect AVX512 support in getarch.
|
# On x86_64 build getarch with march=native. This is required to detect AVX512 support in getarch.
|
||||||
ifeq ($(ARCH), x86_64)
|
ifeq ($(ARCH), x86_64)
|
||||||
|
ifneq ($(C_COMPILER), PGI)
|
||||||
GETARCH_FLAGS += -march=native
|
GETARCH_FLAGS += -march=native
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef INTERFACE64
|
ifdef INTERFACE64
|
||||||
ifneq ($(INTERFACE64), 0)
|
ifneq ($(INTERFACE64), 0)
|
||||||
|
|
|
@ -28,11 +28,15 @@ endif
|
||||||
ifeq ($(CORE), HASWELL)
|
ifeq ($(CORE), HASWELL)
|
||||||
ifndef DYNAMIC_ARCH
|
ifndef DYNAMIC_ARCH
|
||||||
ifndef NO_AVX2
|
ifndef NO_AVX2
|
||||||
|
ifeq ($(C_COMPILER), GCC)
|
||||||
CCOMMON_OPT += -mavx2
|
CCOMMON_OPT += -mavx2
|
||||||
|
endif
|
||||||
|
ifeq ($(F_COMPILER), GFORTRAN)
|
||||||
FCOMMON_OPT += -mavx2
|
FCOMMON_OPT += -mavx2
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -129,12 +129,13 @@ static __inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx){
|
||||||
*ecx=cpuinfo[2];
|
*ecx=cpuinfo[2];
|
||||||
*edx=cpuinfo[3];
|
*edx=cpuinfo[3];
|
||||||
#else
|
#else
|
||||||
__asm__ __volatile__("cpuid"
|
__asm__ __volatile__("mov $0, %%ecx;"
|
||||||
|
"cpuid"
|
||||||
: "=a" (*eax),
|
: "=a" (*eax),
|
||||||
"=b" (*ebx),
|
"=b" (*ebx),
|
||||||
"=c" (*ecx),
|
"=c" (*ecx),
|
||||||
"=d" (*edx)
|
"=d" (*edx)
|
||||||
: "0" (op), "c"(0));
|
: "0" (op));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue