Browse Source

Merge pull request #2484 from RajalakshmiSR/power-dynamic

Fix DYNAMIC_ARCH build for POWER9
tags/v0.3.10^2
Martin Kroeker GitHub 6 years ago
parent
commit
ad9e53154d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 37 additions and 5 deletions
  1. +1
    -1
      Makefile.system
  2. +4
    -4
      driver/others/dynamic_power.c
  3. +4
    -0
      kernel/power/caxpy_power9.S
  4. +7
    -0
      kernel/power/icamax_power9.S
  5. +7
    -0
      kernel/power/icamin_power9.S
  6. +7
    -0
      kernel/power/isamax_power9.S
  7. +7
    -0
      kernel/power/isamin_power9.S

+ 1
- 1
Makefile.system View File

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


+ 4
- 4
driver/others/dynamic_power.c View File

@@ -3,7 +3,7 @@

extern gotoblas_t gotoblas_POWER6;
extern gotoblas_t gotoblas_POWER8;
#if (!defined C_GCC) || (GCC_VERSION >= 60000)
#if (!defined __GNUC__) || ( __GNUC__ >= 6)
extern gotoblas_t gotoblas_POWER9;
#endif

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


+ 4
- 0
kernel/power/caxpy_power9.S View File

@@ -13,7 +13,11 @@

PROLOGUE

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


+ 7
- 0
kernel/power/icamax_power9.S View File

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

PROLOGUE

icamax_k:
.LCF0:
0: addis 2,12,.TOC.-.LCF0@ha


+ 7
- 0
kernel/power/icamin_power9.S View File

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

PROLOGUE

icamin_k:
.LCF0:
0: addis 2,12,.TOC.-.LCF0@ha


+ 7
- 0
kernel/power/isamax_power9.S View File

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

PROLOGUE

isamax_k:
.LCF0:
0: addis 2,12,.TOC.-.LCF0@ha


+ 7
- 0
kernel/power/isamin_power9.S View File

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

PROLOGUE

isamin_k:
.LCF0:
0: addis 2,12,.TOC.-.LCF0@ha


Loading…
Cancel
Save