On 2009-12-06 13:07:29 -0500, "Adam D. Ruppe" <[email protected]> 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
[email protected]
http://michelf.com/

Reply via email to