harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Timoshenko <george.timoshe...@gmail.com>
Subject Re: [jira] Updated: (HARMONY-2092) [drlvm][jit] Harmony works with volatile variables incorrectly
Date Wed, 30 May 2007 04:08:16 GMT

> I had a question in the JIRA about this issue: why don't we use "lock"
> prefix for the atomic access?


Originally we split all 64-bit memory access into 2 ones of 32-bit.
It does not have sense to set #LOCK prefix for them. (there is a gap 

We can only set #LOCK to some instruction that reads/writes whole 64 bits.

The bad thing is the only instruction (according to IA32 spec) we can 
set #LOCK to is CMPXCHG8B (MOVQ, MOVSD and any others can not be used 
with #LOCK)

This monster (CMPXCHG8B) requires 4 registers:


and (FLAGS) also.

I am not sure CMPXCHG8B usage will be faster than making volatile fields 
   always synchronized (artificially)

View raw message