Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1acd378
Provides direct link to the PR when toolstate is changed.
kennytm Feb 21, 2018
e181050
Submit a comment to the PR in additional to pushing a commit.
kennytm Feb 21, 2018
f6e4751
Disallow toolstate regression at the last week of the 6-week cycle.
kennytm Feb 21, 2018
51238c7
CI: Fixed the incorrect folder region when building codegen dylib.
kennytm Feb 21, 2018
0d300d4
Split test::Docs into one Step for each book.
kennytm Feb 21, 2018
a9f940e
Run the external doc tests in tools job.
kennytm Feb 21, 2018
d27fac6
Fix find_width_of_character_at_span bounds check
etaoins Feb 25, 2018
c237d4f
Add test for #48508
etaoins Feb 26, 2018
c99f4c4
Stabilize LocalKey::try_with
Feb 27, 2018
989134e
Add regression test for #48551
ishitatsuyuki Feb 28, 2018
90b2813
Remove the v7 feature from AArch64
Amanieu Feb 26, 2018
f756ad3
Add AArch64 features
Amanieu Feb 27, 2018
27fae2b
Remove thread_local_state
Feb 28, 2018
11eb83a
Update issue-48551.rs
nikomatsakis Feb 28, 2018
2ec79f9
Remove E0245; improve E0404 explanation
mark-i-m Feb 22, 2018
082dd6d
Fix a few run-pass tests
Feb 28, 2018
804666f
rustc: Tweak funclet cleanups of ffi functions
alexcrichton Feb 27, 2018
c9aff92
Support parentheses in patterns under feature gate
petrochenkov Feb 24, 2018
cb56b2d
Fix a bug introduced in previous commit
Feb 28, 2018
6edbe37
Fix link to rustc guide in README.md
teiesti Mar 1, 2018
363d604
Add ignore-pretty for issue-48506.rs
etaoins Mar 1, 2018
eadea4a
Rollup merge of #48405 - kennytm:autotoolstate-follow-up, r=Mark-Simu…
Manishearth Mar 1, 2018
39d5e1c
Rollup merge of #48446 - mark-i-m:e0245, r=mark-i-m
Manishearth Mar 1, 2018
38f4d55
Rollup merge of #48500 - petrochenkov:parpat, r=nikomatsakis
Manishearth Mar 1, 2018
75b8c10
Rollup merge of #48522 - etaoins:fix-find-width-of-character-at-span-…
Manishearth Mar 1, 2018
8025e15
Rollup merge of #48572 - alexcrichton:noexcept-msvc2, r=eddyb
Manishearth Mar 1, 2018
b812b77
Rollup merge of #48585 - stjepang:stabilize-localkey-try_with, r=alex…
Manishearth Mar 1, 2018
cf0638c
Rollup merge of #48610 - ishitatsuyuki:ishitatsuyuki-patch-1, r=nikom…
Manishearth Mar 1, 2018
a080d7b
Rollup merge of #48626 - teiesti:fix-readme, r=frewsxcv
Manishearth Mar 1, 2018
2b3c815
Rollup merge of #48570 - Amanieu:aarch64_features, r=alexcrichton
kennytm Mar 1, 2018
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
2 changes: 1 addition & 1 deletion src/librustc_trans/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ fn from_target_feature(
let value = value.as_str();
for feature in value.split(',') {
if whitelist.contains(feature) {
let llvm_feature = llvm_util::to_llvm_feature(feature);
let llvm_feature = llvm_util::to_llvm_feature(&tcx.sess, feature);
target_features.push(format!("+{}", llvm_feature));
continue
}
Expand Down
24 changes: 16 additions & 8 deletions src/librustc_trans/llvm_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ unsafe fn configure_llvm(sess: &Session) {

const ARM_WHITELIST: &'static [&'static str] = &["neon", "v7", "vfp2", "vfp3", "vfp4"];

const AARCH64_WHITELIST: &'static [&'static str] = &["neon", "v7"];
const AARCH64_WHITELIST: &'static [&'static str] = &["fp", "neon", "sve", "crc", "crypto",
"ras", "lse", "rdm", "fp16", "rcpc",
"dotprod", "v8.1a", "v8.2a", "v8.3a"];

const X86_WHITELIST: &'static [&'static str] = &["aes", "avx", "avx2", "avx512bw",
"avx512cd", "avx512dq", "avx512er",
Expand All @@ -104,12 +106,18 @@ const POWERPC_WHITELIST: &'static [&'static str] = &["altivec",

const MIPS_WHITELIST: &'static [&'static str] = &["msa"];

pub fn to_llvm_feature(s: &str) -> &str {
match s {
"pclmulqdq" => "pclmul",
"rdrand" => "rdrnd",
"bmi1" => "bmi",
s => s,
pub fn to_llvm_feature<'a>(sess: &Session, s: &'a str) -> &'a str {
let arch = if sess.target.target.arch == "x86_64" {
"x86"
} else {
&*sess.target.target.arch
};
match (arch, s) {
("x86", "pclmulqdq") => "pclmul",
("x86", "rdrand") => "rdrnd",
("x86", "bmi1") => "bmi",
("aarch64", "fp16") => "fullfp16",
(_, s) => s,
}
}

Expand All @@ -118,7 +126,7 @@ pub fn target_features(sess: &Session) -> Vec<Symbol> {
target_feature_whitelist(sess)
.iter()
.filter(|feature| {
let llvm_feature = to_llvm_feature(feature);
let llvm_feature = to_llvm_feature(sess, feature);
let cstr = CString::new(llvm_feature).unwrap();
unsafe { llvm::LLVMRustHasFeature(target_machine, cstr.as_ptr()) }
})
Expand Down