Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recognize byteswap and generate XCHG #11388

Merged
merged 1 commit into from
Jul 11, 2020
Merged

Conversation

WalterBright
Copy link
Member

Much faster than the old shift, mask, and or code.

Related to dlang/druntime#3150

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#11388"

@WalterWaldron
Copy link
Contributor

WalterWaldron commented Jul 11, 2020

I think ROL/ROR r16,imm has better performance and also allows using R8-R15 on amd64 which don't have upper 8 bits of a 16 bit word access.

@WalterBright
Copy link
Member Author

@WalterWaldron that's a good idea and can be used as a later enhancement to this.

@WalterBright
Copy link
Member Author

@WalterWaldron I encourage you to file your suggestion as an enhancement request on bugzilla, so it doesn't get overlooked.

@dlang-bot dlang-bot merged commit a99a3d0 into dlang:master Jul 11, 2020
@WalterBright WalterBright deleted the byteswap branch July 11, 2020 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants