Skip to content

Commit 625633f

Browse files
committed
Add volatile specifier to rdseed inline asm annotation
1 parent a888026 commit 625633f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/lib/entropy/rdseed/rdseed.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ BOTAN_FUNC_ISA("rdseed,sse2") bool read_rdseed(secure_vector<uint32_t>& seed) {
4141
int cf = 0; // NOLINT(*-const-correctness) clang-tidy doesn't understand inline asm
4242

4343
#if defined(BOTAN_USE_GCC_INLINE_ASM)
44-
asm("rdseed %0; adcl $0,%1" : "=r"(r), "=r"(cf) : "0"(r), "1"(cf) : "cc"); // NOLINT(*-no-assembler)
44+
asm volatile("rdseed %0; adcl $0,%1" : "=r"(r), "=r"(cf) : "0"(r), "1"(cf) : "cc"); // NOLINT(*-no-assembler)
4545
#else
4646
cf = _rdseed32_step(&r);
4747
#endif

0 commit comments

Comments
 (0)