|
@@ -8,6 +8,7 @@
|
|
|
|
|
|
#include <stdint.h>
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include <stdbool.h>
|
|
|
|
+#include <linux/auxvec.h>
|
|
|
|
|
|
/* Avoid headaches with PRI?64 - just use %ll? always */
|
|
/* Avoid headaches with PRI?64 - just use %ll? always */
|
|
typedef unsigned long long u64;
|
|
typedef unsigned long long u64;
|
|
@@ -22,6 +23,11 @@ typedef uint8_t u8;
|
|
int test_harness(int (test_function)(void), char *name);
|
|
int test_harness(int (test_function)(void), char *name);
|
|
extern void *get_auxv_entry(int type);
|
|
extern void *get_auxv_entry(int type);
|
|
|
|
|
|
|
|
+static inline bool have_hwcap2(unsigned long ftr2)
|
|
|
|
+{
|
|
|
|
+ return ((unsigned long)get_auxv_entry(AT_HWCAP2) & ftr2) == ftr2;
|
|
|
|
+}
|
|
|
|
+
|
|
/* Yes, this is evil */
|
|
/* Yes, this is evil */
|
|
#define FAIL_IF(x) \
|
|
#define FAIL_IF(x) \
|
|
do { \
|
|
do { \
|