DMD 1.029 and 2.013 releases

Sean Kelly sean at invisibleduck.org
Sun Apr 27 08:05:03 PDT 2008


Walter Bright wrote:
> Bill Baxter wrote:
>> Maybe you two could arrange a time to have a higher bandwidth 
>> IM/irc/skype/telephone chat on the subject?  This seems important, but 
>> this one-line-at-a-time back and forth style of discussion is going 
>> nowhere fast.
> 
> For the moment, if you are really concerned about it, write it in the 2 
> lines of inline assembler. That's what I've done to do lock-free CAS 
> stuff. It's really not a big deal.

That's easy for x86 in D, but for other platforms it requires using C or 
a standalone assembler, which is workable but annoying.  And regarding 
the assembler approach in general, I label all the asm blocks as 
volatile for safety (you fixed a ticket I submitted regarding this a few 
years back).  I know that DMD doesn't optimize within or across asm 
blocks, but I don't trust that every D compiler does or will do the 
same.  Particularly since D doesn't actually have a multithreaded memory 
model.  If it did, I may trust that seeing a 'lock' expression in x86 
inline asm would be enough.


Sean


More information about the Digitalmars-d-announce mailing list