Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Implement extractlane instruction for x86 #855

Merged

Conversation

abrown
Copy link
Member

@abrown abrown commented Jul 17, 2019

The primary commit for this is 9785535 but the following three are improvements from comments to #833 or suggested by the IDE (9a036ec).

@abrown
Copy link
Member Author

abrown commented Jul 24, 2019

@sunfishcode can you take a look at this?

@abrown abrown force-pushed the add-extract-lane-x86-rebased branch from dfa1ec7 to e6c6b90 Compare July 25, 2019 00:16
@abrown abrown force-pushed the add-extract-lane-x86-rebased branch 2 times, most recently from 1b00fa6 to 2ead474 Compare July 26, 2019 22:37
@abrown
Copy link
Member Author

abrown commented Jul 26, 2019

As I was playing with clif-util run from #872 I realized that the recipe for extractlane could not be re-used for x86_pushd--the output operand for extractlane must be a gpr and the order of the registers passed to modrm_rr must be flipped. I fixed the tests to catch this and rebased the fixes in.

@abrown
Copy link
Member Author

abrown commented Aug 5, 2019

@arunetm, here is an extractlane implementation for x86.

abrown added 4 commits August 19, 2019 15:36
This refactor moves the calculation of the number of lanes to code closer to where the Instruction/BoundInstruction is bound.
In talking to @sunfishcode, he preferred to avoid the confusion of more ISA predicates by eliminating SSE2. SSE2 was released with the Pentium 4 in 2000 so it is unlikely that current CPUs would have SIMD enabled and not have this feature. I tried to note the SSE2-specific instructions with comments in the code.
@abrown abrown force-pushed the add-extract-lane-x86-rebased branch from 2ead474 to 8bd1ff4 Compare August 19, 2019 22:45
@abrown
Copy link
Member Author

abrown commented Aug 19, 2019

@sunfishcode this one is also rebased and ready for review

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 to me!

@sunfishcode sunfishcode merged commit 8977442 into bytecodealliance:master Aug 20, 2019
@abrown abrown deleted the add-extract-lane-x86-rebased branch August 21, 2019 16:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants