[jdk11u-dev] RFR: 8254072: AArch64: Get rid of --disable-warnings-as-errors on Windows+ARM64 build [v5]

Ahmed Muhsin duke at openjdk.java.net
Thu Feb 24 00:57:11 UTC 2022


On Tue, 15 Feb 2022 21:30:37 GMT, Reka Kovacs <rkovacs at openjdk.org> wrote:

>> Despite its title, this patch only touches common code that's present before adding Windows/AArch64 support. Not a clean backport. Differences to the original commit:
>> 
>> - This is the first time we disable an MSVC warning for hotspot in 11, so in  `make/hotspot/lib/CompileJvm.gmk` this introduces a new `DISABLED_WARNINGS_microsoft` line.
>> - We disable the same warning in  `make/hotspot/lib/CompileGtest.gmk`.
>> - A tiny useless switch is removed from `src/hotspot/cpu/aarch64/aarch64.ad` that's no longer present on tip (probably not worth a separate PR).
>> - <s>Changes to `src/hotspot/cpu/aarch64/frame_aarch64.cpp` don't yet include the changes from #215.</s>
>> - The assert on line 1477 in `src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp` needed some adjustment to compile. (I'm not sure how it compiles on tip, as I don't see `-Wsign-compare` turned off there either, but the types seem to be the same.)
>> 
>> This is part of the Windows/AArch64 port.
>
> Reka Kovacs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits:
> 
>  - Replace C-style casts with checked_cast
>  - Use size_t in generate_disjoint_copy
>  - Explain disabled MSVC warning C4146 in comment
>  - Fix MSVC warning C4334: result of 32-bit shift implicitly converted to 64 bits
>  - Backport d2812f780e87511736f2d41bc57a69c2a898b583

src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp line 92:

> 90:                                              (uint64_t)Universe::narrow_klass_base())
> 91:          && ((uint64_t)Universe::narrow_klass_base()
> 92:              > (1UL << log2_intptr((uintptr_t)Universe::narrow_klass_range()))));

I am getting a build issue when building on MacOS/aarch64 12.2.1 using Xcode 13.1. The cause being the `uintptr_t` cast that was removed from line 92. 

I resolved the issue by adding the cast back like so:
`             > (1UL << log2_intptr(checked_cast<uintptr_t>(Universe::narrow_klass_range())))));`

If all looks well, I will have a colleague with Author status go ahead and create an issue on JBS for me so I can then submit the fix.

Here's the build error:

 $ make images CONF=macosx-aarch64-normal-server-release
Building target 'images' in configuration 'macosx-aarch64-normal-server-release'
In file included from /Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/precompiled/precompiled.hpp:111:
In file included from /Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/interpreter/abstractInterpreter.hpp:28:
In file included from /Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/asm/macroAssembler.hpp:31:

-------------

PR: https://git.openjdk.java.net/jdk11u-dev/pull/280


More information about the jdk-updates-dev mailing list