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

Partial work on JITLink ARM64-COFF #89697

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

orion160
Copy link
Contributor

Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be
notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write
permissions for the repository. In which case you can instead tag reviewers by
name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review
by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate
is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

Copy link

github-actions bot commented Apr 23, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@vgvassilev vgvassilev requested review from lhames and sunho April 23, 2024 13:47
Copy link
Contributor

@lhames lhames left a comment

Choose a reason for hiding this comment

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

This is looking great. I don't have access to an aarch64/Windows machine to test it, but should be able to get hold of one in a few weeks.

In the mean time if anyone else can help with testing it'd be much appreciated. @vgvassilev -- do you know anyone who uses aarch64/Windows?

I'm ok with this landing as-is, but I think we'll want to revisit the tests at some point and turn them into jitlink-check tests.

@@ -0,0 +1,38 @@
//===--- COFF_arm64.h - JIT link functions for COFF/arm64 ---*- C++ -*-===//
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be padded out to 80 cols:

//===----- COFF_arm64.h - JIT link functions for COFF/arm64 -----*- C++ -*-===//

COFFJITLinker_arm64::link(std::move(Ctx), std::move(G), std::move(Config));
}
} // namespace jitlink
} // namespace llvm
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing newline?

@@ -0,0 +1,32 @@
# REQUIRES: asserts
# RUN: llvm-mc -filetype=obj -triple=aarch64-windows-msvc %s -o %t
# RUN: llvm-jitlink --debug-only=jitlink -noexec %t 2>&1 | FileCheck %s
Copy link
Contributor

Choose a reason for hiding this comment

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

-debug-only can be used with a single dash.

@@ -0,0 +1,32 @@
# REQUIRES: asserts
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this would be better written as a jitlink-check test. I know you mentioned that you didn't have a Windows machine handy to test on, but it should still be possible to write -noexec tests on any platform (even non-aarch64 ones).

@@ -0,0 +1,347 @@
//===----- COFF_arm64.cpp - JIT linker implementation for COFF/arm64 ----===//
Copy link
Contributor

Choose a reason for hiding this comment

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

This header here is not aligned with the one on line 7.

break;
}
case EdgeKind_coff_arm64::Secrel: {
// TODO
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to issue a sensible diagnostic in these cases?

@@ -5,9 +5,6 @@
#
# Use -sectcreate to create a section from a data file.

# Jitlink does not support ARM64 COFF files.
# UNSUPPORTED: target=aarch64-pc-windows-{{.*}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

@vgvassilev
Copy link
Contributor

@vgvassilev -- do you know anyone who uses aarch64/Windows?

No, I checked and I could not find a if LLVM has a build bot with that setup. I am fine moving forward even with blind eyes...

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

3 participants