mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 23:15:41 +01:00
Merge pull request #4978 from davidhorstmann-arm/2.x-fix-aarch64-asm-constraints
Backport 2.x: Fix aarch64 assembly for bignum multiplication
This commit is contained in:
commit
186c0216b0
@ -1,4 +0,0 @@
|
|||||||
Bugfix
|
|
||||||
* Fix missing constraints on x86_64 assembly code for bignum multiplication
|
|
||||||
that broke some bignum operations with (at least) Clang 12.
|
|
||||||
Fixes #4116, #4786, #4917.
|
|
5
ChangeLog.d/muladdc-memory.txt
Normal file
5
ChangeLog.d/muladdc-memory.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Bugfix
|
||||||
|
* Fix missing constraints on x86_64 and aarch64 assembly code
|
||||||
|
for bignum multiplication that broke some bignum operations with
|
||||||
|
(at least) Clang 12.
|
||||||
|
Fixes #4116, #4786, #4917, #4962.
|
@ -244,8 +244,8 @@
|
|||||||
#define MULADDC_CORE \
|
#define MULADDC_CORE \
|
||||||
"ldr x4, [%2], #8 \n\t" \
|
"ldr x4, [%2], #8 \n\t" \
|
||||||
"ldr x5, [%1] \n\t" \
|
"ldr x5, [%1] \n\t" \
|
||||||
"mul x6, x4, %3 \n\t" \
|
"mul x6, x4, %4 \n\t" \
|
||||||
"umulh x7, x4, %3 \n\t" \
|
"umulh x7, x4, %4 \n\t" \
|
||||||
"adds x5, x5, x6 \n\t" \
|
"adds x5, x5, x6 \n\t" \
|
||||||
"adc x7, x7, xzr \n\t" \
|
"adc x7, x7, xzr \n\t" \
|
||||||
"adds x5, x5, %0 \n\t" \
|
"adds x5, x5, %0 \n\t" \
|
||||||
@ -253,8 +253,8 @@
|
|||||||
"str x5, [%1], #8 \n\t"
|
"str x5, [%1], #8 \n\t"
|
||||||
|
|
||||||
#define MULADDC_STOP \
|
#define MULADDC_STOP \
|
||||||
: "+r" (c), "+r" (d), "+r" (s) \
|
: "+r" (c), "+r" (d), "+r" (s), "+m" (*(uint64_t (*)[16]) d) \
|
||||||
: "r" (b) \
|
: "r" (b), "m" (*(const uint64_t (*)[16]) s) \
|
||||||
: "x4", "x5", "x6", "x7", "cc" \
|
: "x4", "x5", "x6", "x7", "cc" \
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user