| Thread overview | |||||
|---|---|---|---|---|---|
|
January 22, 2009 volatile asm | ||||
|---|---|---|---|---|
| ||||
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? | ||||
January 22, 2009 Re: volatile asm | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Jason House | 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 ordering of the assembly in those blocks is incredibly important to preserve as-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 | |||
January 22, 2009 Re: volatile asm | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Jason House | 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
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply