add arm simple cpuid_flags

This commit is contained in:
Konstantinos Margaritis
2020-10-15 16:25:29 +03:00
parent 31ac6718dd
commit 5b425bd5a6
3 changed files with 57 additions and 1 deletions

View File

@@ -28,6 +28,7 @@
#include "config.h"
#include "hs_common.h"
#include "ue2common.h"
#if defined(ARCH_X86_64)
#include "util/arch/x86/cpuid_inline.h"
#endif
@@ -35,9 +36,13 @@
HS_PUBLIC_API
hs_error_t HS_CDECL hs_valid_platform(void) {
/* Hyperscan requires SSSE3, anything else is a bonus */
#if defined(ARCH_IA32) || defined(ARCH_X86_64)
if (check_ssse3()) {
return HS_SUCCESS;
} else {
return HS_ARCH_ERROR;
}
#elif defined(ARCH_ARM32) || defined(ARCH_AARCH64)
return HS_SUCCESS;
#endif
}