aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-12-30 02:55:16 +0000
committerlloyd <[email protected]>2009-12-30 02:55:16 +0000
commitb2bfe8d52a93767fbeea37d83300cbc3b1ae641d (patch)
tree71562fcd33395e0c90ce88cae4c805acd96a9890 /src
parent5cae9cd00a4b326f097703669fea07970ea63901 (diff)
Use IS_XXX_FAMILY macros where useful
Diffstat (limited to 'src')
-rw-r--r--src/entropy/hres_timer/hres_timer.cpp4
-rw-r--r--src/utils/bswap.h3
2 files changed, 3 insertions, 4 deletions
diff --git a/src/entropy/hres_timer/hres_timer.cpp b/src/entropy/hres_timer/hres_timer.cpp
index d06ca7a9d..65ca4a8c1 100644
--- a/src/entropy/hres_timer/hres_timer.cpp
+++ b/src/entropy/hres_timer/hres_timer.cpp
@@ -31,7 +31,7 @@ void High_Resolution_Timestamp::poll(Entropy_Accumulator& accum)
u64bit rtc = 0;
-#if defined(BOTAN_TARGET_ARCH_IS_IA32) || defined(BOTAN_TARGET_ARCH_IS_AMD64)
+#if defined(BOTAN_TARGET_IS_X86_FAMILY)
if(CPUID::has_rdtsc()) // not availble on all x86 CPUs
{
u32bit rtc_low = 0, rtc_high = 0;
@@ -39,7 +39,7 @@ void High_Resolution_Timestamp::poll(Entropy_Accumulator& accum)
rtc = (static_cast<u64bit>(rtc_high) << 32) | rtc_low;
}
-#elif defined(BOTAN_TARGET_ARCH_IS_PPC) || defined(BOTAN_TARGET_ARCH_IS_PPC64)
+#elif defined(BOTAN_TARGET_IS_PPC_FAMILY)
u32bit rtc_low = 0, rtc_high = 0;
asm volatile("mftbu %0; mftb %1" : "=r" (rtc_high), "=r" (rtc_low));
rtc = (static_cast<u64bit>(rtc_high) << 32) | rtc_low;
diff --git a/src/utils/bswap.h b/src/utils/bswap.h
index 96ec4982a..bd570e7c6 100644
--- a/src/utils/bswap.h
+++ b/src/utils/bswap.h
@@ -32,8 +32,7 @@ inline u16bit reverse_bytes(u16bit input)
inline u32bit reverse_bytes(u32bit input)
{
-#if BOTAN_USE_GCC_INLINE_ASM && (defined(BOTAN_TARGET_ARCH_IS_IA32) || \
- defined(BOTAN_TARGET_ARCH_IS_AMD64))
+#if BOTAN_USE_GCC_INLINE_ASM && defined(BOTAN_TARGET_IS_X86_FAMILY)
// GCC-style inline assembly for x86 or x86-64
asm("bswapl %0" : "=r" (input) : "0" (input));