Use MACHINE_CPU, not MACHINE_ARCH, to select optimizations. Add BF_PTR/BF_PTR2 tweaks to bf.inc

This commit is contained in:
tls 2001-09-09 21:22:09 +00:00
parent f52ec0ef7e
commit c9d0af63e8
2 changed files with 13 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: bf.inc,v 1.3 2000/07/16 07:16:21 mrg Exp $
# $NetBSD: bf.inc,v 1.4 2001/09/09 21:22:09 tls Exp $
#
# @(#) Copyright (c) 1995 Simon J. Gerraty
#
@ -9,6 +9,13 @@
CPPFLAGS+= -I${OPENSSLSRC}/crypto/bf
.if (${MACHINE_CPU} == "i386")
CPPFLAGS+= -DBF_PTR2
.endif
.if (${MACHINE_CPU} == "sparc" || ${MACHINE_CPU} == "mips")
CPPFLAGS+= -DBF_PTR
.endif
SRCS+=bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c

View File

@ -1,4 +1,4 @@
# $NetBSD: des.inc,v 1.6 2001/09/09 20:54:25 tls Exp $
# $NetBSD: des.inc,v 1.7 2001/09/09 21:22:09 tls Exp $
#
# @(#) Copyright (c) 1995 Simon J. Gerraty
#
@ -9,16 +9,16 @@
CPPFLAGS+= -I${OPENSSLSRC}/crypto/des
.if (${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "i386")
.if (${MACHINE_CPU} == "mips" || ${MACHINE_CPU} == "i386")
CPPFLAGS+= -DDES_UNROLL -DDES_RISC2 -DDES_PTR
.endif
.if (${MACHINE_ARCH} == "sparc64")
.if (${MACHINE_CPU} == "sparc64")
CPPFLAGS+= -DDES_UNROLL -DDES_RISC1 -DDES_PTR
.endif
.if (${MACHINE_ARCH} == "alpha")
.if (${MACHINE_CPU} == "alpha")
CPPFLAGS+= -DDES_RISC2 -DDES_PTR
.endif
.if (${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc")
.if (${MACHINE_CPU} == "powerpc" || ${MACHINE_ARCH} == "sparc")
CPPFLAGS+= -DDES_UNROLL
.endif