Skip to content

add thiscall calling convention #42044

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
froydnj opened this issue May 16, 2017 · 3 comments
Closed

add thiscall calling convention #42044

froydnj opened this issue May 16, 2017 · 3 comments

Comments

@froydnj
Copy link
Contributor

froydnj commented May 16, 2017

Trying to get servo/rust-bindgen working with win32 today, I ran into rust-lang/rust-bindgen#541, where the __thiscall calling convention wasn't supported in bindgen. (My use of bindgen doesn't actually generate calls to __thiscall functions, but the function representations need to support __thiscall AFAICT.) Tracing back through the stack, it's not supported in syntex_syntax, and adding that support is AFAICT tricky until it's supported by rustc in some way.

Adding __thiscall was already proposed in #37 and/or #5853, but tangled up in much grander plans about FFI interfaces; this bug is more narrowly scoped to just adding support for the calling convention. People can then experiment with it via bindgen and nightly Rust. In this way, I think it's essentially like the existing support for vectorcall.

I think it's straightforward to do the work and am happy to # for doing it, but I'd like to know if there are strenuous objections to doing so.

@froydnj
Copy link
Contributor Author

froydnj commented May 16, 2017

cc @emilio

@retep998
Copy link
Member

See also rust-lang/rfcs#1342

@froydnj
Copy link
Contributor Author

froydnj commented May 16, 2017

So, uh, we should just do this, then? 😁

froydnj added a commit to froydnj/rust that referenced this issue May 24, 2017
This support is needed for bindgen to work well on 32-bit Windows, and
also enables people to begin experimenting with C++ FFI support on that
platform.

Fixes rust-lang#42044.
bors added a commit that referenced this issue May 26, 2017
add thiscall calling convention support

This support is needed for bindgen to work well on 32-bit Windows, and also enables people to begin experimenting with C++ FFI support on that platform.

Fixes #42044.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants