[m-rev.] diff: support none.par.gc with clang on Linux
Julien Fischer
juliensf at csse.unimelb.edu.au
Fri Aug 26 18:00:25 AEST 2011
Hi,
The compiler now bootstraps with clang in none.par.gc on Linux (x86-64).
The following test cases fail. All fail to terminate except the last one,
which produces output that differs from the expected output.
par_conj/consume_in_some_branches
par_conj/dep_par_21
par_conj/dep_par_24b
par_conj/dep_par_5b
par_conj/impure_wait
par_conj/pathological_right_recursion
par_conj/threads_hang
(The test machine was apollo.)
I will try rebuilding with gcc on the same machine and see if they fail
too.
------------------------------
Branches: main, 11.07
Make none.par.gc bootstrap with clang (2.8.0) on Linux.
runtime/mercury_atomic_ops.h:
Define MR_ATOMIC_DEC_INT_BODY and MR_ATOMIC_DEC_AND_IS_ZERO_WORD_BODY
for clang - we use the same inline assembler definitions that are used
for GCC.
Julien.
Index: runtime/mercury_atomic_ops.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_atomic_ops.h,v
retrieving revision 1.19
diff -u -r1.19 mercury_atomic_ops.h
--- runtime/mercury_atomic_ops.h 26 Aug 2011 06:19:34 -0000 1.19
+++ runtime/mercury_atomic_ops.h 26 Aug 2011 06:26:33 -0000
@@ -438,7 +438,7 @@
/*---------------------------------------------------------------------------*/
-#if defined(MR_GNUC) && defined(__x86_64__) && \
+#if (defined(MR_CLANG) || defined(MR_GNUC)) && defined(__x86_64__) && \
!defined(MR_AVOID_HANDWRITTEN_ASSEMBLER)
#define MR_ATOMIC_DEC_INT_BODY \
@@ -450,7 +450,7 @@
); \
} while (0)
-#elif defined(MR_GNUC) && defined(__i386__) && \
+#elif(defined(MR_CLANG)|| defined(MR_GNUC)) && defined(__i386__) && \
!defined(MR_AVOID_HANDWRITTEN_ASSEMBLER)
/* Really 486 or better. */
@@ -486,7 +486,7 @@
** Note that on x86(_64) we have to use the sub instruction rather than the
** dec instruction because we need it to set the CPU flags.
*/
-#if defined(MR_GNUC) && defined(__x86_64__) && \
+#if (defined(MR_CLANG) || defined(MR_GNUC)) && defined(__x86_64__) && \
!defined(MR_AVOID_HANDWRITTEN_ASSEMBLER)
/*
@@ -511,7 +511,7 @@
#define MR_ATOMIC_DEC_AND_IS_ZERO_UINT_BODY \
MR_ATOMIC_DEC_AND_IS_ZERO_WORD_BODY
-#elif defined(MR_GNUC) && defined(__i386__)
+#elif (defined(MR_CLANG) || defined(MR_GNUC)) && defined(__i386__)
#define MR_ATOMIC_DEC_AND_IS_ZERO_WORD_BODY \
do { \
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list