Skip to content

add thiscall calling convention #42044

Closed
Closed
@froydnj

Description

@froydnj

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 sign up for doing it, but I'd like to know if there are strenuous objections to doing so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions