Merge pull request #4941 from gilles-peskine-arm/muladdc-amd64-memory-2.x

Backport 2.x: Fix x86_64 assembly for bignum multiplication
This commit is contained in:
Gilles Peskine 2021-09-20 22:23:53 +02:00 committed by GitHub
commit 02e17c0aa5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -0,0 +1,4 @@
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.

View File

@ -229,9 +229,9 @@
"addq $8, %%rdi\n"
#define MULADDC_STOP \
: "+c" (c), "+D" (d), "+S" (s) \
: "b" (b) \
: "rax", "rdx", "r8" \
: "+c" (c), "+D" (d), "+S" (s), "+m" (*(uint64_t (*)[16]) d) \
: "b" (b), "m" (*(const uint64_t (*)[16]) s) \
: "rax", "rdx", "r8" \
);
#endif /* AMD64 */