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 - [PATCH] Use MSVC byteswapping intrinsics for SDL_Swap16/32/64
Summary: [PATCH] Use MSVC byteswapping intrinsics for SDL_Swap16/32/64
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: All Windows 10
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-02 19:33 UTC by Cameron Gutman
Modified: 2021-01-03 18:25 UTC (History)
0 users

See Also:


Attachments
Patch (1.37 KB, patch)
2021-01-02 19:34 UTC, Cameron Gutman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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