summaryrefslogtreecommitdiff
path: root/rdrand.cpp
diff options
context:
space:
mode:
authorName <jo@o-llvm.org>2016-01-26 02:07:16 -0500
committerJeffrey Walton <noloader@gmail.com>2016-01-26 02:07:16 -0500
commit4c1d62928411090f33ce141878949e156ceb7148 (patch)
tree43f5ff6d1dcc03c7424998da69a4ab808c05318d /rdrand.cpp
parentab320ad59b7412c542d9aca6cb5acfbab6b93365 (diff)
downloadcryptopp-git-4c1d62928411090f33ce141878949e156ceb7148.tar.gz
Fix missing clobbered registers (Issue 124)
Diffstat (limited to 'rdrand.cpp')
-rw-r--r--rdrand.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/rdrand.cpp b/rdrand.cpp
index 55fde3ab..5d7b8e2e 100644
--- a/rdrand.cpp
+++ b/rdrand.cpp
@@ -253,7 +253,11 @@ static int GCC_RRA_GenerateBlock(byte *output, size_t size, unsigned int safety)
"setc %1; "
: "=a" (val), "=qm" (rc)
:
- : "cc"
+#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32
+ : "rax", "cc"
+#else
+ : "eax", "cc"
+#endif
);
if (rc)
@@ -434,7 +438,11 @@ static int GCC_RSA_GenerateBlock(byte *output, size_t size, unsigned int safety)
"setc %1; "
: "=a" (val), "=qm" (rc)
:
- : "cc"
+#if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32
+ : "rax", "cc"
+#else
+ : "eax", "cc"
+#endif
);
if (rc)