From d97873f8db01cd052f45675db2ed3d9584c93c44 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Mon, 27 Jan 2025 14:02:32 +0000 Subject: Mop up RC4_INDEX. The RC4_INDEX define switches between base pointer indexing and per-byte pointer increment. This supposedly made a huge difference to performance on x86 at some point, however compilers have improved somewhat since then. There is no change (or effectively no change) in generated assembly on a the majority of LLVM platforms and even when there is some change (e.g. aarch64), there is no noticable performance difference. Simplify the (still messy) macros/code and mop up RC4_INDEX. ok tb@ --- src/lib/libcrypto/arch/aarch64/opensslconf.h | 7 ------- src/lib/libcrypto/arch/alpha/opensslconf.h | 7 ------- src/lib/libcrypto/arch/amd64/opensslconf.h | 7 ------- src/lib/libcrypto/arch/arm/opensslconf.h | 7 ------- src/lib/libcrypto/arch/hppa/opensslconf.h | 7 ------- src/lib/libcrypto/arch/i386/opensslconf.h | 7 ------- src/lib/libcrypto/arch/m88k/opensslconf.h | 7 ------- src/lib/libcrypto/arch/mips64/opensslconf.h | 7 ------- src/lib/libcrypto/arch/powerpc/opensslconf.h | 7 ------- src/lib/libcrypto/arch/powerpc64/opensslconf.h | 7 ------- src/lib/libcrypto/arch/riscv64/opensslconf.h | 7 ------- src/lib/libcrypto/arch/sh/opensslconf.h | 7 ------- src/lib/libcrypto/arch/sparc64/opensslconf.h | 7 ------- 13 files changed, 91 deletions(-) (limited to 'src/lib/libcrypto/arch') diff --git a/src/lib/libcrypto/arch/aarch64/opensslconf.h b/src/lib/libcrypto/arch/aarch64/opensslconf.h index fed209a008..e6e294a962 100644 --- a/src/lib/libcrypto/arch/aarch64/opensslconf.h +++ b/src/lib/libcrypto/arch/aarch64/opensslconf.h @@ -65,13 +65,6 @@ #undef EIGHT_BIT #endif -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#undef RC4_INDEX -#endif - #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) #define CONFIG_HEADER_BF_LOCL_H #undef BF_PTR diff --git a/src/lib/libcrypto/arch/alpha/opensslconf.h b/src/lib/libcrypto/arch/alpha/opensslconf.h index 1dbd8f22fa..1c033369ea 100644 --- a/src/lib/libcrypto/arch/alpha/opensslconf.h +++ b/src/lib/libcrypto/arch/alpha/opensslconf.h @@ -63,13 +63,6 @@ #undef THIRTY_TWO_BIT #endif -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#undef RC4_INDEX -#endif - #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) #define CONFIG_HEADER_BF_LOCL_H #define BF_PTR diff --git a/src/lib/libcrypto/arch/amd64/opensslconf.h b/src/lib/libcrypto/arch/amd64/opensslconf.h index 7615744a6b..4187a44c86 100644 --- a/src/lib/libcrypto/arch/amd64/opensslconf.h +++ b/src/lib/libcrypto/arch/amd64/opensslconf.h @@ -60,13 +60,6 @@ #undef THIRTY_TWO_BIT #endif -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#undef RC4_INDEX -#endif - #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) #define CONFIG_HEADER_BF_LOCL_H #undef BF_PTR diff --git a/src/lib/libcrypto/arch/arm/opensslconf.h b/src/lib/libcrypto/arch/arm/opensslconf.h index 3413abb672..98dcfee3a1 100644 --- a/src/lib/libcrypto/arch/arm/opensslconf.h +++ b/src/lib/libcrypto/arch/arm/opensslconf.h @@ -65,13 +65,6 @@ #undef EIGHT_BIT #endif -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#define RC4_INDEX -#endif - #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) #define CONFIG_HEADER_BF_LOCL_H #undef BF_PTR diff --git a/src/lib/libcrypto/arch/hppa/opensslconf.h b/src/lib/libcrypto/arch/hppa/opensslconf.h index 3413abb672..98dcfee3a1 100644 --- a/src/lib/libcrypto/arch/hppa/opensslconf.h +++ b/src/lib/libcrypto/arch/hppa/opensslconf.h @@ -65,13 +65,6 @@ #undef EIGHT_BIT #endif -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#define RC4_INDEX -#endif - #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) #define CONFIG_HEADER_BF_LOCL_H #undef BF_PTR diff --git a/src/lib/libcrypto/arch/i386/opensslconf.h b/src/lib/libcrypto/arch/i386/opensslconf.h index ac1ea99cc9..1ea367102b 100644 --- a/src/lib/libcrypto/arch/i386/opensslconf.h +++ b/src/lib/libcrypto/arch/i386/opensslconf.h @@ -65,13 +65,6 @@ #undef EIGHT_BIT #endif -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#define RC4_INDEX -#endif - #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) #define CONFIG_HEADER_BF_LOCL_H #undef BF_PTR diff --git a/src/lib/libcrypto/arch/m88k/opensslconf.h b/src/lib/libcrypto/arch/m88k/opensslconf.h index 3413abb672..98dcfee3a1 100644 --- a/src/lib/libcrypto/arch/m88k/opensslconf.h +++ b/src/lib/libcrypto/arch/m88k/opensslconf.h @@ -65,13 +65,6 @@ #undef EIGHT_BIT #endif -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#define RC4_INDEX -#endif - #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) #define CONFIG_HEADER_BF_LOCL_H #undef BF_PTR diff --git a/src/lib/libcrypto/arch/mips64/opensslconf.h b/src/lib/libcrypto/arch/mips64/opensslconf.h index e5b1b51ec5..ec35dc9946 100644 --- a/src/lib/libcrypto/arch/mips64/opensslconf.h +++ b/src/lib/libcrypto/arch/mips64/opensslconf.h @@ -65,13 +65,6 @@ #undef EIGHT_BIT #endif -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#undef RC4_INDEX -#endif - #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) #define CONFIG_HEADER_BF_LOCL_H #define BF_PTR diff --git a/src/lib/libcrypto/arch/powerpc/opensslconf.h b/src/lib/libcrypto/arch/powerpc/opensslconf.h index 3413abb672..98dcfee3a1 100644 --- a/src/lib/libcrypto/arch/powerpc/opensslconf.h +++ b/src/lib/libcrypto/arch/powerpc/opensslconf.h @@ -65,13 +65,6 @@ #undef EIGHT_BIT #endif -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#define RC4_INDEX -#endif - #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) #define CONFIG_HEADER_BF_LOCL_H #undef BF_PTR diff --git a/src/lib/libcrypto/arch/powerpc64/opensslconf.h b/src/lib/libcrypto/arch/powerpc64/opensslconf.h index 7615744a6b..4187a44c86 100644 --- a/src/lib/libcrypto/arch/powerpc64/opensslconf.h +++ b/src/lib/libcrypto/arch/powerpc64/opensslconf.h @@ -60,13 +60,6 @@ #undef THIRTY_TWO_BIT #endif -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#undef RC4_INDEX -#endif - #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) #define CONFIG_HEADER_BF_LOCL_H #undef BF_PTR diff --git a/src/lib/libcrypto/arch/riscv64/opensslconf.h b/src/lib/libcrypto/arch/riscv64/opensslconf.h index fed209a008..e6e294a962 100644 --- a/src/lib/libcrypto/arch/riscv64/opensslconf.h +++ b/src/lib/libcrypto/arch/riscv64/opensslconf.h @@ -65,13 +65,6 @@ #undef EIGHT_BIT #endif -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#undef RC4_INDEX -#endif - #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) #define CONFIG_HEADER_BF_LOCL_H #undef BF_PTR diff --git a/src/lib/libcrypto/arch/sh/opensslconf.h b/src/lib/libcrypto/arch/sh/opensslconf.h index 3413abb672..98dcfee3a1 100644 --- a/src/lib/libcrypto/arch/sh/opensslconf.h +++ b/src/lib/libcrypto/arch/sh/opensslconf.h @@ -65,13 +65,6 @@ #undef EIGHT_BIT #endif -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#define RC4_INDEX -#endif - #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) #define CONFIG_HEADER_BF_LOCL_H #undef BF_PTR diff --git a/src/lib/libcrypto/arch/sparc64/opensslconf.h b/src/lib/libcrypto/arch/sparc64/opensslconf.h index e5b1b51ec5..ec35dc9946 100644 --- a/src/lib/libcrypto/arch/sparc64/opensslconf.h +++ b/src/lib/libcrypto/arch/sparc64/opensslconf.h @@ -65,13 +65,6 @@ #undef EIGHT_BIT #endif -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#undef RC4_INDEX -#endif - #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) #define CONFIG_HEADER_BF_LOCL_H #define BF_PTR -- cgit v1.2.3-55-g6feb