digitalmars.D - volatile asm
- Jason House (1/1) Jan 21 2009 I was just looking at Atomic.d in the D2 port of tango and I see that al...
- Jarrett Billingsley (9/10) Jan 21 2009 the volatile keywords are commented out. My understanding is that the ...
- Sean Kelly (6/7) Jan 21 2009 Walter has said that compilers should not optimize across asm blocks,
I was just looking at Atomic.d in the D2 port of tango and I see that all the volatile keywords are commented out. My understanding is that the ordering of the assembly in those blocks is incredibly important to preserve as-is. What is the way to ensure that in D2?
Jan 21 2009
On Wed, Jan 21, 2009 at 9:49 PM, Jason House <jason.james.house gmail.com> wrote:I was just looking at Atomic.d in the D2 port of tango and I see that all=the volatile keywords are commented out. My understanding is that the ord= ering of the assembly in those blocks is incredibly important to preserve a= s-is. What is the way to ensure that in D2? olol, use inline assembly or link to external functions that do that. That's what Walter told me, anyway. http://www.digitalmars.com/d/archives/digitalmars/D/announce/DMD_1.029_and_= 2.013_releases_11949.html#N11974
Jan 21 2009
Jason House wrote:I was just looking at Atomic.d in the D2 port of tango and I see that all the volatile keywords are commented out. My understanding is that the ordering of the assembly in those blocks is incredibly important to preserve as-is. What is the way to ensure that in D2?Walter has said that compilers should not optimize across asm blocks, and so a correct D compiler will not do so, and therefore the volatile label should be unnecessary. But I hope that this will be revisited once multiprogramming in D is a bit more fleshed out. Sean
Jan 21 2009