postgresql/src
Tom Lane 40dde82907 Fix spinlock assembly code for MIPS so it works on MIPS r6.
Original MIPS-I processors didn't have the LL/SC instructions (nor any
other userland synchronization primitive).  If the build toolchain
targets that ISA variant by default, as an astonishingly large fraction
of MIPS platforms still do, the assembler won't take LL/SC without
coercion in the form of a ".set mips2" instruction.  But we issued that
unconditionally, making it an ISA downgrade for chips later than MIPS2.
That breaks things for the latest MIPS r6 ISA, which encodes these
instructions differently.  Adjust the code so we don't change ISA level
if it's >= 2.

Note that this patch doesn't change what happens on an actual MIPS-I
processor: either the kernel will emulate these instructions
transparently, or you'll get a SIGILL failure.  That tradeoff seemed
fine in 2002 when this code was added (cf 3cbe6b247), and it's even
more so today when MIPS-I is basically extinct.  But let's add a
comment about that.

YunQiang Su (with cosmetic adjustments by me).  Back-patch to all
supported branches.

Discussion: https://postgr.es/m/15844-8f62fe7e163939b3@postgresql.org
2019-06-22 20:31:50 -04:00
..
backend Remove obsolete comments about sempahores from proc.c. 2019-06-21 10:57:32 +12:00
bin Translation updates 2019-06-17 15:32:44 +02:00
common Tolerate EINVAL when calling fsync() on a directory. 2019-02-24 23:51:54 +13:00
fe_utils Fix translation of special characters in psql's LaTeX output modes. 2018-11-26 17:32:51 -05:00
include Fix spinlock assembly code for MIPS so it works on MIPS r6. 2019-06-22 20:31:50 -04:00
interfaces Stamp 11.4. 2019-06-17 17:15:30 -04:00
makefiles Define WIN32_STACK_RLIMIT throughout win32 and cygwin builds. 2019-04-09 08:25:42 -07:00
pl Translation updates 2019-06-17 15:32:44 +02:00
port Stamp 11.4. 2019-06-17 17:15:30 -04:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Consolidate methods for translating a Perl path to a Windows path. 2019-06-21 20:47:34 -07:00
timezone Portability fix for zic.c. 2019-04-26 21:20:21 -04:00
tools In the pg_upgrade test suite, don't write to src/test/regress. 2019-05-28 12:59:36 -07:00
tutorial Update copyright for 2018 2018-01-02 23:30:12 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Consistently test for in-use shared memory. 2019-04-12 22:36:42 -07:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00