From: Michael R. Crusoe <crusoe@debian.org>
Subject: use the simde header library for greater compatibility
Forwarded: https://github.com/DaehwanKimLab/hisat2/pull/251
--- hisat2.orig/aligner_sw.h
+++ hisat2/aligner_sw.h
@@ -66,11 +66,12 @@
 
 #define INLINE_CUPS
 
+#define SIMDE_ENABLE_NATIVE_ALIASES
+#include <simde/x86/sse2.h>
 #include <stdint.h>
 #include <iostream>
 #include <limits>
 #include "threading.h"
-#include <emmintrin.h>
 #include "aligner_sw_common.h"
 #include "aligner_sw_nuc.h"
 #include "ds.h"
--- hisat2.orig/sse_util.h
+++ hisat2/sse_util.h
@@ -20,11 +20,13 @@
 #ifndef SSE_UTIL_H_
 #define SSE_UTIL_H_
 
+#define SIMDE_ENABLE_NATIVE_ALIASES
+#include <simde/x86/sse2.h>
+
 #include "assert_helpers.h"
 #include "ds.h"
 #include "limit.h"
 #include <iostream>
-#include <emmintrin.h>
 
 class EList_m128i {
 public:
--- hisat2.orig/Makefile
+++ hisat2/Makefile
@@ -55,7 +55,7 @@
 	MACOS = 1
 endif
 
-EXTRA_FLAGS += -DPOPCNT_CAPABILITY -std=c++11
+EXTRA_FLAGS += -std=c++11
 INC += -I. -I third_party 
 
 MM_DEF = 
--- hisat2.orig/processor_support.h
+++ hisat2/processor_support.h
@@ -12,7 +12,7 @@
 
 #if defined(__INTEL_COMPILER)
 #   define USING_INTEL_COMPILER
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) && defined(__x86_64__) || defined(__i386__)
 #   define USING_GCC_COMPILER
 #   include <cpuid.h>
 #elif defined(_MSC_VER)
@@ -52,8 +52,7 @@
 #elif defined(USING_GCC_COMPILER)
         __get_cpuid(0x1, &regs.EAX, &regs.EBX, &regs.ECX, &regs.EDX);
 #else
-        std::cerr << "ERROR: please define __cpuid() for this build.\n"; 
-        assert(0);
+	return false;
 #endif
         if( !( (regs.ECX & BIT(20)) && (regs.ECX & BIT(23)) ) ) return false;
     }
