V2 [PATCH 3/4] amd64: Always include <config.h> in cipher assembly codes

H.J. Lu hjl.tools at gmail.com
Sun Jan 19 15:40:24 CET 2020


* cipher/camellia-aesni-avx-amd64.S: Always include <config.h>.
* cipher/camellia-aesni-avx2-amd64.S: Likewise.
* cipher/serpent-avx2-amd64.S: Likewise.
--

When Intel CET is enabled, we need to include <cet.h> in assembly
codes to mark Intel CET support even if it is empty.  We should
always include <config.h> in cipher amd64 assembly codes so that
they will be marked for Intel CET support when compiling for i686.

Signed-off-by: H.J. Lu <hjl.tools at gmail.com>
---
 cipher/camellia-aesni-avx-amd64.S  | 3 ++-
 cipher/camellia-aesni-avx2-amd64.S | 3 ++-
 cipher/serpent-avx2-amd64.S        | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/cipher/camellia-aesni-avx-amd64.S b/cipher/camellia-aesni-avx-amd64.S
index e16d4f61..4671bcfe 100644
--- a/cipher/camellia-aesni-avx-amd64.S
+++ b/cipher/camellia-aesni-avx-amd64.S
@@ -18,8 +18,9 @@
  * License along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifdef __x86_64
 #include <config.h>
+
+#ifdef __x86_64
 #if (defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) || \
      defined(HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS)) && \
     defined(ENABLE_AESNI_SUPPORT) && defined(ENABLE_AVX_SUPPORT)
diff --git a/cipher/camellia-aesni-avx2-amd64.S b/cipher/camellia-aesni-avx2-amd64.S
index cc01c774..517e6880 100644
--- a/cipher/camellia-aesni-avx2-amd64.S
+++ b/cipher/camellia-aesni-avx2-amd64.S
@@ -18,8 +18,9 @@
  * License along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifdef __x86_64
 #include <config.h>
+
+#ifdef __x86_64
 #if (defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) || \
      defined(HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS)) && \
     defined(ENABLE_AESNI_SUPPORT) && defined(ENABLE_AVX2_SUPPORT)
diff --git a/cipher/serpent-avx2-amd64.S b/cipher/serpent-avx2-amd64.S
index 9b17c2bd..dcee9b62 100644
--- a/cipher/serpent-avx2-amd64.S
+++ b/cipher/serpent-avx2-amd64.S
@@ -18,8 +18,9 @@
  * License along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifdef __x86_64
 #include <config.h>
+
+#ifdef __x86_64
 #if (defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) || \
     defined(HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS)) && defined(USE_SERPENT) && \
     defined(ENABLE_AVX2_SUPPORT)
-- 
2.24.1




More information about the Gcrypt-devel mailing list