openssl/crypto/ec/asm
David Benjamin 15972296af Fix calling convention bug in ecp_nistz256_ord_sqr_mont
The rep parameter takes an int in C, but the assembly implementation
looks at the upper bits. While it's unlikely to happen here, where all
calls pass a constant, in other scenarios x86_64 compilers will leave
arbitrary values in the upper half.

Fix this by making the C prototype match the assembly. (This aspect of
the calling convention implies smaller-than-word arguments in assembly
functions should be avoided. There are far fewer things to test if
everything consistently takes word-sized arguments.)

This was found as part of ABI testing work in BoringSSL.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/8108)
2019-04-14 12:55:53 +02:00
..
ecp_nistz256-armv4.pl ARM assembly pack: make it Windows-friendly. 2019-02-16 16:59:23 +01:00
ecp_nistz256-armv8.pl Fix calling convention bug in ecp_nistz256_ord_sqr_mont 2019-04-14 12:55:53 +02:00
ecp_nistz256-avx2.pl
ecp_nistz256-ppc64.pl Fix calling convention bug in ecp_nistz256_ord_sqr_mont 2019-04-14 12:55:53 +02:00
ecp_nistz256-sparcv9.pl
ecp_nistz256-x86_64.pl Fix calling convention bug in ecp_nistz256_ord_sqr_mont 2019-04-14 12:55:53 +02:00
ecp_nistz256-x86.pl
x25519-ppc64.pl
x25519-x86_64.pl