about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-12-03 17:41:14 +0000
committerbors <bors@rust-lang.org>2016-12-03 17:41:14 +0000
commit2cdbd5eb4255974db204819f9aa49c00b15a6d23 (patch)
tree700af30689a3fd50162761b8c5c2f9eff8c35808 /src/rustllvm/RustWrapper.cpp
parent890085450a495678622178a471afd630fe15f0f5 (diff)
parent80ef1dbf2d51d2f2fd039d98a9150d2614e775b0 (diff)
downloadrust-2cdbd5eb4255974db204819f9aa49c00b15a6d23.tar.gz
rust-2cdbd5eb4255974db204819f9aa49c00b15a6d23.zip
Auto merge of #38079 - BurntSushi:attrtarget, r=alexcrichton
Add new #[target_feature = "..."] attribute.

This commit adds a new attribute that instructs the compiler to emit
target specific code for a single function. For example, the following
function is permitted to use instructions that are part of SSE 4.2:

    #[target_feature = "+sse4.2"]
    fn foo() { ... }

In particular, use of this attribute does not require setting the
-C target-feature or -C target-cpu options on rustc.

This attribute does not have any protections built into it. For example,
nothing stops one from calling the above `foo` function on hosts without
SSE 4.2 support. Doing so may result in a SIGILL.

I've also expanded the x86 target feature whitelist.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions