Don:

> I think DMD should just do what gcc does: recognize that
> (x << 32-n | x>>n)  is ror n
> (x << n | x>> 32-n) is rol n
> where x is int. Ugly, but doesn't require an intrinsic.

Thanks, but no thanks, it's too much ugly and it gets even more ugly if you 
need to use that with ulongs or ushorts, etc. It seems Walter doesn't want to 
remove the unsigned shift, so for the rotations it's much better to add a 
rol/ror to std.intrinsic (plus something to read the carry bit, etc).

Bye,
bearophile

Reply via email to