diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2004-07-05 21:49:50 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2004-07-05 21:49:50 +0000 |
commit | c3f9cc095730edb525775115a94a521229eb08d2 (patch) | |
tree | 4e809a983281c4873ec012e99d51c17c2e276ec0 /integer.cpp | |
parent | e844cb79246824fb345f5c9a41f2369979ef6185 (diff) | |
download | cryptopp-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.cpp | 5 |
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 |