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

Support detecting all llc's x86 target features #34397

Closed
wants to merge 3 commits into from
Closed
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
22 changes: 13 additions & 9 deletions src/librustc_driver/target_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,19 @@ const ARM_WHITELIST: &'static [&'static str] = &[
];

const X86_WHITELIST: &'static [&'static str] = &[
"avx\0",
"avx2\0",
"sse\0",
"sse2\0",
"sse3\0",
"sse4.1\0",
"sse4.2\0",
"ssse3\0",
];
"avx\0", // AVX instructions.
"avx2\0", // AVX2 instructions.
"bmi\0", // BMI instructions.
"bmi2\0", // BMI2 instructions.
"sse\0", // SSE instructions.
"sse2\0", // SSE2 instructions.
"sse3\0", // SSE3 instructions.
"sse4.1\0", // SSE 4.1 instructions.
"sse4.2\0", // SSE 4.2 instructions.
"sse4a\0", // SSE 4a instructions.
"ssse3\0", // SSSE3 instructions.
"tbm\0", // TBM instructions.
];

/// Add `target_feature = "..."` cfgs for a variety of platform
/// specific features (SSE, NEON etc.).
Expand Down