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 64-bit calling convention on Windows #98

Closed
wants to merge 1 commit into from

Conversation

Aciz
Copy link
Collaborator

@Aciz Aciz commented Jun 10, 2024

On 64-bit, va_arg does not pass in all arguments via stack, instead some are passed in via registers. GCC/Clang expand these correctly to the argument list, but MSVC does some funky shit and would require some manual macro hell to correctly expand the arguments from registers to the va_arg call. By doing VM_Call like this, we avoid passing in random integers to mod in vmMain arguments.

https://blog.nelhage.com/2010/10/amd64-and-va_arg/

@Aciz Aciz marked this pull request as draft June 11, 2024 04:03
@Aciz
Copy link
Collaborator Author

Aciz commented Jul 22, 2024

#99

@Aciz Aciz closed this Jul 22, 2024
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

1 participant