crc32c_intel() doesn't make sense on platforms without SSE, so alias it
to crc32c() on such machines.
Signed-off-by: Aaron Carroll <aaronc@gelato.unsw.edu.au>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
return bitmask;
}
#define ARCH_HAVE_FFZ
+#define ARCH_HAVE_SSE
#endif
return bitmask;
}
#define ARCH_HAVE_FFZ
+#define ARCH_HAVE_SSE
#endif
#include <inttypes.h>
+#include "crc32c.h"
/*
* Based on a posting to lkml by Austin Zhang <austin.zhang@intel.com>
* Volume 2A: Instruction Set Reference, A-M
*/
+#ifdef ARCH_HAVE_SSE
+
#if BITS_PER_LONG == 64
#define REX_PRE "0x48, "
#define SCALE_F 8
return crc;
}
+
+#endif /* ARCH_HAVE_SSE */
+
#ifndef CRC32C_H
#define CRC32C_H
+#include "../arch/arch.h"
+
extern uint32_t crc32c(unsigned char const *, unsigned long);
+
+#ifdef ARCH_HAVE_SSE
extern uint32_t crc32c_intel(unsigned char const *, unsigned long);
+#else
+#define crc32c_intel crc32c
+#endif
#endif