[Bug 126] Add support for attribute to mark data as volatile.
via D.gnu
d.gnu at puremagic.com
Wed Jun 11 16:33:30 PDT 2014
http://bugzilla.gdcproject.org/show_bug.cgi?id=126
--- Comment #14 from Martin Nowak <code at dawg.eu> ---
Bit-bending I/O is a counter-example against the "no performance needed"
argument, but I still think this can be achieved easily enough with the
existing tools, i.e. by inlining the asm code in your hot loop or writing an
asm function.
for (uint i = 0; i < 32; ++i)
{
if (data & 1)
asm { mov r0, #1; str r0, [r3]; }
else
asm { mov r0, #2; str r0, [r3]; }
data >>= 1;
}
Compiler intrinsics for volatile loading/storing could be implemented with zero
overhead and it would be useful for at least one other cases (forced float
rounding to fix excess precision). So I favor this solution, but until then
core.atomic can be used.
--
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20140611/11fdd1b0/attachment.html>
More information about the D.gnu
mailing list