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

On 64-bit windows-msvc, can't specify SysV calling convention #34388

Closed
jethrogb opened this issue Jun 20, 2016 · 4 comments
Closed

On 64-bit windows-msvc, can't specify SysV calling convention #34388

jethrogb opened this issue Jun 20, 2016 · 4 comments
Labels
O-windows-msvc Toolchain: MSVC, Operating system: Windows

Comments

@jethrogb
Copy link
Contributor

On most 64-bit platforms you can use extern "C" to select the SysV calling convention or extern "win64" to select the Microsoft calling convention. On windows-msvc, extern "C" is the same as extern "win64" and there's no way to select SysV.

@retep998
Copy link
Member

Are there any situations where you'd want the SysV calling convention on Windows?

@Aatch
Copy link
Contributor

Aatch commented Jun 22, 2016

@retep998 interfacing with assembly seems like a reasonable use-case.

@apasel422 apasel422 added the O-windows-msvc Toolchain: MSVC, Operating system: Windows label Jun 24, 2016
@CensoredUsername
Copy link
Contributor

CensoredUsername commented Jun 26, 2016

@retep998 It's an annoyance/restriction when writing anything that deals with run-time assembling (JIT compilers for instance). It necessitates using of the asm feature to call into it or sticking to win64 as calling convention on all platforms.

Alternatively large parts of such code must be duplicated in order to deal with the different register allocations

@CensoredUsername
Copy link
Contributor

This is available now since the merge of #34494, this issue can be closed in favor of the tracking issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows-msvc Toolchain: MSVC, Operating system: Windows
Projects
None yet
Development

No branches or pull requests

5 participants