aboutsummaryrefslogtreecommitdiffstats
path: root/test/endian.h
diff options
context:
space:
mode:
authorXavier Leroy <xavierleroy@users.noreply.github.com>2019-09-11 15:13:12 +0200
committerGitHub <noreply@github.com>2019-09-11 15:13:12 +0200
commit7601fb5e792a5305336e5cda9794c4041d053b95 (patch)
treef0dc0acd7bb5ad6dae80e4389fb165fa93eb3cb8 /test/endian.h
parentd3eba50731c23546c6e9ccb14230460fc1da592e (diff)
parentc243b565ab0744086e10efcfee16768f6c3cf880 (diff)
downloadcompcert-7601fb5e792a5305336e5cda9794c4041d053b95.tar.gz
compcert-7601fb5e792a5305336e5cda9794c4041d053b95.zip
Merge pull request #313 from AbsInt/aarch64
Support target architecture AArch64 (ARMv8 in 64-bit mode)
Diffstat (limited to 'test/endian.h')
-rw-r--r--test/endian.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/endian.h b/test/endian.h
new file mode 100644
index 00000000..8be2850c
--- /dev/null
+++ b/test/endian.h
@@ -0,0 +1,8 @@
+#if defined(__ppc__) || defined(__PPC__) || defined(__ARMEB__)
+#define ARCH_BIG_ENDIAN
+#elif defined(__i386__) || defined(__x86_64__) || defined(__ARMEL__) \
+ || defined(__riscv) || defined(__aarch64__)
+#undef ARCH_BIG_ENDIAN
+#else
+#error "unknown endianness"
+#endif