Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile.system
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion common_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 5 additions & 1 deletion common_x86_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading