H1 2015 Priorities and Bare-Metal Programming
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Mon Feb 2 02:57:28 PST 2015
On 2/2/2015 1:39 AM, Johannes Pfau wrote:
> No, it doesn't even come close.
>
> * Ports.B += 7 doesn't work.
This should not be done with MMIO because the read and write cycles generated
are ill-defined and vary based on obscure backend details.
> In order to implement it you need a
> Volatile!ubyte wrapper, return by ref and avoid some compiler bugs
What compiler bugs?
> * You do need force-inline to produce halfway decent code
Nope. volatileLoad() and volatileStore() do not produce function calls.
> * You also need to enable backend optimization to produce decent code
Not any more true than with volatile types, because the compiler intrinsic
actually translates to a volatile type, not a function call.
You are making a lot of assumptions that volatileLoad() and volatileStore() do
not work. Please try it, examine the generated code, and see.
More information about the Digitalmars-d
mailing list