Remove long-dead sparc support. Sparc (v8) has not been a supported platform
since the 1.4 release (and configure would abort when run with sparc v8), but the code was left in place. Sparc v9 (32 or 64 bit) are still supported targets. This commit was SVN r25258.
Этот коммит содержится в:
родитель
98e98ce2c5
Коммит
431f1b6f8c
@ -67,7 +67,6 @@ EXTRA_DIST = \
|
||||
base/MIPS.asm \
|
||||
base/POWERPC32.asm \
|
||||
base/POWERPC64.asm \
|
||||
base/SPARC.asm \
|
||||
base/SPARCV9_32.asm \
|
||||
base/SPARCV9_64.asm
|
||||
|
||||
|
@ -1,80 +0,0 @@
|
||||
START_FILE
|
||||
TEXT
|
||||
|
||||
ALIGN(4)
|
||||
|
||||
START_FUNC(opal_atomic_mb)
|
||||
!#PROLOGUE# 0
|
||||
!#PROLOGUE# 1
|
||||
retl
|
||||
nop
|
||||
END_FUNC(opal_atomic_mb)
|
||||
|
||||
|
||||
START_FUNC(opal_atomic_rmb)
|
||||
!#PROLOGUE# 0
|
||||
!#PROLOGUE# 1
|
||||
retl
|
||||
nop
|
||||
END_FUNC(opal_atomic_rmb)
|
||||
|
||||
|
||||
START_FUNC(opal_atomic_wmb)
|
||||
!#PROLOGUE# 0
|
||||
!#PROLOGUE# 1
|
||||
retl
|
||||
nop
|
||||
END_FUNC(opal_atomic_wmb)
|
||||
|
||||
|
||||
START_FUNC(opal_atomic_init)
|
||||
!#PROLOGUE# 0
|
||||
!#PROLOGUE# 1
|
||||
stb %o1, [%o0]
|
||||
retl
|
||||
nop
|
||||
END_FUNC(opal_atomic_init)
|
||||
|
||||
|
||||
START_FUNC(opal_atomic_trylock)
|
||||
!#PROLOGUE# 0
|
||||
!#PROLOGUE# 1
|
||||
ldstub [%o0], %o0
|
||||
and %o0, 0xff, %o0
|
||||
subcc %g0, %o0, %g0
|
||||
retl
|
||||
subx %g0, -1, %o0
|
||||
END_FUNC(opal_atomic_trylock)
|
||||
|
||||
|
||||
START_FUNC(opal_atomic_lock)
|
||||
!#PROLOGUE# 0
|
||||
save %sp, -112, %sp
|
||||
!#PROLOGUE# 1
|
||||
LSYM(retry)
|
||||
ldstub [%i0], %l0
|
||||
tst %l0
|
||||
be REFLSYM(out)
|
||||
nop
|
||||
LSYM(loop)
|
||||
ldub [%i0], %l0
|
||||
tst %l0
|
||||
bne REFLSYM(loop)
|
||||
nop
|
||||
ba,a REFLSYM(retry)
|
||||
LSYM(out)
|
||||
nop
|
||||
ret
|
||||
restore
|
||||
END_FUNC(opal_atomic_lock)
|
||||
|
||||
|
||||
START_FUNC(opal_atomic_unlock)
|
||||
!#PROLOGUE# 0
|
||||
!#PROLOGUE# 1
|
||||
stbar
|
||||
stb %g0, [%o0]
|
||||
|
||||
retl
|
||||
nop
|
||||
END_FUNC(opal_atomic_unlock)
|
@ -32,6 +32,5 @@ include opal/sys/ia32/Makefile.am
|
||||
include opal/sys/ia64/Makefile.am
|
||||
include opal/sys/mips/Makefile.am
|
||||
include opal/sys/powerpc/Makefile.am
|
||||
include opal/sys/sparc/Makefile.am
|
||||
include opal/sys/sparcv9/Makefile.am
|
||||
include opal/sys/win32/Makefile.am
|
||||
|
@ -1,22 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# This makefile.am does not stand on its own - it is included from opal/include/Makefile.am
|
||||
|
||||
headers += \
|
||||
opal/sys/sparc/atomic.h
|
@ -1,154 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef OMPI_SYS_ARCH_ATOMIC_H
|
||||
#define OMPI_SYS_ARCH_ATOMIC_H 1
|
||||
|
||||
|
||||
#if OPAL_WANT_SMP_LOCKS
|
||||
#define MB() __asm__ __volatile__ ("" : : : "memory")
|
||||
#else
|
||||
#define MB()
|
||||
#endif
|
||||
|
||||
#ifdef OMPI_GENERATE_ASM_FILE
|
||||
struct opal_atomic_lock_t {
|
||||
union {
|
||||
volatile int lock; /**< The lock address (an integer) */
|
||||
volatile unsigned char sparc_lock; /**< The lock address on sparc */
|
||||
char padding[sizeof(int)]; /**< Array for optional padding */
|
||||
} u;
|
||||
};
|
||||
typedef struct opal_atomic_lock_t opal_atomic_lock_t;
|
||||
#endif
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* Define constants for Sparc
|
||||
*
|
||||
*********************************************************************/
|
||||
#define OPAL_HAVE_ATOMIC_MEM_BARRIER 1
|
||||
|
||||
#define OPAL_HAVE_ATOMIC_CMPSET_32 0
|
||||
#define OPAL_HAVE_ATOMIC_CMPSET_64 0
|
||||
|
||||
#define OPAL_HAVE_ATOMIC_MATH_32 1
|
||||
#define OPAL_HAVE_ATOMIC_SUB_32 1
|
||||
#define OPAL_HAVE_ATOMIC_ADD_32 1
|
||||
|
||||
#define OPAL_HAVE_ATOMIC_SPINLOCKS 1
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* Memory Barriers
|
||||
*
|
||||
*********************************************************************/
|
||||
#if OMPI_GCC_INLINE_ASSEMBLY
|
||||
|
||||
static inline void opal_atomic_mb(void)
|
||||
{
|
||||
MB();
|
||||
}
|
||||
|
||||
|
||||
static inline void opal_atomic_rmb(void)
|
||||
{
|
||||
MB();
|
||||
}
|
||||
|
||||
|
||||
static inline void opal_atomic_wmb(void)
|
||||
{
|
||||
MB();
|
||||
}
|
||||
|
||||
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* Atomic spinlocks
|
||||
*
|
||||
*********************************************************************/
|
||||
#if OMPI_GCC_INLINE_ASSEMBLY
|
||||
|
||||
/* for these, the lock is held whenever lock.sparc_lock != 0. We
|
||||
attempt to leave it as OPAL_LOCKED whenever possible */
|
||||
|
||||
|
||||
static inline void opal_atomic_init(opal_atomic_lock_t* lock, int value)
|
||||
{
|
||||
lock->u.sparc_lock = (unsigned char) value;
|
||||
}
|
||||
|
||||
|
||||
static inline int opal_atomic_trylock(opal_atomic_lock_t *lock)
|
||||
{
|
||||
unsigned char result;
|
||||
|
||||
/* try to load the lock byte (atomically making the memory byte
|
||||
contain all 1s). If the byte used to be 0, we now have the
|
||||
lock. Otherwise, someone else has the lock. Either way, the
|
||||
lock is now held. */
|
||||
__asm__ __volatile__ ("\t"
|
||||
"ldstub [%1], %0"
|
||||
: "+r"(result)
|
||||
: "r"(&(lock->u.sparc_lock))
|
||||
: "memory");
|
||||
return (result == 0);
|
||||
}
|
||||
|
||||
|
||||
static inline void opal_atomic_lock(opal_atomic_lock_t *lock)
|
||||
{
|
||||
/* From page 264 of The SPARC Architecture Manual, Version 8 */
|
||||
__asm__ __volatile__ (
|
||||
"1: \n\t"
|
||||
"ldstub [%0], %%l0 \n\t"
|
||||
"tst %%l0 \n\t"
|
||||
"be 3f \n\t"
|
||||
"nop \n"
|
||||
"2: \n\t"
|
||||
"ldub [%0], %%l0 \n\t"
|
||||
"tst %%l0 \n\t"
|
||||
"bne 2b \n\t"
|
||||
"nop \n\t"
|
||||
"ba,a 1b \n"
|
||||
"3: \n\t"
|
||||
"nop"
|
||||
:
|
||||
: "r"(&(lock->u.sparc_lock))
|
||||
: "%l0", "memory");
|
||||
}
|
||||
|
||||
|
||||
static inline void opal_atomic_unlock(opal_atomic_lock_t *lock)
|
||||
{
|
||||
/* 0 out that byte in memory */
|
||||
__asm__ __volatile__ ("\t"
|
||||
"stbar \n\t"
|
||||
"stb %%g0, [%0] \n\t"
|
||||
:
|
||||
: "r"(&(lock->u.sparc_lock))
|
||||
: "memory");
|
||||
}
|
||||
|
||||
#endif /* OMPI_GCC_INLINE_ASSEMBLY */
|
||||
|
||||
|
||||
#endif /* ! OMPI_SYS_ARCH_ATOMIC_H */
|
@ -1,37 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
CFILE=/tmp/opal_atomic_$$.c
|
||||
|
||||
trap "/bin/rm -f $CFILE; exit 0" 0 1 2 15
|
||||
|
||||
echo Updating atomic.s from atomic.h using gcc
|
||||
|
||||
cat > $CFILE<<EOF
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
#define static
|
||||
#define inline
|
||||
#define OMPI_GCC_INLINE_ASSEMBLY 1
|
||||
#define OPAL_WANT_SMP_LOCKS 1
|
||||
#define OMPI_GENERATE_ASM_FILE
|
||||
#include "atomic.h"
|
||||
EOF
|
||||
|
||||
gcc -O1 -I. -S $CFILE -o atomic.s
|
Загрузка…
x
Ссылка в новой задаче
Block a user