Use (""::"r"(pnt):"memory") instead of (""::"p"(pnt)) for the barrier

This commit is contained in:
Frank Denis 2017-12-31 01:10:48 +01:00
parent 7dee41abee
commit a18e21b49d

View File

@ -114,7 +114,7 @@ sodium_memzero(void *const pnt, const size_t len)
memset(pnt, 0, len);
_sodium_dummy_symbol_to_prevent_memzero_lto(pnt, len);
# ifdef HAVE_AMD64_ASM
__asm__ __volatile__ ("" : : "p"(pnt));
__asm__ __volatile__ ("" : : "r"(pnt) : "memory");
# endif
#else
volatile unsigned char *volatile pnt_ =