diff options
| author | bors <bors@rust-lang.org> | 2016-09-01 11:56:51 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-09-01 11:56:51 -0700 |
| commit | 933f4717104aba3af71ced7e5a513f8c0bd6077a (patch) | |
| tree | 6a90d940e178680a5678c9fd92b0c92b4702bfb9 /src/libsyntax | |
| parent | 147371f58f1a99e32524d61af1d86b2e1e0a503b (diff) | |
| parent | 3d766a077944f167dbd412538af4c6957943374d (diff) | |
| download | rust-933f4717104aba3af71ced7e5a513f8c0bd6077a.tar.gz rust-933f4717104aba3af71ced7e5a513f8c0bd6077a.zip | |
Auto merge of #34494 - CensoredUsername:allow_sysV64_abi, r=nagisa
Allow specification of the system V AMD64 ABI constraint. This can be specified using `extern "sysV64" fn` on all platforms. This ABI is used as the C ABI on unix platforms, but can only be specified there using extern "C". It was impossible to specify on other platforms. Meanwhile the win64 ABI, which was the extern "C" ABI on the windows platform could be specified on other platforms using extern "win64". This pull request adds the the "sysV64" ABI constraint which exposes this calling convention on platforms where it is not the C ABI.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/abi.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 23 |
2 files changed, 18 insertions, 7 deletions
diff --git a/src/libsyntax/abi.rs b/src/libsyntax/abi.rs index c959e2108f5..64a71133a8c 100644 --- a/src/libsyntax/abi.rs +++ b/src/libsyntax/abi.rs @@ -39,6 +39,7 @@ pub enum Abi { Vectorcall, Aapcs, Win64, + SysV64, // Multiplatform ABIs second Rust, @@ -86,6 +87,7 @@ const AbiDatas: &'static [AbiData] = &[ AbiData {abi: Abi::Vectorcall, name: "vectorcall"}, AbiData {abi: Abi::Aapcs, name: "aapcs" }, AbiData {abi: Abi::Win64, name: "win64" }, + AbiData {abi: Abi::SysV64, name: "sysv64" }, // Cross-platform ABIs // diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 1e15c156356..e224e30b1a2 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -281,7 +281,11 @@ declare_features! ( (active, never_type, "1.13.0", Some(35121)), // Allows all literals in attribute lists and values of key-value pairs. - (active, attr_literals, "1.13.0", Some(34981)) + (active, attr_literals, "1.13.0", Some(34981)), + + // Allows the sysV64 ABI to be specified on all platforms + // instead of just the platforms on which it is the C ABI + (active, abi_sysv64, "1.13.0", Some(36167)) ); declare_features! ( @@ -811,21 +815,26 @@ macro_rules! gate_feature_post { impl<'a> PostExpansionVisitor<'a> { fn check_abi(&self, abi: Abi, span: Span) { match abi { - Abi::RustIntrinsic => + Abi::RustIntrinsic => { gate_feature_post!(&self, intrinsics, span, - "intrinsics are subject to change"), + "intrinsics are subject to change"); + }, Abi::PlatformIntrinsic => { gate_feature_post!(&self, platform_intrinsics, span, - "platform intrinsics are experimental and possibly buggy") + "platform intrinsics are experimental and possibly buggy"); }, Abi::Vectorcall => { gate_feature_post!(&self, abi_vectorcall, span, - "vectorcall is experimental and subject to change") - } + "vectorcall is experimental and subject to change"); + }, Abi::RustCall => { gate_feature_post!(&self, unboxed_closures, span, "rust-call ABI is subject to change"); - } + }, + Abi::SysV64 => { + gate_feature_post!(&self, abi_sysv64, span, + "sysv64 ABI is experimental and subject to change"); + }, _ => {} } } |
