diff options
-rw-r--r-- | src/entropy/hres_timer/hres_timer.cpp | 4 | ||||
-rw-r--r-- | src/utils/bswap.h | 2 | ||||
-rw-r--r-- | src/utils/cpuid.cpp | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/entropy/hres_timer/hres_timer.cpp b/src/entropy/hres_timer/hres_timer.cpp index 65ca4a8c1..e1b4928df 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_IS_X86_FAMILY) +#if defined(BOTAN_TARGET_CPU_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_IS_PPC_FAMILY) +#elif defined(BOTAN_TARGET_CPU_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 bd570e7c6..cceeda4f3 100644 --- a/src/utils/bswap.h +++ b/src/utils/bswap.h @@ -32,7 +32,7 @@ inline u16bit reverse_bytes(u16bit input) inline u32bit reverse_bytes(u32bit input) { -#if BOTAN_USE_GCC_INLINE_ASM && defined(BOTAN_TARGET_IS_X86_FAMILY) +#if BOTAN_USE_GCC_INLINE_ASM && defined(BOTAN_TARGET_CPU_IS_X86_FAMILY) // GCC-style inline assembly for x86 or x86-64 asm("bswapl %0" : "=r" (input) : "0" (input)); diff --git a/src/utils/cpuid.cpp b/src/utils/cpuid.cpp index d024a19c0..067f24f22 100644 --- a/src/utils/cpuid.cpp +++ b/src/utils/cpuid.cpp @@ -14,7 +14,7 @@ #include <sys/sysctl.h> #endif -#if defined(BOTAN_TARGET_IS_X86_FAMILY) +#if defined(BOTAN_TARGET_CPU_IS_X86_FAMILY) #if defined(BOTAN_BUILD_COMPILER_IS_MSVC) @@ -68,7 +68,7 @@ u32bit get_x86_cache_line_size() return 32; // default cache line guess } -#if defined(BOTAN_TARGET_IS_PPC_FAMILY) +#if defined(BOTAN_TARGET_CPU_IS_PPC_FAMILY) bool altivec_check_sysctl() { @@ -121,7 +121,7 @@ bool altivec_check_pvr_emul() pvr >>= 16; altivec_capable |= (pvr == PVR_G4_7400); - altivec_capable |= ((pvr >> 8) == PVR_G4_74xx_24); + altivec_capable |= ((pvr >> 4) == PVR_G4_74xx_24); altivec_capable |= (pvr == PVR_G5_970); altivec_capable |= (pvr == PVR_G5_970FX); altivec_capable |= (pvr == PVR_G5_970MP); @@ -175,7 +175,7 @@ bool CPUID::has_altivec() if(first_time) { -#if defined(BOTAN_TARGET_IS_PPC_FAMILY) +#if defined(BOTAN_TARGET_CPU_IS_PPC_FAMILY) if(altivec_check_sysctl() || altivec_check_pvr_emul()) altivec_capable = true; #endif |