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

Add MOVBE x86 CPU feature #57999

Merged
merged 1 commit into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/librustc_codegen_llvm/llvm_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ const X86_WHITELIST: &[(&str, Option<&str>)] = &[
("fxsr", None),
("lzcnt", None),
("mmx", Some("mmx_target_feature")),
("movbe", Some("movbe_target_feature")),
("pclmulqdq", None),
("popcnt", None),
("rdrand", None),
Expand Down
1 change: 1 addition & 0 deletions src/librustc_typeck/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2205,6 +2205,7 @@ fn from_target_feature(
Some("wasm_target_feature") => rust_features.wasm_target_feature,
Some("cmpxchg16b_target_feature") => rust_features.cmpxchg16b_target_feature,
Some("adx_target_feature") => rust_features.adx_target_feature,
Some("movbe_target_feature") => rust_features.movbe_target_feature,
Some(name) => bug!("unknown target feature gate {}", name),
None => true,
};
Expand Down
1 change: 1 addition & 0 deletions src/libsyntax/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ declare_features! (
(active, wasm_target_feature, "1.30.0", Some(44839), None),
(active, adx_target_feature, "1.32.0", Some(44839), None),
(active, cmpxchg16b_target_feature, "1.32.0", Some(44839), None),
(active, movbe_target_feature, "1.34.0", Some(44839), None),

// Allows macro invocations on modules expressions and statements and
// procedural macros to expand to non-items.
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/target-feature-gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
// gate-test-wasm_target_feature
// gate-test-adx_target_feature
// gate-test-cmpxchg16b_target_feature
// gate-test-movbe_target_feature
// min-llvm-version 6.0

#[target_feature(enable = "avx512bw")]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/target-feature-gate.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0658]: the target feature `avx512bw` is currently unstable (see issue #44839)
--> $DIR/target-feature-gate.rs:27:18
--> $DIR/target-feature-gate.rs:28:18
|
LL | #[target_feature(enable = "avx512bw")]
| ^^^^^^^^^^^^^^^^^^^
Expand Down