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

docs: Add win64 calling convention, update doc #14349

Merged
merged 1 commit into from
May 22, 2014

Conversation

richo
Copy link
Contributor

@richo richo commented May 22, 2014

Wikipedia suggests that windows on x64 has it's own calling convention (Supported by the fact that we implement it)

source: http://en.wikipedia.org/wiki/X86_calling_conventions#x86-64_calling_conventions

@alexcrichton
Copy link
Member

I think that may mean that windows defines a calling convention for 64-bit, not that it necessarily uses it. We have it defined because it's an abi that can be used.

I don't think that it's the one that windows uses internally at least for kernel32.dll because our system calling convention currently maps to C for windows on 64-bit, and I've heard that it's working (instead of horribly dying).

I may be wrong though, do you think that the win64 calling convention is the predominant one on win64?

@richo
Copy link
Contributor Author

richo commented May 22, 2014

That's the impression I get.

I'll grab some win64 binaries tomorrow and pull them apart, until then let's leave this.

@richo
Copy link
Contributor Author

richo commented May 22, 2014

Though, if it turns out not to be used, we may want to create an alias for it for uefi, where it is absolutely used.

@klutzy
Copy link
Contributor

klutzy commented May 22, 2014

Win64 defines its own calling convention, and it's the "C" calling convention. On win64, extern "C" is as same as extern "win64" - LLVM treats them equally.
(Yes, the actual detail of C calling convention depends on target architecture. For example, C calling convention on win32 differ from one on linux: #9205)

We have explicit notion of win64 calling convention because it may be used outside windows, notably in UEFI specification. (See also #10527 and Booting to Rust)

@richo
Copy link
Contributor Author

richo commented May 22, 2014

That explains a lot (The actual usecase was a friend doing some uefi stuff, hence the lack of windows. I'll update the patch to mention win64 in the list.

I'm a little suss on using "C" as the example, when it's so nontrivial.

Verified

This commit was signed with the committer’s verified signature.
ChrisDenton Chris Denton
@richo
Copy link
Contributor Author

richo commented May 22, 2014

Patch updated.

bors added a commit that referenced this pull request May 22, 2014

Verified

This commit was signed with the committer’s verified signature.
ChrisDenton Chris Denton
…excrichton

Wikipedia suggests that windows on x64 has it's own calling convention (Supported by the fact that we implement it)

source: http://en.wikipedia.org/wiki/X86_calling_conventions#x86-64_calling_conventions
@bors bors closed this May 22, 2014
@bors bors merged commit e5d8831 into rust-lang:master May 22, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 20, 2023
fix: Fix visibility resolution not respecting parent blocks

Fixes rust-lang/rust-analyzer#14047
flip1995 pushed a commit to flip1995/rust that referenced this pull request Mar 20, 2025

Verified

This commit was signed with the committer’s verified signature.
ChrisDenton Chris Denton
Since the error kind (`io::ErrorKind::other`) is in the root context,
the error message must be found in the root context as well to compute
the correct span to remove.

Fix rust-lang#14346

changelog: [`io_error_other`]: fix non-applicable suggestion

r? @llogiq
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.

None yet

4 participants