-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8365579: ml64.exe is not the right assembler for Windows aarch64 #26791
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
Conversation
|
👋 Welcome back swesonga! A progress list of the required criteria for merging this PR into |
|
@swesonga This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 126 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@TheShermanTanker, @erikj79, @magicus) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
Webrevs
|
TheShermanTanker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer if -Ta could be kept somehow but there doesn't seem to be a clean way to do that, so this gets a +1 from me anyway
make/common/native/CompileFile.gmk
Outdated
| $$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \ | ||
| $$($1_COMPILER) $$($1_FLAGS) \ | ||
| $(CC_OUT_OPTION)$$($1_OBJ) -Ta $$($1_SRC_FILE))) \ | ||
| $(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE))) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you verified that removing -Ta works for the x86 assembler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you verified that removing
-Taworks for the x86 assembler?
Yes, both of these command lines work:
; "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\bin\Hostx64\x86\ml.exe" -nologo -c -Fo test_x86_assembler.obj -Ta test_x86_assembler.S
; "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\bin\Hostx64\x86\ml.exe" -nologo -c -Fo test_x86_assembler.obj test_x86_assembler.S
TEST_SEG SEGMENT
mov eax, ecx
TEST_SEG ENDS
END
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why we still have the assembler for 32 bit, as the JDK no longer supports 32 bit Windows ever since Magnus nuked it from the codebase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why we still have the assembler for 32 bit, as the JDK no longer supports 32 bit Windows ever since Magnus nuked it from the codebase
I have filed https://bugs.openjdk.org/browse/JDK-8365707 to address that issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really so? The documentation states:
/Ta filename Assembles source file whose name doesn't end with the .asm extension.
We want the compiler to actually do what we tell it to do, even if the files are named .S.
Maybe this behavior has been changed in later versions, but I am a bit wary about removing it unless we have some official confirmation that /Ta is a no-op, and/or information on which version this started to happen.
make/autoconf/toolchain.m4
Outdated
| else | ||
| # otherwise, the assembler is "ml.exe" | ||
| UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, ml) | ||
| if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then | ||
| # On Windows x64, the assembler is "ml64.exe" | ||
| UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, ml64) | ||
| else | ||
| # otherwise, the assembler is "ml.exe" | ||
| UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, ml) | ||
| fi |
There was a problem hiding this comment.
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 more readable as an elif with all the cases on the same level rather than nesting the second if/else inside the else block.
TheShermanTanker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still ok with me
|
/integrate |
| # Force preprocessor to run, just to make sure | ||
| BASIC_ASFLAGS="-x assembler-with-cpp" | ||
| elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then | ||
| BASIC_ASFLAGS="-nologo -c" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we need to update the copyright year from 2024 to 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please that would be good.
|
I'd like to see some more investigation into the removal of An alternative to investigation is to keep it for ml64, by creating a new variable exposed to spec.gmk, similar to how cl.exe needs a |
magicus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd envisioned setting it in configure like other flags, but I guess this works. (I've always been a bit skeptical towards setting compiler "infrastructure" flags from configure, so in the long term I'd like to migrate such flags to make.)
|
/integrate |
|
/sponsor |
|
Going to push as commit a629424.
Your commit was automatically rebased without conflicts. |
|
@sendaoYan @swesonga Pushed as commit a629424. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
|
I actually missed this earlier, but I don't believe the quotes around -Ta are needed. It doesn't seem to do any harm though, so I'm not sure if anyone else would want to remove them |
|
@TheShermanTanker Good point. You are correct; they should not have been there (to follow our style), but they should be harmless (I assume @swesonga tested that it still works with x64). |
Thanks for catching this. I've filed https://bugs.openjdk.org/browse/JDK-8366195 to clean it up |
Yes, it still works with x64. I'll clean up the quotes in https://bugs.openjdk.org/browse/JDK-8366195 though |
ml64 is set as the assembler for the Windows platform but is specific to the x64 platform. The armasm64 assembler should be used for Windows AArch64.
The -c and -Ta options are only valid for ml64 and -Ta can be removed from CompileFile.gmk (assembling for x64 works without it).
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26791/head:pull/26791$ git checkout pull/26791Update a local copy of the PR:
$ git checkout pull/26791$ git pull https://git.openjdk.org/jdk.git pull/26791/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26791View PR using the GUI difftool:
$ git pr show -t 26791Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26791.diff
Using Webrev
Link to Webrev Comment