diff --git a/Makefile.system b/Makefile.system index 095608e83a..635b3d660f 100644 --- a/Makefile.system +++ b/Makefile.system @@ -1648,7 +1648,11 @@ ifneq ($(C_COMPILER), SUN) CCOMMON_OPT += -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME endif endif +ifeq ( ,$(findstring pizfix,$(CEXTRALIB))) CCOMMON_OPT += -DASMNAME=$(FU)$(*F) -DASMFNAME=$(FU)$(*F)$(BU) -DNAME=$(*F)$(BU) -DCNAME=$(*F) -DCHAR_NAME=\"$(*F)$(BU)\" -DCHAR_CNAME=\"$(*F)\" +else +CCOMMON_OPT += -DASMNAME=$(FU)pizlonated_$(*F) -DASMFNAME=$(FU)pizlonated_$(*F)$(BU) -DNAME=$(*F)$(BU) -DCNAME=$(*F) -DCHAR_NAME=\"$(*F)$(BU)\" -DCHAR_CNAME=\"$(*F)\" +endif ifeq ($(CORE), PPC440) CCOMMON_OPT += -DALLOC_QALLOC diff --git a/common_linux.h b/common_linux.h index 5a1c4e1508..83111d2069 100644 --- a/common_linux.h +++ b/common_linux.h @@ -70,7 +70,7 @@ extern long int syscall (long int __sysno, ...); static inline int my_mbind(void *addr, unsigned long len, int mode, unsigned long *nodemask, unsigned long maxnode, unsigned flags) { -#if defined (__LSB_VERSION__) || defined(ARCH_ZARCH) +#if defined (__LSB_VERSION__) || defined(ARCH_ZARCH) || defined(__PIZLONATOR_WAS_HERE__) // So far, LSB (Linux Standard Base) don't support syscall(). // https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=3482 return 0; diff --git a/common_x86_64.h b/common_x86_64.h index 143e188a79..f3e936174c 100644 --- a/common_x86_64.h +++ b/common_x86_64.h @@ -83,11 +83,15 @@ static __inline void blas_lock(volatile BLASULONG *address){ while (*address) {YIELDING;} #ifndef C_MSVC +#ifdef __PIZLONATOR_WAS_HERE__ + ret=__atomic_exchange_n(address, 1, __ATOMIC_SEQ_CST); +#else __asm__ __volatile__( "xchgl %0, %1\n" : "=r"(ret), "=m"(*address) : "0"(1), "m"(*address) : "memory"); +#endif #else ret=InterlockedExchange64((volatile LONG64 *)(address), 1); #endif @@ -237,7 +241,7 @@ static __inline unsigned int blas_quickdivide(unsigned int x, unsigned int y){ y = blas_quick_divide_table[y]; - __asm__ __volatile__ ("mull %0" :"=d" (result), "+a"(x) : "0" (y)); + __asm__ __volatile__ ("mull %0" :"=d" (result), "+a"(x) : "0" (y) : "cc"); return result; } #endif