Merge pull request #2484 from RajalakshmiSR/power-dynamic

Fix DYNAMIC_ARCH build for POWER9
This commit is contained in:
Martin Kroeker 2020-03-04 08:06:06 +01:00 committed by GitHub
commit ad9e53154d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 37 additions and 5 deletions

View File

@ -327,7 +327,6 @@ ifeq ($(C_COMPILER), GCC)
#Version tests for supporting specific features (MS_ABI, POWER9 intrinsics) #Version tests for supporting specific features (MS_ABI, POWER9 intrinsics)
GCCVERSIONGTEQ4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 4) GCCVERSIONGTEQ4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 4)
GCCVERSIONGT4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 4) GCCVERSIONGT4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 4)
GCCVERSIONGT5 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 5)
GCCVERSIONGTEQ7 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 7) GCCVERSIONGTEQ7 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 7)
GCCVERSIONGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9) GCCVERSIONGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9)
GCCMINORVERSIONGTEQ7 := $(shell expr `$(CC) -dumpversion | cut -f2 -d.` \>= 7) GCCMINORVERSIONGTEQ7 := $(shell expr `$(CC) -dumpversion | cut -f2 -d.` \>= 7)
@ -575,6 +574,7 @@ ifneq ($(C_COMPILER), GCC)
DYNAMIC_CORE += POWER9 DYNAMIC_CORE += POWER9
endif endif
ifeq ($(C_COMPILER), GCC) ifeq ($(C_COMPILER), GCC)
GCCVERSIONGT5 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 5)
ifeq ($(GCCVERSIONGT5), 1) ifeq ($(GCCVERSIONGT5), 1)
DYNAMIC_CORE += POWER9 DYNAMIC_CORE += POWER9
else else

View File

@ -3,7 +3,7 @@
extern gotoblas_t gotoblas_POWER6; extern gotoblas_t gotoblas_POWER6;
extern gotoblas_t gotoblas_POWER8; extern gotoblas_t gotoblas_POWER8;
#if (!defined C_GCC) || (GCC_VERSION >= 60000) #if (!defined __GNUC__) || ( __GNUC__ >= 6)
extern gotoblas_t gotoblas_POWER9; extern gotoblas_t gotoblas_POWER9;
#endif #endif
@ -21,7 +21,7 @@ static char *corename[] = {
char *gotoblas_corename(void) { char *gotoblas_corename(void) {
if (gotoblas == &gotoblas_POWER6) return corename[1]; if (gotoblas == &gotoblas_POWER6) return corename[1];
if (gotoblas == &gotoblas_POWER8) return corename[2]; if (gotoblas == &gotoblas_POWER8) return corename[2];
#if (!defined C_GCC) || (GCC_VERSION >= 60000) #if (!defined __GNUC__) || ( __GNUC__ >= 6)
if (gotoblas == &gotoblas_POWER9) return corename[3]; if (gotoblas == &gotoblas_POWER9) return corename[3];
#endif #endif
return corename[0]; return corename[0];
@ -33,7 +33,7 @@ static gotoblas_t *get_coretype(void) {
return &gotoblas_POWER6; return &gotoblas_POWER6;
if (__builtin_cpu_is("power8")) if (__builtin_cpu_is("power8"))
return &gotoblas_POWER8; return &gotoblas_POWER8;
#if (!defined C_GCC) || (GCC_VERSION >= 60000) #if (!defined __GNUC__) || ( __GNUC__ >= 6)
if (__builtin_cpu_is("power9")) if (__builtin_cpu_is("power9"))
return &gotoblas_POWER9; return &gotoblas_POWER9;
#endif #endif
@ -59,7 +59,7 @@ static gotoblas_t *force_coretype(char * coretype) {
{ {
case 1: return (&gotoblas_POWER6); case 1: return (&gotoblas_POWER6);
case 2: return (&gotoblas_POWER8); case 2: return (&gotoblas_POWER8);
#if (!defined C_GCC) || (GCC_VERSION >= 60000) #if (!defined __GNUC__) || ( __GNUC__ >= 6)
case 3: return (&gotoblas_POWER9); case 3: return (&gotoblas_POWER9);
#endif #endif
default: return NULL; default: return NULL;

View File

@ -13,7 +13,11 @@
PROLOGUE PROLOGUE
#ifdef CONJ
caxpyc_k:
#else
caxpy_k: caxpy_k:
#endif
.LCF0: .LCF0:
0: addis 2,12,.TOC.-.LCF0@ha 0: addis 2,12,.TOC.-.LCF0@ha
addi 2,2,.TOC.-.LCF0@l addi 2,2,.TOC.-.LCF0@l

View File

@ -1,3 +1,4 @@
/*
.file "icamax.c" .file "icamax.c"
.abiversion 2 .abiversion 2
.section ".text" .section ".text"
@ -5,6 +6,12 @@
.p2align 4,,15 .p2align 4,,15
.globl icamax_k .globl icamax_k
.type icamax_k, @function .type icamax_k, @function
*/
#define ASSEMBLER
#include "common.h"
PROLOGUE
icamax_k: icamax_k:
.LCF0: .LCF0:
0: addis 2,12,.TOC.-.LCF0@ha 0: addis 2,12,.TOC.-.LCF0@ha

View File

@ -1,3 +1,4 @@
/*
.file "icamin.c" .file "icamin.c"
.abiversion 2 .abiversion 2
.section ".text" .section ".text"
@ -5,6 +6,12 @@
.p2align 4,,15 .p2align 4,,15
.globl icamin_k .globl icamin_k
.type icamin_k, @function .type icamin_k, @function
*/
#define ASSEMBLER
#include "common.h"
PROLOGUE
icamin_k: icamin_k:
.LCF0: .LCF0:
0: addis 2,12,.TOC.-.LCF0@ha 0: addis 2,12,.TOC.-.LCF0@ha

View File

@ -1,3 +1,4 @@
/*
.file "isamax.c" .file "isamax.c"
.abiversion 2 .abiversion 2
.section ".text" .section ".text"
@ -5,6 +6,12 @@
.p2align 4,,15 .p2align 4,,15
.globl isamax_k .globl isamax_k
.type isamax_k, @function .type isamax_k, @function
*/
#define ASSEMBLER
#include "common.h"
PROLOGUE
isamax_k: isamax_k:
.LCF0: .LCF0:
0: addis 2,12,.TOC.-.LCF0@ha 0: addis 2,12,.TOC.-.LCF0@ha

View File

@ -1,3 +1,4 @@
/*
.file "isamin.c" .file "isamin.c"
.abiversion 2 .abiversion 2
.section ".text" .section ".text"
@ -5,6 +6,12 @@
.p2align 4,,15 .p2align 4,,15
.globl isamin_k .globl isamin_k
.type isamin_k, @function .type isamin_k, @function
*/
#define ASSEMBLER
#include "common.h"
PROLOGUE
isamin_k: isamin_k:
.LCF0: .LCF0:
0: addis 2,12,.TOC.-.LCF0@ha 0: addis 2,12,.TOC.-.LCF0@ha