http://d.puremagic.com/issues/show_bug.cgi?id=7181


bearophile_h...@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_h...@eml.cc


--- Comment #1 from bearophile_h...@eml.cc 2011-12-29 04:21:37 PST ---
(In reply to comment #0)
> In the same way that abs, rol and ror are recognized, bswap(int x)
> could be identified from:
> 
> ( x << 24 ) | ( x << 8 ) & 0xff0000 | ( x >> 8 ) & 0xff00 | ( x >> 24 );
> 
> and this would be completely portable.

Even if this pattern gets recognized and optimized, I suggest to keep a bswap
function in Phobos, to avoid writing all that bug-prone stuff (I'd like a
rol/ror function pair too in Phobos).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to