summaryrefslogtreecommitdiff
path: root/test/cminor/sha1.cmp
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2009-01-05 10:29:33 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2009-01-05 10:29:33 +0000
commitbd6a21e2e7c87725b9a1992e0179dae1009e7d40 (patch)
tree03e971052a0beed973b0183c986abdf6e2503a8a /test/cminor/sha1.cmp
parentbcc49e9df3e1885fcdf6e7a082f9101a323fb39c (diff)
Endianness in tests
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@939 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/cminor/sha1.cmp')
-rw-r--r--test/cminor/sha1.cmp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/cminor/sha1.cmp b/test/cminor/sha1.cmp
index 9d7744c..98a6b51 100644
--- a/test/cminor/sha1.cmp
+++ b/test/cminor/sha1.cmp
@@ -6,7 +6,13 @@
extern "memcpy" : int -> int -> int -> void
extern "memset" : int -> int -> int -> void
+#if defined(__ppc__) || defined(__PPC__)
#define ARCH_BIG_ENDIAN
+#elif defined(__i386__) || defined(__x86_64__) || defined(__ARMEL__)
+#undef ARCH_BIG_ENDIAN
+#else
+#error "unknown endianness"
+#endif
#define rol1(x) (((x) << 1) | ((x) >>u 31))
#define rol5(x) (((x) << 5) | ((x) >>u 27))