From 431f1b6f8c5a7a1fd538f1a94cb7d690721a209d Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Tue, 11 Oct 2011 18:46:06 +0000 Subject: [PATCH] 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. --- opal/asm/Makefile.am | 1 - opal/asm/base/SPARC.asm | 80 ------------ opal/include/opal/sys/Makefile.am | 1 - opal/include/opal/sys/sparc/Makefile.am | 22 ---- opal/include/opal/sys/sparc/atomic.h | 154 ------------------------ opal/include/opal/sys/sparc/update.sh | 37 ------ 6 files changed, 295 deletions(-) delete mode 100644 opal/asm/base/SPARC.asm delete mode 100644 opal/include/opal/sys/sparc/Makefile.am delete mode 100644 opal/include/opal/sys/sparc/atomic.h delete mode 100644 opal/include/opal/sys/sparc/update.sh diff --git a/opal/asm/Makefile.am b/opal/asm/Makefile.am index 49bd19f833..fb7ccffc47 100644 --- a/opal/asm/Makefile.am +++ b/opal/asm/Makefile.am @@ -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 diff --git a/opal/asm/base/SPARC.asm b/opal/asm/base/SPARC.asm deleted file mode 100644 index 66f6fe67b4..0000000000 --- a/opal/asm/base/SPARC.asm +++ /dev/null @@ -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) diff --git a/opal/include/opal/sys/Makefile.am b/opal/include/opal/sys/Makefile.am index c99af20279..0917c7d0b3 100644 --- a/opal/include/opal/sys/Makefile.am +++ b/opal/include/opal/sys/Makefile.am @@ -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 diff --git a/opal/include/opal/sys/sparc/Makefile.am b/opal/include/opal/sys/sparc/Makefile.am deleted file mode 100644 index afd1742b37..0000000000 --- a/opal/include/opal/sys/sparc/Makefile.am +++ /dev/null @@ -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 diff --git a/opal/include/opal/sys/sparc/atomic.h b/opal/include/opal/sys/sparc/atomic.h deleted file mode 100644 index 76350136c1..0000000000 --- a/opal/include/opal/sys/sparc/atomic.h +++ /dev/null @@ -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 */ diff --git a/opal/include/opal/sys/sparc/update.sh b/opal/include/opal/sys/sparc/update.sh deleted file mode 100644 index 84dc7cba19..0000000000 --- a/opal/include/opal/sys/sparc/update.sh +++ /dev/null @@ -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< -#include -#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