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

Fix arm simd shuffling arguments #452

Merged
merged 1 commit into from
Jan 10, 2021

Conversation

berkus
Copy link
Contributor

@berkus berkus commented Jan 10, 2021

According to packed_simd docs, the syntax for simd_shuffle4()
is as follows:

"The indices must be in range [0, M * N) where M is the number of input
vectors (1 or 2)and N is the number of lanes of the input vectors. The
indices i in range [0, N) refer to the i-th element of vec0, while the
indices in range [N, 2*N) refer to the i - N-th element of vec1."

I did not find implementation or documentation for simd_shuffle4() but
I believe packed_simd implements exactly the same interface.

Plus, implementing this change has fixed font-kit glyph output on
an Apple M1 mac (64-bit arm).

Closes #450

According to packed_simd docs, the syntax for simd_shuffle4()
is as follows:

"The indices must be in range [0, M * N) where M is the number of input
vectors (1 or 2)and N is the number of lanes of the input vectors. The
indices i in range [0, N) refer to the i-th element of vec0, while the
indices in range [N, 2*N) refer to the i - N-th element of vec1."

I did not find implementation or documentation for simd_shuffle4() but
I believe packed_simd implements exactly the same interface.

Plus, implementing this change has fixed font-kit glyph output on
an Apple M1 mac (64-bit arm).
@jdm
Copy link
Member

jdm commented Jan 10, 2021

@bors-servo r+
Looks reasonable; thanks!

@bors-servo
Copy link
Contributor

📌 Commit bd6d015 has been approved by jdm

@bors-servo
Copy link
Contributor

⌛ Testing commit bd6d015 with merge 20adbee...

@bors-servo
Copy link
Contributor

☀️ Test successful - checks-travis
Approved by: jdm
Pushing 20adbee to master...

@bors-servo bors-servo merged commit 20adbee into servo:master Jan 10, 2021
@berkus berkus deleted the fix/simd-arm-shuffle branch January 11, 2021 07:16
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.

Invalid simd implementation on Apple M1
3 participants