-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Fix ABI string docs in reference.md #34461
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
I know it's not the best, I'm not great at writing documentation. I just wanted to get a first attempt there. |
* `extern "win64"` -- The default for C code on x86\_64 Windows. | ||
* `extern "aapcs"` -- The default for ARM. | ||
* `extern "fastcall"` | ||
* `extern "vectorcall"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extern "fastcall"
corresponds to the Visual Studio's __fastcall
and gcc's __attribute__((fastcall))
is a. extern "vectorcall"
corresponds to the Visual Studio's __vectorcall
.
No, that's a nice work. 👍 for me. |
This looks good to me, but I would like @rust-lang/compiler and @rust-lang/lang to make a call here about "all compilers are guaranteed to support" |
* `extern "rust-intrinsic"` -- The ABI of rustc intrinsics. | ||
* `extern "rust-call"` -- The ABI of the Fn::call trait functions. | ||
* `extern "platform-intrinsic"` -- Specific platform intrinsics -- like, for | ||
example, `sqrt` -- have this ABI. You should never have to deal with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sqrt
? I thought that was a regular intrinsic. Also, a subset of the platform intrinsics is likely to be stabilized in some form, while the more general set of intrinsics will remain unstable indefinitely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The simd
crate, for example, uses platform-intrinsics
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eddyb I wasn't sure. Is there... like... any documentation on this? or code I can read? |
@ubsan The existing implementation is governed by https://github.com/rust-lang/rfcs/blob/master/text/1199-simd-infrastructure.md AFAIK. |
ping, is this ready for merge? |
|
||
```ignore | ||
// Interface to the Windows API | ||
extern "stdcall" { } | ||
``` | ||
|
||
There are three ABI strings which are cross-platform, and which all compilers | ||
are guaranteed to support: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the fact that there are no other rust compilers, it seems like we should just say "which are cross-platform". This wording suggests that other compilers exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They do? They're not finished, but they exist. (mrustc, grustc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mrustc is the main one I know of.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikomatsakis and the rest of @rust-lang/lang , are we comfortable saying that all compilers are guaranteed to support this? It feels like a strange thing to "guarantee".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is a requirement, not a guarantee - i.e., "which all compilers must support:"
@bors: r+ rollup |
📌 Commit 1e899fd has been approved by |
Fix ABI string docs in reference.md
⌛ Testing commit 1e899fd with merge 226f9f3... |
💔 Test failed - auto-win-msvc-64-opt |
@bors: retry On Tue, Jul 26, 2016 at 3:55 AM, bors notifications@github.com wrote:
|
Fix ABI string docs in reference.md
No description provided.