Merge pull request #6090 from hanno-arm/fix_bnmul_arm_v7a

Remove encoding width suffix from Arm bignum assembly
This commit is contained in:
Dave Rodgman 2022-08-18 08:48:03 +01:00 committed by GitHub
commit 92cd8642fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 14 deletions

View file

@ -743,10 +743,10 @@
#define MULADDC_X1_CORE \ #define MULADDC_X1_CORE \
".p2align 2 \n\t" \ ".p2align 2 \n\t" \
"ldr.w %[a], [%[in]], #4 \n\t" \ "ldr %[a], [%[in]], #4 \n\t" \
"ldr.w %[b], [%[acc]] \n\t" \ "ldr %[b], [%[acc]] \n\t" \
"umaal %[b], %[carry], %[scalar], %[a] \n\t" \ "umaal %[b], %[carry], %[scalar], %[a] \n\t" \
"str.w %[b], [%[acc]], #4 \n\t" "str %[b], [%[acc]], #4 \n\t"
#define MULADDC_X1_STOP \ #define MULADDC_X1_STOP \
: [a] "=&r" (tmp_a), \ : [a] "=&r" (tmp_a), \
@ -777,14 +777,14 @@
* 2 cycles, while subsequent loads/stores are single-cycle. */ * 2 cycles, while subsequent loads/stores are single-cycle. */
#define MULADDC_X2_CORE \ #define MULADDC_X2_CORE \
".p2align 2 \n\t" \ ".p2align 2 \n\t" \
"ldr.w %[a0], [%[in]], #+8 \n\t" \ "ldr %[a0], [%[in]], #+8 \n\t" \
"ldr.w %[b0], [%[acc]], #+8 \n\t" \ "ldr %[b0], [%[acc]], #+8 \n\t" \
"ldr.w %[a1], [%[in], #-4] \n\t" \ "ldr %[a1], [%[in], #-4] \n\t" \
"ldr.w %[b1], [%[acc], #-4] \n\t" \ "ldr %[b1], [%[acc], #-4] \n\t" \
"umaal %[b0], %[carry], %[scalar], %[a0] \n\t" \ "umaal %[b0], %[carry], %[scalar], %[a0] \n\t" \
"umaal %[b1], %[carry], %[scalar], %[a1] \n\t" \ "umaal %[b1], %[carry], %[scalar], %[a1] \n\t" \
"str.w %[b0], [%[acc], #-8] \n\t" \ "str %[b0], [%[acc], #-8] \n\t" \
"str.w %[b1], [%[acc], #-4] \n\t" "str %[b1], [%[acc], #-4] \n\t"
#define MULADDC_X2_STOP \ #define MULADDC_X2_STOP \
: [a0] "=&r" (tmp_a0), \ : [a0] "=&r" (tmp_a0), \

View file

@ -2948,6 +2948,7 @@ component_build_armcc () {
scripts/config.py baremetal scripts/config.py baremetal
# armc[56] don't support SHA-512 intrinsics # armc[56] don't support SHA-512 intrinsics
scripts/config.py unset MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT scripts/config.py unset MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
scripts/config.py set MBEDTLS_HAVE_ASM
make CC="$ARMC5_CC" AR="$ARMC5_AR" WARNING_CFLAGS='--strict --c99' lib make CC="$ARMC5_CC" AR="$ARMC5_AR" WARNING_CFLAGS='--strict --c99' lib
@ -2956,20 +2957,25 @@ component_build_armcc () {
make clean make clean
# Compile with -O1 since some Arm inline assembly is disabled for -O0.
# ARM Compiler 6 - Target ARMv7-A # ARM Compiler 6 - Target ARMv7-A
armc6_build_test "--target=arm-arm-none-eabi -march=armv7-a" armc6_build_test "-O1 --target=arm-arm-none-eabi -march=armv7-a"
# ARM Compiler 6 - Target ARMv7-M # ARM Compiler 6 - Target ARMv7-M
armc6_build_test "--target=arm-arm-none-eabi -march=armv7-m" armc6_build_test "-O1 --target=arm-arm-none-eabi -march=armv7-m"
# ARM Compiler 6 - Target ARMv7-M+DSP
armc6_build_test "-O1 --target=arm-arm-none-eabi -march=armv7-m+dsp"
# ARM Compiler 6 - Target ARMv8-A - AArch32 # ARM Compiler 6 - Target ARMv8-A - AArch32
armc6_build_test "--target=arm-arm-none-eabi -march=armv8.2-a" armc6_build_test "-O1 --target=arm-arm-none-eabi -march=armv8.2-a"
# ARM Compiler 6 - Target ARMv8-M # ARM Compiler 6 - Target ARMv8-M
armc6_build_test "--target=arm-arm-none-eabi -march=armv8-m.main" armc6_build_test "-O1 --target=arm-arm-none-eabi -march=armv8-m.main"
# ARM Compiler 6 - Target ARMv8.2-A - AArch64 # ARM Compiler 6 - Target ARMv8.2-A - AArch64
armc6_build_test "--target=aarch64-arm-none-eabi -march=armv8.2-a+crypto" armc6_build_test "-O1 --target=aarch64-arm-none-eabi -march=armv8.2-a+crypto"
} }
component_test_tls13_only () { component_test_tls13_only () {