aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/cpuid.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-01-31 20:06:25 -0500
committerJack Lloyd <[email protected]>2017-01-31 20:06:25 -0500
commite934e03821ab28dc2573ff52da49a3b700d4cfb7 (patch)
tree2f6ec6d1e8eeabb763c94b70e1dbe70a44bc27ad /src/lib/utils/cpuid.h
parent3cf1917b4e0ab45f853f1fe7cb7faed342987dd9 (diff)
parent58e2509932412c01708214e0780429ae28b94d8c (diff)
Merge GH #859 Add support for ARM NEON in SIMD_4x32 module
Diffstat (limited to 'src/lib/utils/cpuid.h')
-rw-r--r--src/lib/utils/cpuid.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/utils/cpuid.h b/src/lib/utils/cpuid.h
index 98b5e14ce..f618ac35c 100644
--- a/src/lib/utils/cpuid.h
+++ b/src/lib/utils/cpuid.h
@@ -79,6 +79,15 @@ class BOTAN_DLL CPUID
return g_little_endian;
}
+ static bool is_big_endian()
+ {
+ /*
+ * We do not support PDP endian, so the endian is
+ * always either big or little.
+ */
+ return is_little_endian() == false;
+ }
+
enum CPUID_bits : uint64_t {
#if defined(BOTAN_TARGET_CPU_IS_X86_FAMILY)
// These values have no relation to cpuid bitfields
@@ -261,7 +270,7 @@ class BOTAN_DLL CPUID
/*
* Don't call this function, use CPUID::has_xxx above
- * It should have been private.
+ * It is only exposed for the tests.
*/
static bool has_cpuid_bit(CPUID_bits elem)
{