This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]