This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[trans-mem] __sync_add_and_fetch_8 on ia32
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: gcc at gcc dot gnu dot org, rth at redhat dot com
- Cc: pearly dot zhao at oracle dot com, paolo dot carlini at oracle dot com
- Date: Fri, 19 Feb 2010 07:38:13 -0400
- Subject: [trans-mem] __sync_add_and_fetch_8 on ia32
libitm.so won't build on ia32 because of an undefined reference to
__sync_add_and_fetch_8.
This is the build failure Pearly encountered here:
http://gcc.gnu.org/ml/gcc-patches/2009-09/msg01201.html
What happens is that we try to do a __sync_and_fetch() on global_tid,
which is of type _ITM_transactionId_t, a 64-bit quantity:
typedef uint64_t _ITM_transactionId_t; /* Transaction identifier */
Since the TM library on ia32 is built with -m486, which doesn't have
64-bit atomic operations, should we...
a) Build with -m586 and above.
b) Have _ITM_transactionId_t be 32-bit quantities.
c) Come up with some locking solution for archs that don't have
64-bit atomic operations.
??
Aldy