Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove encoding width suffix from Arm bignum assembly #6090

Merged
merged 3 commits into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions library/bn_mul.h
Original file line number Diff line number Diff line change
Expand Up @@ -717,10 +717,10 @@

#define MULADDC_X1_CORE \
".p2align 2 \n\t" \
"ldr.w %[a], [%[in]], #4 \n\t" \
"ldr.w %[b], [%[acc]] \n\t" \
"ldr %[a], [%[in]], #4 \n\t" \
"ldr %[b], [%[acc]] \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 \
: [a] "=&r" (tmp_a), \
Expand Down Expand Up @@ -751,14 +751,14 @@
* 2 cycles, while subsequent loads/stores are single-cycle. */
#define MULADDC_X2_CORE \
".p2align 2 \n\t" \
"ldr.w %[a0], [%[in]], #+8 \n\t" \
"ldr.w %[b0], [%[acc]], #+8 \n\t" \
"ldr.w %[a1], [%[in], #-4] \n\t" \
"ldr.w %[b1], [%[acc], #-4] \n\t" \
"ldr %[a0], [%[in]], #+8 \n\t" \
"ldr %[b0], [%[acc]], #+8 \n\t" \
"ldr %[a1], [%[in], #-4] \n\t" \
"ldr %[b1], [%[acc], #-4] \n\t" \
"umaal %[b0], %[carry], %[scalar], %[a0] \n\t" \
"umaal %[b1], %[carry], %[scalar], %[a1] \n\t" \
"str.w %[b0], [%[acc], #-8] \n\t" \
"str.w %[b1], [%[acc], #-4] \n\t"
"str %[b0], [%[acc], #-8] \n\t" \
"str %[b1], [%[acc], #-4] \n\t"

#define MULADDC_X2_STOP \
: [a0] "=&r" (tmp_a0), \
Expand Down
16 changes: 11 additions & 5 deletions tests/scripts/all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2870,6 +2870,7 @@ component_build_armcc () {
scripts/config.py baremetal
# armc[56] don't support SHA-512 intrinsics
scripts/config.py unset MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
scripts/config.py set MBEDTLS_HAVE_ASM
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's on by default anyway, but I have nothing against explicitly enabling it.


make CC="$ARMC5_CC" AR="$ARMC5_AR" WARNING_CFLAGS='--strict --c99' lib

Expand All @@ -2878,20 +2879,25 @@ component_build_armcc () {

make clean

# Compile with -O1 since some Arm inline assembly is disabled for -O0.

# 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
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
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
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
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 () {
Expand Down