We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5437

Summary: [PATCH] Use MSVC byteswapping intrinsics for SDL_Swap16/32/64
Product: SDL Reporter: Cameron Gutman <cameron.gutman>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: Windows 10   
Attachments: Patch

Description Cameron Gutman 2021-01-02 19:33:35 UTC
MSVC has byteswap intrinsics that generate good code on Intel and ARM platforms. Let's use these rather than the fallback C implementation on MSVC.

Tested with platform tests on x64 compiled with MSVC 2019.
Comment 1 Cameron Gutman 2021-01-02 19:34:00 UTC
Created attachment 4629 [details]
Patch
Comment 2 Sam Lantinga 2021-01-03 18:25:04 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/2114c408176d