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

Constify all x86 rustc_args_required_const intrinsics #876

Merged
merged 1 commit into from
Jul 19, 2020

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Jul 18, 2020

Fixes https://github.com/bjorn3/rustc_codegen_cranelift/issues/669

I am not quite sure about how some intrinsics should handle imm8 values > 255. Where there was no masking before, I have used saturating through constify_imm8.

@rust-highfive
Copy link

r? @gnzlbg

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

@Amanieu
Copy link
Member

Amanieu commented Jul 18, 2020

IMO we should panic on out-of-range immediates, with the intention of turning those into compile-time errors once we have enough support for const generics (and #[rustc_args_required_const] becomes syntax sugar for const generics).

@bjorn3
Copy link
Member Author

bjorn3 commented Jul 18, 2020

All other #[rustc_args_required_const] intrinsics either mask or saturate the immediate.

@Amanieu
Copy link
Member

Amanieu commented Jul 19, 2020

I reviewed the existing code and it seems that they all use masking via the constify_* macros. Let's just stick to that for now.

@Amanieu Amanieu merged commit 7a6a442 into rust-lang:master Jul 19, 2020
@bjorn3 bjorn3 deleted the constify branch July 19, 2020 14:58
bjorn3 added a commit to rust-lang/rustc_codegen_cranelift that referenced this pull request Aug 8, 2020
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.

Support simd_insert platform intrinsic
4 participants