On 2 February 2015 at 10:57, Walter Bright via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > 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. >
I think he was referring to ubyte B() and void B(), and not the load/store intrinsics themselves.