Browse Source

Merge pull request #535 from libtom/fix-532

Add "memory" to clobber list of `STORE/LOAD32`
Steffen Jaeckel 5 years ago
parent
commit
14ed10c11f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/headers/tomcrypt_macros.h

+ 2 - 2
src/headers/tomcrypt_macros.h

@@ -74,13 +74,13 @@ asm __volatile__ (               \
    "bswapl %0     \n\t"          \
    "bswapl %0     \n\t"          \
    "movl   %0,(%1)\n\t"          \
    "movl   %0,(%1)\n\t"          \
    "bswapl %0     \n\t"          \
    "bswapl %0     \n\t"          \
-      ::"r"(x), "r"(y));
+      ::"r"(x), "r"(y): "memory");
 
 
 #define LOAD32H(x, y)          \
 #define LOAD32H(x, y)          \
 asm __volatile__ (             \
 asm __volatile__ (             \
    "movl (%1),%0\n\t"          \
    "movl (%1),%0\n\t"          \
    "bswapl %0\n\t"             \
    "bswapl %0\n\t"             \
-   :"=r"(x): "r"(y));
+   :"=r"(x): "r"(y): "memory");
 
 
 #else
 #else