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

Feature/singlepass windows #2574

Merged
merged 9 commits into from
Sep 23, 2021
Merged

Feature/singlepass windows #2574

merged 9 commits into from
Sep 23, 2021

Conversation

ptitSeb
Copy link
Contributor

@ptitSeb ptitSeb commented Sep 15, 2021

Description

Added Windows x86_64 support to SinglePass Compiler.

Compared to System V ABI, the Windows ABI changed the way argument are send to function in the following way:

  1. Only the 4 1st arguments can be send in register.
  2. The argument will go in XMM reg is Float or Double, or in GPR for anything else
  3. Regs are RCX/XMM0, RDX/XMM1, R8/XMM2 and R9/XMM3
  4. Other argument go to the stack
  5. There is 32bytes also reserved in the stack to shadow the 4 arguments if the callee function needs too

Copy link
Member

@syrusakbary syrusakbary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now we are using compilation flags #[cfg(target_os = "windows")] to determine the output.

To allow cross-compilation it would be great to have it depending on a runtime flag (we can add the compiler::Target to the Singlepass struct, and check the target OS there)

@ptitSeb
Copy link
Contributor Author

ptitSeb commented Sep 16, 2021

bors try

bors bot added a commit that referenced this pull request Sep 16, 2021
@bors
Copy link
Contributor

bors bot commented Sep 16, 2021

try

Build failed:

@ptitSeb
Copy link
Contributor Author

ptitSeb commented Sep 16, 2021

bors try

bors bot added a commit that referenced this pull request Sep 16, 2021
@bors
Copy link
Contributor

bors bot commented Sep 16, 2021

try

Build failed:

@ptitSeb
Copy link
Contributor Author

ptitSeb commented Sep 16, 2021

bors try

bors bot added a commit that referenced this pull request Sep 16, 2021
@bors
Copy link
Contributor

bors bot commented Sep 16, 2021

try

Build failed:

@ptitSeb
Copy link
Contributor Author

ptitSeb commented Sep 17, 2021

bors try

bors bot added a commit that referenced this pull request Sep 17, 2021
@bors
Copy link
Contributor

bors bot commented Sep 17, 2021

try

Build failed:

@ptitSeb
Copy link
Contributor Author

ptitSeb commented Sep 17, 2021

bors try

bors bot added a commit that referenced this pull request Sep 17, 2021
@bors
Copy link
Contributor

bors bot commented Sep 17, 2021

@syrusakbary syrusakbary marked this pull request as ready for review September 23, 2021 14:04
@syrusakbary syrusakbary requested a review from Hywan as a code owner September 23, 2021 14:04
@syrusakbary syrusakbary merged commit 8f855cf into master Sep 23, 2021
@bors bors bot deleted the feature/singlepass_windows branch September 23, 2021 14:04
@webmaster128
Copy link
Contributor

webmaster128 commented Oct 7, 2021

Great stuff, thank you! This is big news.

CHANGELOG entry seems missing. Would love to see this released. Happy to test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants