aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-04-18 18:05:27 +0000
committerlloyd <[email protected]>2011-04-18 18:05:27 +0000
commit06a32c91e639cc2b0c636553a8aa395aa90d4d37 (patch)
tree9e69d0eda9228cfde50cfd377ebe0e4463026e32 /src
parent886252ce1a1b0de611c33c9eac0a91a0e6bf3276 (diff)
My workaround for gcc pr 44174 caused cpuid support to be silently
disabled under gcc. Hide asm labels in the x86-32 code; some did not begin with a .L so they were being exported.
Diffstat (limited to 'src')
-rw-r--r--src/block/serpent_ia32/serp_ia32_imp.S4
-rw-r--r--src/hash/sha1_ia32/sha1_ia32_imp.S4
-rw-r--r--src/utils/cpuid.cpp10
3 files changed, 12 insertions, 6 deletions
diff --git a/src/block/serpent_ia32/serp_ia32_imp.S b/src/block/serpent_ia32/serp_ia32_imp.S
index 768192061..5308173bf 100644
--- a/src/block/serpent_ia32/serp_ia32_imp.S
+++ b/src/block/serpent_ia32/serp_ia32_imp.S
@@ -591,7 +591,7 @@ START_FUNCTION(botan_serpent_ia32_key_schedule)
ASSIGN(ESI, IMM(8))
ADD_IMM(EDI, 32)
-START_LOOP(.EXPANSION)
+START_LOOP(.L_SERP_EXPANSION)
ASSIGN(EAX, ARRAY4(EDI, -1))
ASSIGN(EBX, ARRAY4(EDI, -3))
ASSIGN(ECX, ARRAY4(EDI, -5))
@@ -611,7 +611,7 @@ START_LOOP(.EXPANSION)
ADD_IMM(ESI, 1)
ADD_IMM(EDI, 4)
-LOOP_UNTIL_EQ(ESI, 140, .EXPANSION)
+LOOP_UNTIL_EQ(ESI, 140, .L_SERP_EXPANSION)
ASSIGN(EDI, ARG(1)) /* round keys */
diff --git a/src/hash/sha1_ia32/sha1_ia32_imp.S b/src/hash/sha1_ia32/sha1_ia32_imp.S
index c2777b4b5..0aed8015b 100644
--- a/src/hash/sha1_ia32/sha1_ia32_imp.S
+++ b/src/hash/sha1_ia32/sha1_ia32_imp.S
@@ -42,7 +42,7 @@ LOOP_UNTIL_EQ(ESI, 16, .LOAD_INPUT)
ADD2_IMM(EDI, EBP, 64)
-START_LOOP(.EXPANSION)
+START_LOOP(.L_SHA_EXPANSION)
ADD_IMM(ESI, 4)
ZEROIZE(EAX)
@@ -77,7 +77,7 @@ START_LOOP(.EXPANSION)
ASSIGN(ARRAY4(EDI, 3), EAX)
ADD_IMM(EDI, 16)
-LOOP_UNTIL_EQ(ESI, 80, .EXPANSION)
+LOOP_UNTIL_EQ(ESI, 80, .L_SHA_EXPANSION)
#define MAGIC1 0x5A827999
#define MAGIC2 0x6ED9EBA1
diff --git a/src/utils/cpuid.cpp b/src/utils/cpuid.cpp
index 7f3b4d9b8..ce3822d55 100644
--- a/src/utils/cpuid.cpp
+++ b/src/utils/cpuid.cpp
@@ -31,15 +31,21 @@
// Only available starting in GCC 4.3
#include <cpuid.h>
+namespace {
+
/*
* Prevent inlining to work around GCC bug 44174
*/
- void __attribute__((__noinline__)) CALL_CPUID(Botan::u32bit type,
- Botan::u32bit out[4])
+ void __attribute__((__noinline__)) call_gcc_cpuid(Botan::u32bit type,
+ Botan::u32bit out[4])
{
__get_cpuid(type, out, out+1, out+2, out+3);
}
+ #define CALL_CPUID call_gcc_cpuid
+
+}
+
#else
#warning "No method of calling CPUID for this compiler"
#endif