Commit 4124d15069 for openssl.org
commit 4124d150697e7e4114015c2b35b2323be0b2bc89
Author: Norbert Pocs <norbertp@openssl.org>
Date: Thu Apr 9 13:38:07 2026 +0200
Move *_arch.h to include/arch
Move all the architecture specific header files under a single directory
in include/
Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Sun May 10 09:53:34 2026
(Merged from https://github.com/openssl/openssl/pull/30751)
diff --git a/crypto/aes/asm/aes-armv4.pl b/crypto/aes/asm/aes-armv4.pl
index 162eb5ce36..641e45144e 100644
--- a/crypto/aes/asm/aes-armv4.pl
+++ b/crypto/aes/asm/aes-armv4.pl
@@ -73,7 +73,7 @@ $rounds="r12";
$code=<<___;
#ifndef __KERNEL__
-# include "arm_arch.h"
+# include "arch/arm_arch.h"
#else
# define __ARM_ARCH__ __LINUX_ARM_ARCH__
#endif
diff --git a/crypto/aes/asm/aes-mips.pl b/crypto/aes/asm/aes-mips.pl
index 6a37c1ce3f..28ca4d028b 100644
--- a/crypto/aes/asm/aes-mips.pl
+++ b/crypto/aes/asm/aes-mips.pl
@@ -107,7 +107,7 @@ my ($MSB,$LSB)=(0,3); # automatically converted to little-endian
$output and open STDOUT,">$output";
$code.=<<___;
-#include "mips_arch.h"
+#include "arch/mips_arch.h"
.text
#if !defined(__mips_eabi) && (!defined(__vxworks) || defined(__pic__))
diff --git a/crypto/aes/asm/aes-s390x.pl b/crypto/aes/asm/aes-s390x.pl
index 073829cda4..66529ad732 100644
--- a/crypto/aes/asm/aes-s390x.pl
+++ b/crypto/aes/asm/aes-s390x.pl
@@ -131,7 +131,7 @@ sub _data_word()
}
$code=<<___;
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
.text
diff --git a/crypto/aes/asm/aes-sha1-armv8.pl b/crypto/aes/asm/aes-sha1-armv8.pl
index eb6e16698a..e965811b71 100644
--- a/crypto/aes/asm/aes-sha1-armv8.pl
+++ b/crypto/aes/asm/aes-sha1-armv8.pl
@@ -30,7 +30,7 @@ open OUT,"| \"$^X\" $xlate $flavour \"$output\""
*STDOUT=*OUT;
$code=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
/* These are offsets into the CIPH_DIGEST struct */
#define CIPHER_KEY 0
diff --git a/crypto/aes/asm/aes-sha256-armv8.pl b/crypto/aes/asm/aes-sha256-armv8.pl
index 085319eace..f81f590090 100644
--- a/crypto/aes/asm/aes-sha256-armv8.pl
+++ b/crypto/aes/asm/aes-sha256-armv8.pl
@@ -30,7 +30,7 @@ open OUT,"| \"$^X\" $xlate $flavour \"$output\""
*STDOUT=*OUT;
$code=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
/* These are offsets into the CIPH_DIGEST struct */
#define CIPHER_KEY 0
diff --git a/crypto/aes/asm/aes-sha512-armv8.pl b/crypto/aes/asm/aes-sha512-armv8.pl
index 3582bcfeef..bae8f31c44 100644
--- a/crypto/aes/asm/aes-sha512-armv8.pl
+++ b/crypto/aes/asm/aes-sha512-armv8.pl
@@ -22,7 +22,7 @@ open OUT,"| \"$^X\" $xlate $flavour \"$output\""
*STDOUT=*OUT;
$code=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
/* These are offsets into the CIPH_DIGEST struct */
#define CIPHER_KEY 0
diff --git a/crypto/aes/asm/aes-sparcv9.pl b/crypto/aes/asm/aes-sparcv9.pl
index 2a6fa6c96e..9fbe7c7a74 100755
--- a/crypto/aes/asm/aes-sparcv9.pl
+++ b/crypto/aes/asm/aes-sparcv9.pl
@@ -85,7 +85,7 @@ $code.=<<___;
#ifndef __ASSEMBLER__
# define __ASSEMBLER__ 1
#endif
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#ifdef __arch64__
.register %g2,#scratch
diff --git a/crypto/aes/asm/aesfx-sparcv9.pl b/crypto/aes/asm/aesfx-sparcv9.pl
index 8a307e1f60..d19efa2f92 100644
--- a/crypto/aes/asm/aesfx-sparcv9.pl
+++ b/crypto/aes/asm/aesfx-sparcv9.pl
@@ -42,7 +42,7 @@ $code.=<<___;
#ifndef __ASSEMBLER__
# define __ASSEMBLER__ 1
#endif
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#define LOCALS (STACK_BIAS+STACK_FRAME)
diff --git a/crypto/aes/asm/aest4-sparcv9.pl b/crypto/aes/asm/aest4-sparcv9.pl
index c04b5f3cda..d867db183b 100644
--- a/crypto/aes/asm/aest4-sparcv9.pl
+++ b/crypto/aes/asm/aest4-sparcv9.pl
@@ -94,7 +94,7 @@ $code.=<<___;
#ifndef __ASSEMBLER__
# define __ASSEMBLER__ 1
#endif
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#ifdef __arch64__
.register %g2,#scratch
diff --git a/crypto/aes/asm/aesv8-armx.pl b/crypto/aes/asm/aesv8-armx.pl
index 82e60d788e..a9e272a91c 100755
--- a/crypto/aes/asm/aesv8-armx.pl
+++ b/crypto/aes/asm/aesv8-armx.pl
@@ -75,7 +75,7 @@ $prefix="aes_v8";
$_byte = ($flavour =~ /win/ ? "DCB" : ".byte");
$code=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#if __ARM_MAX_ARCH__>=7
___
diff --git a/crypto/aes/asm/bsaes-armv7.pl b/crypto/aes/asm/bsaes-armv7.pl
index edc01265f7..ff9c2fa3b9 100644
--- a/crypto/aes/asm/bsaes-armv7.pl
+++ b/crypto/aes/asm/bsaes-armv7.pl
@@ -706,7 +706,7 @@ ___
$code.=<<___;
#ifndef __KERNEL__
-# include "arm_arch.h"
+# include "arch/arm_arch.h"
# define VFP_ABI_PUSH vstmdb sp!,{d8-d15}
# define VFP_ABI_POP vldmia sp!,{d8-d15}
diff --git a/crypto/aes/asm/bsaes-armv8.pl b/crypto/aes/asm/bsaes-armv8.pl
index 912538622b..fa64865ba6 100644
--- a/crypto/aes/asm/bsaes-armv8.pl
+++ b/crypto/aes/asm/bsaes-armv8.pl
@@ -56,7 +56,7 @@ __END__
// up in Perl, and it is presented as pure assembly.
-#include "crypto/arm_arch.h"
+#include "arch/arm_arch.h"
.text
diff --git a/crypto/aes/asm/vpaes-armv8.pl b/crypto/aes/asm/vpaes-armv8.pl
index 1e348aafc7..e9bf163cac 100755
--- a/crypto/aes/asm/vpaes-armv8.pl
+++ b/crypto/aes/asm/vpaes-armv8.pl
@@ -53,7 +53,7 @@ open OUT,"| \"$^X\" $xlate $flavour \"$output\""
*STDOUT=*OUT;
$code.=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
.rodata
diff --git a/crypto/arm64cpuid.pl b/crypto/arm64cpuid.pl
index f38a64bc6b..d90289b6a9 100755
--- a/crypto/arm64cpuid.pl
+++ b/crypto/arm64cpuid.pl
@@ -22,7 +22,7 @@ open OUT,"| \"$^X\" $xlate $flavour \"$output\""
*STDOUT=*OUT;
$code.=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
.text
.arch armv8-a+crypto
diff --git a/crypto/armcap.c b/crypto/armcap.c
index e5ba2132ff..cdb8336b13 100644
--- a/crypto/armcap.c
+++ b/crypto/armcap.c
@@ -23,7 +23,7 @@
#else
#include <unistd.h>
#endif
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#ifdef __aarch64__
#include <stdint.h>
#endif
diff --git a/crypto/armv4cpuid.pl b/crypto/armv4cpuid.pl
index e7273b3390..9b6670e66d 100644
--- a/crypto/armv4cpuid.pl
+++ b/crypto/armv4cpuid.pl
@@ -22,7 +22,7 @@ open OUT,"| \"$^X\" $xlate $flavour \"$output\""
*STDOUT=*OUT;
$code.=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#if defined(__thumb2__) && !defined(__APPLE__)
.syntax unified
diff --git a/crypto/bn/asm/armv4-gf2m.pl b/crypto/bn/asm/armv4-gf2m.pl
index 3332eb112a..f722804b2f 100644
--- a/crypto/bn/asm/armv4-gf2m.pl
+++ b/crypto/bn/asm/armv4-gf2m.pl
@@ -57,7 +57,7 @@ if ($flavour && $flavour ne "void") {
}
$code=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#if defined(__thumb2__)
.syntax unified
diff --git a/crypto/bn/asm/armv4-mont.pl b/crypto/bn/asm/armv4-mont.pl
index ad474e3899..9429440e87 100644
--- a/crypto/bn/asm/armv4-mont.pl
+++ b/crypto/bn/asm/armv4-mont.pl
@@ -97,7 +97,7 @@ $_n0="$num,#14*4";
$_num="$num,#15*4"; $_bpend=$_num;
$code=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#if defined(__thumb2__)
.syntax unified
diff --git a/crypto/bn/asm/armv8-mont.pl b/crypto/bn/asm/armv8-mont.pl
index 32f2821d3b..9f0495f270 100755
--- a/crypto/bn/asm/armv8-mont.pl
+++ b/crypto/bn/asm/armv8-mont.pl
@@ -67,7 +67,7 @@ $n0="x4"; # const BN_ULONG *n0,
$num="x5"; # int num);
$code.=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#ifndef __KERNEL__
.extern OPENSSL_armv8_rsa_neonized
.hidden OPENSSL_armv8_rsa_neonized
diff --git a/crypto/bn/asm/mips-mont.pl b/crypto/bn/asm/mips-mont.pl
index b3740b7527..b26989271f 100644
--- a/crypto/bn/asm/mips-mont.pl
+++ b/crypto/bn/asm/mips-mont.pl
@@ -124,7 +124,7 @@ $m1=$s11;
$FRAMESIZE=14;
$code=<<___;
-#include "mips_arch.h"
+#include "arch/mips_arch.h"
.text
diff --git a/crypto/bn/asm/mips.pl b/crypto/bn/asm/mips.pl
index 3240a3e398..0e7046ac48 100644
--- a/crypto/bn/asm/mips.pl
+++ b/crypto/bn/asm/mips.pl
@@ -111,7 +111,7 @@ $gp=$v1 if ($flavour =~ /nubi/i);
$minus4=$v1;
$code.=<<___;
-#include "mips_arch.h"
+#include "arch/mips_arch.h"
#if defined(_MIPS_ARCH_MIPS64R6)
# define ddivu(rs,rt)
diff --git a/crypto/bn/asm/sparct4-mont.pl b/crypto/bn/asm/sparct4-mont.pl
index 8a3bedc9af..1d2747c4ca 100755
--- a/crypto/bn/asm/sparct4-mont.pl
+++ b/crypto/bn/asm/sparct4-mont.pl
@@ -89,7 +89,7 @@ $code.=<<___;
#ifndef __ASSEMBLER__
# define __ASSEMBLER__ 1
#endif
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#ifdef __arch64__
.register %g2,#scratch
diff --git a/crypto/bn/asm/sparcv9-gf2m.pl b/crypto/bn/asm/sparcv9-gf2m.pl
index 7beee807f4..2cd0498aa1 100644
--- a/crypto/bn/asm/sparcv9-gf2m.pl
+++ b/crypto/bn/asm/sparcv9-gf2m.pl
@@ -41,7 +41,7 @@ $code.=<<___;
#ifndef __ASSEMBLER__
# define __ASSEMBLER__ 1
#endif
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#ifdef __arch64__
.register %g2,#scratch
diff --git a/crypto/bn/asm/sparcv9-mont.pl b/crypto/bn/asm/sparcv9-mont.pl
index ce7a8651fc..4578f523a6 100644
--- a/crypto/bn/asm/sparcv9-mont.pl
+++ b/crypto/bn/asm/sparcv9-mont.pl
@@ -86,7 +86,7 @@ $code=<<___;
#ifndef __ASSEMBLER__
# define __ASSEMBLER__ 1
#endif
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
.section ".text",#alloc,#execinstr
diff --git a/crypto/bn/asm/sparcv9a-mont.pl b/crypto/bn/asm/sparcv9a-mont.pl
index f60854e95f..81fc807625 100755
--- a/crypto/bn/asm/sparcv9a-mont.pl
+++ b/crypto/bn/asm/sparcv9a-mont.pl
@@ -129,7 +129,7 @@ $code=<<___;
#ifndef __ASSEMBLER__
# define __ASSEMBLER__ 1
#endif
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
.section ".text",#alloc,#execinstr
diff --git a/crypto/bn/asm/vis3-mont.pl b/crypto/bn/asm/vis3-mont.pl
index 5f8304c0ea..65a6c23e3c 100644
--- a/crypto/bn/asm/vis3-mont.pl
+++ b/crypto/bn/asm/vis3-mont.pl
@@ -34,7 +34,7 @@ $code.=<<___;
#ifndef __ASSEMBLER__
# define __ASSEMBLER__ 1
#endif
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#ifdef __arch64__
.register %g2,#scratch
diff --git a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c
index 46eea10f5d..c3bd5e7b5d 100644
--- a/crypto/bn/bn_exp.c
+++ b/crypto/bn/bn_exp.c
@@ -29,7 +29,7 @@
#undef SPARC_T4_MONT
#if defined(OPENSSL_BN_ASM_MONT) && (defined(__sparc__) || defined(__sparc))
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#define SPARC_T4_MONT
#endif
diff --git a/crypto/bn/bn_ppc.c b/crypto/bn/bn_ppc.c
index 5a5f9b04b1..f7e2568ab7 100644
--- a/crypto/bn/bn_ppc.c
+++ b/crypto/bn/bn_ppc.c
@@ -9,7 +9,7 @@
#include <openssl/crypto.h>
#include <openssl/bn.h>
-#include "crypto/ppc_arch.h"
+#include "arch/ppc_arch.h"
#include "bn_local.h"
int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
diff --git a/crypto/bn/bn_s390x.c b/crypto/bn/bn_s390x.c
index 599f4eba58..ef96161ced 100644
--- a/crypto/bn/bn_s390x.c
+++ b/crypto/bn/bn_s390x.c
@@ -8,7 +8,7 @@
*/
#include "crypto/bn.h"
-#include "crypto/s390x_arch.h"
+#include "arch/s390x_arch.h"
#ifdef S390X_MOD_EXP
diff --git a/crypto/bn/bn_sparc.c b/crypto/bn/bn_sparc.c
index c58b25c3da..1dedbdf26f 100644
--- a/crypto/bn/bn_sparc.c
+++ b/crypto/bn/bn_sparc.c
@@ -10,7 +10,7 @@
#include <stdlib.h>
#include <openssl/bn.h>
#include "internal/cryptlib.h"
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#include "bn_local.h" /* for definition of bn_mul_mont */
int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
diff --git a/crypto/camellia/asm/cmllt4-sparcv9.pl b/crypto/camellia/asm/cmllt4-sparcv9.pl
index 86e38d65c4..c1299397e3 100644
--- a/crypto/camellia/asm/cmllt4-sparcv9.pl
+++ b/crypto/camellia/asm/cmllt4-sparcv9.pl
@@ -69,7 +69,7 @@ $code=<<___;
#ifndef __ASSEMBLER__
# define __ASSEMBLER__ 1
#endif
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
.text
diff --git a/crypto/chacha/asm/chacha-armv4.pl b/crypto/chacha/asm/chacha-armv4.pl
index cb5441ad8b..24acb742b0 100755
--- a/crypto/chacha/asm/chacha-armv4.pl
+++ b/crypto/chacha/asm/chacha-armv4.pl
@@ -171,7 +171,7 @@ my @ret;
}
$code.=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#if defined(__thumb2__) || defined(__clang__)
.syntax unified
diff --git a/crypto/chacha/asm/chacha-armv8-sve.pl b/crypto/chacha/asm/chacha-armv8-sve.pl
index 40454c3322..df5232d621 100755
--- a/crypto/chacha/asm/chacha-armv8-sve.pl
+++ b/crypto/chacha/asm/chacha-armv8-sve.pl
@@ -724,7 +724,7 @@ ___
my ($sve2flag) = ("x7");
$code.=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
.arch armv8-a
diff --git a/crypto/chacha/asm/chacha-armv8.pl b/crypto/chacha/asm/chacha-armv8.pl
index f500bf1eb5..ccbc816136 100755
--- a/crypto/chacha/asm/chacha-armv8.pl
+++ b/crypto/chacha/asm/chacha-armv8.pl
@@ -132,7 +132,7 @@ my ($a3,$b3,$c3,$d3)=map(($_&~3)+(($_+1)&3),($a2,$b2,$c2,$d2));
}
$code.=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#ifndef __KERNEL__
.extern OPENSSL_armcap_P
.hidden OPENSSL_armcap_P
diff --git a/crypto/chacha/asm/chacha-loongarch64.pl b/crypto/chacha/asm/chacha-loongarch64.pl
index 43adf75ce3..e78f668927 100644
--- a/crypto/chacha/asm/chacha-loongarch64.pl
+++ b/crypto/chacha/asm/chacha-loongarch64.pl
@@ -46,7 +46,7 @@ open STDOUT,">$output";
my ($out, $inp, $len, $key, $counter) = ($a0, $a1, $a2, $a3, $a4);
$code .= <<EOF;
-#include "loongarch_arch.h"
+#include "arch/loongarch_arch.h"
.text
diff --git a/crypto/chacha/asm/chacha-s390x.pl b/crypto/chacha/asm/chacha-s390x.pl
index bf393a6c7b..a5a7102b7a 100755
--- a/crypto/chacha/asm/chacha-s390x.pl
+++ b/crypto/chacha/asm/chacha-s390x.pl
@@ -240,7 +240,7 @@ my $odd=@_[24];
PERLASM_BEGIN($output);
-INCLUDE ("s390x_arch.h");
+INCLUDE ("arch/s390x_arch.h");
TEXT ();
################
diff --git a/crypto/chacha/chacha_ppc.c b/crypto/chacha/chacha_ppc.c
index b36881a833..d2e0a68baa 100644
--- a/crypto/chacha/chacha_ppc.c
+++ b/crypto/chacha/chacha_ppc.c
@@ -12,7 +12,7 @@
#include <openssl/opensslconf.h>
#include "crypto/chacha.h"
-#include "crypto/ppc_arch.h"
+#include "arch/ppc_arch.h"
void ChaCha20_ctr32_int(unsigned char *out, const unsigned char *inp,
size_t len, const unsigned int key[8],
diff --git a/crypto/chacha/chacha_riscv.c b/crypto/chacha/chacha_riscv.c
index c9f17b35d8..e3e24c99fa 100644
--- a/crypto/chacha/chacha_riscv.c
+++ b/crypto/chacha/chacha_riscv.c
@@ -38,7 +38,7 @@
#include <openssl/opensslconf.h>
#include "crypto/chacha.h"
-#include "crypto/riscv_arch.h"
+#include "arch/riscv_arch.h"
void ChaCha20_ctr32_v_zbb_zvkb(unsigned char *out, const unsigned char *inp,
size_t len, const unsigned int key[8],
diff --git a/crypto/des/asm/dest4-sparcv9.pl b/crypto/des/asm/dest4-sparcv9.pl
index afa15860f0..87a5a82742 100644
--- a/crypto/des/asm/dest4-sparcv9.pl
+++ b/crypto/des/asm/dest4-sparcv9.pl
@@ -40,7 +40,7 @@ $code.=<<___;
#ifndef __ASSEMBLER__
# define __ASSEMBLER__ 1
#endif
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#ifdef __arch64__
.register %g2,#scratch
diff --git a/crypto/ec/asm/ecp_nistz256-armv4.pl b/crypto/ec/asm/ecp_nistz256-armv4.pl
index 77fd64c90a..f00767e28b 100755
--- a/crypto/ec/asm/ecp_nistz256-armv4.pl
+++ b/crypto/ec/asm/ecp_nistz256-armv4.pl
@@ -51,7 +51,7 @@ if ($flavour && $flavour ne "void") {
}
$code.=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#if defined(__thumb2__)
.syntax unified
diff --git a/crypto/ec/asm/ecp_nistz256-armv8.pl b/crypto/ec/asm/ecp_nistz256-armv8.pl
index f84c6d49e7..9ecabca7a7 100644
--- a/crypto/ec/asm/ecp_nistz256-armv8.pl
+++ b/crypto/ec/asm/ecp_nistz256-armv8.pl
@@ -53,7 +53,7 @@ my ($rp,$ap,$bp,$bi,$a0,$a1,$a2,$a3,$t0,$t1,$t2,$t3,$poly1,$poly3,
my ($acc6,$acc7)=($ap,$bp); # used in __ecp_nistz256_sqr_mont
$code.=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
.rodata
___
diff --git a/crypto/ec/asm/ecp_nistz256-sparcv9.pl b/crypto/ec/asm/ecp_nistz256-sparcv9.pl
index 33f8ea2032..0171420aaa 100755
--- a/crypto/ec/asm/ecp_nistz256-sparcv9.pl
+++ b/crypto/ec/asm/ecp_nistz256-sparcv9.pl
@@ -37,7 +37,7 @@ $code.=<<___;
#ifndef __ASSEMBLER__
# define __ASSEMBLER__ 1
#endif
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#define LOCALS (STACK_BIAS+STACK_FRAME)
#ifdef __arch64__
diff --git a/crypto/ec/asm/ecp_sm2p256-armv8.pl b/crypto/ec/asm/ecp_sm2p256-armv8.pl
index 6db0b6d7aa..34def77c6e 100644
--- a/crypto/ec/asm/ecp_sm2p256-armv8.pl
+++ b/crypto/ec/asm/ecp_sm2p256-armv8.pl
@@ -162,7 +162,7 @@ ___
{
$code.=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
.arch armv8-a
.rodata
diff --git a/crypto/ec/ecp_nistp384.c b/crypto/ec/ecp_nistp384.c
index ce42edad05..aedd052d98 100644
--- a/crypto/ec/ecp_nistp384.c
+++ b/crypto/ec/ecp_nistp384.c
@@ -720,7 +720,7 @@ void p384_felem_square_reduce(felem out, const felem in);
void p384_felem_mul_reduce(felem out, const felem in1, const felem in2);
#if defined(_ARCH_PPC64)
-#include "crypto/ppc_arch.h"
+#include "arch/ppc_arch.h"
#endif
static void felem_select(void)
diff --git a/crypto/ec/ecp_nistp521.c b/crypto/ec/ecp_nistp521.c
index 3c088d9a5f..1fb747eba0 100644
--- a/crypto/ec/ecp_nistp521.c
+++ b/crypto/ec/ecp_nistp521.c
@@ -605,7 +605,7 @@ void p521_felem_square(largefelem out, const felem in);
void p521_felem_mul(largefelem out, const felem in1, const felem in2);
#if defined(_ARCH_PPC64)
-#include "crypto/ppc_arch.h"
+#include "arch/ppc_arch.h"
#endif
static void felem_select(void)
diff --git a/crypto/ec/ecp_ppc.c b/crypto/ec/ecp_ppc.c
index e038a07475..5fd27654fd 100644
--- a/crypto/ec/ecp_ppc.c
+++ b/crypto/ec/ecp_ppc.c
@@ -8,7 +8,7 @@
*/
#include "internal/cryptlib.h"
-#include "crypto/ppc_arch.h"
+#include "arch/ppc_arch.h"
#include "ec_local.h"
void ecp_nistz256_mul_mont(unsigned long res[4], const unsigned long a[4],
diff --git a/crypto/ec/ecp_s390x_nistp.c b/crypto/ec/ecp_s390x_nistp.c
index a405625d67..c05f21c732 100644
--- a/crypto/ec/ecp_s390x_nistp.c
+++ b/crypto/ec/ecp_s390x_nistp.c
@@ -18,7 +18,7 @@
#include <openssl/err.h>
#include <openssl/rand.h>
#include "ec_local.h"
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
/* Size of parameter blocks */
#define S390X_SIZE_PARAM 4096
diff --git a/crypto/ec/ecx_key.c b/crypto/ec/ecx_key.c
index 2fed62c361..4d8c945755 100644
--- a/crypto/ec/ecx_key.c
+++ b/crypto/ec/ecx_key.c
@@ -14,7 +14,7 @@
#include "internal/common.h" /* for ossl_assert() */
#ifdef S390X_EC_ASM
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
#endif
ECX_KEY *ossl_ecx_key_new(OSSL_LIB_CTX *libctx, ECX_KEY_TYPE type, int haspubkey,
diff --git a/crypto/ec/ecx_s390x.c b/crypto/ec/ecx_s390x.c
index 4b9514084a..5f0cad0fe3 100644
--- a/crypto/ec/ecx_s390x.c
+++ b/crypto/ec/ecx_s390x.c
@@ -15,7 +15,7 @@
#include "ec_local.h"
#include "curve448/curve448_local.h"
#include "ecx_backend.h"
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
#include "internal/constant_time.h"
static void s390x_x25519_mod_p(unsigned char u[32])
diff --git a/crypto/hmac/hmac_s390x.c b/crypto/hmac/hmac_s390x.c
index eede428cf0..873e975284 100644
--- a/crypto/hmac/hmac_s390x.c
+++ b/crypto/hmac/hmac_s390x.c
@@ -10,7 +10,7 @@
/* We need to use some engine deprecated APIs */
#define OPENSSL_SUPPRESS_DEPRECATED
-#include "crypto/s390x_arch.h"
+#include "arch/s390x_arch.h"
#include "hmac_local.h"
#include "openssl/obj_mac.h"
#include "openssl/evp.h"
diff --git a/crypto/info.c b/crypto/info.c
index fe8e5fa2a9..2038db5a52 100644
--- a/crypto/info.c
+++ b/crypto/info.c
@@ -21,19 +21,19 @@
#endif
#if defined(__arm__) || defined(__arm) || defined(__aarch64__)
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#define CPU_INFO_STR_LEN 128
#elif defined(__powerpc__) || defined(__POWERPC__) || defined(_ARCH_PPC)
-#include "crypto/ppc_arch.h"
+#include "arch/ppc_arch.h"
#define CPU_INFO_STR_LEN 128
#elif defined(__sparcv9) || defined(__sparcv9__)
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#define CPU_INFO_STR_LEN 128
#elif defined(__s390__) || defined(__s390x__)
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
#define CPU_INFO_STR_LEN 2048
#elif defined(__riscv)
-#include "crypto/riscv_arch.h"
+#include "arch/riscv_arch.h"
#define CPU_INFO_STR_LEN 2048
#else
#define CPU_INFO_STR_LEN 256
diff --git a/crypto/init.c b/crypto/init.c
index 0d10f7bf02..302e37f7fa 100644
--- a/crypto/init.c
+++ b/crypto/init.c
@@ -34,7 +34,7 @@
#include "sslerr.h"
#ifdef S390X_MOD_EXP
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
#endif
static int stopped = 0;
diff --git a/crypto/loongarchcap.c b/crypto/loongarchcap.c
index 5375eb3655..d259276e47 100644
--- a/crypto/loongarchcap.c
+++ b/crypto/loongarchcap.c
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
#include <sys/auxv.h>
-#include "loongarch_arch.h"
+#include "arch/loongarch_arch.h"
unsigned int OPENSSL_loongarch_hwcap_P = 0;
diff --git a/crypto/md5/asm/md5-aarch64.pl b/crypto/md5/asm/md5-aarch64.pl
index 02bc05caaf..6ef69715d0 100755
--- a/crypto/md5/asm/md5-aarch64.pl
+++ b/crypto/md5/asm/md5-aarch64.pl
@@ -28,7 +28,7 @@ open OUT,"| \"$^X\" $xlate $flavour \"$output\""
*STDOUT=*OUT;
$code .= <<EOF;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
.text
.globl ossl_md5_block_asm_data_order
diff --git a/crypto/md5/asm/md5-sparcv9.pl b/crypto/md5/asm/md5-sparcv9.pl
index cecaadb114..24439e490b 100644
--- a/crypto/md5/asm/md5-sparcv9.pl
+++ b/crypto/md5/asm/md5-sparcv9.pl
@@ -206,7 +206,7 @@ $code.=<<___;
#ifndef __ASSEMBLER__
# define __ASSEMBLER__ 1
#endif
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#ifdef __arch64__
.register %g2,#scratch
diff --git a/crypto/md5/md5_riscv.c b/crypto/md5/md5_riscv.c
index 1f00d9e034..64dd1a5a26 100644
--- a/crypto/md5/md5_riscv.c
+++ b/crypto/md5/md5_riscv.c
@@ -9,7 +9,7 @@
#include <openssl/opensslconf.h>
#include <openssl/md5.h>
-#include "crypto/riscv_arch.h"
+#include "arch/riscv_arch.h"
void ossl_md5_block_asm_data_order(MD5_CTX *c, const void *p, size_t num);
void ossl_md5_block_asm_data_order_zbb(MD5_CTX *c, const void *p, size_t num);
diff --git a/crypto/ml_kem/ml_kem.c b/crypto/ml_kem/ml_kem.c
index 97cc3cad7d..e40047e596 100644
--- a/crypto/ml_kem/ml_kem.c
+++ b/crypto/ml_kem/ml_kem.c
@@ -408,7 +408,7 @@ static __owur int sample_scalar(scalar *out, EVP_MD_CTX *mdctx)
static CRYPTO_ONCE ml_kem_ntt_once = CRYPTO_ONCE_STATIC_INIT;
#if defined(_ARCH_PPC64)
-#include "crypto/ppc_arch.h"
+#include "arch/ppc_arch.h"
#endif
#if defined(MLKEM_NTT_PPC_ASM) && defined(_ARCH_PPC64)
diff --git a/crypto/modes/asm/aes-gcm-armv8-unroll8_64.pl b/crypto/modes/asm/aes-gcm-armv8-unroll8_64.pl
index d516359eb8..81d1c195a9 100644
--- a/crypto/modes/asm/aes-gcm-armv8-unroll8_64.pl
+++ b/crypto/modes/asm/aes-gcm-armv8-unroll8_64.pl
@@ -170,7 +170,7 @@ open OUT,"| \"$^X\" $xlate $flavour $output";
*STDOUT=*OUT;
$code=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#if __ARM_MAX_ARCH__>=8
___
diff --git a/crypto/modes/asm/aes-gcm-armv8_64.pl b/crypto/modes/asm/aes-gcm-armv8_64.pl
index 507e8c341e..d4c076961b 100755
--- a/crypto/modes/asm/aes-gcm-armv8_64.pl
+++ b/crypto/modes/asm/aes-gcm-armv8_64.pl
@@ -225,7 +225,7 @@ my $rk4v="v22";
my $rk4d="d22";
$code=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#if __ARM_MAX_ARCH__>=8
___
diff --git a/crypto/modes/asm/ghash-armv4.pl b/crypto/modes/asm/ghash-armv4.pl
index 5a0a406ee3..79bfaaf9da 100644
--- a/crypto/modes/asm/ghash-armv4.pl
+++ b/crypto/modes/asm/ghash-armv4.pl
@@ -142,7 +142,7 @@ ___
}
$code=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#if defined(__thumb2__) || defined(__clang__)
.syntax unified
diff --git a/crypto/modes/asm/ghash-s390x.pl b/crypto/modes/asm/ghash-s390x.pl
index 48dc33d99a..fbb4ac6ffa 100644
--- a/crypto/modes/asm/ghash-s390x.pl
+++ b/crypto/modes/asm/ghash-s390x.pl
@@ -82,7 +82,7 @@ $rem_4bit="%r14";
$sp="%r15";
$code.=<<___;
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
.text
diff --git a/crypto/modes/asm/ghash-sparcv9.pl b/crypto/modes/asm/ghash-sparcv9.pl
index 8096d2d033..63021645c0 100644
--- a/crypto/modes/asm/ghash-sparcv9.pl
+++ b/crypto/modes/asm/ghash-sparcv9.pl
@@ -83,7 +83,7 @@ $code.=<<___;
#ifndef __ASSEMBLER__
# define __ASSEMBLER__ 1
#endif
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#ifdef __arch64__
.register %g2,#scratch
diff --git a/crypto/modes/asm/ghashv8-armx.pl b/crypto/modes/asm/ghashv8-armx.pl
index 5401e50bf8..065154a8b3 100644
--- a/crypto/modes/asm/ghashv8-armx.pl
+++ b/crypto/modes/asm/ghashv8-armx.pl
@@ -73,7 +73,7 @@ my ($t0,$t1,$t2,$xC2,$H,$Hhl,$H2)=map("q$_",(8..14));
my $_byte = ($flavour =~ /win/ ? "DCB" : ".byte");
$code=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#if __ARM_MAX_ARCH__>=7
___
diff --git a/crypto/modes/gcm128.c b/crypto/modes/gcm128.c
index 16c13e2961..0bef7440f8 100644
--- a/crypto/modes/gcm128.c
+++ b/crypto/modes/gcm128.c
@@ -368,7 +368,7 @@ void gcm_ghash_4bit_x86(u64 Xi[2], const u128 Htable[16], const u8 *inp,
size_t len);
#endif
#elif defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(_M_ARM64)
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#if __ARM_MAX_ARCH__ >= 7
#define GHASH_ASM_ARM
#define PMULL_CAPABLE (OPENSSL_armcap_P & ARMV8_PMULL)
@@ -385,21 +385,21 @@ void gcm_ghash_v8(u64 Xi[2], const u128 Htable[16], const u8 *inp,
size_t len);
#endif
#elif defined(__sparc__) || defined(__sparc)
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#define GHASH_ASM_SPARC
void gcm_init_vis3(u128 Htable[16], const u64 Xi[2]);
void gcm_gmult_vis3(u64 Xi[2], const u128 Htable[16]);
void gcm_ghash_vis3(u64 Xi[2], const u128 Htable[16], const u8 *inp,
size_t len);
#elif defined(OPENSSL_CPUID_OBJ) && (defined(__powerpc__) || defined(__POWERPC__) || defined(_ARCH_PPC))
-#include "crypto/ppc_arch.h"
+#include "arch/ppc_arch.h"
#define GHASH_ASM_PPC
void gcm_init_p8(u128 Htable[16], const u64 Xi[2]);
void gcm_gmult_p8(u64 Xi[2], const u128 Htable[16]);
void gcm_ghash_p8(u64 Xi[2], const u128 Htable[16], const u8 *inp,
size_t len);
#elif defined(OPENSSL_CPUID_OBJ) && defined(__riscv) && __riscv_xlen == 64
-#include "crypto/riscv_arch.h"
+#include "arch/riscv_arch.h"
#define GHASH_ASM_RV64I
/* Zbc/Zbkc (scalar crypto with clmul) based routines. */
void gcm_init_rv64i_zbc(u128 Htable[16], const u64 Xi[2]);
diff --git a/crypto/poly1305/asm/poly1305-armv4.pl b/crypto/poly1305/asm/poly1305-armv4.pl
index 05751238fe..31500feed2 100755
--- a/crypto/poly1305/asm/poly1305-armv4.pl
+++ b/crypto/poly1305/asm/poly1305-armv4.pl
@@ -48,7 +48,7 @@ if ($flavour && $flavour ne "void") {
($ctx,$inp,$len,$padbit)=map("r$_",(0..3));
$code.=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#if defined(__thumb2__)
.syntax unified
diff --git a/crypto/poly1305/asm/poly1305-armv8.pl b/crypto/poly1305/asm/poly1305-armv8.pl
index 6659cd631f..17bf15d781 100755
--- a/crypto/poly1305/asm/poly1305-armv8.pl
+++ b/crypto/poly1305/asm/poly1305-armv8.pl
@@ -55,7 +55,7 @@ my ($mac,$nonce)=($inp,$len);
my ($h0,$h1,$h2,$r0,$r1,$s1,$t0,$t1,$d0,$d1,$d2) = map("x$_",(4..14));
$code.=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
.text
diff --git a/crypto/poly1305/asm/poly1305-armv9-sve2.pl b/crypto/poly1305/asm/poly1305-armv9-sve2.pl
index b68741fe58..7f957f0188 100755
--- a/crypto/poly1305/asm/poly1305-armv9-sve2.pl
+++ b/crypto/poly1305/asm/poly1305-armv9-sve2.pl
@@ -104,7 +104,7 @@ my ($pwr,$mask) = map("x$_",(25..26));
my $is_base2_26 = "w17";
$code.=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
.text
diff --git a/crypto/poly1305/asm/poly1305-mips.pl b/crypto/poly1305/asm/poly1305-mips.pl
index a41def668c..7ecf285520 100755
--- a/crypto/poly1305/asm/poly1305-mips.pl
+++ b/crypto/poly1305/asm/poly1305-mips.pl
@@ -71,7 +71,7 @@ $SAVED_REGS_MASK = ($flavour =~ /nubi/i) ? "0x0003f000" : "0x00030000";
($in0,$in1,$tmp0,$tmp1,$tmp2,$tmp3,$tmp4) = ($a4,$a5,$a6,$a7,$at,$t0,$t1);
$code.=<<___;
-#include "mips_arch.h"
+#include "arch/mips_arch.h"
#ifdef MIPSEB
# define MSB 0
diff --git a/crypto/poly1305/asm/poly1305-s390x.pl b/crypto/poly1305/asm/poly1305-s390x.pl
index 8f3f97a1cf..34e4f5cf2d 100755
--- a/crypto/poly1305/asm/poly1305-s390x.pl
+++ b/crypto/poly1305/asm/poly1305-s390x.pl
@@ -68,7 +68,7 @@ my ($ctx,$inp,$len,$padbit) = map("%r$_",(2..5));
PERLASM_BEGIN($output);
-INCLUDE ("s390x_arch.h");
+INCLUDE ("arch/s390x_arch.h");
TEXT ();
################
diff --git a/crypto/poly1305/asm/poly1305-sparcv9.pl b/crypto/poly1305/asm/poly1305-sparcv9.pl
index a3282a8058..62ab114acb 100755
--- a/crypto/poly1305/asm/poly1305-sparcv9.pl
+++ b/crypto/poly1305/asm/poly1305-sparcv9.pl
@@ -55,7 +55,7 @@ $code.=<<___;
#ifndef __ASSEMBLER__
# define __ASSEMBLER__ 1
#endif
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#ifdef __arch64__
.register %g2,#scratch
diff --git a/crypto/poly1305/poly1305_ppc.c b/crypto/poly1305/poly1305_ppc.c
index a40ce729b7..4a2a943a8b 100644
--- a/crypto/poly1305/poly1305_ppc.c
+++ b/crypto/poly1305/poly1305_ppc.c
@@ -10,7 +10,7 @@
#include <openssl/opensslconf.h>
#include <openssl/types.h>
#include "crypto/poly1305.h"
-#include "crypto/ppc_arch.h"
+#include "arch/ppc_arch.h"
void poly1305_init_int(void *ctx, const unsigned char key[16]);
void poly1305_blocks(void *ctx, const unsigned char *inp, size_t len,
diff --git a/crypto/ppccap.c b/crypto/ppccap.c
index 69b3254b6d..a2acf6b6ed 100644
--- a/crypto/ppccap.c
+++ b/crypto/ppccap.c
@@ -28,7 +28,7 @@
#endif
#include <openssl/crypto.h>
#include "internal/cryptlib.h"
-#include "crypto/ppc_arch.h"
+#include "arch/ppc_arch.h"
unsigned int OPENSSL_ppccap_P = 0;
diff --git a/crypto/riscvcap.c b/crypto/riscvcap.c
index b4cfbdc429..cdec9a0216 100644
--- a/crypto/riscvcap.c
+++ b/crypto/riscvcap.c
@@ -15,7 +15,7 @@
#include "internal/cryptlib.h"
#define OPENSSL_RISCVCAP_IMPL
-#include "crypto/riscv_arch.h"
+#include "arch/riscv_arch.h"
#ifdef OSSL_RISCV_HWPROBE
#include <unistd.h>
diff --git a/crypto/s390xcap.c b/crypto/s390xcap.c
index 77b3b0307a..5453f33c12 100644
--- a/crypto/s390xcap.c
+++ b/crypto/s390xcap.c
@@ -14,7 +14,7 @@
#include <signal.h>
#include "internal/cryptlib.h"
#include "crypto/ctype.h"
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
#if defined(OPENSSL_SYS_LINUX) && !defined(FIPS_MODULE)
#include <sys/types.h>
diff --git a/crypto/s390xcpuid.pl b/crypto/s390xcpuid.pl
index 2860a17048..dce17a3bfa 100755
--- a/crypto/s390xcpuid.pl
+++ b/crypto/s390xcpuid.pl
@@ -26,7 +26,7 @@ $sp="%r15";
$stdframe=16*$SIZE_T+4*8;
$code=<<___;
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
.text
diff --git a/crypto/sha/asm/keccak1600-armv4.pl b/crypto/sha/asm/keccak1600-armv4.pl
index 4e81bb805b..896ce6ec5b 100755
--- a/crypto/sha/asm/keccak1600-armv4.pl
+++ b/crypto/sha/asm/keccak1600-armv4.pl
@@ -113,7 +113,7 @@ my @D = map(8*$_, (25..29));
my @T = map([ 8*$_, 8*($_+1), 8*($_+2), 8*($_+3), 8*($_+4) ], (30,35,40,45,50));
$code.=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#if defined(__thumb2__)
.syntax unified
diff --git a/crypto/sha/asm/keccak1600-armv8.pl b/crypto/sha/asm/keccak1600-armv8.pl
index 61096079d3..48247dcd27 100755
--- a/crypto/sha/asm/keccak1600-armv8.pl
+++ b/crypto/sha/asm/keccak1600-armv8.pl
@@ -80,7 +80,7 @@ my @rhotates = ([ 0, 1, 62, 28, 27 ],
[ 18, 2, 61, 56, 14 ]);
$code.=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
.rodata
diff --git a/crypto/sha/asm/sha1-armv4-large.pl b/crypto/sha/asm/sha1-armv4-large.pl
index 7ef7bd6e91..38f5ae988d 100644
--- a/crypto/sha/asm/sha1-armv4-large.pl
+++ b/crypto/sha/asm/sha1-armv4-large.pl
@@ -187,7 +187,7 @@ ___
}
$code=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#if defined(__thumb2__)
.syntax unified
diff --git a/crypto/sha/asm/sha1-armv8.pl b/crypto/sha/asm/sha1-armv8.pl
index 1c1920f702..4eeec6b0b2 100644
--- a/crypto/sha/asm/sha1-armv8.pl
+++ b/crypto/sha/asm/sha1-armv8.pl
@@ -175,7 +175,7 @@ ___
}
$code.=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#ifndef __KERNEL__
.extern OPENSSL_armcap_P
.hidden OPENSSL_armcap_P
diff --git a/crypto/sha/asm/sha1-mips.pl b/crypto/sha/asm/sha1-mips.pl
index 870a05a109..c60791b175 100644
--- a/crypto/sha/asm/sha1-mips.pl
+++ b/crypto/sha/asm/sha1-mips.pl
@@ -343,7 +343,7 @@ $FRAMESIZE=16; # large enough to accommodate NUBI saved registers
$SAVED_REGS_MASK = ($flavour =~ /nubi/i) ? "0xc0fff008" : "0xc0ff0000";
$code=<<___;
-#include "mips_arch.h"
+#include "arch/mips_arch.h"
.text
diff --git a/crypto/sha/asm/sha1-s390x.pl b/crypto/sha/asm/sha1-s390x.pl
index 6762932a87..448b4a8848 100644
--- a/crypto/sha/asm/sha1-s390x.pl
+++ b/crypto/sha/asm/sha1-s390x.pl
@@ -162,7 +162,7 @@ ___
}
$code.=<<___;
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
.text
.align 64
diff --git a/crypto/sha/asm/sha1-sparcv9.pl b/crypto/sha/asm/sha1-sparcv9.pl
index a95d5717ee..24ee48222a 100644
--- a/crypto/sha/asm/sha1-sparcv9.pl
+++ b/crypto/sha/asm/sha1-sparcv9.pl
@@ -190,7 +190,7 @@ $code.=<<___;
#ifndef __ASSEMBLER__
# define __ASSEMBLER__ 1
#endif
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#ifdef __arch64__
.register %g2,#scratch
diff --git a/crypto/sha/asm/sha256-armv4.pl b/crypto/sha/asm/sha256-armv4.pl
index ba05676f14..1bcf7cea4f 100644
--- a/crypto/sha/asm/sha256-armv4.pl
+++ b/crypto/sha/asm/sha256-armv4.pl
@@ -177,7 +177,7 @@ ___
$code=<<___;
#ifndef __KERNEL__
-# include "arm_arch.h"
+# include "arch/arm_arch.h"
#else
# define __ARM_ARCH__ __LINUX_ARM_ARCH__
# define __ARM_MAX_ARCH__ 7
diff --git a/crypto/sha/asm/sha512-armv4.pl b/crypto/sha/asm/sha512-armv4.pl
index 597854b6a6..a7d7b19b19 100644
--- a/crypto/sha/asm/sha512-armv4.pl
+++ b/crypto/sha/asm/sha512-armv4.pl
@@ -203,7 +203,7 @@ my $_word = ($flavour =~ /win/ ? "DCDU" : ".word");
$code=<<___;
#ifndef __KERNEL__
-# include "arm_arch.h"
+# include "arch/arm_arch.h"
# define VFP_ABI_PUSH vstmdb sp!,{d8-d15}
# define VFP_ABI_POP vldmia sp!,{d8-d15}
#else
diff --git a/crypto/sha/asm/sha512-armv8.pl b/crypto/sha/asm/sha512-armv8.pl
index 6fb26e912b..66c29a5eef 100644
--- a/crypto/sha/asm/sha512-armv8.pl
+++ b/crypto/sha/asm/sha512-armv8.pl
@@ -190,7 +190,7 @@ ___
}
$code.=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
#ifndef __KERNEL__
.extern OPENSSL_armcap_P
.hidden OPENSSL_armcap_P
diff --git a/crypto/sha/asm/sha512-mips.pl b/crypto/sha/asm/sha512-mips.pl
index 58aac18eb9..cbca8163a0 100644
--- a/crypto/sha/asm/sha512-mips.pl
+++ b/crypto/sha/asm/sha512-mips.pl
@@ -308,7 +308,7 @@ $FRAMESIZE=16*$SZ+16*$SZREG;
$SAVED_REGS_MASK = ($flavour =~ /nubi/i) ? "0xc0fff008" : "0xc0ff0000";
$code.=<<___;
-#include "mips_arch.h"
+#include "arch/mips_arch.h"
.text
.set noat
diff --git a/crypto/sha/asm/sha512-s390x.pl b/crypto/sha/asm/sha512-s390x.pl
index f4cf4848cf..7d57eaaa47 100644
--- a/crypto/sha/asm/sha512-s390x.pl
+++ b/crypto/sha/asm/sha512-s390x.pl
@@ -172,7 +172,7 @@ ___
}
$code.=<<___;
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
.text
.align 64
diff --git a/crypto/sha/asm/sha512-sparcv9.pl b/crypto/sha/asm/sha512-sparcv9.pl
index 4763e714eb..b2c64c7a3f 100644
--- a/crypto/sha/asm/sha512-sparcv9.pl
+++ b/crypto/sha/asm/sha512-sparcv9.pl
@@ -397,7 +397,7 @@ $code.=<<___;
#ifndef __ASSEMBLER__
# define __ASSEMBLER__ 1
#endif
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#ifdef __arch64__
.register %g2,#scratch
diff --git a/crypto/sha/sha3.c b/crypto/sha/sha3.c
index 4e82a277e9..5c8754cfd6 100644
--- a/crypto/sha/sha3.c
+++ b/crypto/sha/sha3.c
@@ -12,11 +12,11 @@
#include "internal/common.h"
#if defined(__aarch64__) && defined(KECCAK1600_ASM)
-#include "crypto/arm_arch.h"
+#include "arch/arm_arch.h"
#endif
#if defined(__s390x__) && defined(OPENSSL_CPUID_OBJ)
-#include "crypto/s390x_arch.h"
+#include "arch/s390x_arch.h"
#if defined(KECCAK1600_ASM)
#define S390_SHA3 1
#define S390_SHA3_CAPABLE(name) \
diff --git a/crypto/sha/sha_loongarch.c b/crypto/sha/sha_loongarch.c
index da8dac8975..55ececfe04 100644
--- a/crypto/sha/sha_loongarch.c
+++ b/crypto/sha/sha_loongarch.c
@@ -12,7 +12,7 @@
#include <openssl/opensslconf.h>
#include <openssl/sha.h>
-#include "crypto/loongarch_arch.h"
+#include "arch/loongarch_arch.h"
void sha256_block_data_order_la64v100(void *ctx, const void *in, size_t num);
void sha256_block_data_order_lsx(void *ctx, const void *in, size_t num);
diff --git a/crypto/sha/sha_ppc.c b/crypto/sha/sha_ppc.c
index 9853a2321a..0e5c5c5709 100644
--- a/crypto/sha/sha_ppc.c
+++ b/crypto/sha/sha_ppc.c
@@ -12,7 +12,7 @@
#include <openssl/opensslconf.h>
#include <openssl/sha.h>
-#include "crypto/ppc_arch.h"
+#include "arch/ppc_arch.h"
void sha256_block_p8(void *ctx, const void *inp, size_t len);
void sha256_block_ppc(void *ctx, const void *inp, size_t len);
diff --git a/crypto/sha/sha_riscv.c b/crypto/sha/sha_riscv.c
index 5a0eaaf11b..28248fd5ac 100644
--- a/crypto/sha/sha_riscv.c
+++ b/crypto/sha/sha_riscv.c
@@ -12,7 +12,7 @@
#include <openssl/opensslconf.h>
#include <openssl/sha.h>
-#include "crypto/riscv_arch.h"
+#include "arch/riscv_arch.h"
void sha256_block_data_order_zvkb_zvknha_or_zvknhb(void *ctx, const void *in,
size_t num);
diff --git a/crypto/sm3/asm/sm3-armv8.pl b/crypto/sm3/asm/sm3-armv8.pl
index f36e0e2be9..e0c33ecb95 100644
--- a/crypto/sm3/asm/sm3-armv8.pl
+++ b/crypto/sm3/asm/sm3-armv8.pl
@@ -109,7 +109,7 @@ ___
}
$code=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
.text
___
diff --git a/crypto/sm3/sm3_local.h b/crypto/sm3/sm3_local.h
index a8f92be87e..6cb8dca61b 100644
--- a/crypto/sm3/sm3_local.h
+++ b/crypto/sm3/sm3_local.h
@@ -47,12 +47,12 @@
#if defined(OPENSSL_SM3_ASM)
#if defined(__aarch64__) || defined(_M_ARM64)
-#include "crypto/arm_arch.h"
+#include "arch/arm_arch.h"
#define HWSM3_CAPABLE (OPENSSL_armcap_P & ARMV8_SM3)
void ossl_hwsm3_block_data_order(SM3_CTX *c, const void *p, size_t num);
#endif
#if defined(OPENSSL_CPUID_OBJ) && defined(__riscv) && __riscv_xlen == 64
-#include "crypto/riscv_arch.h"
+#include "arch/riscv_arch.h"
#define HWSM3_CAPABLE 1
void ossl_hwsm3_block_data_order(SM3_CTX *c, const void *p, size_t num);
#endif
diff --git a/crypto/sm3/sm3_riscv.c b/crypto/sm3/sm3_riscv.c
index f8abc4e277..3dcb3d2938 100644
--- a/crypto/sm3/sm3_riscv.c
+++ b/crypto/sm3/sm3_riscv.c
@@ -12,7 +12,7 @@
#include <openssl/opensslconf.h>
#include "internal/sm3.h"
-#include "crypto/riscv_arch.h"
+#include "arch/riscv_arch.h"
#include <stdio.h>
void ossl_hwsm3_block_data_order_zvksh(SM3_CTX *c, const void *p, size_t num);
diff --git a/crypto/sm4/asm/sm4-armv8.pl b/crypto/sm4/asm/sm4-armv8.pl
index 1fe12dead4..8024922ece 100755
--- a/crypto/sm4/asm/sm4-armv8.pl
+++ b/crypto/sm4/asm/sm4-armv8.pl
@@ -111,7 +111,7 @@ ___
}
$code=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
.arch armv8-a+crypto
.text
___
diff --git a/crypto/sm4/asm/vpsm4-armv8.pl b/crypto/sm4/asm/vpsm4-armv8.pl
index c60ace1536..e242af75ee 100755
--- a/crypto/sm4/asm/vpsm4-armv8.pl
+++ b/crypto/sm4/asm/vpsm4-armv8.pl
@@ -537,7 +537,7 @@ ___
}
$code=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
.arch armv8-a
.text
diff --git a/crypto/sm4/asm/vpsm4_ex-armv8.pl b/crypto/sm4/asm/vpsm4_ex-armv8.pl
index eac5a0f6a1..fdb0d29947 100644
--- a/crypto/sm4/asm/vpsm4_ex-armv8.pl
+++ b/crypto/sm4/asm/vpsm4_ex-armv8.pl
@@ -539,7 +539,7 @@ ___
}
$code=<<___;
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
.arch armv8-a+crypto
.text
diff --git a/crypto/sparcv9cap.c b/crypto/sparcv9cap.c
index b7f109581f..c9cc2b9575 100644
--- a/crypto/sparcv9cap.c
+++ b/crypto/sparcv9cap.c
@@ -16,7 +16,7 @@
#include <unistd.h>
#include <openssl/bn.h>
#include "internal/cryptlib.h"
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#if defined(__GNUC__) && defined(__linux)
__attribute__((visibility("hidden")))
diff --git a/crypto/arm_arch.h b/include/arch/arm_arch.h
similarity index 100%
rename from crypto/arm_arch.h
rename to include/arch/arm_arch.h
diff --git a/crypto/loongarch_arch.h b/include/arch/loongarch_arch.h
similarity index 100%
rename from crypto/loongarch_arch.h
rename to include/arch/loongarch_arch.h
diff --git a/crypto/mips_arch.h b/include/arch/mips_arch.h
similarity index 100%
rename from crypto/mips_arch.h
rename to include/arch/mips_arch.h
diff --git a/include/crypto/ppc_arch.h b/include/arch/ppc_arch.h
similarity index 100%
rename from include/crypto/ppc_arch.h
rename to include/arch/ppc_arch.h
diff --git a/include/crypto/riscv_arch.def b/include/arch/riscv_arch.def
similarity index 100%
rename from include/crypto/riscv_arch.def
rename to include/arch/riscv_arch.def
diff --git a/include/crypto/riscv_arch.h b/include/arch/riscv_arch.h
similarity index 100%
rename from include/crypto/riscv_arch.h
rename to include/arch/riscv_arch.h
diff --git a/crypto/s390x_arch.h b/include/arch/s390x_arch.h
similarity index 100%
rename from crypto/s390x_arch.h
rename to include/arch/s390x_arch.h
diff --git a/include/crypto/sparc_arch.h b/include/arch/sparc_arch.h
similarity index 100%
rename from include/crypto/sparc_arch.h
rename to include/arch/sparc_arch.h
diff --git a/include/crypto/aes_platform.h b/include/crypto/aes_platform.h
index bec9040e3e..de65183417 100644
--- a/include/crypto/aes_platform.h
+++ b/include/crypto/aes_platform.h
@@ -61,7 +61,7 @@ void AES_xts_decrypt(const unsigned char *inp, unsigned char *out, size_t len,
#if defined(OPENSSL_CPUID_OBJ)
#if (defined(__powerpc__) || defined(__POWERPC__) || defined(_ARCH_PPC))
-#include "crypto/ppc_arch.h"
+#include "arch/ppc_arch.h"
#ifdef VPAES_ASM
#define VPAES_CAPABLE (OPENSSL_ppccap_P & PPC_ALTIVEC)
#endif
@@ -94,7 +94,7 @@ void gcm_ghash_p8(u64 Xi[2], const u128 Htable[16], const u8 *inp, size_t len);
#endif /* PPC */
#if (defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(_M_ARM64))
-#include "crypto/arm_arch.h"
+#include "arch/arm_arch.h"
#if __ARM_MAX_ARCH__ >= 7
#if defined(BSAES_ASM)
#define BSAES_CAPABLE (OPENSSL_armcap_P & ARMV7_NEON)
@@ -172,7 +172,7 @@ void gcm_ghash_v8(u64 Xi[2], const u128 Htable[16], const u8 *inp, size_t len);
#endif
#if defined(__loongarch__) || defined(__loongarch64)
-#include "loongarch_arch.h"
+#include "arch/loongarch_arch.h"
#if defined(VPAES_ASM)
#define VPAES_CAPABLE (OPENSSL_loongarch_hwcap_P & LOONGARCH_HWCAP_LSX)
#endif
@@ -299,7 +299,7 @@ void gcm_ghash_avx(u64 Xi[2], const u128 Htable[16], const u8 *in, size_t len);
#elif defined(AES_ASM) && (defined(__sparc) || defined(__sparc__))
/* Fujitsu SPARC64 X support */
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#define SPARC_AES_CAPABLE (OPENSSL_sparcv9cap_P[1] & CFR_AES)
#define HWAES_CAPABLE (OPENSSL_sparcv9cap_P[0] & SPARCV9_FJAESX)
@@ -369,7 +369,7 @@ void aes256_t4_xts_decrypt(const unsigned char *in, unsigned char *out,
#elif defined(OPENSSL_CPUID_OBJ) && defined(__s390__)
/* IBM S390X support */
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
/* Convert key size to function code: [16,24,32] -> [18,19,20]. */
#define S390X_AES_FC(keylen) (S390X_AES_128 + ((((keylen) << 3) - 128) >> 6))
@@ -433,7 +433,7 @@ void aes256_t4_xts_decrypt(const unsigned char *in, unsigned char *out,
#define S390X_AES_FC(keylen) (S390X_AES_128 + ((((keylen) << 3) - 128) >> 6))
#elif defined(OPENSSL_CPUID_OBJ) && defined(__riscv) && __riscv_xlen == 64
/* RISC-V 64 support */
-#include "riscv_arch.h"
+#include "arch/riscv_arch.h"
/* Zkne and Zknd extensions (scalar crypto AES). */
int rv64i_zkne_set_encrypt_key(const unsigned char *userKey, const int bits,
@@ -509,7 +509,7 @@ void gcm_ghash_rv64i_zvkg(u64 Xi[2], const u128 Htable[16], const u8 *inp,
#elif defined(OPENSSL_CPUID_OBJ) && defined(__riscv) && __riscv_xlen == 32
/* RISC-V 32 support */
-#include "riscv_arch.h"
+#include "arch/riscv_arch.h"
int rv32i_zkne_set_encrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key);
diff --git a/include/crypto/cmll_platform.h b/include/crypto/cmll_platform.h
index 02ed385c05..207084b123 100644
--- a/include/crypto/cmll_platform.h
+++ b/include/crypto/cmll_platform.h
@@ -14,7 +14,7 @@
#if defined(CMLL_ASM) && (defined(__sparc) || defined(__sparc__))
/* Fujitsu SPARC64 X support */
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#ifndef OPENSSL_NO_CAMELLIA
#define SPARC_CMLL_CAPABLE (OPENSSL_sparcv9cap_P[1] & CFR_CAMELLIA)
diff --git a/include/crypto/des_platform.h b/include/crypto/des_platform.h
index e0210c664f..660d1b6a18 100644
--- a/include/crypto/des_platform.h
+++ b/include/crypto/des_platform.h
@@ -14,7 +14,7 @@
#if defined(DES_ASM) && (defined(__sparc) || defined(__sparc__))
/* Fujitsu SPARC64 X support */
-#include "crypto/sparc_arch.h"
+#include "arch/sparc_arch.h"
#ifndef OPENSSL_NO_DES
#define SPARC_DES_CAPABLE (OPENSSL_sparcv9cap_P[1] & CFR_DES)
diff --git a/include/crypto/sm4_platform.h b/include/crypto/sm4_platform.h
index 56e8604fd7..48c9ff93cf 100644
--- a/include/crypto/sm4_platform.h
+++ b/include/crypto/sm4_platform.h
@@ -13,7 +13,7 @@
#if defined(OPENSSL_CPUID_OBJ)
#if defined(__aarch64__) || defined(_M_ARM64)
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
extern unsigned int OPENSSL_arm_midr;
static inline int vpsm4_capable(void)
{
@@ -37,7 +37,7 @@ static inline int vpsm4_ex_capable(void)
#define HWSM4_ctr32_encrypt_blocks sm4_v8_ctr32_encrypt_blocks
#elif defined(OPENSSL_CPUID_OBJ) && defined(__riscv) && __riscv_xlen == 64
/* RV64 support */
-#include "riscv_arch.h"
+#include "arch/riscv_arch.h"
/* Zvksed extension (vector crypto SM4). */
int rv64i_zvksed_sm4_set_encrypt_key(const unsigned char *userKey,
SM4_KEY *key);
diff --git a/providers/implementations/ciphers/cipher_aes_cfb_hw_s390x.inc b/providers/implementations/ciphers/cipher_aes_cfb_hw_s390x.inc
index 98d60809c4..113c1de6a9 100644
--- a/providers/implementations/ciphers/cipher_aes_cfb_hw_s390x.inc
+++ b/providers/implementations/ciphers/cipher_aes_cfb_hw_s390x.inc
@@ -12,7 +12,7 @@
* This file is included by cipher_aes_cfb_hw.c
*/
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
#include <stdio.h>
diff --git a/providers/implementations/ciphers/cipher_aes_hw_s390x.inc b/providers/implementations/ciphers/cipher_aes_hw_s390x.inc
index ed69f1709f..be82d3be9b 100644
--- a/providers/implementations/ciphers/cipher_aes_hw_s390x.inc
+++ b/providers/implementations/ciphers/cipher_aes_hw_s390x.inc
@@ -12,7 +12,7 @@
* This file is included by cipher_aes_hw.c
*/
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
#include <stdio.h>
diff --git a/providers/implementations/ciphers/cipher_aes_xts_s390x.inc b/providers/implementations/ciphers/cipher_aes_xts_s390x.inc
index 77341b3bbd..b13d23581c 100644
--- a/providers/implementations/ciphers/cipher_aes_xts_s390x.inc
+++ b/providers/implementations/ciphers/cipher_aes_xts_s390x.inc
@@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/
-#include "crypto/s390x_arch.h"
+#include "arch/s390x_arch.h"
static OSSL_FUNC_cipher_encrypt_init_fn s390x_aes_xts_einit;
static OSSL_FUNC_cipher_decrypt_init_fn s390x_aes_xts_dinit;
diff --git a/providers/implementations/digests/sha3_prov.c b/providers/implementations/digests/sha3_prov.c
index f851e8987b..cae88b1d63 100644
--- a/providers/implementations/digests/sha3_prov.c
+++ b/providers/implementations/digests/sha3_prov.c
@@ -59,7 +59,7 @@
/*
* IBM S390X support
*/
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
#define S390_SHA3 1
#define S390_SHA3_CAPABLE(name) \
((OPENSSL_s390xcap_P.kimd[0] & S390X_CAPBIT(S390X_##name)) && (OPENSSL_s390xcap_P.klmd[0] & S390X_CAPBIT(S390X_##name)))
@@ -362,7 +362,7 @@ static PROV_SHA3_METHOD cshake_keccak_s390x_md = {
ctx->meth = shake_generic_md; \
}
#elif defined(__aarch64__) && defined(KECCAK1600_ASM)
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
static sha3_absorb_fn armsha3_sha3_absorb;
diff --git a/providers/implementations/keymgmt/ecx_kmgmt.c b/providers/implementations/keymgmt/ecx_kmgmt.c
index 8345f5a7bb..8489ce2248 100644
--- a/providers/implementations/keymgmt/ecx_kmgmt.c
+++ b/providers/implementations/keymgmt/ecx_kmgmt.c
@@ -27,7 +27,7 @@
#include "prov/ecx.h"
#include "prov/securitycheck.h"
#ifdef S390X_EC_ASM
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
#include <openssl/sha.h> /* For SHA512_DIGEST_LENGTH */
#endif
@@ -1025,7 +1025,7 @@ MAKE_KEYMGMT_FUNCTIONS(ed25519)
MAKE_KEYMGMT_FUNCTIONS(ed448)
#ifdef S390X_EC_ASM
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
static void *s390x_ecx_keygen25519(struct ecx_gen_ctx *gctx)
{
diff --git a/providers/implementations/rands/seeding/rand_cpu_arm64.c b/providers/implementations/rands/seeding/rand_cpu_arm64.c
index 76bbedf119..083b4826ae 100644
--- a/providers/implementations/rands/seeding/rand_cpu_arm64.c
+++ b/providers/implementations/rands/seeding/rand_cpu_arm64.c
@@ -13,7 +13,7 @@
#include "prov/seeding.h"
#ifdef OPENSSL_RAND_SEED_RDCPU
-#include "crypto/arm_arch.h"
+#include "arch/arm_arch.h"
size_t OPENSSL_rndrrs_bytes(unsigned char *buf, size_t len);
diff --git a/providers/implementations/signature/eddsa_sig.c b/providers/implementations/signature/eddsa_sig.c
index 40a2c66c33..9c25866794 100644
--- a/providers/implementations/signature/eddsa_sig.c
+++ b/providers/implementations/signature/eddsa_sig.c
@@ -30,7 +30,7 @@
#include "providers/implementations/signature/eddsa_sig.inc"
#ifdef S390X_EC_ASM
-#include "s390x_arch.h"
+#include "arch/s390x_arch.h"
#define S390X_CAN_SIGN(edtype) \
((OPENSSL_s390xcap_P.pcc[1] & S390X_CAPBIT(S390X_SCALAR_MULTIPLY_##edtype)) \
diff --git a/test/chacha_internal_test.c b/test/chacha_internal_test.c
index 358bf7fc68..effdc26b88 100644
--- a/test/chacha_internal_test.c
+++ b/test/chacha_internal_test.c
@@ -17,7 +17,7 @@
#include "testutil.h"
#include "crypto/chacha.h"
#if defined(__powerpc64__) && !defined(OPENSSL_SYS_AIX) && !defined(OPENSSL_SYS_MACOSX)
-#include "crypto/ppc_arch.h"
+#include "arch/ppc_arch.h"
#endif
static const unsigned int key[] = {
diff --git a/test/rdcpu_sanitytest.c b/test/rdcpu_sanitytest.c
index e76b94b34c..47c2ea71ca 100644
--- a/test/rdcpu_sanitytest.c
+++ b/test/rdcpu_sanitytest.c
@@ -23,7 +23,7 @@ size_t OPENSSL_ia32_rdseed_bytes(unsigned char *buf, size_t len);
#if defined(__aarch64__) && defined(OPENSSL_CPUID_OBJ)
#define IS_AARCH_64 1
-#include "arm_arch.h"
+#include "arch/arm_arch.h"
size_t OPENSSL_rndr_bytes(unsigned char *buf, size_t len);
size_t OPENSSL_rndrrs_bytes(unsigned char *buf, size_t len);