about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-09-01 11:56:51 -0700
committerGitHub <noreply@github.com>2016-09-01 11:56:51 -0700
commit933f4717104aba3af71ced7e5a513f8c0bd6077a (patch)
tree6a90d940e178680a5678c9fd92b0c92b4702bfb9 /src/doc
parent147371f58f1a99e32524d61af1d86b2e1e0a503b (diff)
parent3d766a077944f167dbd412538af4c6957943374d (diff)
downloadrust-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/doc')
-rw-r--r--src/doc/book/ffi.md1
-rw-r--r--src/doc/reference.md4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/doc/book/ffi.md b/src/doc/book/ffi.md
index ca104ff29ac..1dea15311ce 100644
--- a/src/doc/book/ffi.md
+++ b/src/doc/book/ffi.md
@@ -539,6 +539,7 @@ This is currently hidden behind the `abi_vectorcall` gate and is subject to chan
 * `system`
 * `C`
 * `win64`
+* `sysv64`
 
 Most of the abis in this list are self-explanatory, but the `system` abi may
 seem a little odd. This constraint selects whatever the appropriate ABI is for
diff --git a/src/doc/reference.md b/src/doc/reference.md
index be3559a5880..ec2d3e2822e 100644
--- a/src/doc/reference.md
+++ b/src/doc/reference.md
@@ -1677,6 +1677,7 @@ There are also some platform-specific ABI strings:
 * `extern "cdecl"` -- The default for x86\_32 C code.
 * `extern "stdcall"` -- The default for the Win32 API on x86\_32.
 * `extern "win64"` -- The default for C code on x86\_64 Windows.
+* `extern "sysv64"` -- The default for C code on non-Windows x86\_64.
 * `extern "aapcs"` -- The default for ARM.
 * `extern "fastcall"` -- The `fastcall` ABI -- corresponds to MSVC's
   `__fastcall` and GCC and clang's `__attribute__((fastcall))`
@@ -2485,6 +2486,9 @@ The currently implemented features of the reference compiler are:
 
 * - `dotdot_in_tuple_patterns` - Allows `..` in tuple (struct) patterns.
 
+* - `abi_sysv64` - Allows the usage of the system V AMD64 calling convention
+                             (e.g. `extern "sysv64" func fn_();`)
+
 If a feature is promoted to a language feature, then all existing programs will
 start to receive compilation warnings about `#![feature]` directives which enabled
 the new feature (because the directive is no longer necessary). However, if a