Skip to content
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

Merged
merged 2 commits into from
Jul 27, 2016
Merged

Fix ABI string docs in reference.md #34461

merged 2 commits into from
Jul 27, 2016

Conversation

strega-nil
Copy link
Contributor

No description provided.

@rust-highfive
Copy link
Collaborator

r? @steveklabnik

(rust_highfive has picked a reviewer for you, use r? to override)

@strega-nil strega-nil changed the title First commit, fix ABI string docs in reference.md Fix ABI string docs in reference.md Jun 24, 2016
@strega-nil
Copy link
Contributor Author

strega-nil commented Jun 24, 2016

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"`
Copy link
Contributor

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.

@GuillaumeGomez
Copy link
Member

No, that's a nice work. 👍 for me.

@steveklabnik
Copy link
Member

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.
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ubsan what's your response to @eddyb here?

@strega-nil
Copy link
Contributor Author

@eddyb I wasn't sure. Is there... like... any documentation on this? or code I can read?

@eddyb
Copy link
Member

eddyb commented Jun 28, 2016

@ubsan The existing implementation is governed by https://github.com/rust-lang/rfcs/blob/master/text/1199-simd-infrastructure.md AFAIK.

@alexcrichton
Copy link
Member

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:
Copy link
Contributor

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.

Copy link
Contributor Author

@strega-nil strega-nil Jul 19, 2016

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)

Copy link
Member

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.

Copy link
Member

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".

Copy link
Member

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:"

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Jul 25, 2016

📌 Commit 1e899fd has been approved by steveklabnik

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Jul 25, 2016
bors added a commit that referenced this pull request Jul 25, 2016
Rollup of 13 pull requests

- Successful merges: #34461, #34609, #34732, #34850, #34894, #34935, #34974, #34990, #34995, #35001, #35009, #35010, #35028
- Failed merges:
@bors
Copy link
Contributor

bors commented Jul 26, 2016

⌛ Testing commit 1e899fd with merge 226f9f3...

@bors
Copy link
Contributor

bors commented Jul 26, 2016

💔 Test failed - auto-win-msvc-64-opt

@alexcrichton
Copy link
Member

@bors: retry

On Tue, Jul 26, 2016 at 3:55 AM, bors notifications@github.com wrote:

💔 Test failed - auto-win-msvc-64-opt
https://buildbot.rust-lang.org/builders/auto-win-msvc-64-opt/builds/5081


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#34461 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAD95NsAa6ldvTcFv8Mzs7hTBIpKHTgWks5qZeevgaJpZM4I-LJ_
.

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Jul 26, 2016
bors added a commit that referenced this pull request Jul 27, 2016
@bors bors merged commit 1e899fd into rust-lang:master Jul 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.