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

Implement SIMD swizzle #1248

Merged
merged 2 commits into from
Mar 6, 2020
Merged

Implement SIMD swizzle #1248

merged 2 commits into from
Mar 6, 2020

Conversation

abrown
Copy link
Contributor

@abrown abrown commented Mar 6, 2020

This implements the SIMD swizzle instruction using the PADDUSB 0x70 mask + PSHUFB code sequence proposed by @zeux. This implementation has an extra instruction to MOV the mask into a register but this could be removed by a future optimization adding additional addressing modes to arithmetic instructions (in this case uadd_sat).

This PR depends on #1246 being merged [edit: this is now merged]

Copy link
Member

@sunfishcode sunfishcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@abrown abrown merged commit 4284491 into bytecodealliance:master Mar 6, 2020
@abrown abrown deleted the swizzle branch March 7, 2020 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants