Fix bug in Via Padlock support
Backport of cf201201 from the 1.3 branch
diff --git a/ChangeLog b/ChangeLog
index 3a4522c..d41468f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
crash it remotely (found by Caj Larsson).
Bugfix
+ * Fix bug in Via Padlock support (found by Nikos Mavrogiannopoulos).
* Fix hardclock() (only used in the benchmarking program) with some
versions of mingw64 (found by kxjhlele).
* Fix warnings from mingw64 in timing.c (found by kxjklele).
diff --git a/library/padlock.c b/library/padlock.c
index 942aca7..15343ab 100644
--- a/library/padlock.c
+++ b/library/padlock.c
@@ -98,7 +98,7 @@
"movl %1, %%ebx \n\t"
: "=m" (ebx)
: "m" (ebx), "m" (ctrl), "m" (rk), "m" (blk)
- : "ecx", "edx", "esi", "edi" );
+ : "memory", "ecx", "edx", "esi", "edi" );
memcpy( output, blk, 16 );
@@ -149,7 +149,7 @@
: "=m" (ebx)
: "m" (ebx), "m" (count), "m" (ctrl),
"m" (rk), "m" (input), "m" (output), "m" (iw)
- : "eax", "ecx", "edx", "esi", "edi" );
+ : "memory", "eax", "ecx", "edx", "esi", "edi" );
memcpy( iv, iw, 16 );