Index: src/utils.h |
diff --git a/src/utils.h b/src/utils.h |
index 89cc5ef4a5587e6bece7093a2734379e4714fea5..8ff1f9b1c826d2e47c2978c9811257c8ec481f35 100644 |
--- a/src/utils.h |
+++ b/src/utils.h |
@@ -581,11 +581,12 @@ static inline void MemsetPointer(T** dest, T* value, int counter) { |
#endif |
#if defined(__GNUC__) && defined(STOS) |
- asm("cld;" |
+ asm volatile( |
+ "cld;" |
"rep ; " STOS |
- : /* no output */ |
- : "c" (counter), "a" (value), "D" (dest) |
- : /* no clobbered list as all inputs are considered clobbered */); |
+ : "+&c" (counter), "+&D" (dest) |
+ : "a" (value) |
+ : "memory", "cc"); |
#else |
for (int i = 0; i < counter; i++) { |
dest[i] = value; |