[trans-mem] __sync_add_and_fetch_8 on ia32
Paolo Carlini
paolo.carlini@oracle.com
Fri Feb 19 12:19:00 GMT 2010
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.
More information about the Gcc
mailing list