Browse Source

Disable using simple thread level3 to fix a bug on Loongson 3B.

tags/v0.1.0^2
Xianyi Zhang 14 years ago
parent
commit
285e69e2d1
2 changed files with 13 additions and 5 deletions
  1. +8
    -1
      Makefile.system
  2. +5
    -4
      common_mips64.h

+ 8
- 1
Makefile.system View File

@@ -275,7 +275,12 @@ endif
BINARY_DEFINED = 1
endif

ifeq ($(CORE), LOONGSON3A)
ifeq ($(CORE), LOONGSON3A)
CCOMMON_OPT += -march=mips64
FCOMMON_OPT += -march=mips64
endif

ifeq ($(CORE), LOONGSON3B)
CCOMMON_OPT += -march=mips64
FCOMMON_OPT += -march=mips64
endif
@@ -529,8 +534,10 @@ ifdef SMP
CCOMMON_OPT += -DSMP_SERVER

ifeq ($(ARCH), mips64)
ifneq ($(CORE), LOONGSON3B)
USE_SIMPLE_THREADED_LEVEL3 = 1
endif
endif

ifeq ($(USE_OPENMP), 1)
# USE_SIMPLE_THREADED_LEVEL3 = 1


+ 5
- 4
common_mips64.h View File

@@ -119,7 +119,8 @@ static inline unsigned int rpcc(void){
return ret;
}

//#if defined(LOONGSON3A) || defined(LOONGSON3B)
#if defined(LOONGSON3A) || defined(LOONGSON3B)
#define WHEREAMI
static inline int WhereAmI(void){
int ret=0;
__asm__ __volatile__(".set push \n"
@@ -129,7 +130,7 @@ static inline int WhereAmI(void){
return ret;

}
//#endif
#endif

static inline int blas_quickdivide(blasint x, blasint y){
return x / y;
@@ -252,8 +253,8 @@ REALNAME: ;\
#endif

#if defined(LOONGSON3B)
#define PAGESIZE (16UL << 10)
#define FIXED_PAGESIZE (16UL << 10)
#define PAGESIZE (32UL << 10)
#define FIXED_PAGESIZE (32UL << 10)
#endif

#ifndef PAGESIZE


Loading…
Cancel
Save