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

Windows binaries support #38

Open
Trass3r opened this issue Sep 20, 2019 · 2 comments
Open

Windows binaries support #38

Trass3r opened this issue Sep 20, 2019 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@Trass3r
Copy link
Contributor

Trass3r commented Sep 20, 2019

Did some quick-and-dirty tests with Windows x64 executables: https://github.com/Trass3r/llvm-mctoll/commits/coff
It does reach the MachineInst level but after that all the assertions kick in.
Biggest changes are required in X86MachineInstructionRaiserUtils and the hard-coded calling convention registers in X86RegisterUtils.

Also requires SSE etc support for the startup code, standard C runtime etc.
Use cl -nologo -MT -GS- -GR- -EHs-c- test.cpp -link /opt:ref /ENTRY:main /NODEFAULTLIB with some simple code (no runtime) to generate a tiny executable for testing.

__declspec(noinline)
int sum(int *arr, int n)
{
  int sum = 0;
  for (int i = 0; i < n; ++i)
    sum += arr[i];
  return sum;
}

int main()
{
  int arr[] = {0, 1, 2, 3};
  return sum(arr, 4);
}

SSE2 support is also sort of required to use -O1 or -O2 as that's used by msvc even for trivial memcpy or init code.

This was referenced Sep 21, 2019
Closed
@mitp0sh
Copy link

mitp0sh commented Jun 18, 2020

Are there any updates? Any info's on the roadmap? Estimated time?

@bharadwajy
Copy link
Contributor

I started adding support to abstract SSE2 registers (7487a7a). It is one of the higher priority tasks. Unfortunately, it is difficult to provide a roadmap or timeline.

As always, any/all help, if it can be offered, is highly appreciated.

@bharadwajy bharadwajy added the help wanted Extra attention is needed label Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants