summaryrefslogtreecommitdiff
path: root/integer.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2004-07-05 21:49:50 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2004-07-05 21:49:50 +0000
commitc3f9cc095730edb525775115a94a521229eb08d2 (patch)
tree4e809a983281c4873ec012e99d51c17c2e276ec0 /integer.cpp
parente844cb79246824fb345f5c9a41f2369979ef6185 (diff)
downloadcryptopp-c3f9cc095730edb525775115a94a521229eb08d2.tar.gz
fix for -fPIC
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@183 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'integer.cpp')
-rw-r--r--integer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/integer.cpp b/integer.cpp
index 79214a2..503ba26 100644
--- a/integer.cpp
+++ b/integer.cpp
@@ -876,8 +876,9 @@ static void CpuId(word32 input, word32 *output)
#ifdef __GNUC__
__asm__
(
- "cpuid"
- : "=a" (output[0]), "=b" (output[1]), "=c" (output[2]), "=d" (output[3])
+ // save ebx in case -fPIC is being used
+ "push %%ebx; cpuid; mov %%ebx, %%edi; pop %%ebx"
+ : "=a" (output[0]), "=D" (output[1]), "=c" (output[2]), "=d" (output[3])
: "a" (input)
);
#else