NetBSD/crypto
martin 8f46ba3acd Pull up following revision(s) (requested by mrg in ticket #1895):
crypto/external/bsd/openssl/dist/crypto/sparccpuid.S: revision 1.11

fix SPARC v8/v9 detection code.

this code uses a trick where the encoding on both v8 and v9 are
the same, and are not illegal instructions, but that the v9 one
has a detectable difference than v8.

the idea is that we perform a "subcc" (set condition codes) which
sets "%ccr" on v9, which is an unimplemented "%asr2" on v8, then
we read %ccr (v9) or %asr2 (v8), which will always be 0x99 on v9,
and .. is non-trapping but impleentation defined on v8.

for many implementations this returns the value of the %y reg.

as nothing actually sets %y in this path, it remains the value it
was most recently set to by something (anything), and if it just
happens to be 0x99 then the v9 paths will be taken on v8.

fix this by clearing the %y register before the potential read.

fixes PR port-sparc/57594.  tested on ss20 and in qemu.  this
version of the patch has been submitted upstream.
2023-09-06 08:03:45 +00:00
..
dist/ipsec-tools Pull up following revision(s) (requested by ozaki-r in ticket #1306): 2019-07-25 08:58:21 +00:00
external Pull up following revision(s) (requested by mrg in ticket #1895): 2023-09-06 08:03:45 +00:00
Makefile.openssl Remove -I line for no longer extant directory. The OpenSSL libraries 2009-09-23 04:02:28 +00:00
TODO