mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Further tidy-up for old CPU architectures.
Further to commit 92d70b77
, let's drop the code we carry for the
following untested architectures: M68K, M88K, M32R, SuperH. We have no
idea if anything actually works there, and surely as vintage hardware
and microcontrollers they would be underpowered for modern purposes.
We could always consider re-adding SuperH based on evidence of usage and
build farm support, if someone shows up to provide it.
While here, SPARC is usually written in all caps.
Suggested-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Robert Haas <robertmhaas@gmail.com> (the idea, not the patch)
Discussion: https://postgr.es/m/959917.1657522169%40sss.pgh.pa.us
This commit is contained in:
@@ -220,71 +220,6 @@ update_spins_per_delay(int shared_spins_per_delay)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Various TAS implementations that cannot live in s_lock.h as no inline
|
||||
* definition exists (yet).
|
||||
* In the future, get rid of tas.[cso] and fold it into this file.
|
||||
*
|
||||
* If you change something here, you will likely need to modify s_lock.h too,
|
||||
* because the definitions for these are split between this file and s_lock.h.
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_SPINLOCKS /* skip spinlocks if requested */
|
||||
|
||||
|
||||
#if defined(__GNUC__)
|
||||
|
||||
/*
|
||||
* All the gcc flavors that are not inlined
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Note: all the if-tests here probably ought to be testing gcc version
|
||||
* rather than platform, but I don't have adequate info to know what to
|
||||
* write. Ideally we'd flush all this in favor of the inline version.
|
||||
*/
|
||||
#if defined(__m68k__) && !defined(__linux__)
|
||||
/* really means: extern int tas(slock_t* **lock); */
|
||||
static void
|
||||
tas_dummy()
|
||||
{
|
||||
__asm__ __volatile__(
|
||||
#if (defined(__NetBSD__) || defined(__OpenBSD__)) && defined(__ELF__)
|
||||
/* no underscore for label and % for registers */
|
||||
"\
|
||||
.global tas \n\
|
||||
tas: \n\
|
||||
movel %sp@(0x4),%a0 \n\
|
||||
tas %a0@ \n\
|
||||
beq _success \n\
|
||||
moveq #-128,%d0 \n\
|
||||
rts \n\
|
||||
_success: \n\
|
||||
moveq #0,%d0 \n\
|
||||
rts \n"
|
||||
#else
|
||||
"\
|
||||
.global _tas \n\
|
||||
_tas: \n\
|
||||
movel sp@(0x4),a0 \n\
|
||||
tas a0@ \n\
|
||||
beq _success \n\
|
||||
moveq #-128,d0 \n\
|
||||
rts \n\
|
||||
_success: \n\
|
||||
moveq #0,d0 \n\
|
||||
rts \n"
|
||||
#endif /* (__NetBSD__ || __OpenBSD__) && __ELF__ */
|
||||
);
|
||||
}
|
||||
#endif /* __m68k__ && !__linux__ */
|
||||
#endif /* not __GNUC__ */
|
||||
#endif /* HAVE_SPINLOCKS */
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
#if defined(S_LOCK_TEST)
|
||||
|
||||
|
Reference in New Issue
Block a user