summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@mongodb.com>2016-09-12 23:50:19 -0400
committerAlex Gorrod <alexander.gorrod@mongodb.com>2016-09-13 13:50:19 +1000
commitc8ccbfcf988ac32eed4a7e04f6a37d4ae5ff6146 (patch)
tree41c2dc69510fe5d322402602c513d9b0634ebc6c /src
parent07b6e5d4bef3ca46adfbdda012e35bd2937c49ec (diff)
downloadmongo-c8ccbfcf988ac32eed4a7e04f6a37d4ae5ff6146.tar.gz
WT-2900 Add ARM8 build support to WiredTiger and fix ARM CRC assembler tags (#3028)
Add -march=armv8-a+crc to the gcc compile flags for ARM, we need the optional CRC instructions.
Diffstat (limited to 'src')
-rw-r--r--src/checksum/arm64/crc32-arm64.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/checksum/arm64/crc32-arm64.c b/src/checksum/arm64/crc32-arm64.c
index 5d6c5f69c58..38b4f623044 100644
--- a/src/checksum/arm64/crc32-arm64.c
+++ b/src/checksum/arm64/crc32-arm64.c
@@ -32,14 +32,18 @@
#include <asm/hwcap.h>
#include <sys/auxv.h>
+#ifndef __GNUC__
+#define __asm__ asm
+#endif
+
#define CRC32CX(crc,value) \
- asm("crc32cx %w[c], %w[c], %x[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
+ __asm__("crc32cx %w[c], %w[c], %x[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
#define CRC32CW(crc,value) \
- asm("crc32cw %w[c], %w[c], %w[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
+ __asm__("crc32cw %w[c], %w[c], %w[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
#define CRC32CH(crc,value) \
- asm("crc32ch %w[c], %w[c], %w[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
+ __asm__("crc32ch %w[c], %w[c], %w[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
#define CRC32CB(crc,value) \
- asm("crc32cb %w[c], %w[c], %w[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
+ __asm__("crc32cb %w[c], %w[c], %w[v]" : [c]"+r"(*&crc) : [v]"r"(+value))
/*
* __wt_checksum_hw --