This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [trans-mem] __sync_add_and_fetch_8 on ia32
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc at gcc dot gnu dot org, rth at redhat dot com, pearly dot zhao at oracle dot com
- Date: Fri, 19 Feb 2010 13:18:49 +0100
- Subject: Re: [trans-mem] __sync_add_and_fetch_8 on ia32
- References: <20100219113812.GB3097@redhat.com> <4B7E7F06.20809@oracle.com>
On 02/19/2010 01:07 PM, Paolo Carlini wrote:
> On 02/19/2010 12:38 PM, Aldy Hernandez wrote:
>
>> 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.
>>
> My personal opinion on this is that unless we are 100% sure that
> performance are decent anyway (thus 3), or 32-bits are certainly enough
> (thus 2), we should not waste time supporting anything older than -m586
> for the transactional memory work.
>
... a slightly more sophisticated variant of b) would be using uint64_t
for 64-bit targets and uint32_t for 32-bit targets, should make
everybody happy.
Paolo.