[Issue 7181] New: Make bswap a recognized sequence, rather than an intrinsic

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 29 02:15:17 PST 2011


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

           Summary: Make bswap a recognized sequence, rather than an
                    intrinsic
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: clugdbug at yahoo.com.au


--- Comment #0 from Don <clugdbug at yahoo.com.au> 2011-12-29 02:15:03 PST ---
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.

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


More information about the Digitalmars-d-bugs mailing list