From 16ad16a49ca8bc55e1c91d3c13aeea3dad93848e Mon Sep 17 00:00:00 2001 From: Cuda-Chen Date: Fri, 17 Nov 2023 22:17:43 +0800 Subject: [PATCH] Add A32 support in CI Add A32 support in CI. Currently choose Cortex-A32 as test target because it only supports AArch32. Moreover, Cortex-A32 has Armv8-A Cryptographic Extension, which is an ideal target for testing Cryptographic Extension. --- .github/workflows/github_actions.yml | 4 ++-- Makefile | 6 +++++- README.md | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 798aaed3..92be10fb 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -55,7 +55,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - arch_with_features: [{arch: armv7, feature: none}, {arch: aarch64, feature: none}, {arch: aarch64, feature: crypto+crc}] + arch_with_features: [{arch: armv7, feature: none}, {arch: aarch64, feature: none}, {arch: aarch64, feature: crypto+crc}, {arch: armv7, feature: none, set_a32: 1}] cxx_compiler: [g++-10, clang++-11] steps: - name: checkout code @@ -74,7 +74,7 @@ jobs: apt-get install -q -y "${{ matrix.cxx_compiler }}" make apt-get install -q -y gcc run: | - make FEATURE=${{ matrix.arch_with_features.feature }} check + make FEATURE=${{ matrix.arch_with_features.feature }} A32=${{ matrix.arch_with_features.set_a32 }} check host_win_msvc: runs-on: windows-2022 diff --git a/Makefile b/Makefile index f31dfab9..c8b1b6c5 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,11 @@ ifeq ($(processor),$(filter $(processor),aarch64 arm64)) else ifeq ($(processor),$(filter $(processor),i386 x86_64)) ARCH_CFLAGS = -maes -mpclmul -mssse3 -msse4.2 else ifeq ($(processor),$(filter $(processor),arm armv7 armv7l)) - ARCH_CFLAGS = -mfpu=neon + ifdef A32 + ARCH_CFLAGS = -mcpu=cortex-a32 -mfpu=neon-fp-armv8 + else + ARCH_CFLAGS = -mfpu=neon + endif else $(error Unsupported architecture) endif diff --git a/README.md b/README.md index 83dfb075..625156b3 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,10 @@ or ```shell $ make CROSS_COMPILE=arm-linux-gnueabihf- check # ARMv7-A ``` +or +``` shell +$ make CROSS_COMPILE=arm-linux-gnueabihf- A32=1 check # ARMv8-A running in 32-bit mode, i.e., A32 instruction set +``` Check the details via [Test Suite for SSE2NEON](tests/README.md).