global: in gnu code, use un-underscored asm

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2018-02-27 00:49:16 +01:00
parent 3314030d57
commit 4574967465
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ typedef int64_t s64;
static noinline void memzero_explicit(void *s, size_t count) static noinline void memzero_explicit(void *s, size_t count)
{ {
memset(s, 0, count); memset(s, 0, count);
__asm__ __volatile__("": :"r"(s) :"memory"); asm volatile("": :"r"(s) :"memory");
} }
#ifdef __SIZEOF_INT128__ #ifdef __SIZEOF_INT128__

View File

@ -113,7 +113,7 @@ bool key_is_zero(const uint8_t key[static WG_KEY_LEN])
for (unsigned int i = 0; i < WG_KEY_LEN; ++i) { for (unsigned int i = 0; i < WG_KEY_LEN; ++i) {
acc |= key[i]; acc |= key[i];
__asm__ ("" : "=r" (acc) : "0" (acc)); asm("" : "=r" (acc) : "0" (acc));
} }
return 1 & ((acc - 1) >> 8); return 1 & ((acc - 1) >> 8);
} }