Skip to content

More Altivec intrinsics #43711

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

Merged
merged 8 commits into from
Aug 8, 2017
Merged

More Altivec intrinsics #43711

merged 8 commits into from
Aug 8, 2017

Conversation

lu-zero
Copy link
Contributor

@lu-zero lu-zero commented Aug 7, 2017

Beside the usual json + generated files, I added two additional modifiers in the generator.

@rust-highfive
Copy link
Contributor

r? @pnkfelix

(rust_highfive has picked a reviewer for you, use r? to override)

@nagisa
Copy link
Member

nagisa commented Aug 7, 2017

Is there any documentation online which a reviewer could reference when checking the intrinsics?

@lu-zero
Copy link
Contributor Author

lu-zero commented Aug 7, 2017

Not specifically, that I know.

My way to check has been to compare the llvm output between clang and rustc on simple test-code.

@lu-zero
Copy link
Contributor Author

lu-zero commented Aug 7, 2017

The C/ELF intrinsics are described here and historically [http://www.nxp.com/docs/en/reference-manual/ALTIVECPIM.pdf] here, the closest up to date document is this one.

"llvm": "vsubcuw",
"ret": "u32",
"args": ["0", "0"]
},
Copy link
Member

Choose a reason for hiding this comment

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

VEC_SUBC here alludes to both unsigned and signed version existing. Is it intended to only expose unsigned version with the canonical name subc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The underlying instruction for both signed and unsigned is vsubcuw.

I'm currently exposing the altivec intrinsics, then I'll add the VSX and POWER8-only ones.
The safe altivec.h-like-api would live in a separate crate.

Please refer to altivec.h to see what I'm miming :)

@nagisa
Copy link
Member

nagisa commented Aug 7, 2017

Everything looks okay, although I wonder if adding just one unsigned variant for subc and addc was intended.

@arielb1 arielb1 added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 8, 2017
@lu-zero
Copy link
Contributor Author

lu-zero commented Aug 8, 2017

Yes it was intended.

@nagisa
Copy link
Member

nagisa commented Aug 8, 2017

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 8, 2017

📌 Commit 8b78ea5 has been approved by nagisa

@bors
Copy link
Collaborator

bors commented Aug 8, 2017

⌛ Testing commit 8b78ea5 with merge 215e0b1...

bors added a commit that referenced this pull request Aug 8, 2017
More Altivec intrinsics

Beside the usual json + generated files, I added two additional modifiers in the generator.
@bors
Copy link
Collaborator

bors commented Aug 8, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: nagisa
Pushing 215e0b1 to master...

@bors bors merged commit 8b78ea5 into rust-lang:master Aug 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants