yank '>>>'?

Michel Fortin michel.fortin at michelf.com
Sun Dec 6 10:31:21 PST 2009


On 2009-12-06 13:07:29 -0500, "Adam D. Ruppe" <destructionator at gmail.com> said:

> On Sun, Dec 06, 2009 at 05:36:49PM +0000, dsimcha wrote:
>> In a close to the metal language, there needs to be a straightforward, 
>> efficient
>> way to access it.
> 
> You could always do what I did in my D SHA implementations:
> 
> uint something = whatever;
> 
> asm { rol something, 5; }
> 
> something += stuff;
> 
> We have inline asm, so I say just go ahead and use it.

The problem with asm is portability. You can't go very far from x86 
with the above code, and if you do you end up with static ifs 
everywhere, adding a readability problem.

So an intrinsic or a built-in operator is much better.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list