The assembly sha512 code detects at runtime if it is running on a 64-bit
authormiod <miod@openbsd.org>
Fri, 2 May 2014 19:59:16 +0000 (19:59 +0000)
committermiod <miod@openbsd.org>
Fri, 2 May 2014 19:59:16 +0000 (19:59 +0000)
commit9409225ba0bf899521709e91376dd12fe5c7d4fb
tree3188b3657ff4f467fd21d95043ced7277b2301e6
parent482c5e6592ccdce0e65a8d7ed38f90726c8cd4f9
The assembly sha512 code detects at runtime if it is running on a 64-bit
processor (PA2.0) and, if so, switches to 64-bit code.

However, when running under a 32-bit OpenBSD/hppa kernel, there is no guarantee
that the upper part of the registers will be preserved accross context switches
(or even userland->kernel boundaries), which causes this code to fail.

Wrap the generated code within #ifndef __OpenBSD__ in that case, to avoid
using the 64-bit code completely. (OpenBSD/hppa64, once stable, will not be
affected by this)
lib/libcrypto/sha/asm/sha512-parisc.pl
lib/libssl/src/crypto/sha/asm/sha512-parisc.pl