mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2026-01-18 14:31:43 +01:00
Compare commits
126 Commits
ngubarkov/
...
jbr21.75
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc51a81cbe | ||
|
|
f14d82ff0c | ||
|
|
5ef69a60cc | ||
|
|
fe9b8974ef | ||
|
|
234fecbc23 | ||
|
|
798265a6f6 | ||
|
|
df9f90246d | ||
|
|
b391f46a69 | ||
|
|
7800bc0ad6 | ||
|
|
3c95b2ab05 | ||
|
|
50f7f63294 | ||
|
|
7d6c93fd13 | ||
|
|
928092516f | ||
|
|
9641d23fb5 | ||
|
|
df9bd4f752 | ||
|
|
c2cb3bf7b2 | ||
|
|
f8a4c82f23 | ||
|
|
305fb08323 | ||
|
|
07ed3a7ef6 | ||
|
|
25181ee8c6 | ||
|
|
a13b0f8c9c | ||
|
|
e8fc186488 | ||
|
|
8cfc681968 | ||
|
|
b901d0a01b | ||
|
|
8102d33642 | ||
|
|
54431ca2d9 | ||
|
|
3591d5ba83 | ||
|
|
25aa746316 | ||
|
|
5ad7c43615 | ||
|
|
89f234131a | ||
|
|
8699ddeaf0 | ||
|
|
46cb10955c | ||
|
|
114dd6eff5 | ||
|
|
4e072d85c8 | ||
|
|
d4db154c53 | ||
|
|
03b143be1a | ||
|
|
0036279ab3 | ||
|
|
6b774448b6 | ||
|
|
2fc90cab62 | ||
|
|
830cdc38c2 | ||
|
|
38c4eda591 | ||
|
|
611f7b8d3f | ||
|
|
78390c5b79 | ||
|
|
458a0ec1b6 | ||
|
|
4ea4a39c29 | ||
|
|
8bd980ee56 | ||
|
|
170163a8c5 | ||
|
|
c3eaf3d682 | ||
|
|
1da072b8ff | ||
|
|
0ea078f6f8 | ||
|
|
13791c5e84 | ||
|
|
fcaf06808d | ||
|
|
fb30d11911 | ||
|
|
ece8279ce4 | ||
|
|
b7488da615 | ||
|
|
6fb37aeb60 | ||
|
|
cc738a2444 | ||
|
|
49ad75d966 | ||
|
|
795177b594 | ||
|
|
3ece728ae5 | ||
|
|
da8cea6c82 | ||
|
|
fd57ef34ca | ||
|
|
ae5a32664d | ||
|
|
34a1dd97bc | ||
|
|
fd3350053d | ||
|
|
943ffc6753 | ||
|
|
0c78f34539 | ||
|
|
22e6f5e083 | ||
|
|
39b64c3887 | ||
|
|
1c99766061 | ||
|
|
c984bf720d | ||
|
|
2714987127 | ||
|
|
e1558d4bb7 | ||
|
|
ff783d4cc5 | ||
|
|
144cb6adfa | ||
|
|
99d02d2983 | ||
|
|
e11f5aae2a | ||
|
|
9240a5f7aa | ||
|
|
570a5ab7a4 | ||
|
|
b0963c7969 | ||
|
|
7cc8ad9829 | ||
|
|
e5a46e1422 | ||
|
|
46dfc32321 | ||
|
|
5afb009201 | ||
|
|
73cfdbaecd | ||
|
|
2ee398d8c5 | ||
|
|
44838e2d85 | ||
|
|
2df686d193 | ||
|
|
a2653d6645 | ||
|
|
0d4c0dff13 | ||
|
|
0c23538473 | ||
|
|
059a49f44a | ||
|
|
1a07cb8f17 | ||
|
|
dbee04674b | ||
|
|
dc99c51416 | ||
|
|
a4dd8c1033 | ||
|
|
b282302881 | ||
|
|
10a9ca00bc | ||
|
|
213688bcd7 | ||
|
|
17a0dc4fe8 | ||
|
|
434d5f6c5a | ||
|
|
21ab23c568 | ||
|
|
f73e9e6a90 | ||
|
|
f536cacc9d | ||
|
|
48591d1ff0 | ||
|
|
46c8a37ed6 | ||
|
|
4117176422 | ||
|
|
3604e76e6f | ||
|
|
c32617e2ad | ||
|
|
c5c11f16de | ||
|
|
6575829c15 | ||
|
|
de6d58b4ef | ||
|
|
e88982042a | ||
|
|
7d169aff12 | ||
|
|
9e7831e229 | ||
|
|
05526b781d | ||
|
|
165238f13a | ||
|
|
b4610bc7aa | ||
|
|
5d2c730d9d | ||
|
|
1391d10279 | ||
|
|
1a22a900a4 | ||
|
|
066f79723a | ||
|
|
940acca0d6 | ||
|
|
4db9cff6e7 | ||
|
|
05c172cf3a | ||
|
|
675f4137cf |
4
.github/actions/get-jtreg/action.yml
vendored
4
.github/actions/get-jtreg/action.yml
vendored
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -57,7 +57,7 @@ runs:
|
||||
- name: 'Build JTReg'
|
||||
run: |
|
||||
# Build JTReg and move files to the proper locations
|
||||
bash make/build.sh --jdk "$JAVA_HOME_17_X64"
|
||||
bash make/build.sh --jdk "$JAVA_HOME_11_X64"
|
||||
mkdir ../installed
|
||||
mv build/images/jtreg/* ../installed
|
||||
working-directory: jtreg/src
|
||||
|
||||
3
.github/actions/get-msys2/action.yml
vendored
3
.github/actions/get-msys2/action.yml
vendored
@@ -30,8 +30,7 @@ runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Install MSYS2'
|
||||
# use a specific release of msys2/setup-msys2 to prevent jtreg build failures on newer release
|
||||
uses: msys2/setup-msys2@7efe20baefed56359985e327d329042cde2434ff
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
install: 'autoconf tar unzip zip make'
|
||||
path-type: minimal
|
||||
|
||||
16
.github/workflows/build-windows.yml
vendored
16
.github/workflows/build-windows.yml
vendored
@@ -98,26 +98,12 @@ jobs:
|
||||
id: gtest
|
||||
uses: ./.github/actions/get-gtest
|
||||
|
||||
- name: 'Check toolchain installed'
|
||||
id: toolchain-check
|
||||
run: |
|
||||
set +e
|
||||
'/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/vc/auxiliary/build/vcvars64.bat' -vcvars_ver=${{ inputs.msvc-toolset-version }}
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Toolchain is already installed"
|
||||
echo "toolchain-installed=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Toolchain is not yet installed"
|
||||
echo "toolchain-installed=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: 'Install toolchain and dependencies'
|
||||
run: |
|
||||
# Run Visual Studio Installer
|
||||
'/c/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe' \
|
||||
modify --quiet --installPath 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise' \
|
||||
modify --quiet --installPath 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise' \
|
||||
--add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.${{ inputs.msvc-toolset-architecture }}
|
||||
if: steps.toolchain-check.outputs.toolchain-installed != 'true'
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
|
||||
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@@ -145,7 +145,7 @@ jobs:
|
||||
apt-architecture: 'i386'
|
||||
# Some multilib libraries do not have proper inter-dependencies, so we have to
|
||||
# install their dependencies manually.
|
||||
apt-extra-packages: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libc6-i386 libgcc-s1:i386 libstdc++6:i386'
|
||||
apt-extra-packages: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libc6-i386'
|
||||
extra-conf-options: '--with-target-bits=32'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
|
||||
@@ -80,7 +80,6 @@ id="toc-getting-jdk-binaries">Getting JDK binaries</a></li>
|
||||
id="toc-external-library-requirements">External Library Requirements</a>
|
||||
<ul>
|
||||
<li><a href="#freetype" id="toc-freetype">FreeType</a></li>
|
||||
<li><a href="#fontconfig" id="toc-fontconfig">Fontconfig</a></li>
|
||||
<li><a href="#cups" id="toc-cups">CUPS</a></li>
|
||||
<li><a href="#x11" id="toc-x11">X11</a></li>
|
||||
<li><a href="#alsa" id="toc-alsa">ALSA</a></li>
|
||||
@@ -324,7 +323,6 @@ GB of free disk space is required.</p>
|
||||
<p>Even for 32-bit builds, it is recommended to use a 64-bit build
|
||||
machine, and instead create a 32-bit target using
|
||||
<code>--with-target-bits=32</code>.</p>
|
||||
<p>Note: The Windows 32-bit x86 port is deprecated and may be removed in a future release.</p>
|
||||
<h3 id="building-on-aarch64">Building on aarch64</h3>
|
||||
<p>At a minimum, a machine with 8 cores is advisable, as well as 8 GB of
|
||||
RAM. (The more cores to use, the more memory you need.) At least 6 GB of
|
||||
@@ -355,22 +353,22 @@ to date at the time of writing.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th>Operating system</th>
|
||||
<th>Vendor/version used</th>
|
||||
<th style="text-align: left;">Operating system</th>
|
||||
<th style="text-align: left;">Vendor/version used</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td>Linux</td>
|
||||
<td>Oracle Enterprise Linux 6.4 / 7.6</td>
|
||||
<td style="text-align: left;">Linux</td>
|
||||
<td style="text-align: left;">Oracle Enterprise Linux 6.4 / 7.6</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>macOS</td>
|
||||
<td>Mac OS X 10.13 (High Sierra)</td>
|
||||
<td style="text-align: left;">macOS</td>
|
||||
<td style="text-align: left;">Mac OS X 10.13 (High Sierra)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>Windows</td>
|
||||
<td>Windows Server 2012 R2</td>
|
||||
<td style="text-align: left;">Windows</td>
|
||||
<td style="text-align: left;">Windows Server 2012 R2</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -401,7 +399,6 @@ to the build system, e.g. in arguments to <code>configure</code>. So,
|
||||
use <code>--with-msvcr-dll=/cygdrive/c/msvcr100.dll</code> rather than
|
||||
<code>--with-msvcr-dll=c:\msvcr100.dll</code>. For details on this
|
||||
conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
|
||||
<p>Note: The Windows 32-bit x86 port is deprecated and may be removed in a future release.</p>
|
||||
<h4 id="cygwin">Cygwin</h4>
|
||||
<p>A functioning <a href="http://www.cygwin.com/">Cygwin</a> environment
|
||||
is required for building the JDK on Windows. If you have a 64-bit OS, we
|
||||
@@ -680,19 +677,6 @@ copy.</p>
|
||||
<p>Use <code>--with-freetype-include=<path></code> and
|
||||
<code>--with-freetype-lib=<path></code> if <code>configure</code>
|
||||
does not automatically locate the platform FreeType files.</p>
|
||||
<h3 id="fontconfig">Fontconfig</h3>
|
||||
<p>Fontconfig from <a href="http://fontconfig.org">freedesktop.org
|
||||
Fontconfig</a> is required on all platforms except Windows and
|
||||
macOS.</p>
|
||||
<ul>
|
||||
<li>To install on an apt-based Linux, try running
|
||||
<code>sudo apt-get install libfontconfig-dev</code>.</li>
|
||||
<li>To install on an rpm-based Linux, try running
|
||||
<code>sudo yum install fontconfig-devel</code>.</li>
|
||||
</ul>
|
||||
<p>Use <code>--with-fontconfig-include=<path></code> and
|
||||
<code>--with-fontconfig=<path></code> if <code>configure</code>
|
||||
does not automatically locate the platform Fontconfig files.</p>
|
||||
<h3 id="cups">CUPS</h3>
|
||||
<p>CUPS, <a href="http://www.cups.org">Common UNIX Printing System</a>
|
||||
header files are required on all platforms, except Windows. Often these
|
||||
@@ -1211,27 +1195,27 @@ following targets are known to work:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th>Supported devkit targets</th>
|
||||
<th style="text-align: left;">Supported devkit targets</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td>x86_64-linux-gnu</td>
|
||||
<td style="text-align: left;">x86_64-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>aarch64-linux-gnu</td>
|
||||
<td style="text-align: left;">aarch64-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>arm-linux-gnueabihf</td>
|
||||
<td style="text-align: left;">arm-linux-gnueabihf</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>ppc64-linux-gnu</td>
|
||||
<td style="text-align: left;">ppc64-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>ppc64le-linux-gnu</td>
|
||||
<td style="text-align: left;">ppc64le-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>s390x-linux-gnu</td>
|
||||
<td style="text-align: left;">s390x-linux-gnu</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1433,119 +1417,112 @@ example <code>${sysroot}/usr/lib/${target}/</code></p></li>
|
||||
<p>Architectures that are known to successfully cross-compile like this
|
||||
are:</p>
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width: 13%" />
|
||||
<col style="width: 13%" />
|
||||
<col style="width: 15%" />
|
||||
<col style="width: 27%" />
|
||||
<col style="width: 29%" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th>Target</th>
|
||||
<th>Debian tree</th>
|
||||
<th>Debian arch</th>
|
||||
<th><code>--openjdk-target=...</code></th>
|
||||
<th style="text-align: left;">Target</th>
|
||||
<th style="text-align: left;">Debian tree</th>
|
||||
<th style="text-align: left;">Debian arch</th>
|
||||
<th style="text-align: left;"><code>--openjdk-target=...</code></th>
|
||||
<th><code>--with-jvm-variants=...</code></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td>x86</td>
|
||||
<td>buster</td>
|
||||
<td>i386</td>
|
||||
<td>i386-linux-gnu</td>
|
||||
<td style="text-align: left;">x86</td>
|
||||
<td style="text-align: left;">buster</td>
|
||||
<td style="text-align: left;">i386</td>
|
||||
<td style="text-align: left;">i386-linux-gnu</td>
|
||||
<td>(all)</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>arm</td>
|
||||
<td>buster</td>
|
||||
<td>armhf</td>
|
||||
<td>arm-linux-gnueabihf</td>
|
||||
<td style="text-align: left;">arm</td>
|
||||
<td style="text-align: left;">buster</td>
|
||||
<td style="text-align: left;">armhf</td>
|
||||
<td style="text-align: left;">arm-linux-gnueabihf</td>
|
||||
<td>(all)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>aarch64</td>
|
||||
<td>buster</td>
|
||||
<td>arm64</td>
|
||||
<td>aarch64-linux-gnu</td>
|
||||
<td style="text-align: left;">aarch64</td>
|
||||
<td style="text-align: left;">buster</td>
|
||||
<td style="text-align: left;">arm64</td>
|
||||
<td style="text-align: left;">aarch64-linux-gnu</td>
|
||||
<td>(all)</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>ppc64le</td>
|
||||
<td>buster</td>
|
||||
<td>ppc64el</td>
|
||||
<td>powerpc64le-linux-gnu</td>
|
||||
<td style="text-align: left;">ppc64le</td>
|
||||
<td style="text-align: left;">buster</td>
|
||||
<td style="text-align: left;">ppc64el</td>
|
||||
<td style="text-align: left;">powerpc64le-linux-gnu</td>
|
||||
<td>(all)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>s390x</td>
|
||||
<td>buster</td>
|
||||
<td>s390x</td>
|
||||
<td>s390x-linux-gnu</td>
|
||||
<td style="text-align: left;">s390x</td>
|
||||
<td style="text-align: left;">buster</td>
|
||||
<td style="text-align: left;">s390x</td>
|
||||
<td style="text-align: left;">s390x-linux-gnu</td>
|
||||
<td>(all)</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>mipsle</td>
|
||||
<td>buster</td>
|
||||
<td>mipsel</td>
|
||||
<td>mipsel-linux-gnu</td>
|
||||
<td style="text-align: left;">mipsle</td>
|
||||
<td style="text-align: left;">buster</td>
|
||||
<td style="text-align: left;">mipsel</td>
|
||||
<td style="text-align: left;">mipsel-linux-gnu</td>
|
||||
<td>zero</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>mips64le</td>
|
||||
<td>buster</td>
|
||||
<td>mips64el</td>
|
||||
<td>mips64el-linux-gnueabi64</td>
|
||||
<td style="text-align: left;">mips64le</td>
|
||||
<td style="text-align: left;">buster</td>
|
||||
<td style="text-align: left;">mips64el</td>
|
||||
<td style="text-align: left;">mips64el-linux-gnueabi64</td>
|
||||
<td>zero</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>armel</td>
|
||||
<td>buster</td>
|
||||
<td>arm</td>
|
||||
<td>arm-linux-gnueabi</td>
|
||||
<td style="text-align: left;">armel</td>
|
||||
<td style="text-align: left;">buster</td>
|
||||
<td style="text-align: left;">arm</td>
|
||||
<td style="text-align: left;">arm-linux-gnueabi</td>
|
||||
<td>zero</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>ppc</td>
|
||||
<td>sid</td>
|
||||
<td>powerpc</td>
|
||||
<td>powerpc-linux-gnu</td>
|
||||
<td style="text-align: left;">ppc</td>
|
||||
<td style="text-align: left;">sid</td>
|
||||
<td style="text-align: left;">powerpc</td>
|
||||
<td style="text-align: left;">powerpc-linux-gnu</td>
|
||||
<td>zero</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>ppc64be</td>
|
||||
<td>sid</td>
|
||||
<td>ppc64</td>
|
||||
<td>powerpc64-linux-gnu</td>
|
||||
<td style="text-align: left;">ppc64be</td>
|
||||
<td style="text-align: left;">sid</td>
|
||||
<td style="text-align: left;">ppc64</td>
|
||||
<td style="text-align: left;">powerpc64-linux-gnu</td>
|
||||
<td>(all)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>m68k</td>
|
||||
<td>sid</td>
|
||||
<td>m68k</td>
|
||||
<td>m68k-linux-gnu</td>
|
||||
<td style="text-align: left;">m68k</td>
|
||||
<td style="text-align: left;">sid</td>
|
||||
<td style="text-align: left;">m68k</td>
|
||||
<td style="text-align: left;">m68k-linux-gnu</td>
|
||||
<td>zero</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>alpha</td>
|
||||
<td>sid</td>
|
||||
<td>alpha</td>
|
||||
<td>alpha-linux-gnu</td>
|
||||
<td style="text-align: left;">alpha</td>
|
||||
<td style="text-align: left;">sid</td>
|
||||
<td style="text-align: left;">alpha</td>
|
||||
<td style="text-align: left;">alpha-linux-gnu</td>
|
||||
<td>zero</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>sh4</td>
|
||||
<td>sid</td>
|
||||
<td>sh4</td>
|
||||
<td>sh4-linux-gnu</td>
|
||||
<td style="text-align: left;">sh4</td>
|
||||
<td style="text-align: left;">sid</td>
|
||||
<td style="text-align: left;">sh4</td>
|
||||
<td style="text-align: left;">sh4-linux-gnu</td>
|
||||
<td>zero</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>riscv64</td>
|
||||
<td>sid</td>
|
||||
<td>riscv64</td>
|
||||
<td>riscv64-linux-gnu</td>
|
||||
<td style="text-align: left;">riscv64</td>
|
||||
<td style="text-align: left;">sid</td>
|
||||
<td style="text-align: left;">riscv64</td>
|
||||
<td style="text-align: left;">riscv64-linux-gnu</td>
|
||||
<td>(all)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -126,8 +126,6 @@ space is required.
|
||||
Even for 32-bit builds, it is recommended to use a 64-bit build machine, and
|
||||
instead create a 32-bit target using `--with-target-bits=32`.
|
||||
|
||||
Note: The Windows 32-bit x86 port is deprecated and may be removed in a future release.
|
||||
|
||||
### Building on aarch64
|
||||
|
||||
At a minimum, a machine with 8 cores is advisable, as well as 8 GB of RAM.
|
||||
@@ -164,11 +162,11 @@ This table lists the OS versions used by Oracle when building the JDK. Such
|
||||
information is always subject to change, but this table is up to date at the
|
||||
time of writing.
|
||||
|
||||
| Operating system | Vendor/version used |
|
||||
| ----------------- | ---------------------------------- |
|
||||
| Linux | Oracle Enterprise Linux 6.4 / 7.6 |
|
||||
| macOS | Mac OS X 10.13 (High Sierra) |
|
||||
| Windows | Windows Server 2012 R2 |
|
||||
Operating system Vendor/version used
|
||||
----------------- -------------------------------------------------------
|
||||
Linux Oracle Enterprise Linux 6.4 / 7.6
|
||||
macOS Mac OS X 10.13 (High Sierra)
|
||||
Windows Windows Server 2012 R2
|
||||
|
||||
The double version numbers for Linux are due to the hybrid model
|
||||
used at Oracle, where header files and external libraries from an older version
|
||||
@@ -201,8 +199,6 @@ rule also applies to input to the build system, e.g. in arguments to
|
||||
`--with-msvcr-dll=c:\msvcr100.dll`. For details on this conversion, see the section
|
||||
on [Fixpath](#fixpath).
|
||||
|
||||
Note: The Windows 32-bit x86 port is deprecated and may be removed in a future release.
|
||||
|
||||
#### Cygwin
|
||||
|
||||
A functioning [Cygwin](http://www.cygwin.com/) environment is required for
|
||||
@@ -475,19 +471,6 @@ rather than bundling the JDK's own copy.
|
||||
Use `--with-freetype-include=<path>` and `--with-freetype-lib=<path>`
|
||||
if `configure` does not automatically locate the platform FreeType files.
|
||||
|
||||
### Fontconfig
|
||||
|
||||
Fontconfig from [freedesktop.org Fontconfig](http://fontconfig.org) is required
|
||||
on all platforms except Windows and macOS.
|
||||
|
||||
* To install on an apt-based Linux, try running `sudo apt-get install
|
||||
libfontconfig-dev`.
|
||||
* To install on an rpm-based Linux, try running `sudo yum install
|
||||
fontconfig-devel`.
|
||||
|
||||
Use `--with-fontconfig-include=<path>` and `--with-fontconfig=<path>`
|
||||
if `configure` does not automatically locate the platform Fontconfig files.
|
||||
|
||||
### CUPS
|
||||
|
||||
CUPS, [Common UNIX Printing System](http://www.cups.org) header files are
|
||||
@@ -987,14 +970,14 @@ https://sourceware.org/autobook/autobook/autobook_17.html). If no
|
||||
targets are given, a native toolchain for the current platform will be
|
||||
created. Currently, at least the following targets are known to work:
|
||||
|
||||
| Supported devkit targets |
|
||||
| ------------------------ |
|
||||
| x86_64-linux-gnu |
|
||||
| aarch64-linux-gnu |
|
||||
| arm-linux-gnueabihf |
|
||||
| ppc64-linux-gnu |
|
||||
| ppc64le-linux-gnu |
|
||||
| s390x-linux-gnu |
|
||||
Supported devkit targets
|
||||
-------------------------
|
||||
x86_64-linux-gnu
|
||||
aarch64-linux-gnu
|
||||
arm-linux-gnueabihf
|
||||
ppc64-linux-gnu
|
||||
ppc64le-linux-gnu
|
||||
s390x-linux-gnu
|
||||
|
||||
`BASE_OS` must be one of "OEL6" for Oracle Enterprise Linux 6 or
|
||||
"Fedora" (if not specified "OEL6" will be the default). If the base OS
|
||||
@@ -1221,22 +1204,22 @@ it might require a little nudge with:
|
||||
|
||||
Architectures that are known to successfully cross-compile like this are:
|
||||
|
||||
| Target | Debian tree | Debian arch | `--openjdk-target=...` | `--with-jvm-variants=...` |
|
||||
| ------------ | ------------ | ------------- | ------------------------ | ------------------------- |
|
||||
| x86 | buster | i386 | i386-linux-gnu | (all) |
|
||||
| arm | buster | armhf | arm-linux-gnueabihf | (all) |
|
||||
| aarch64 | buster | arm64 | aarch64-linux-gnu | (all) |
|
||||
| ppc64le | buster | ppc64el | powerpc64le-linux-gnu | (all) |
|
||||
| s390x | buster | s390x | s390x-linux-gnu | (all) |
|
||||
| mipsle | buster | mipsel | mipsel-linux-gnu | zero |
|
||||
| mips64le | buster | mips64el | mips64el-linux-gnueabi64 | zero |
|
||||
| armel | buster | arm | arm-linux-gnueabi | zero |
|
||||
| ppc | sid | powerpc | powerpc-linux-gnu | zero |
|
||||
| ppc64be | sid | ppc64 | powerpc64-linux-gnu | (all) |
|
||||
| m68k | sid | m68k | m68k-linux-gnu | zero |
|
||||
| alpha | sid | alpha | alpha-linux-gnu | zero |
|
||||
| sh4 | sid | sh4 | sh4-linux-gnu | zero |
|
||||
| riscv64 | sid | riscv64 | riscv64-linux-gnu | (all) |
|
||||
Target Debian tree Debian arch `--openjdk-target=...` `--with-jvm-variants=...`
|
||||
------------ ------------ ------------- ------------------------ --------------
|
||||
x86 buster i386 i386-linux-gnu (all)
|
||||
arm buster armhf arm-linux-gnueabihf (all)
|
||||
aarch64 buster arm64 aarch64-linux-gnu (all)
|
||||
ppc64le buster ppc64el powerpc64le-linux-gnu (all)
|
||||
s390x buster s390x s390x-linux-gnu (all)
|
||||
mipsle buster mipsel mipsel-linux-gnu zero
|
||||
mips64le buster mips64el mips64el-linux-gnueabi64 zero
|
||||
armel buster arm arm-linux-gnueabi zero
|
||||
ppc sid powerpc powerpc-linux-gnu zero
|
||||
ppc64be sid ppc64 powerpc64-linux-gnu (all)
|
||||
m68k sid m68k m68k-linux-gnu zero
|
||||
alpha sid alpha alpha-linux-gnu zero
|
||||
sh4 sid sh4 sh4-linux-gnu zero
|
||||
riscv64 sid riscv64 riscv64-linux-gnu (all)
|
||||
|
||||
### Building for ARM/aarch64
|
||||
|
||||
|
||||
@@ -426,14 +426,6 @@ GB/2</em>.</p>
|
||||
<p>Sets the argument <code>-timeoutHandlerTimeout</code> for JTReg. The
|
||||
default value is 0. This is only valid if the failure handler is
|
||||
built.</p>
|
||||
<h4 id="jtreg_test_thread_factory">JTREG_TEST_THREAD_FACTORY</h4>
|
||||
<p>Sets the <code>-testThreadFactory</code> for JTReg. It should be the
|
||||
fully qualified classname of a class which implements
|
||||
<code>java.util.concurrent.ThreadFactory</code>. One such implementation
|
||||
class, named Virtual, is currently part of the JDK build in the
|
||||
<code>test/jtreg_test_thread_factory/</code> directory. This class gets
|
||||
compiled during the test image build. The implementation of the Virtual
|
||||
class creates a new virtual thread for executing each test class.</p>
|
||||
<h4 id="test_mode">TEST_MODE</h4>
|
||||
<p>The test mode (<code>agentvm</code> or <code>othervm</code>).</p>
|
||||
<p>Defaults to <code>agentvm</code>.</p>
|
||||
|
||||
@@ -378,15 +378,6 @@ Defaults to 4.
|
||||
Sets the argument `-timeoutHandlerTimeout` for JTReg. The default value is 0.
|
||||
This is only valid if the failure handler is built.
|
||||
|
||||
#### JTREG_TEST_THREAD_FACTORY
|
||||
|
||||
Sets the `-testThreadFactory` for JTReg. It should be the fully qualified classname
|
||||
of a class which implements `java.util.concurrent.ThreadFactory`.
|
||||
One such implementation class, named Virtual, is currently part of the JDK build
|
||||
in the `test/jtreg_test_thread_factory/` directory. This class gets compiled during
|
||||
the test image build. The implementation of the Virtual class creates a new virtual
|
||||
thread for executing each test class.
|
||||
|
||||
#### TEST_MODE
|
||||
|
||||
The test mode (`agentvm` or `othervm`).
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
SCANNER=wayland-scanner
|
||||
else
|
||||
SCANNER="$1"
|
||||
fi
|
||||
|
||||
set -ex
|
||||
|
||||
"$SCANNER" client-header src/java.desktop/share/native/libwakefield/protocol/wakefield.xml src/java.desktop/unix/native/libawt_wlawt/wakefield-client-protocol.h
|
||||
"$SCANNER" private-code src/java.desktop/share/native/libwakefield/protocol/wakefield.xml src/java.desktop/unix/native/libawt_wlawt/wakefield-client-protocol.c
|
||||
13
jb/project/docker/Dockerfile
Normal file
13
jb/project/docker/Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
# jetbrains/runtime:jbr15env
|
||||
FROM centos:7
|
||||
RUN yum -y install centos-release-scl
|
||||
RUN yum -y install devtoolset-8
|
||||
RUN yum -y install zip bzip2 unzip tar wget make autoconf automake libtool gcc gcc-c++ libstdc++-devel alsa-devel cups-devel xorg-x11-devel libjpeg62-devel giflib-devel freetype-devel file which libXtst-devel libXt-devel libXrender-devel alsa-lib-devel fontconfig-devel libXrandr-devel libXi-devel git
|
||||
# Install Java 16
|
||||
RUN wget https://cdn.azul.com/zulu/bin/zulu17.28.13-ca-jdk17.0.0-linux_x64.tar.gz \
|
||||
-O - | tar xz -C /
|
||||
RUN mv /zulu17.28.13-ca-jdk17.0.0-linux_x64 /jdk17.0.0
|
||||
ENV PATH /opt/rh/devtoolset-8/root/usr/bin:$PATH
|
||||
RUN mkdir .git
|
||||
RUN git config user.email "teamcity@jetbrains.com"
|
||||
RUN git config user.name "builduser"
|
||||
@@ -5,42 +5,44 @@
|
||||
# image creation reproducible.
|
||||
# NB: this also means there may be no security-related fixes there, need to
|
||||
# move the version to the next manually.
|
||||
|
||||
# jetbrains/runtime:jbr17env_aarch64
|
||||
FROM arm64v8/centos:7
|
||||
FROM arm64v8/ubuntu:focal-20211006
|
||||
|
||||
# Install the necessary build tools
|
||||
RUN yum -y update; \
|
||||
yum -y install centos-release-scl; \
|
||||
yum -y install devtoolset-10-10.1-0.el7; \
|
||||
yum -y install \
|
||||
alsa-lib-devel-1.1.8-1.el7.aarch64 \
|
||||
autoconf-2.69-11.el7.noarch \
|
||||
automake-1.13.4-3.el7.noarch \
|
||||
bzip2-1.0.6-13.el7.aarch64 \
|
||||
cups-devel-1.6.3-51.el7.aarch64 \
|
||||
file-5.11-37.el7.aarch64 \
|
||||
fontconfig-devel-2.13.0-4.3.el7.aarch64 \
|
||||
freetype-devel-2.8-14.el7_9.1.aarch64 \
|
||||
giflib-devel-4.1.6-9.el7.aarch64 \
|
||||
git-1.8.3.1-24.el7_9.aarch64 \
|
||||
libtool-2.4.2-22.el7_3.aarch64 \
|
||||
libXi-devel-1.7.9-1.el7.aarch64 \
|
||||
libXrandr-devel-1.5.1-2.el7.aarch64 \
|
||||
libXrender-devel-0.9.10-1.el7.aarch64 \
|
||||
libXt-devel-1.1.5-3.el7.aarch64 \
|
||||
libXtst-devel-1.2.3-1.el7.aarch64 \
|
||||
make-3.82-24.el7.aarch64 \
|
||||
rsync-3.1.2-12.el7_9.aarch64 \
|
||||
tar-1.26-35.el7.aarch64 \
|
||||
unzip-6.0-24.el7_9.aarch64 \
|
||||
wayland-devel-1.15.0-1.el7 \
|
||||
zip-3.0-11.el7.aarch64; \
|
||||
yum -y clean all
|
||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
export DEBCONF_NONINTERACTIVE_SEEN=true && \
|
||||
echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \
|
||||
echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections; \
|
||||
apt-get update -qy && \
|
||||
apt-get install -qy \
|
||||
autoconf \
|
||||
build-essential \
|
||||
bzip2 \
|
||||
file \
|
||||
g++-10=10.3.0-1ubuntu1~20.04 \
|
||||
gcc-10=10.3.0-1ubuntu1~20.04 \
|
||||
git \
|
||||
libasound2-dev \
|
||||
libcups2-dev \
|
||||
libfontconfig1-dev \
|
||||
libx11-dev \
|
||||
libxext-dev \
|
||||
libxrandr-dev \
|
||||
libxrender-dev \
|
||||
libxt-dev \
|
||||
libxtst-dev \
|
||||
make \
|
||||
rsync \
|
||||
tar \
|
||||
unzip \
|
||||
zip && \
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 && \
|
||||
apt-get clean -qy && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
ENV PATH="/opt/rh/devtoolset-10/root/usr/bin:${PATH}"
|
||||
ENV LD_LIBRARY_PATH="/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib:/opt/rh/devtoolset-10/root/usr/lib64/dyninst:/opt/rh/devtoolset-10/root/usr/lib/dyninst:/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib"
|
||||
ENV PKG_CONFIG_PATH="/opt/rh/devtoolset-10/root/usr/lib64/pkgconfig"
|
||||
# Set up boot JDK for building
|
||||
COPY boot_jdk.tar.gz /jdk17/
|
||||
RUN cd /jdk17 && tar --strip-components=1 -xzf boot_jdk.tar.gz && rm /jdk17/boot_jdk.tar.gz
|
||||
ENV BOOT_JDK=/jdk17
|
||||
|
||||
RUN git config --global user.email "teamcity@jetbrains.com" && \
|
||||
git config --global user.name "builduser"
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
# jetbrains/runtime:jbr17env_x86_64
|
||||
FROM centos:7
|
||||
RUN yum -y install centos-release-scl; \
|
||||
yum -y install devtoolset-10-10.1-0.el7; \
|
||||
yum -y install \
|
||||
alsa-lib-devel-1.1.8-1.el7 \
|
||||
autoconf-2.69-11.el7 \
|
||||
automake-1.13.4-3.el7 \
|
||||
bzip2-1.0.6-13.el7 \
|
||||
cups-devel-1.6.3-51.el7 \
|
||||
file-5.11-37.el7 \
|
||||
fontconfig-devel-2.13.0-4.3.el7 \
|
||||
freetype-devel-2.8-14.el7_9.1 \
|
||||
giflib-devel-4.1.6-9.el7 \
|
||||
git-1.8.3.1-24.el7_9 \
|
||||
libtool-2.4.2-22.el7_3 \
|
||||
libXi-devel-1.7.9-1.el7 \
|
||||
libXrandr-devel-1.5.1-2.el7 \
|
||||
libXrender-devel-0.9.10-1.el7 \
|
||||
libXt-devel-1.1.5-3.el7 \
|
||||
libXtst-devel-1.2.3-1.el7 \
|
||||
make-3.82-24.el7 \
|
||||
tar-1.26-35.el7 \
|
||||
unzip-6.0-24.el7_9 \
|
||||
wayland-devel-1.15.0-1.el7 \
|
||||
wget-1.14-18.el7_6.1 \
|
||||
which-2.20-7.el7 \
|
||||
zip-3.0-11.el7
|
||||
|
||||
RUN mkdir .git && \
|
||||
git config user.email "teamcity@jetbrains.com" && \
|
||||
git config user.name "builduser"
|
||||
|
||||
ENV LD_LIBRARY_PATH="/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib:/opt/rh/devtoolset-10/root/usr/lib64/dyninst:/opt/rh/devtoolset-10/root/usr/lib/dyninst:/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib"
|
||||
ENV PATH="/opt/rh/devtoolset-10/root/usr/bin::${PATH}"
|
||||
ENV PKG_CONFIG_PATH="/opt/rh/devtoolset-10/root/usr/lib64/pkgconfig"
|
||||
@@ -94,7 +94,8 @@ esac
|
||||
|
||||
WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS="--with-native-debug-symbols=zipped"
|
||||
|
||||
REPRODUCIBLE_BUILD_OPTS="--with-source-date=$SOURCE_DATE_EPOCH
|
||||
REPRODUCIBLE_BUILD_OPTS="--enable-reproducible-build
|
||||
--with-source-date=$SOURCE_DATE_EPOCH
|
||||
--with-hotspot-build-time=$BUILD_TIME
|
||||
--with-copyright-year=$COPYRIGHT_YEAR
|
||||
--disable-absolute-paths-in-output
|
||||
|
||||
@@ -135,7 +135,6 @@ if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
@@ -93,7 +93,7 @@ function create_image_bundle {
|
||||
[ -f "$JBR".tar.gz ] && rm "$JBR.tar.gz"
|
||||
touch -c -d "@$SOURCE_DATE_EPOCH" "$JBR".tar
|
||||
gzip "$JBR".tar || do_exit $?
|
||||
#rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
@@ -134,7 +134,7 @@ if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
[ "$bundle_type" != "fd" ] && jbrsdk_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
#!/bin/bash
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
|
||||
|
||||
source "$SCRIPT_DIR/jetsign-common.sh" || exit 1
|
||||
|
||||
function isMacOsBinary() {
|
||||
file "$1" | grep -q 'Mach-O'
|
||||
}
|
||||
|
||||
function isSigned() {
|
||||
codesign --verify "$1" >/dev/null 2>&1 && ! grep -q Signature=adhoc < <(codesign --display --verbose "$1" 2>&1)
|
||||
}
|
||||
|
||||
# last argument is a path to be signed
|
||||
pathToBeSigned="$(pwd)/${*: -1}"
|
||||
jetSignArgs=("${@:1:$#-1}")
|
||||
if [[ ! -f "$pathToBeSigned" ]]; then
|
||||
echo "$pathToBeSigned is missing or not a file"
|
||||
exit 1
|
||||
elif isSigned "$pathToBeSigned" && ! isForced "${jetSignArgs[@]}" ; then
|
||||
echo "Already signed: $pathToBeSigned"
|
||||
elif [[ "$JETSIGN_CLIENT" == "null" ]]; then
|
||||
echo "JetSign client is missing, cannot proceed with signing"
|
||||
exit 1
|
||||
elif ! isMacOsBinary "$pathToBeSigned" && [[ "$pathToBeSigned" != *.sit ]] && [[ "$pathToBeSigned" != *.tar.gz ]]; then
|
||||
echo "$pathToBeSigned won't be signed, assumed not to be a macOS executable"
|
||||
else
|
||||
if isMacOsBinary "$pathToBeSigned" && ! isSigned "$pathToBeSigned" ; then
|
||||
echo "Unsigned macOS binary: $pathToBeSigned"
|
||||
fi
|
||||
workDir=$(dirname "$pathToBeSigned")
|
||||
pathSigned="$workDir/signed/${pathToBeSigned##*/}"
|
||||
jetSignExtensions=$(jetSignExtensions "${jetSignArgs[@]}")
|
||||
contentType=$(jetSignContentType "$pathToBeSigned")
|
||||
(
|
||||
cd "$workDir" || exit 1
|
||||
"$JETSIGN_CLIENT" -log-format text -denoted-content-type "$contentType" -extensions "$jetSignExtensions" "$pathToBeSigned"
|
||||
# SRE-1223 (Codesign removes execute bits in executable files) workaround
|
||||
chmod "$(stat -f %A "$pathToBeSigned")" "$pathSigned"
|
||||
if isMacOsBinary "$pathSigned"; then
|
||||
isSigned "$pathSigned"
|
||||
fi
|
||||
rm "$pathToBeSigned"
|
||||
mv "$pathSigned" "$pathToBeSigned"
|
||||
rm -rf "$workDir/signed"
|
||||
)
|
||||
fi
|
||||
@@ -1,63 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
function isForced() {
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" == --force ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
function jetSignExtensions() {
|
||||
args=("$@")
|
||||
((lastElementIndex=${#args[@]}-1))
|
||||
for index in "${!args[@]}"; do
|
||||
arg=${args[$index]}
|
||||
case "$arg" in
|
||||
--sign | -s)
|
||||
echo -n 'mac_codesign_identity='
|
||||
continue
|
||||
;;
|
||||
--entitlements)
|
||||
echo -n 'mac_codesign_entitlements='
|
||||
continue
|
||||
;;
|
||||
--options=runtime)
|
||||
echo -n 'mac_codesign_options=runtime'
|
||||
;;
|
||||
--force)
|
||||
echo -n 'mac_codesign_force=true'
|
||||
;;
|
||||
--timestamp | --verbose | -v)
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
echo -n "$arg"
|
||||
;;
|
||||
esac
|
||||
if [[ $index != "$lastElementIndex" ]]; then
|
||||
echo -n ","
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# See jetbrains.sign.util.FileUtil.contentType
|
||||
function jetSignContentType() {
|
||||
case "${1##*/}" in
|
||||
*.sit)
|
||||
echo -n 'application/x-mac-app-zip'
|
||||
;;
|
||||
*.tar.gz)
|
||||
echo -n 'application/x-mac-app-targz'
|
||||
;;
|
||||
*.pkg)
|
||||
echo -n 'application/x-mac-pkg'
|
||||
;;
|
||||
*)
|
||||
echo -n 'application/x-mac-app-bin'
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -81,10 +81,6 @@ function create_image_bundle {
|
||||
zip_native_debug_symbols $IMAGES_DIR/jdk-bundle/jdk-$JBSDK_VERSION.jdk "${JBR}_diz"
|
||||
fi
|
||||
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
cat $JCEF_PATH/jcef.version >> "$JRE_CONTENTS/Home/release"
|
||||
fi
|
||||
|
||||
cp -R "$JSDK"/../MacOS "$JRE_CONTENTS"
|
||||
cp "$JSDK"/../Info.plist "$JRE_CONTENTS"
|
||||
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
[[ "${SCRIPT_VERBOSE:-}" == "1" ]] && set -x
|
||||
set -x
|
||||
|
||||
APP_PATH=$1
|
||||
APP_DIRECTORY=$1
|
||||
APPL_USER=$2
|
||||
APPL_PASSWORD=$3
|
||||
APP_NAME=$4
|
||||
BUNDLE_ID=$5
|
||||
FAKE_ROOT="${6:-fake-root}"
|
||||
|
||||
if [[ -z "$APP_PATH" ]]; then
|
||||
echo "Usage: $0 AppPath"
|
||||
if [[ -z "$APP_DIRECTORY" ]] || [[ -z "$APPL_USER" ]] || [[ -z "$APPL_PASSWORD" ]]; then
|
||||
echo "Usage: $0 AppDirectory Username Password"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -f "$APP_PATH" ]]; then
|
||||
echo "AppName '$APP_PATH' does not exist or not a file"
|
||||
if [[ ! -d "$APP_DIRECTORY" ]]; then
|
||||
echo "AppDirectory '$APP_DIRECTORY' does not exist or not a directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -19,22 +23,99 @@ function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
}
|
||||
|
||||
function publish-log() {
|
||||
id=$1
|
||||
file=$2
|
||||
curl -T "$file" "$ARTIFACTORY_URL/$id" || true
|
||||
}
|
||||
|
||||
# check required parameters
|
||||
: "${APPLE_ISSUER_ID}"
|
||||
: "${APPLE_KEY_ID}"
|
||||
: "${APPLE_PRIVATE_KEY}"
|
||||
function altool-upload() {
|
||||
# Since altool uses same file for upload token we have to trick it into using different folders for token file location
|
||||
# Also it copies zip into TMPDIR so we override it too, to simplify cleanup
|
||||
OLD_HOME="$HOME"
|
||||
export HOME="$FAKE_ROOT/home"
|
||||
export TMPDIR="$FAKE_ROOT/tmp"
|
||||
mkdir -p "$HOME"
|
||||
mkdir -p "$TMPDIR"
|
||||
export _JAVA_OPTIONS="-Duser.home=$HOME -Djava.io.tmpdir=$TMPDIR"
|
||||
# Reduce amount of downloads, cache transporter libraries
|
||||
shared_itmstransporter="$OLD_HOME/shared-itmstransporter"
|
||||
if [[ -f "$shared_itmstransporter" ]]; then
|
||||
cp -r "$shared_itmstransporter" "$HOME/.itmstransporter"
|
||||
fi
|
||||
# For some reason altool prints everything to stderr, not stdout
|
||||
set +e
|
||||
xcrun altool --notarize-app \
|
||||
--username "$APPL_USER" --password "$APPL_PASSWORD" \
|
||||
--primary-bundle-id "$BUNDLE_ID" \
|
||||
--asc-provider JetBrainssro --file "$1" 2>&1 | tee "altool.init.out"
|
||||
unset TMPDIR
|
||||
export HOME="$OLD_HOME"
|
||||
set -e
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2064
|
||||
trap "rm -f \"$PWD/tmp_key\"" INT EXIT RETURN
|
||||
echo -n "${APPLE_PRIVATE_KEY}" > tmp_key
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
|
||||
log "Notarizing $APP_PATH..."
|
||||
xcrun notarytool submit --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" "$APP_PATH" 2>&1 | tee "notarytool.submit.out"
|
||||
REQUEST_ID="$(grep -e " id: " "notarytool.submit.out" | grep -oE '([0-9a-f-]{36})'| head -n1)"
|
||||
#file="$APP_NAME.zip"
|
||||
|
||||
xcrun notarytool wait "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" --timeout 6h ||:
|
||||
xcrun notarytool log "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" developer_log.json ||:
|
||||
xcrun notarytool info "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}"
|
||||
#log "Zipping $file..."
|
||||
#rm -rf "$file"
|
||||
#ditto -c -k --sequesterRsrc --keepParent "$APP_DIRECTORY" "$file"
|
||||
|
||||
log "Notarizing finished"
|
||||
log "Notarizing $APP_NAME..."
|
||||
rm -rf "altool.init.out" "altool.check.out"
|
||||
altool-upload "$APP_NAME"
|
||||
|
||||
notarization_info="$(grep -e "RequestUUID" "altool.init.out" | grep -oE '([0-9a-f-]{36})')"
|
||||
|
||||
if [ -z "$notarization_info" ]; then
|
||||
log "Faile to read RequestUUID from altool.init.out"
|
||||
exit 10
|
||||
fi
|
||||
|
||||
PATH="$PATH:/usr/local/bin/"
|
||||
|
||||
log "Notarization request sent, awaiting response"
|
||||
spent=0
|
||||
|
||||
while true; do
|
||||
# For some reason altool prints everything to stderr, not stdout
|
||||
xcrun altool --username "$APPL_USER" --notarization-info "$notarization_info" --password "$APPL_PASSWORD" >"altool.check.out" 2>&1 || true
|
||||
status="$(grep -oe 'Status: .*' "altool.check.out" | cut -c 9- || true)"
|
||||
log "Current status: $status"
|
||||
if [ "$status" = "invalid" ]; then
|
||||
log "Notarization failed"
|
||||
ec=1
|
||||
elif [ "$status" = "success" ]; then
|
||||
log "Notarization succeeded"
|
||||
ec=0
|
||||
else
|
||||
if [ "$status" != "in progress" ]; then
|
||||
log "Unknown notarization status, waiting more, altool output:"
|
||||
cat "altool.check.out"
|
||||
fi
|
||||
if [[ $spent -gt 60 ]]; then
|
||||
log "Waiting time out (apx 60 minutes)"
|
||||
ec=2
|
||||
break
|
||||
fi
|
||||
sleep 60
|
||||
((spent += 1))
|
||||
continue
|
||||
fi
|
||||
developer_log="developer_log.json"
|
||||
log "Fetching $developer_log"
|
||||
# TODO: Replace cut with trim or something better
|
||||
url="$(grep -oe 'LogFileURL: .*' "altool.check.out" | cut -c 13-)"
|
||||
wget "$url" -O "$developer_log" && cat "$developer_log" || true
|
||||
if [ $ec != 0 ]; then
|
||||
log "Publishing $developer_log"
|
||||
publish-log "$notarization_info" "$developer_log"
|
||||
fi
|
||||
break
|
||||
done
|
||||
cat "altool.check.out"
|
||||
|
||||
rm -rf "altool.init.out" "altool.check.out"
|
||||
exit $ec
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
#!/bin/bash
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
|
||||
|
||||
source "$SCRIPT_DIR/jetsign-common.sh" || exit 1
|
||||
|
||||
function isSigned() {
|
||||
pkgutil --check-signature "$1" >/dev/null 2>&1 && grep -q "signed by a developer certificate" < <(pkgutil --check-signature "$1" 2>&1)
|
||||
}
|
||||
|
||||
# second last argument is a path to be signed
|
||||
pathToBeSigned="$(pwd)/${*:(-2):1}"
|
||||
# last argument is a path to signed file
|
||||
pathOut="$(pwd)/${*:(-1)}"
|
||||
jetSignArgs=("${@:1:$#-2}")
|
||||
if [[ ! -f "$pathToBeSigned" ]]; then
|
||||
echo "$pathToBeSigned is missing or not a file"
|
||||
exit 1
|
||||
elif isSigned "$pathToBeSigned" && ! isForced "${jetSignArgs[@]}" ; then
|
||||
echo "Already signed: $pathToBeSigned"
|
||||
elif [[ "$JETSIGN_CLIENT" == "null" ]]; then
|
||||
echo "JetSign client is missing, cannot proceed with signing"
|
||||
exit 1
|
||||
elif [[ "$pathToBeSigned" != *.pkg ]]; then
|
||||
echo "$pathToBeSigned won't be signed, assumed not to be a macOS package"
|
||||
else
|
||||
if ! isSigned "$pathToBeSigned" ; then
|
||||
echo "Unsigned macOS package: $pathToBeSigned"
|
||||
fi
|
||||
workDir=$(dirname "$pathToBeSigned")
|
||||
pathSigned="$workDir/signed/${pathToBeSigned##*/}"
|
||||
jetSignExtensions=$(jetSignExtensions "${jetSignArgs[@]}")
|
||||
contentType=$(jetSignContentType "$pathToBeSigned")
|
||||
(
|
||||
cd "$workDir" || exit 1
|
||||
"$JETSIGN_CLIENT" -log-format text -denoted-content-type "$contentType" -extensions "$jetSignExtensions" "$pathToBeSigned"
|
||||
isSigned "$pathSigned"
|
||||
rm -f "$pathOut"
|
||||
mv "$pathSigned" "$pathOut"
|
||||
rm -rf "$workDir/signed"
|
||||
)
|
||||
fi
|
||||
@@ -1,33 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
[[ "${SCRIPT_VERBOSE:-}" == "1" ]] && set -x
|
||||
|
||||
if [[ $# -lt 5 ]]; then
|
||||
echo "Usage: $0 AppDirectory AppName BundleId CertificateID InstallerCertificateID"
|
||||
exit 1
|
||||
fi
|
||||
set -x
|
||||
|
||||
APPLICATION_PATH=$1
|
||||
PKG_NAME=$2
|
||||
APP_NAME=$2
|
||||
BUNDLE_ID=$3
|
||||
JB_DEVELOPER_CERT=$4
|
||||
JB_INSTALLER_CERT=$5
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
|
||||
|
||||
# Use JetBrains sign utility if it's available
|
||||
if [[ "${JETSIGN_CLIENT:=}" == "null" ]] || [[ "$JETSIGN_CLIENT" == "" ]]; then
|
||||
JB_SIGN=false
|
||||
SIGN_UTILITY="codesign"
|
||||
PRODUCTSIGN_UTILITY="productsign"
|
||||
else
|
||||
JB_SIGN=true
|
||||
SIGN_UTILITY="$SCRIPT_DIR/codesign.sh"
|
||||
PRODUCTSIGN_UTILITY="$SCRIPT_DIR/productsign.sh"
|
||||
if [[ -z "$APPLICATION_PATH" ]] || [[ -z "$JB_DEVELOPER_CERT" ]]; then
|
||||
echo "Usage: $0 AppDirectory CertificateID"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -d "$APPLICATION_PATH" ]]; then
|
||||
echo "AppDirectory '$APPLICATION_PATH' does not exist or not a directory"
|
||||
exit 1
|
||||
@@ -37,6 +22,9 @@ function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
}
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
|
||||
# Cleanup files left from previous sign attempt (if any)
|
||||
find "$APPLICATION_PATH" -name '*.cstemp' -exec rm '{}' \;
|
||||
|
||||
@@ -49,13 +37,13 @@ for f in \
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -name "*.node" -o -perm +111 \) \
|
||||
-exec "$SIGN_UTILITY" --timestamp \
|
||||
-exec codesign --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime --force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" {} \;
|
||||
--entitlements entitlements.xml {} \;
|
||||
fi
|
||||
done
|
||||
|
||||
log "Signing libraries in jars in $APPLICATION_PATH"
|
||||
log "Signing libraries in jars in $PWD"
|
||||
|
||||
# todo: add set -euo pipefail; into the inner sh -c
|
||||
# `-e` prevents `grep -q && printf` loginc
|
||||
@@ -73,10 +61,10 @@ find "$APPLICATION_PATH" -name '*.jar' \
|
||||
|
||||
find jarfolder \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -name "jattach" \) \
|
||||
-exec "$SIGN_UTILITY" --timestamp \
|
||||
-exec codesign --timestamp \
|
||||
--force \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" {} \;
|
||||
--entitlements entitlements.xml {} \;
|
||||
|
||||
(cd jarfolder; zip -q -r -o -0 ../jar.jar .)
|
||||
mv jar.jar "$file"
|
||||
@@ -85,77 +73,44 @@ find "$APPLICATION_PATH" -name '*.jar' \
|
||||
rm -rf jarfolder jar.jar
|
||||
|
||||
log "Signing other files..."
|
||||
# shellcheck disable=SC2043
|
||||
for f in \
|
||||
"Contents/Home/bin"; do
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -perm +111 \) \
|
||||
-exec "$SIGN_UTILITY" --timestamp \
|
||||
-exec codesign --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime --force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" {} \;
|
||||
--entitlements entitlements.xml {} \;
|
||||
fi
|
||||
done
|
||||
|
||||
log "Signing whole frameworks..."
|
||||
# shellcheck disable=SC2043
|
||||
if [ "$JB_SIGN" = true ]; then for f in \
|
||||
"Contents/Home/Frameworks" "Contents/Frameworks"; do
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" \( -name '*.framework' -o -name '*.app' \) -maxdepth 1 | while read -r line
|
||||
do
|
||||
log "Signing '$line':"
|
||||
tar -pczf tmp-to-sign.tar.gz -C "$(dirname "$line")" "$(basename "$line")"
|
||||
"$SIGN_UTILITY" --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" tmp-to-sign.tar.gz
|
||||
rm -rf "$line"
|
||||
tar -xzf tmp-to-sign.tar.gz --directory "$(dirname "$line")"
|
||||
rm -f tmp-to-sign.tar.gz
|
||||
done
|
||||
fi
|
||||
done; fi
|
||||
|
||||
log "Checking framework signatures..."
|
||||
for f in \
|
||||
"Contents/Home/Frameworks" "Contents/Frameworks"; do
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" -name '*.framework' -maxdepth 1 | while read -r line
|
||||
do
|
||||
log "Checking '$line':"
|
||||
codesign --verify --deep --strict --verbose=4 "$line"
|
||||
done
|
||||
fi
|
||||
done
|
||||
#log "Signing executable..."
|
||||
#codesign --timestamp \
|
||||
# -v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
# --force \
|
||||
# --entitlements entitlements.xml "$APPLICATION_PATH/Contents/MacOS/idea"
|
||||
|
||||
log "Signing whole app..."
|
||||
if [ "$JB_SIGN" = true ]; then
|
||||
tar -pczf tmp-to-sign.tar.gz --exclude='man' -C "$(dirname "$APPLICATION_PATH")" "$(basename "$APPLICATION_PATH")"
|
||||
"$SIGN_UTILITY" --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" tmp-to-sign.tar.gz
|
||||
rm -rf "$APPLICATION_PATH"
|
||||
tar -xzf tmp-to-sign.tar.gz --directory "$(dirname "$APPLICATION_PATH")"
|
||||
rm -f tmp-to-sign.tar.gz
|
||||
else
|
||||
"$SIGN_UTILITY" --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" "$APPLICATION_PATH"
|
||||
fi
|
||||
codesign --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--force \
|
||||
--entitlements entitlements.xml "$APPLICATION_PATH"
|
||||
|
||||
BUILD_NAME="$(basename "$APPLICATION_PATH")"
|
||||
BUILD_NAME=$(echo $APPLICATION_PATH | awk -F"/" '{ print $2 }')
|
||||
|
||||
log "Creating $PKG_NAME..."
|
||||
rm -rf "$PKG_NAME"
|
||||
log "Creating $APP_NAME.pkg..."
|
||||
rm -rf "$APP_NAME.pkg"
|
||||
|
||||
mkdir -p unsigned
|
||||
pkgbuild --identifier $BUNDLE_ID --root $APPLICATION_PATH \
|
||||
--install-location /Library/Java/JavaVirtualMachines/${BUILD_NAME} unsigned/${PKG_NAME}
|
||||
log "Signing $PKG_NAME..."
|
||||
"$PRODUCTSIGN_UTILITY" --timestamp --sign "$JB_INSTALLER_CERT" unsigned/${PKG_NAME} ${PKG_NAME}
|
||||
--install-location /Library/Java/JavaVirtualMachines/${BUILD_NAME} unsigned/${APP_NAME}.pkg
|
||||
productsign --timestamp --sign "$JB_INSTALLER_CERT" unsigned/${APP_NAME}.pkg ${APP_NAME}.pkg
|
||||
|
||||
#log "Signing whole app..."
|
||||
#codesign --timestamp \
|
||||
# -v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
# --force \
|
||||
# --entitlements entitlements.xml $APP_NAME.pkg
|
||||
|
||||
log "Verifying java is not broken"
|
||||
find "$APPLICATION_PATH" \
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
[[ "${SCRIPT_VERBOSE:-}" == "1" ]] && set -x
|
||||
set -x
|
||||
|
||||
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
|
||||
export COPYFILE_DISABLE=true
|
||||
@@ -17,7 +17,7 @@ JB_INSTALLER_CERT=$6
|
||||
NOTARIZE=$7
|
||||
BUNDLE_ID=$8
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
@@ -44,8 +44,7 @@ fi
|
||||
|
||||
log "$INPUT_FILE extracted and removed"
|
||||
|
||||
APP_NAME=$(basename "$INPUT_FILE" | awk -F".tar" '{ print $1 }')
|
||||
PKG_NAME="$APP_NAME.pkg"
|
||||
APP_NAME=$(echo ${INPUT_FILE} | awk -F".tar" '{ print $1 }')
|
||||
APPLICATION_PATH=$EXPLODED/$(ls $EXPLODED)
|
||||
|
||||
find "$APPLICATION_PATH/Contents/Home/bin" \
|
||||
@@ -74,18 +73,16 @@ if [[ $non_plist -gt 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${JETSIGN_CLIENT:=}" == "null" ]] || [[ "$JETSIGN_CLIENT" == "" ]]; then
|
||||
log "Unlocking keychain..."
|
||||
# Make sure *.p12 is imported into local KeyChain
|
||||
security unlock-keychain -p "$PASSWORD" "/Users/$USERNAME/Library/Keychains/login.keychain"
|
||||
fi
|
||||
log "Unlocking keychain..."
|
||||
# Make sure *.p12 is imported into local KeyChain
|
||||
security unlock-keychain -p "$PASSWORD" "/Users/$USERNAME/Library/Keychains/login.keychain"
|
||||
|
||||
attempt=1
|
||||
limit=3
|
||||
set +e
|
||||
while [[ $attempt -le $limit ]]; do
|
||||
log "Signing (attempt $attempt) $APPLICATION_PATH ..."
|
||||
"$SCRIPT_DIR/sign.sh" "$APPLICATION_PATH" "$PKG_NAME" "$BUNDLE_ID" "$CODESIGN_STRING" "$JB_INSTALLER_CERT"
|
||||
./sign.sh "$APPLICATION_PATH" "$APP_NAME" "$BUNDLE_ID" "$CODESIGN_STRING" "$JB_INSTALLER_CERT"
|
||||
ec=$?
|
||||
if [[ $ec -ne 0 ]]; then
|
||||
((attempt += 1))
|
||||
@@ -107,10 +104,19 @@ set -e
|
||||
|
||||
if [ "$NOTARIZE" = "yes" ]; then
|
||||
log "Notarizing..."
|
||||
"$SCRIPT_DIR/notarize.sh" "$PKG_NAME"
|
||||
# shellcheck disable=SC1090
|
||||
source "$HOME/.notarize_token"
|
||||
# Since notarization tool uses same file for upload token we have to trick it into using different folders, hence fake root
|
||||
# Also it leaves copy of zip file in TMPDIR, so notarize.sh overrides it and uses FAKE_ROOT as location for temp TMPDIR
|
||||
FAKE_ROOT="$(pwd)/fake-root"
|
||||
mkdir -p "$FAKE_ROOT"
|
||||
echo "Notarization will use fake root: $FAKE_ROOT"
|
||||
./notarize.sh "$APPLICATION_PATH" "$APPLE_USERNAME" "$APPLE_PASSWORD" "$APP_NAME.pkg" "$BUNDLE_ID" "$FAKE_ROOT"
|
||||
rm -rf "$FAKE_ROOT"
|
||||
|
||||
set +e
|
||||
log "Stapling..."
|
||||
xcrun stapler staple "$APPLICATION_PATH" ||:
|
||||
xcrun stapler staple "$PKG_NAME" ||:
|
||||
xcrun stapler staple "$APPLICATION_PATH"
|
||||
else
|
||||
log "Notarization disabled"
|
||||
log "Stapling disabled"
|
||||
@@ -123,11 +129,7 @@ log "Zipping $BUILD_NAME to $INPUT_FILE ..."
|
||||
if test -d $BACKUP_JMODS/jmods; then
|
||||
mv $BACKUP_JMODS/jmods $APPLICATION_PATH/Contents/Home
|
||||
fi
|
||||
if [[ "$APPLICATION_PATH" != "$EXPLODED/$BUILD_NAME" ]]; then
|
||||
mv $APPLICATION_PATH $EXPLODED/$BUILD_NAME
|
||||
else
|
||||
echo "No move, source == destination: $APPLICATION_PATH"
|
||||
fi
|
||||
mv $APPLICATION_PATH $EXPLODED/$BUILD_NAME
|
||||
|
||||
tar -pczvf $INPUT_FILE --exclude='man' -C $EXPLODED $BUILD_NAME
|
||||
log "Finished zipping"
|
||||
|
||||
@@ -34,7 +34,6 @@ NVDA_PATH=${NVDA_PATH:=$WORK_DIR/nvda_controllerClient}
|
||||
|
||||
function do_configure {
|
||||
sh ./configure \
|
||||
--enable-option-checking=fatal \
|
||||
--openjdk-target=aarch64-unknown-cygwin \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
@@ -48,10 +47,9 @@ function do_configure {
|
||||
--with-build-jdk=$BUILD_JDK \
|
||||
--with-nvdacontrollerclient=$NVDA_PATH \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
|| do_exit $?
|
||||
--enable-cds=yes || do_exit $?
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
@@ -70,7 +68,7 @@ function create_image_bundle {
|
||||
--module-path $__modules_path --no-man-pages --compress=2 \
|
||||
--add-modules $__modules --output $__root_dir || do_exit $?
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__root_dir/release
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__arch_name/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' $__root_dir/release > release
|
||||
mv release $__root_dir/release
|
||||
@@ -131,7 +129,6 @@ if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not unchanged
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
@@ -122,7 +122,6 @@ if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
cp $JCEF_PATH/jmods/* ${JSDK_MODS_DIR} # $JSDK/jmods is not unchanged
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -98,7 +98,6 @@ define SetupInterimModule
|
||||
EXCLUDES := sun javax/tools/snippet-files, \
|
||||
EXCLUDE_FILES := $(TOPDIR)/src/$1/share/classes/module-info.java \
|
||||
$(TOPDIR)/src/$1/share/classes/javax/tools/ToolProvider.java \
|
||||
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/Main.java \
|
||||
Standard.java, \
|
||||
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java \
|
||||
$($1.interim_EXTRA_FILES), \
|
||||
@@ -110,9 +109,7 @@ define SetupInterimModule
|
||||
$$(INTERIM_LANGTOOLS_ADD_EXPORTS) \
|
||||
--patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \
|
||||
--add-exports java.base/jdk.internal.javac=java.compiler.interim \
|
||||
--add-exports java.base/jdk.internal.javac=jdk.compiler.interim \
|
||||
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.compiler.interim \
|
||||
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.javadoc.interim, \
|
||||
--add-exports java.base/jdk.internal.javac=jdk.compiler.interim, \
|
||||
))
|
||||
|
||||
$1_DEPS_INTERIM := $$(addsuffix .interim, $$(filter \
|
||||
|
||||
@@ -57,9 +57,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
|
||||
JAVAC_FLAGS := \
|
||||
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
|
||||
--add-exports java.base/sun.text=ALL-UNNAMED \
|
||||
--add-exports java.base/sun.security.util=ALL-UNNAMED \
|
||||
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.compiler.interim \
|
||||
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.javadoc.interim, \
|
||||
--add-exports java.base/sun.security.util=ALL-UNNAMED, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_TOOLS_JDK)
|
||||
@@ -92,9 +90,7 @@ $(eval $(call SetupJavaCompilation, COMPILE_DEPEND, \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
|
||||
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.compiler.interim \
|
||||
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.javadoc.interim, \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED, \
|
||||
))
|
||||
|
||||
DEPEND_SERVICE_PROVIDER := $(BUILDTOOLS_OUTPUTDIR)/depend/META-INF/services/com.sun.source.util.Plugin
|
||||
|
||||
@@ -110,6 +110,7 @@ JAVA_WARNINGS_ARE_ERRORS ?= -Werror
|
||||
JAVADOC_OPTIONS := -use -keywords -notimestamp \
|
||||
-encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
|
||||
-splitIndex --system none -javafx --expand-requires transitive \
|
||||
--enable-preview -source $(JDK_SOURCE_TARGET_VERSION) \
|
||||
--override-methods=summary \
|
||||
--no-external-specs-page
|
||||
|
||||
@@ -117,6 +118,7 @@ JAVADOC_OPTIONS := -use -keywords -notimestamp \
|
||||
# development cycle.
|
||||
REFERENCE_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \
|
||||
-encoding ISO-8859-1 -breakiterator -splitIndex --system none \
|
||||
--enable-preview -source $(JDK_SOURCE_TARGET_VERSION) \
|
||||
-html5 -javafx --expand-requires transitive \
|
||||
--no-external-specs-page
|
||||
|
||||
|
||||
@@ -125,11 +125,6 @@ test-prebuilt:
|
||||
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
|
||||
test-prebuilt CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
|
||||
|
||||
test-prebuilt-with-exit-code:
|
||||
@( cd $(topdir) && \
|
||||
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
|
||||
test-prebuilt-with-exit-code CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
|
||||
|
||||
# Alias for backwards compatibility
|
||||
run-test-prebuilt: test-prebuilt
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -747,22 +747,6 @@ ifeq ($(BUILD_FAILURE_HANDLER), true)
|
||||
))
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_JTREG_TEST_THREAD_FACTORY), true)
|
||||
# Builds the test thread factory jtreg extension
|
||||
$(eval $(call SetupTarget, build-test-test-thread-factory, \
|
||||
MAKEFILE := test/BuildJtregTestThreadFactory, \
|
||||
TARGET := build, \
|
||||
DEPS := interim-langtools exploded-image, \
|
||||
))
|
||||
|
||||
# Copies the jtreg test thread factory into the test image
|
||||
$(eval $(call SetupTarget, test-image-test-thread-factory, \
|
||||
MAKEFILE := test/BuildJtregTestThreadFactory, \
|
||||
TARGET := images, \
|
||||
DEPS := build-test-test-thread-factory, \
|
||||
))
|
||||
endif
|
||||
|
||||
$(eval $(call SetupTarget, build-microbenchmark, \
|
||||
MAKEFILE := test/BuildMicrobenchmark, \
|
||||
DEPS := interim-langtools exploded-image, \
|
||||
@@ -1243,10 +1227,6 @@ ifeq ($(BUILD_FAILURE_HANDLER), true)
|
||||
test-image: test-image-failure-handler
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_JTREG_TEST_THREAD_FACTORY), true)
|
||||
test-image: test-image-test-thread-factory
|
||||
endif
|
||||
|
||||
ifneq ($(JMH_CORE_JAR), )
|
||||
test-image: build-microbenchmark
|
||||
endif
|
||||
|
||||
@@ -93,9 +93,6 @@ endif
|
||||
JTREG_FAILURE_HANDLER_DIR := $(TEST_IMAGE_DIR)/failure_handler
|
||||
JTREG_FAILURE_HANDLER := $(JTREG_FAILURE_HANDLER_DIR)/jtregFailureHandler.jar
|
||||
|
||||
JTREG_TEST_THREAD_FACTORY_DIR := $(TEST_IMAGE_DIR)/jtreg_test_thread_factory
|
||||
JTREG_TEST_THREAD_FACTORY_JAR := $(JTREG_TEST_THREAD_FACTORY_DIR)/jtregTestThreadFactory.jar
|
||||
|
||||
JTREG_FAILURE_HANDLER_TIMEOUT ?= 0
|
||||
|
||||
ifneq ($(wildcard $(JTREG_FAILURE_HANDLER)), )
|
||||
@@ -203,7 +200,7 @@ $(eval $(call SetTestOpt,REPORT,JTREG))
|
||||
|
||||
$(eval $(call ParseKeywordVariable, JTREG, \
|
||||
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR FAILURE_HANDLER_TIMEOUT \
|
||||
TEST_MODE ASSERT VERBOSE RETAIN TEST_THREAD_FACTORY MAX_MEM RUN_PROBLEM_LISTS \
|
||||
TEST_MODE ASSERT VERBOSE RETAIN MAX_MEM RUN_PROBLEM_LISTS \
|
||||
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
|
||||
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
|
||||
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS \
|
||||
@@ -595,7 +592,16 @@ define SetupRunMicroTestBody
|
||||
endif
|
||||
|
||||
# Set library path for native dependencies
|
||||
$1_JMH_JVM_ARGS := -Djava.library.path=$$(TEST_IMAGE_DIR)/micro/native
|
||||
$1_JMH_JVM_ARGS := -Djava.library.path=$$(TEST_IMAGE_DIR)/micro/native \
|
||||
--add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.classfile=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.classfile.attribute=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.classfile.instruction=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.classfile.java.lang.constant=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.classfile.components=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.classfile.impl=ALL-UNNAMED
|
||||
|
||||
ifneq ($$(MICRO_VM_OPTIONS)$$(MICRO_JAVA_OPTIONS), )
|
||||
$1_JMH_JVM_ARGS += $$(MICRO_VM_OPTIONS) $$(MICRO_JAVA_OPTIONS)
|
||||
@@ -746,7 +752,6 @@ define SetupRunJtregTestBody
|
||||
|
||||
JTREG_VERBOSE ?= fail,error,summary
|
||||
JTREG_RETAIN ?= fail,error
|
||||
JTREG_TEST_THREAD_FACTORY ?=
|
||||
JTREG_RUN_PROBLEM_LISTS ?= false
|
||||
JTREG_RETRY_COUNT ?= 0
|
||||
JTREG_REPEAT_COUNT ?= 0
|
||||
@@ -760,14 +765,6 @@ define SetupRunJtregTestBody
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($$(JTREG_TEST_THREAD_FACTORY), )
|
||||
$1_JTREG_BASIC_OPTIONS += -testThreadFactoryPath:$$(JTREG_TEST_THREAD_FACTORY_JAR)
|
||||
$1_JTREG_BASIC_OPTIONS += -testThreadFactory:$$(JTREG_TEST_THREAD_FACTORY)
|
||||
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
|
||||
$$(addprefix $$($1_TEST_ROOT)/, ProblemList-$$(JTREG_TEST_THREAD_FACTORY).txt) \
|
||||
))
|
||||
endif
|
||||
|
||||
ifneq ($$(JTREG_LAUNCHER_OPTIONS), )
|
||||
$1_JTREG_LAUNCHER_OPTIONS += $$(JTREG_LAUNCHER_OPTIONS)
|
||||
endif
|
||||
|
||||
@@ -295,11 +295,6 @@ test-prebuilt:
|
||||
@cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -f make/RunTests.gmk run-test \
|
||||
TEST="$(TEST)"
|
||||
|
||||
test-prebuilt-with-exit-code: test-prebuilt
|
||||
@if test -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error ; then \
|
||||
exit 1 ; \
|
||||
fi
|
||||
|
||||
all: test-prebuilt
|
||||
|
||||
.PHONY: default all test-prebuilt
|
||||
|
||||
@@ -60,7 +60,6 @@ AC_DEFUN([BASIC_CHECK_LEFTOVER_OVERRIDDEN],
|
||||
|
||||
###############################################################################
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
# Make sure to only use tools set up in BASIC_SETUP_FUNDAMENTAL_TOOLS.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
||||
[
|
||||
# Save the current directory this script was started from
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
RECOMMENDED_PANDOC_VERSION=2.19.2
|
||||
|
||||
###############################################################################
|
||||
# Setup the most fundamental tools, used for setting up build platform and
|
||||
# path handling.
|
||||
# Setup the most fundamental tools that relies on not much else to set up,
|
||||
# but is used by much of the early bootstrap code.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
[
|
||||
# Bootstrapping: These tools are needed by UTIL_LOOKUP_PROGS
|
||||
@@ -42,28 +42,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
UTIL_CHECK_NONEMPTY(FILE)
|
||||
AC_PATH_PROGS(LDD, ldd)
|
||||
|
||||
# Required tools
|
||||
UTIL_REQUIRE_PROGS(ECHO, echo)
|
||||
UTIL_REQUIRE_PROGS(TR, tr)
|
||||
UTIL_REQUIRE_PROGS(UNAME, uname)
|
||||
UTIL_REQUIRE_PROGS(WC, wc)
|
||||
|
||||
# Required tools with some special treatment
|
||||
UTIL_REQUIRE_SPECIAL(GREP, [AC_PROG_GREP])
|
||||
UTIL_REQUIRE_SPECIAL(EGREP, [AC_PROG_EGREP])
|
||||
UTIL_REQUIRE_SPECIAL(SED, [AC_PROG_SED])
|
||||
|
||||
# Tools only needed on some platforms
|
||||
UTIL_LOOKUP_PROGS(PATHTOOL, cygpath wslpath)
|
||||
UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Setup further tools that should be resolved early but after setting up
|
||||
# build platform and path handling.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
|
||||
[
|
||||
# Required tools
|
||||
# First are all the fundamental required tools.
|
||||
UTIL_REQUIRE_PROGS(BASH, bash)
|
||||
UTIL_REQUIRE_PROGS(CAT, cat)
|
||||
UTIL_REQUIRE_PROGS(CHMOD, chmod)
|
||||
@@ -71,6 +50,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
|
||||
UTIL_REQUIRE_PROGS(CUT, cut)
|
||||
UTIL_REQUIRE_PROGS(DATE, date)
|
||||
UTIL_REQUIRE_PROGS(DIFF, gdiff diff)
|
||||
UTIL_REQUIRE_PROGS(ECHO, echo)
|
||||
UTIL_REQUIRE_PROGS(EXPR, expr)
|
||||
UTIL_REQUIRE_PROGS(FIND, find)
|
||||
UTIL_REQUIRE_PROGS(GUNZIP, gunzip)
|
||||
@@ -92,10 +72,16 @@ AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
|
||||
UTIL_REQUIRE_PROGS(TAR, gtar tar)
|
||||
UTIL_REQUIRE_PROGS(TEE, tee)
|
||||
UTIL_REQUIRE_PROGS(TOUCH, touch)
|
||||
UTIL_REQUIRE_PROGS(TR, tr)
|
||||
UTIL_REQUIRE_PROGS(UNAME, uname)
|
||||
UTIL_REQUIRE_PROGS(WC, wc)
|
||||
UTIL_REQUIRE_PROGS(XARGS, xargs)
|
||||
|
||||
# Required tools with some special treatment
|
||||
# Then required tools that require some special treatment.
|
||||
UTIL_REQUIRE_SPECIAL(GREP, [AC_PROG_GREP])
|
||||
UTIL_REQUIRE_SPECIAL(EGREP, [AC_PROG_EGREP])
|
||||
UTIL_REQUIRE_SPECIAL(FGREP, [AC_PROG_FGREP])
|
||||
UTIL_REQUIRE_SPECIAL(SED, [AC_PROG_SED])
|
||||
|
||||
# Optional tools, we can do without them
|
||||
UTIL_LOOKUP_PROGS(DF, df)
|
||||
@@ -104,8 +90,10 @@ AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
|
||||
UTIL_LOOKUP_PROGS(READLINK, greadlink readlink)
|
||||
UTIL_LOOKUP_PROGS(WHOAMI, whoami)
|
||||
|
||||
# Tools only needed on some platforms
|
||||
# These are only needed on some platforms
|
||||
UTIL_LOOKUP_PROGS(PATHTOOL, cygpath wslpath)
|
||||
UTIL_LOOKUP_PROGS(LSB_RELEASE, lsb_release)
|
||||
UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32)
|
||||
|
||||
# For compare.sh only
|
||||
UTIL_LOOKUP_PROGS(CMP, cmp)
|
||||
|
||||
@@ -103,7 +103,3 @@ JVM_FEATURES_server := cds compiler1 compiler2 g1gc serialgc
|
||||
override EXTRA_CFLAGS :=
|
||||
override EXTRA_CXXFLAGS :=
|
||||
override EXTRA_LDFLAGS :=
|
||||
|
||||
# hsdis is not needed
|
||||
HSDIS_BACKEND := none
|
||||
ENABLE_HSDIS_BUNDLING := false
|
||||
|
||||
@@ -86,7 +86,6 @@ PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET
|
||||
|
||||
# Continue setting up basic stuff. Most remaining code require fundamental tools.
|
||||
BASIC_SETUP_PATHS
|
||||
BASIC_SETUP_TOOLS
|
||||
BASIC_SETUP_BUILD_ENV
|
||||
|
||||
# Check if it's a pure open build or if custom sources are to be used.
|
||||
@@ -223,10 +222,6 @@ JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER
|
||||
# LeakSanitizer
|
||||
JDKOPT_SETUP_LEAK_SANITIZER
|
||||
|
||||
# Fallback linker
|
||||
# This needs to go before 'LIB_DETERMINE_DEPENDENCIES'
|
||||
JDKOPT_SETUP_FALLBACK_LINKER
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check dependencies for external and internal libraries.
|
||||
@@ -254,7 +249,6 @@ HOTSPOT_SETUP_MISC
|
||||
###############################################################################
|
||||
|
||||
LIB_TESTS_ENABLE_DISABLE_FAILURE_HANDLER
|
||||
LIB_TESTS_ENABLE_DISABLE_JTREG_TEST_THREAD_FACTORY
|
||||
|
||||
JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
|
||||
JDKOPT_EXCLUDE_TRANSLATIONS
|
||||
|
||||
@@ -51,14 +51,6 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
||||
SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1'
|
||||
|
||||
elif test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
# Linking is different on aix
|
||||
SHARED_LIBRARY_FLAGS="-shared -Wl,-bM:SRE -Wl,-bnoentry"
|
||||
SET_EXECUTABLE_ORIGIN=""
|
||||
SET_SHARED_LIBRARY_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_NAME=''
|
||||
SET_SHARED_LIBRARY_MAPFILE=''
|
||||
|
||||
else
|
||||
# Default works for linux, might work on other platforms as well.
|
||||
SHARED_LIBRARY_FLAGS='-shared'
|
||||
@@ -214,6 +206,7 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
|
||||
WARNINGS_ENABLE_ALL="-Wall -Wextra -Wformat=2 $WARNINGS_ENABLE_ADDITIONAL"
|
||||
|
||||
DISABLED_WARNINGS="unknown-warning-option unused-parameter unused"
|
||||
|
||||
;;
|
||||
|
||||
xlc)
|
||||
@@ -291,15 +284,9 @@ AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
|
||||
C_O_FLAG_NONE="${C_O_FLAG_NONE} ${DISABLE_FORTIFY_CFLAGS}"
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
C_O_FLAG_HIGHEST_JVM="-O3 -finline-functions"
|
||||
C_O_FLAG_HIGHEST="-O3 -finline-functions"
|
||||
C_O_FLAG_HI="-O3 -finline-functions"
|
||||
else
|
||||
C_O_FLAG_HIGHEST_JVM="-O3"
|
||||
C_O_FLAG_HIGHEST="-O3"
|
||||
C_O_FLAG_HI="-O3"
|
||||
fi
|
||||
C_O_FLAG_HIGHEST_JVM="-O3"
|
||||
C_O_FLAG_HIGHEST="-O3"
|
||||
C_O_FLAG_HI="-O3"
|
||||
C_O_FLAG_NORM="-O2"
|
||||
C_O_FLAG_DEBUG_JVM="-O0"
|
||||
C_O_FLAG_SIZE="-Os"
|
||||
@@ -471,9 +458,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
# so for debug we build with '-qpic=large -bbigtoc'.
|
||||
DEBUG_CFLAGS_JVM="-qpic=large"
|
||||
fi
|
||||
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
DEBUG_CFLAGS_JVM="-fpic -mcmodel=large"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$DEBUG_LEVEL" != xrelease; then
|
||||
@@ -509,14 +493,8 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
-fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
# clang compiler on aix needs -ffunction-sections
|
||||
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -ffunction-sections -ftls-model -fno-math-errno -fstack-protector"
|
||||
TOOLCHAIN_CFLAGS_JDK="-ffunction-sections -fsigned-char -fstack-protector"
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fstack-protector"
|
||||
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fcheck-new -fstack-protector"
|
||||
TOOLCHAIN_CFLAGS_JDK="-pipe -fstack-protector"
|
||||
# reduce lib size on linux in link step, this needs also special compile flags
|
||||
# do this on s390x also for libjvm (where serviceability agent is not supported)
|
||||
@@ -623,9 +601,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
PICFLAG="-fPIC"
|
||||
PIEFLAG="-fPIE"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
JVM_PICFLAG="-fpic -mcmodel=large -Wl,-bbigtoc
|
||||
JDK_PICFLAG="-fpic
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
# '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
|
||||
# one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
|
||||
@@ -771,9 +746,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
$1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
|
||||
fi
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
$1_CFLAGS_CPU="-mcpu=pwr8"
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
if test "x$FLAGS_CPU" = xppc64; then
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -75,11 +75,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
BASIC_LDFLAGS_JVM_ONLY="-mno-omit-leaf-frame-pointer -mstack-alignment=16 \
|
||||
-fPIC"
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-bnolibpath -Wl,-bnoexpall \
|
||||
-Wl,-bernotok -Wl,-bdatapsize:64k -Wl,-btextpsize:64k -Wl,-bstackpsize:64k"
|
||||
BASIC_LDFLAGS_JVM_ONLY="$BASIC_LDFLAGS_JVM_ONLY -Wl,-lC_r -Wl,-bbigtoc"
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
BASIC_LDFLAGS="-b64 -brtl -bnorwexec -bnolibpath -bnoexpall -bernotok -btextpsize:64K \
|
||||
-bdatapsize:64K -bstackpsize:64K"
|
||||
@@ -92,8 +88,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
BASIC_LDFLAGS_JVM_ONLY="-opt:icf,8 -subsystem:windows"
|
||||
fi
|
||||
|
||||
if (test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang) \
|
||||
&& test "x$OPENJDK_TARGET_OS" != xaix; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
if test -n "$HAS_NOEXECSTACK"; then
|
||||
BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,-z,noexecstack"
|
||||
fi
|
||||
@@ -121,14 +116,6 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
if test "x$DEBUG_LEVEL" != xrelease; then
|
||||
DEBUGLEVEL_LDFLAGS_JVM_ONLY="$DEBUGLEVEL_LDFLAGS_JVM_ONLY -bbigtoc"
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
# We need '-fpic' or '-fpic -mcmodel=large -Wl,-bbigtoc' if the TOC overflows.
|
||||
# Hotspot now overflows its 64K TOC (currently only for debug),
|
||||
# so we build with '-fpic -mcmodel=large -Wl,-bbigtoc'.
|
||||
if test "x$DEBUG_LEVEL" != xrelease; then
|
||||
DEBUGLEVEL_LDFLAGS_JVM_ONLY="$DEBUGLEVEL_LDFLAGS_JVM_ONLY -Wl,-bbigtoc"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Setup LDFLAGS for linking executables
|
||||
|
||||
@@ -928,22 +928,3 @@ AC_DEFUN([JDKOPT_SETUP_MACOSX_SIGNING],
|
||||
AC_SUBST(MACOSX_CODESIGN_MODE)
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# fallback linker
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_FALLBACK_LINKER],
|
||||
[
|
||||
FALLBACK_LINKER_DEFAULT=false
|
||||
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(zero); then
|
||||
FALLBACK_LINKER_DEFAULT=true
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: fallback-linker, DEFAULT: $FALLBACK_LINKER_DEFAULT,
|
||||
RESULT: ENABLE_FALLBACK_LINKER,
|
||||
DESC: [enable libffi-based fallback implementation of java.lang.foreign.Linker],
|
||||
CHECKING_MSG: [if fallback linker enabled])
|
||||
AC_SUBST(ENABLE_FALLBACK_LINKER)
|
||||
])
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
################################################################################
|
||||
|
||||
# Minimum supported versions
|
||||
JTREG_MINIMUM_VERSION=7.2
|
||||
JTREG_MINIMUM_VERSION=7.1.1
|
||||
GTEST_MINIMUM_VERSION=1.13.0
|
||||
|
||||
###############################################################################
|
||||
@@ -301,22 +301,3 @@ AC_DEFUN_ONCE([LIB_TESTS_ENABLE_DISABLE_FAILURE_HANDLER],
|
||||
])
|
||||
AC_SUBST(BUILD_FAILURE_HANDLER)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([LIB_TESTS_ENABLE_DISABLE_JTREG_TEST_THREAD_FACTORY],
|
||||
[
|
||||
UTIL_ARG_ENABLE(NAME: jtreg-test-thread-factory, DEFAULT: auto,
|
||||
RESULT: BUILD_JTREG_TEST_THREAD_FACTORY,
|
||||
DESC: [enable building of the jtreg test thread factory],
|
||||
DEFAULT_DESC: [enabled if jtreg is present],
|
||||
CHECKING_MSG: [if the jtreg test thread factory should be built],
|
||||
CHECK_AVAILABLE: [
|
||||
AC_MSG_CHECKING([if the jtreg test thread factory is available])
|
||||
if test "x$JT_HOME" != "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AVAILABLE=false
|
||||
AC_MSG_RESULT([no (jtreg not present)])
|
||||
fi
|
||||
])
|
||||
AC_SUBST(BUILD_JTREG_TEST_THREAD_FACTORY)
|
||||
])
|
||||
|
||||
@@ -99,9 +99,6 @@ AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
||||
AC_ARG_WITH(vulkan-include, [AS_HELP_STRING([--with-vulkan-include],
|
||||
[specify directory for the vulkan include files])])
|
||||
|
||||
AC_ARG_WITH(vulkan-shader-compiler, [AS_HELP_STRING([--with-vulkan-shader-compiler],
|
||||
[specify which shader compiler to use: glslc/glslangValidator])])
|
||||
|
||||
if test "x$SUPPORTS_LIB_VULKAN" = xfalse; then
|
||||
|
||||
if (test "x${with_vulkan}" != x && test "x${with_vulkan}" != xno) || \
|
||||
@@ -123,6 +120,7 @@ AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
||||
AC_CHECK_HEADERS([${with_vulkan_include}/include/vulkan/vulkan.h],
|
||||
[ VULKAN_FOUND=yes
|
||||
VULKAN_FLAGS="-DVK_USE_PLATFORM_WAYLAND_KHR -I${with_vulkan_include}/include -DVULKAN_ENABLED"
|
||||
VULKAN_ENABLED=true
|
||||
],
|
||||
[ AC_MSG_ERROR([Can't find 'vulkan/vulkan.h' under '${with_vulkan_include}']) ]
|
||||
)
|
||||
@@ -133,6 +131,7 @@ AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
||||
AC_CHECK_HEADERS([$VULKAN_SDK/include/vulkan/vulkan.h],
|
||||
[ VULKAN_FOUND=yes
|
||||
VULKAN_FLAGS="-DVK_USE_PLATFORM_WAYLAND_KHR -I${VULKAN_SDK}/include -DVULKAN_ENABLED"
|
||||
VULKAN_ENABLED=true
|
||||
],
|
||||
[ VULKAN_FOUND=no; break ]
|
||||
)
|
||||
@@ -143,6 +142,7 @@ AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
||||
AC_CHECK_HEADERS([vulkan/vulkan.h],
|
||||
[ VULKAN_FOUND=yes
|
||||
VULKAN_FLAGS="-DVK_USE_PLATFORM_WAYLAND_KHR -DVULKAN_ENABLED"
|
||||
VULKAN_ENABLED=true
|
||||
],
|
||||
[ VULKAN_FOUND=no; break ]
|
||||
)
|
||||
@@ -151,32 +151,11 @@ AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
||||
if test "x$VULKAN_FOUND" = xno; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([vulkan])
|
||||
AC_MSG_ERROR([Could not find vulkan! $HELP_MSG ])
|
||||
else
|
||||
# Find shader compiler - glslc or glslangValidator
|
||||
if (test "x${with_vulkan_shader_compiler}" = x || test "x${with_vulkan_shader_compiler}" = xglslc); then
|
||||
UTIL_LOOKUP_PROGS(GLSLC, glslc)
|
||||
SHADER_COMPILER="$GLSLC"
|
||||
VULKAN_SHADER_COMPILER="glslc --target-env=vulkan1.2 -mfmt=num -o"
|
||||
fi
|
||||
|
||||
if (test "x${with_vulkan_shader_compiler}" = x || test "x${with_vulkan_shader_compiler}" = xglslangValidator) && \
|
||||
test "x$SHADER_COMPILER" = x; then
|
||||
UTIL_LOOKUP_PROGS(GLSLANG, glslangValidator)
|
||||
SHADER_COMPILER="$GLSLANG"
|
||||
VULKAN_SHADER_COMPILER="glslangValidator --target-env vulkan1.2 -x -o"
|
||||
fi
|
||||
|
||||
if test "x$SHADER_COMPILER" != x; then
|
||||
VULKAN_ENABLED=true
|
||||
else
|
||||
AC_MSG_ERROR([Can't find shader compiler])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(VULKAN_FLAGS)
|
||||
AC_SUBST(VULKAN_SHADER_COMPILER)
|
||||
AC_SUBST(VULKAN_ENABLED)
|
||||
AC_SUBST(WAYLAND_CFLAGS)
|
||||
AC_SUBST(WAYLAND_LIBS)
|
||||
|
||||
@@ -98,7 +98,7 @@ AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
|
||||
fi
|
||||
|
||||
# Check if ffi is needed
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(zero) || test "x$ENABLE_FALLBACK_LINKER" = "xtrue"; then
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(zero); then
|
||||
NEEDS_LIB_FFI=true
|
||||
else
|
||||
NEEDS_LIB_FFI=false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -640,7 +640,6 @@ AC_DEFUN([PLATFORM_SET_MODULE_TARGET_OS_VALUES],
|
||||
])
|
||||
|
||||
#%%% Build and target systems %%%
|
||||
# Make sure to only use tools set up in BASIC_SETUP_FUNDAMENTAL_TOOLS.
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
|
||||
[
|
||||
# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
|
||||
@@ -657,21 +656,6 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
|
||||
PLATFORM_SET_MODULE_TARGET_OS_VALUES
|
||||
PLATFORM_SET_RELEASE_FILE_OS_VALUES
|
||||
PLATFORM_SETUP_LEGACY_VARS
|
||||
PLATFORM_CHECK_DEPRECATION
|
||||
])
|
||||
|
||||
AC_DEFUN([PLATFORM_CHECK_DEPRECATION],
|
||||
[
|
||||
AC_ARG_ENABLE(deprecated-ports, [AS_HELP_STRING([--enable-deprecated-ports@<:@=yes/no@:>@],
|
||||
[Suppress the error when configuring for a deprecated port @<:@no@:>@])])
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows && test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
if test "x$enable_deprecated_ports" = "xyes"; then
|
||||
AC_MSG_WARN([The Windows 32-bit x86 port is deprecated and may be removed in a future release.])
|
||||
else
|
||||
AC_MSG_ERROR(m4_normalize([The Windows 32-bit x86 port is deprecated and may be removed in a future release.
|
||||
Use --enable-deprecated-ports=yes to suppress this error.]))
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
|
||||
@@ -739,7 +723,7 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# Is the target little or big endian?
|
||||
# Is the target little of big endian?
|
||||
#
|
||||
AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal_endianness"])
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -358,8 +358,6 @@ BUILDJDK_OUTPUTDIR=$(OUTPUTDIR)/buildjdk
|
||||
|
||||
BUILD_FAILURE_HANDLER := @BUILD_FAILURE_HANDLER@
|
||||
|
||||
BUILD_JTREG_TEST_THREAD_FACTORY := @BUILD_JTREG_TEST_THREAD_FACTORY@
|
||||
|
||||
ENABLE_GENERATE_CLASSLIST := @ENABLE_GENERATE_CLASSLIST@
|
||||
|
||||
EXCLUDE_TRANSLATIONS := @EXCLUDE_TRANSLATIONS@
|
||||
@@ -409,9 +407,6 @@ TEST_JOBS?=@TEST_JOBS@
|
||||
DEFAULT_MAKE_TARGET:=@DEFAULT_MAKE_TARGET@
|
||||
DEFAULT_LOG:=@DEFAULT_LOG@
|
||||
|
||||
# Fallback linker
|
||||
ENABLE_FALLBACK_LINKER:=@ENABLE_FALLBACK_LINKER@
|
||||
|
||||
FREETYPE_TO_USE:=@FREETYPE_TO_USE@
|
||||
FREETYPE_LIBS:=@FREETYPE_LIBS@
|
||||
FREETYPE_CFLAGS:=@FREETYPE_CFLAGS@
|
||||
@@ -482,7 +477,6 @@ A11Y_JAWS_ANNOUNCING_ENABLED:=@A11Y_JAWS_ANNOUNCING_ENABLED@
|
||||
WAYLAND_CFLAGS:=@WAYLAND_CFLAGS@
|
||||
WAYLAND_LIBS:=@WAYLAND_LIBS@
|
||||
VULKAN_FLAGS:=@VULKAN_FLAGS@
|
||||
VULKAN_SHADER_COMPILER:=@VULKAN_SHADER_COMPILER@
|
||||
VULKAN_ENABLED:=@VULKAN_ENABLED@
|
||||
|
||||
# The lowest required version of macosx
|
||||
@@ -715,8 +709,6 @@ INTERIM_LANGTOOLS_ADD_EXPORTS := \
|
||||
--add-exports java.base/sun.invoke.util=jdk.compiler.interim \
|
||||
--add-exports java.base/jdk.internal.javac=java.compiler.interim \
|
||||
--add-exports java.base/jdk.internal.javac=jdk.compiler.interim \
|
||||
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.compiler.interim \
|
||||
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.javadoc.interim \
|
||||
#
|
||||
INTERIM_LANGTOOLS_MODULES_COMMA := $(strip $(subst $(SPACE),$(COMMA),$(strip \
|
||||
$(INTERIM_LANGTOOLS_MODULES))))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -40,7 +40,7 @@ VALID_TOOLCHAINS_all="gcc clang xlc microsoft"
|
||||
# These toolchains are valid on different platforms
|
||||
VALID_TOOLCHAINS_linux="gcc clang"
|
||||
VALID_TOOLCHAINS_macosx="clang"
|
||||
VALID_TOOLCHAINS_aix="xlc clang"
|
||||
VALID_TOOLCHAINS_aix="xlc"
|
||||
VALID_TOOLCHAINS_windows="microsoft"
|
||||
|
||||
# Toolchain descriptions
|
||||
@@ -53,7 +53,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
|
||||
TOOLCHAIN_MINIMUM_VERSION_clang="3.5"
|
||||
TOOLCHAIN_MINIMUM_VERSION_gcc="6.0"
|
||||
TOOLCHAIN_MINIMUM_VERSION_microsoft="19.28.0.0" # VS2019 16.8, aka MSVC 14.28
|
||||
TOOLCHAIN_MINIMUM_VERSION_xlc="16.1.0.0011"
|
||||
TOOLCHAIN_MINIMUM_VERSION_xlc=""
|
||||
|
||||
# Minimum supported linker versions, empty means unspecified
|
||||
TOOLCHAIN_MINIMUM_LD_VERSION_gcc="2.18"
|
||||
@@ -234,25 +234,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE],
|
||||
# First toolchain type in the list is the default
|
||||
DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
|
||||
|
||||
# On AIX the default toolchain depends on the installed (found) compiler
|
||||
# xlclang++ -> xlc toolchain
|
||||
# ibm-clang++_r -> clang toolchain
|
||||
# The compiler is searched on the PATH and TOOLCHAIN_PATH
|
||||
# xlclang++ has precedence over ibm-clang++_r if both are installed
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
DEFAULT_TOOLCHAIN="clang"
|
||||
if test "x$TOOLCHAIN_PATH" != x; then
|
||||
if test -e ${TOOLCHAIN_PATH}/xlclang++; then
|
||||
DEFAULT_TOOLCHAIN="xlc"
|
||||
fi
|
||||
else
|
||||
UTIL_LOOKUP_PROGS(XLCLANG_TEST_PATH, xlclang++)
|
||||
if test "x$XLCLANG_TEST_PATH" != x; then
|
||||
DEFAULT_TOOLCHAIN="xlc"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$with_toolchain_type" = xlist; then
|
||||
# List all toolchains
|
||||
AC_MSG_NOTICE([The following toolchains are valid on this platform:])
|
||||
@@ -282,40 +263,22 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE],
|
||||
if test "x$TOOLCHAIN_PATH" != x; then
|
||||
XLC_TEST_PATH=${TOOLCHAIN_PATH}/
|
||||
fi
|
||||
if test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
TOOLCHAIN_DESCRIPTION_clang="IBM Open XL C/C++"
|
||||
XLCLANG_VERSION_OUTPUT=`${XLC_TEST_PATH}ibm-clang++_r --version 2>&1 | $HEAD -n 1`
|
||||
$ECHO "$XLCLANG_VERSION_OUTPUT" | $GREP "IBM Open XL C/C++ for AIX" > /dev/null
|
||||
if test $? -eq 0; then
|
||||
AC_MSG_NOTICE([ibm-clang++_r output: $XLCLANG_VERSION_OUTPUT])
|
||||
else
|
||||
AC_MSG_ERROR([ibm-clang++_r version output check failed, output: $XLCLANG_VERSION_OUTPUT])
|
||||
fi
|
||||
|
||||
XLCLANG_VERSION_OUTPUT=`${XLC_TEST_PATH}xlclang++ -qversion 2>&1 | $HEAD -n 1`
|
||||
$ECHO "$XLCLANG_VERSION_OUTPUT" | $GREP "IBM XL C/C++ for AIX" > /dev/null
|
||||
if test $? -eq 0; then
|
||||
AC_MSG_NOTICE([xlclang++ output: $XLCLANG_VERSION_OUTPUT])
|
||||
else
|
||||
XLCLANG_VERSION_OUTPUT=`${XLC_TEST_PATH}xlclang++ -qversion 2>&1 | $HEAD -n 1`
|
||||
$ECHO "$XLCLANG_VERSION_OUTPUT" | $GREP "IBM XL C/C++ for AIX" > /dev/null
|
||||
if test $? -eq 0; then
|
||||
AC_MSG_NOTICE([xlclang++ output: $XLCLANG_VERSION_OUTPUT])
|
||||
else
|
||||
AC_MSG_ERROR([xlclang++ version output check failed, output: $XLCLANG_VERSION_OUTPUT])
|
||||
fi
|
||||
AC_MSG_ERROR([xlclang++ version output check failed, output: $XLCLANG_VERSION_OUTPUT])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
TOOLCHAIN_CC_BINARY_clang="ibm-clang_r"
|
||||
else
|
||||
TOOLCHAIN_CC_BINARY_clang="clang"
|
||||
fi
|
||||
TOOLCHAIN_CC_BINARY_clang="clang"
|
||||
TOOLCHAIN_CC_BINARY_gcc="gcc"
|
||||
TOOLCHAIN_CC_BINARY_microsoft="cl"
|
||||
TOOLCHAIN_CC_BINARY_xlc="xlclang"
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
TOOLCHAIN_CXX_BINARY_clang="ibm-clang++_r"
|
||||
else
|
||||
TOOLCHAIN_CXX_BINARY_clang="clang++"
|
||||
fi
|
||||
TOOLCHAIN_CXX_BINARY_clang="clang++"
|
||||
TOOLCHAIN_CXX_BINARY_gcc="g++"
|
||||
TOOLCHAIN_CXX_BINARY_microsoft="cl"
|
||||
TOOLCHAIN_CXX_BINARY_xlc="xlclang++"
|
||||
@@ -421,7 +384,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
|
||||
# Collapse compiler output into a single line
|
||||
COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
|
||||
COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
|
||||
$SED -e 's/^.*Version: \(@<:@1-9@:>@@<:@0-9.@:>@*\).*$/\1/'`
|
||||
$SED -e 's/^.*, V\(@<:@1-9@:>@@<:@0-9.@:>@*\).*$/\1/'`
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# There is no specific version flag, but all output starts with a version string.
|
||||
# First line typically looks something like:
|
||||
@@ -669,7 +632,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
|
||||
TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: $TOOLCHAIN_MINIMUM_VERSION,
|
||||
IF_OLDER_THAN: [
|
||||
AC_MSG_WARN([You are using $TOOLCHAIN_TYPE $CC_VERSION_NUMBER which is older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration.])
|
||||
AC_MSG_WARN([You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration.])
|
||||
]
|
||||
)
|
||||
fi
|
||||
@@ -1003,11 +966,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS],
|
||||
# Setup hotspot lecagy names for toolchains
|
||||
HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
|
||||
if test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
HOTSPOT_TOOLCHAIN_TYPE=xlc
|
||||
else
|
||||
HOTSPOT_TOOLCHAIN_TYPE=gcc
|
||||
fi
|
||||
HOTSPOT_TOOLCHAIN_TYPE=gcc
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
HOTSPOT_TOOLCHAIN_TYPE=visCPP
|
||||
fi
|
||||
|
||||
@@ -42,6 +42,7 @@ DOCS_MODULES= \
|
||||
jdk.hotspot.agent \
|
||||
jdk.httpserver \
|
||||
jdk.jpackage \
|
||||
jdk.incubator.concurrent \
|
||||
jdk.incubator.vector \
|
||||
jdk.jartool \
|
||||
jdk.javadoc \
|
||||
|
||||
@@ -26,16 +26,16 @@
|
||||
# Versions and download locations for dependencies used by GitHub Actions (GHA)
|
||||
|
||||
GTEST_VERSION=1.13.0
|
||||
JTREG_VERSION=7.2+1
|
||||
JTREG_VERSION=7.1.1+1
|
||||
|
||||
LINUX_X64_BOOT_JDK_EXT=tar.gz
|
||||
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk20/bdc68b4b9cbc4ebcb30745c85038d91d/36/GPL/openjdk-20_linux-x64_bin.tar.gz
|
||||
LINUX_X64_BOOT_JDK_SHA256=bb863b2d542976d1ae4b7b81af3e78b1e4247a64644350b552d298d8dc5980dc
|
||||
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk19/877d6127e982470ba2a7faa31cc93d04/36/GPL/openjdk-19_linux-x64_bin.tar.gz
|
||||
LINUX_X64_BOOT_JDK_SHA256=f47aba585cfc9ecff1ed8e023524e8309f4315ed8b80100b40c7dcc232c12f96
|
||||
|
||||
MACOS_X64_BOOT_JDK_EXT=tar.gz
|
||||
MACOS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk20/bdc68b4b9cbc4ebcb30745c85038d91d/36/GPL/openjdk-20_macos-x64_bin.tar.gz
|
||||
MACOS_X64_BOOT_JDK_SHA256=47cf960d9bb89dbe987535a389f7e26c42de7c984ef5108612d77c81aa8cc6a4
|
||||
MACOS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk19/877d6127e982470ba2a7faa31cc93d04/36/GPL/openjdk-19_macos-x64_bin.tar.gz
|
||||
MACOS_X64_BOOT_JDK_SHA256=bfd33f5b2590fd552ae2d9231340c6b4704a872f927dce1c52860b78c49a5a11
|
||||
|
||||
WINDOWS_X64_BOOT_JDK_EXT=zip
|
||||
WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk20/bdc68b4b9cbc4ebcb30745c85038d91d/36/GPL/openjdk-20_windows-x64_bin.zip
|
||||
WINDOWS_X64_BOOT_JDK_SHA256=c92fae5e42b9aecf444a66c8ec563c652f60b1e231dfdd33a4f5a3e3603058fb
|
||||
WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk19/877d6127e982470ba2a7faa31cc93d04/36/GPL/openjdk-19_windows-x64_bin.zip
|
||||
WINDOWS_X64_BOOT_JDK_SHA256=8fabcee7c4e8d3b53486777ecd27bb906d67d7c1efd1bf22a8290cf659afa487
|
||||
|
||||
@@ -390,7 +390,7 @@ var getJibProfilesCommon = function (input, data) {
|
||||
};
|
||||
};
|
||||
|
||||
common.boot_jdk_version = "20";
|
||||
common.boot_jdk_version = "19";
|
||||
common.boot_jdk_build_number = "36";
|
||||
common.boot_jdk_home = input.get("boot_jdk", "install_path") + "/jdk-"
|
||||
+ common.boot_jdk_version
|
||||
@@ -463,8 +463,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_cpu: "x86",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest"],
|
||||
configure_args: concat(common.configure_args_32bit,
|
||||
"--enable-deprecated-ports"),
|
||||
configure_args: concat(common.configure_args_32bit),
|
||||
},
|
||||
|
||||
"windows-aarch64": {
|
||||
@@ -588,23 +587,21 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"linux-x64-zero": {
|
||||
target_os: "linux",
|
||||
target_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "libffi"],
|
||||
dependencies: ["devkit", "gtest"],
|
||||
configure_args: concat(common.configure_args_64bit, [
|
||||
"--with-zlib=system",
|
||||
"--with-jvm-variants=zero",
|
||||
"--with-libffi=" + input.get("libffi", "home_path"),
|
||||
"--enable-libffi-bundling",
|
||||
"--enable-libffi-bundling"
|
||||
])
|
||||
},
|
||||
|
||||
"linux-aarch64-zero": {
|
||||
target_os: "linux",
|
||||
target_cpu: "aarch64",
|
||||
dependencies: ["devkit", "gtest", "libffi"],
|
||||
dependencies: ["devkit", "gtest"],
|
||||
configure_args: concat(common.configure_args_64bit, [
|
||||
"--with-zlib=system",
|
||||
"--with-jvm-variants=zero",
|
||||
"--with-libffi=" + input.get("libffi", "home_path"),
|
||||
"--enable-libffi-bundling"
|
||||
])
|
||||
},
|
||||
@@ -613,11 +610,10 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_os: "linux",
|
||||
target_cpu: "x86",
|
||||
build_cpu: "x64",
|
||||
dependencies: ["devkit", "gtest", "libffi"],
|
||||
dependencies: ["devkit", "gtest"],
|
||||
configure_args: concat(common.configure_args_32bit, [
|
||||
"--with-zlib=system",
|
||||
"--with-jvm-variants=zero",
|
||||
"--with-libffi=" + input.get("libffi", "home_path"),
|
||||
"--enable-libffi-bundling"
|
||||
])
|
||||
}
|
||||
@@ -748,40 +744,6 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
common.debug_profile_artifacts(artifactData[name]));
|
||||
});
|
||||
|
||||
// Define artifact just for linux-x64-zero, which is the only one we test on
|
||||
["linux-x64"].forEach(function (name) {
|
||||
var o = artifactData[name]
|
||||
var pf = o.platform
|
||||
var jdk_subdir = (o.jdk_subdir != null ? o.jdk_subdir : "jdk-" + data.version);
|
||||
var jdk_suffix = (o.jdk_suffix != null ? o.jdk_suffix : "tar.gz");
|
||||
var zeroName = name + "-zero";
|
||||
profiles[zeroName].artifacts = {
|
||||
jdk: {
|
||||
local: "bundles/\\(jdk.*bin." + jdk_suffix + "\\)",
|
||||
remote: [
|
||||
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-zero." + jdk_suffix,
|
||||
],
|
||||
subdir: jdk_subdir,
|
||||
exploded: "images/jdk",
|
||||
},
|
||||
test: {
|
||||
local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
|
||||
remote: [
|
||||
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-zero-tests.tar.gz",
|
||||
],
|
||||
exploded: "images/test"
|
||||
},
|
||||
jdk_symbols: {
|
||||
local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
|
||||
remote: [
|
||||
"bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-zero-symbols.tar.gz",
|
||||
],
|
||||
subdir: jdk_subdir,
|
||||
exploded: "images/jdk"
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
buildJdkDep = input.build_os + "-" + input.build_cpu + ".jdk";
|
||||
docsProfiles = {
|
||||
"docs": {
|
||||
@@ -1188,9 +1150,9 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
jtreg: {
|
||||
server: "jpg",
|
||||
product: "jtreg",
|
||||
version: "7.2",
|
||||
version: "7.1.1",
|
||||
build_number: "1",
|
||||
file: "bundles/jtreg-7.2+1.zip",
|
||||
file: "bundles/jtreg-7.1.1+1.zip",
|
||||
environment_name: "JT_HOME",
|
||||
environment_path: input.get("jtreg", "home_path") + "/bin",
|
||||
configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"),
|
||||
@@ -1272,13 +1234,6 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
ext: "tar.gz",
|
||||
revision: "1.13.0+1.0"
|
||||
},
|
||||
|
||||
libffi: {
|
||||
organization: common.organization,
|
||||
module: "libffi-" + input.target_platform,
|
||||
ext: "tar.gz",
|
||||
revision: "3.4.2+1.0"
|
||||
},
|
||||
};
|
||||
|
||||
return dependencies;
|
||||
|
||||
@@ -43,6 +43,7 @@ BOOT_MODULES= \
|
||||
java.rmi \
|
||||
java.security.sasl \
|
||||
java.xml \
|
||||
jdk.incubator.concurrent \
|
||||
jdk.incubator.vector \
|
||||
jdk.internal.vm.ci \
|
||||
jdk.jfr \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -37,6 +37,6 @@ DEFAULT_VERSION_DATE=2023-09-19
|
||||
DEFAULT_VERSION_CLASSFILE_MAJOR=65 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
|
||||
DEFAULT_VERSION_CLASSFILE_MINOR=0
|
||||
DEFAULT_VERSION_DOCS_API_SINCE=11
|
||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="20 21"
|
||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="19 20 21"
|
||||
DEFAULT_JDK_SOURCE_TARGET_VERSION=21
|
||||
DEFAULT_PROMOTED_VERSION_PRE=
|
||||
DEFAULT_PROMOTED_VERSION_PRE=ea
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -56,10 +56,10 @@ public class $NAME_CLZ$ extends Charset
|
||||
return new DoubleByte.Encoder$ENCTYPE$(this, $ENC_REPLACEMENT$ EncodeHolder.c2b, EncodeHolder.c2bIndex, $ASCIICOMPATIBLE$);
|
||||
}
|
||||
|
||||
public static class DecodeHolder {
|
||||
static class DecodeHolder {
|
||||
$B2C$
|
||||
public static final char[][] b2c = new char[b2cStr.length][];
|
||||
public static final char[] b2cSB;
|
||||
static final char[][] b2c = new char[b2cStr.length][];
|
||||
static final char[] b2cSB;
|
||||
|
||||
static {
|
||||
for (int i = 0; i < b2cStr.length; i++) {
|
||||
@@ -72,9 +72,9 @@ public class $NAME_CLZ$ extends Charset
|
||||
}
|
||||
}
|
||||
|
||||
public static class EncodeHolder {
|
||||
public static final char[] c2b = new char[$C2BLENGTH$];
|
||||
public static final char[] c2bIndex = new char[0x100];
|
||||
static class EncodeHolder {
|
||||
static final char[] c2b = new char[$C2BLENGTH$];
|
||||
static final char[] c2bIndex = new char[0x100];
|
||||
|
||||
static {
|
||||
$NONROUNDTRIP_B2C$
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
# generate these charsets into sun.nio.cs
|
||||
#
|
||||
Big5
|
||||
Big5_Solaris
|
||||
Big5_HKSCS
|
||||
EUC_CN
|
||||
EUC_KR
|
||||
EUC_JP
|
||||
EUC_JP_LINUX
|
||||
EUC_JP_Open
|
||||
EUC_TW
|
||||
GBK
|
||||
ISO_8859_11
|
||||
@@ -14,9 +16,12 @@ ISO_8859_3
|
||||
ISO_8859_6
|
||||
ISO_8859_8
|
||||
Johab
|
||||
PCK
|
||||
TIS_620
|
||||
JIS_X_0201
|
||||
JIS_X_0208
|
||||
JIS_X_0212
|
||||
JIS_X_0208_Solaris
|
||||
JIS_X_0212_Solaris
|
||||
MS932
|
||||
SJIS
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -30,6 +30,5 @@ jio_vsnprintf
|
||||
JNI_CreateJavaVM
|
||||
JNI_GetCreatedJavaVMs
|
||||
JNI_GetDefaultJavaVMInitArgs
|
||||
JVM_IsForeignLinkerSupported
|
||||
JVM_FindClassFromBootLoader
|
||||
JVM_InitAgentProperties
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -181,7 +181,6 @@ JVM_NewArray
|
||||
JVM_NewInstanceFromConstructor
|
||||
JVM_NewMultiArray
|
||||
JVM_PhantomReferenceRefersTo
|
||||
JVM_PrintWarningAtDynamicAgentLoad
|
||||
JVM_RaiseSignal
|
||||
JVM_RawMonitorCreate
|
||||
JVM_RawMonitorDestroy
|
||||
@@ -218,8 +217,6 @@ JVM_DefineModule
|
||||
JVM_SetBootLoaderUnnamedModule
|
||||
|
||||
# Virtual thread notifications for JVMTI
|
||||
JVM_VirtualThreadStart
|
||||
JVM_VirtualThreadEnd
|
||||
JVM_VirtualThreadMount
|
||||
JVM_VirtualThreadUnmount
|
||||
JVM_VirtualThreadHideFrames
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This script generates a libffi bundle. On linux by building it from source
|
||||
# using a devkit, which should match the devkit used to build the JDK.
|
||||
#
|
||||
# Set MAKE_ARGS to add parameters to make. Ex:
|
||||
#
|
||||
# $ MAKE_ARGS=-j32 bash createLibffiBundle.sh
|
||||
#
|
||||
# The script tries to behave well on multiple invocations, only performing steps
|
||||
# not already done. To redo a step, manually delete the target files from that
|
||||
# step.
|
||||
#
|
||||
# Note that the libtool and texinfo packages are needed to build libffi
|
||||
# $ sudo apt install libtool texinfo
|
||||
|
||||
LIBFFI_VERSION=3.4.2
|
||||
|
||||
BUNDLE_NAME=libffi-$LIBFFI_VERSION.tar.gz
|
||||
|
||||
SCRIPT_FILE="$(basename $0)"
|
||||
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
|
||||
OUTPUT_DIR="${SCRIPT_DIR}/../../build/libffi"
|
||||
SRC_DIR="$OUTPUT_DIR/src"
|
||||
DOWNLOAD_DIR="$OUTPUT_DIR/download"
|
||||
INSTALL_DIR="$OUTPUT_DIR/install"
|
||||
IMAGE_DIR="$OUTPUT_DIR/image"
|
||||
|
||||
USAGE="$0 <devkit dir>"
|
||||
|
||||
if [ "$1" = "" ]; then
|
||||
echo $USAGE
|
||||
exit 1
|
||||
fi
|
||||
DEVKIT_DIR="$1"
|
||||
|
||||
# Download source distros
|
||||
mkdir -p $DOWNLOAD_DIR
|
||||
cd $DOWNLOAD_DIR
|
||||
SOURCE_TAR=v$LIBFFI_VERSION.tar.gz
|
||||
if [ ! -f $SOURCE_TAR ]; then
|
||||
wget https://github.com/libffi/libffi/archive/refs/tags/v$LIBFFI_VERSION.tar.gz
|
||||
fi
|
||||
|
||||
# Unpack src
|
||||
mkdir -p $SRC_DIR
|
||||
cd $SRC_DIR
|
||||
LIBFFI_DIRNAME=libffi-$LIBFFI_VERSION
|
||||
LIBFFI_DIR=$SRC_DIR/$LIBFFI_DIRNAME
|
||||
if [ ! -d $LIBFFI_DIRNAME ]; then
|
||||
echo "Unpacking $SOURCE_TAR"
|
||||
tar xf $DOWNLOAD_DIR/$SOURCE_TAR
|
||||
fi
|
||||
|
||||
# Build
|
||||
cd $LIBFFI_DIR
|
||||
if [ ! -e $LIBFFI_DIR/configure ]; then
|
||||
bash ./autogen.sh
|
||||
fi
|
||||
# For Linux/x86, add --build=i686-pc-linux-gnu CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32
|
||||
bash ./configure --prefix=$INSTALL_DIR CC=$DEVKIT_DIR/bin/gcc CXX=$DEVKIT_DIR/bin/g++
|
||||
|
||||
# Run with nice to keep system usable during build.
|
||||
nice make $MAKE_ARGS install
|
||||
|
||||
mkdir -p $IMAGE_DIR
|
||||
# Extract what we need into an image
|
||||
if [ ! -e $IMAGE_DIR/lib/libffi.so ]; then
|
||||
echo "Copying libffi.so* to image"
|
||||
mkdir -p $IMAGE_DIR/lib
|
||||
# For Linux/x86 it's under /lib/ instead of /lib64/
|
||||
cp -a $INSTALL_DIR/lib64/libffi.so* $IMAGE_DIR/lib/
|
||||
fi
|
||||
if [ ! -e $IMAGE_DIR/include/ ]; then
|
||||
echo "Copying include to image"
|
||||
mkdir -p $IMAGE_DIR/include
|
||||
cp -a $INSTALL_DIR/include/. $IMAGE_DIR/include/
|
||||
fi
|
||||
if [ ! -e $IMAGE_DIR/$SCRIPT_FILE ]; then
|
||||
echo "Copying this script to image"
|
||||
cp -a $SCRIPT_DIR/$SCRIPT_FILE $IMAGE_DIR/
|
||||
fi
|
||||
|
||||
# Create bundle
|
||||
if [ ! -e $OUTPUT_DIR/$BUNDLE_NAME ]; then
|
||||
echo "Creating $OUTPUT_DIR/$BUNDLE_NAME"
|
||||
cd $IMAGE_DIR
|
||||
tar zcf $OUTPUT_DIR/$BUNDLE_NAME *
|
||||
fi
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -37,13 +37,8 @@ ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
ifeq ($(call isBuildOs, linux), true)
|
||||
ADLC_CFLAGS := -fno-exceptions -DLINUX
|
||||
else ifeq ($(call isBuildOs, aix), true)
|
||||
ifeq ($(TOOLCHAIN_TYPE), clang)
|
||||
ADLC_LDFLAGS += -m64
|
||||
ADLC_CFLAGS := -fno-rtti -fexceptions -ffunction-sections -m64 -DAIX -mcpu=pwr8
|
||||
else
|
||||
ADLC_LDFLAGS += -q64
|
||||
ADLC_CFLAGS := -qnortti -qeh -q64 -DAIX
|
||||
endif
|
||||
ADLC_LDFLAGS += -q64
|
||||
ADLC_CFLAGS := -qnortti -qeh -q64 -DAIX
|
||||
else ifeq ($(call isBuildOs, windows), true)
|
||||
ADLC_LDFLAGS += -nologo
|
||||
ADLC_CFLAGS := -nologo -EHsc
|
||||
@@ -172,8 +167,6 @@ ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
|
||||
ifeq ($(call check-jvm-feature, zgc), true)
|
||||
AD_SRC_FILES += $(call uniq, $(wildcard $(foreach d, $(AD_SRC_ROOTS), \
|
||||
$d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/gc/x/x_$(HOTSPOT_TARGET_CPU).ad \
|
||||
$d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/gc/x/x_$(HOTSPOT_TARGET_CPU_ARCH).ad \
|
||||
$d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/gc/z/z_$(HOTSPOT_TARGET_CPU).ad \
|
||||
$d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/gc/z/z_$(HOTSPOT_TARGET_CPU_ARCH).ad \
|
||||
)))
|
||||
|
||||
@@ -168,14 +168,10 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
|
||||
DISABLED_WARNINGS_clang_management.cpp := missing-field-initializers, \
|
||||
DISABLED_WARNINGS_clang_notificationThread.cpp := bitwise-instead-of-logical, \
|
||||
DISABLED_WARNINGS_clang_os_posix.cpp := mismatched-tags missing-field-initializers, \
|
||||
DISABLED_WARNINGS_clang_aix_os_posix.cpp := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_postaloc.cpp := tautological-undefined-compare, \
|
||||
DISABLED_WARNINGS_clang_serviceThread.cpp := bitwise-instead-of-logical, \
|
||||
DISABLED_WARNINGS_clang_vm_version_x86.cpp := missing-field-initializers, \
|
||||
DISABLED_WARNINGS_clang_zTracer.cpp := undefined-var-template, \
|
||||
DISABLED_WARNINGS_clang_aix_debug.cpp := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_aix_jvm.cpp := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_aix_osThread_aix.cpp := tautological-undefined-compare, \
|
||||
DISABLED_WARNINGS_xlc := $(DISABLED_WARNINGS_xlc), \
|
||||
DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft), \
|
||||
ASFLAGS := $(JVM_ASFLAGS), \
|
||||
|
||||
@@ -150,7 +150,6 @@ endif
|
||||
ifneq ($(call check-jvm-feature, zgc), true)
|
||||
JVM_CFLAGS_FEATURES += -DINCLUDE_ZGC=0
|
||||
JVM_EXCLUDE_PATTERNS += gc/z
|
||||
JVM_EXCLUDE_PATTERNS += gc/x
|
||||
endif
|
||||
|
||||
ifneq ($(call check-jvm-feature, shenandoahgc), true)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -109,11 +109,7 @@ else ifeq ($(call isTargetOs, macosx), true)
|
||||
endif
|
||||
|
||||
else ifeq ($(call isTargetOs, aix), true)
|
||||
ifeq ($(TOOLCHAIN_TYPE), clang)
|
||||
BUILD_LIBJVM_synchronizer.cpp_CXXFLAGS := -fno-inline
|
||||
else
|
||||
BUILD_LIBJVM_synchronizer.cpp_CXXFLAGS := -qnoinline
|
||||
endif
|
||||
BUILD_LIBJVM_synchronizer.cpp_CXXFLAGS := -qnoinline
|
||||
BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := $(CXX_O_FLAG_NONE)
|
||||
# Disable aggressive optimizations for functions in sharedRuntimeTrig.cpp
|
||||
# and sharedRuntimeTrans.cpp on ppc64.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -39,7 +39,7 @@ import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.TimeZone;
|
||||
import java.util.TreeMap;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* This tool reads the IANA Language Subtag Registry data file downloaded from
|
||||
@@ -60,9 +60,7 @@ public class EquivMapsGenerator {
|
||||
}
|
||||
copyrightYear = Integer.parseInt(args[2]);
|
||||
readLSRfile(args[0]);
|
||||
// Builds the maps from the IANA data
|
||||
generateEquivalentMap();
|
||||
// Writes the maps out to LocaleEquivalentMaps.java
|
||||
generateSourceCode(args[1]);
|
||||
}
|
||||
|
||||
@@ -138,29 +136,10 @@ public class EquivMapsGenerator {
|
||||
}
|
||||
} else { // language, extlang, legacy, and redundant
|
||||
if (!initialLanguageMap.containsKey(preferred)) {
|
||||
// IANA update 4/13 introduced case where a preferred value
|
||||
// can have a preferred value itself.
|
||||
// eg: ar-ajp has pref ajp which has pref apc
|
||||
boolean foundInOther = false;
|
||||
Pattern pattern = Pattern.compile(","+preferred+"(,|$)");
|
||||
// Check if current pref exists inside a value for another pref
|
||||
List<StringBuilder> doublePrefs = initialLanguageMap
|
||||
.values()
|
||||
.stream()
|
||||
.filter(e -> pattern.matcher(e.toString()).find())
|
||||
.toList();
|
||||
for (StringBuilder otherPrefVal : doublePrefs) {
|
||||
otherPrefVal.append(",");
|
||||
otherPrefVal.append(tag);
|
||||
foundInOther = true;
|
||||
}
|
||||
if (!foundInOther) {
|
||||
// does not exist in any other pref's values, so add as new entry
|
||||
sb = new StringBuilder(preferred);
|
||||
sb.append(',');
|
||||
sb.append(tag);
|
||||
initialLanguageMap.put(preferred, sb);
|
||||
}
|
||||
sb = new StringBuilder(preferred);
|
||||
sb.append(',');
|
||||
sb.append(tag);
|
||||
initialLanguageMap.put(preferred, sb);
|
||||
} else {
|
||||
sb = initialLanguageMap.get(preferred);
|
||||
sb.append(',');
|
||||
@@ -177,7 +156,7 @@ public class EquivMapsGenerator {
|
||||
// "yue" is defined both as extlang and redundant. Remove the dup.
|
||||
subtags = Arrays.stream(initialLanguageMap.get(preferred).toString().split(","))
|
||||
.distinct()
|
||||
.toList()
|
||||
.collect(Collectors.toList())
|
||||
.toArray(new String[0]);
|
||||
|
||||
if (subtags.length == 2) {
|
||||
@@ -215,6 +194,63 @@ public class EquivMapsGenerator {
|
||||
return list.toArray(new String[list.size()]);
|
||||
}
|
||||
|
||||
private static String generateValuesString(String[] values) {
|
||||
String outputStr = "";
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
if (i != values.length - 1) {
|
||||
outputStr = outputStr + "\"" + values[i] + "\", ";
|
||||
} else {
|
||||
outputStr = outputStr + "\"" + values[i] + "\"";
|
||||
}
|
||||
|
||||
}
|
||||
return outputStr;
|
||||
}
|
||||
|
||||
private static final String COPYRIGHT = "/*\n"
|
||||
+ " * Copyright (c) 2012, %d, Oracle and/or its affiliates. All rights reserved.\n"
|
||||
+ " * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n"
|
||||
+ " *\n"
|
||||
+ " * This code is free software; you can redistribute it and/or modify it\n"
|
||||
+ " * under the terms of the GNU General Public License version 2 only, as\n"
|
||||
+ " * published by the Free Software Foundation. Oracle designates this\n"
|
||||
+ " * particular file as subject to the \"Classpath\" exception as provided\n"
|
||||
+ " * by Oracle in the LICENSE file that accompanied this code.\n"
|
||||
+ " *\n"
|
||||
+ " * This code is distributed in the hope that it will be useful, but WITHOUT\n"
|
||||
+ " * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n"
|
||||
+ " * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n"
|
||||
+ " * version 2 for more details (a copy is included in the LICENSE file that\n"
|
||||
+ " * accompanied this code).\n"
|
||||
+ " *\n"
|
||||
+ " * You should have received a copy of the GNU General Public License version\n"
|
||||
+ " * 2 along with this work; if not, write to the Free Software Foundation,\n"
|
||||
+ " * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n"
|
||||
+ " *\n"
|
||||
+ " * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n"
|
||||
+ " * or visit www.oracle.com if you need additional information or have any\n"
|
||||
+ " * questions.\n"
|
||||
+ "*/\n\n";
|
||||
|
||||
private static final String headerText =
|
||||
"package sun.util.locale;\n\n"
|
||||
+ "import java.util.HashMap;\n"
|
||||
+ "import java.util.Map;\n\n"
|
||||
+ "final class LocaleEquivalentMaps {\n\n"
|
||||
+ " static final Map<String, String> singleEquivMap;\n"
|
||||
+ " static final Map<String, String[]> multiEquivsMap;\n"
|
||||
+ " static final Map<String, String> regionVariantEquivMap;\n\n"
|
||||
+ " static {\n"
|
||||
+ " singleEquivMap = new HashMap<>(";
|
||||
|
||||
private static final String footerText =
|
||||
" }\n\n"
|
||||
+ "}";
|
||||
|
||||
private static String getOpenJDKCopyright() {
|
||||
return String.format(Locale.US, COPYRIGHT, copyrightYear);
|
||||
}
|
||||
|
||||
/**
|
||||
* The input lsr data file is in UTF-8, so theoretically for the characters
|
||||
* beyond US-ASCII, the generated Java String literals need to be Unicode
|
||||
@@ -222,132 +258,53 @@ public class EquivMapsGenerator {
|
||||
* the case since we don't use "description", "comment" or alike.
|
||||
*/
|
||||
private static void generateSourceCode(String fileName) {
|
||||
|
||||
try (BufferedWriter writer = Files.newBufferedWriter(
|
||||
Paths.get(fileName))) {
|
||||
writer.write(getOpenJDKCopyright());
|
||||
writer.write(HEADER_TEXT);
|
||||
writer.write(getMapsText());
|
||||
writer.write(getLSRText());
|
||||
writeEquiv(writer, "singleEquivMap", sortedLanguageMap1);
|
||||
writer.write(headerText
|
||||
+ (int)(sortedLanguageMap1.size() / 0.75f + 1) + ");\n"
|
||||
+ " multiEquivsMap = new HashMap<>("
|
||||
+ (int)(sortedLanguageMap2.size() / 0.75f + 1) + ");\n"
|
||||
+ " regionVariantEquivMap = new HashMap<>("
|
||||
+ (int)(sortedRegionVariantMap.size() / 0.75f + 1) + ");\n\n"
|
||||
+ " // This is an auto-generated file and should not be manually edited.\n"
|
||||
+ " // LSR Revision: " + LSRrevisionDate);
|
||||
writer.newLine();
|
||||
writeMultiEquiv(writer);
|
||||
|
||||
for (String key : sortedLanguageMap1.keySet()) {
|
||||
String value = sortedLanguageMap1.get(key);
|
||||
writer.write(" singleEquivMap.put(\""
|
||||
+ key + "\", \"" + value + "\");");
|
||||
writer.newLine();
|
||||
}
|
||||
|
||||
writer.newLine();
|
||||
writeEquiv(writer, "regionVariantEquivMap", sortedRegionVariantMap);
|
||||
writer.write(FOOTER_TEXT);
|
||||
for (String key : sortedLanguageMap2.keySet()) {
|
||||
String[] values = sortedLanguageMap2.get(key);
|
||||
|
||||
if (values.length >= 2) {
|
||||
writer.write(" multiEquivsMap.put(\""
|
||||
+ key + "\", new String[] {"
|
||||
+ generateValuesString(values) + "});");
|
||||
writer.newLine();
|
||||
}
|
||||
}
|
||||
|
||||
writer.newLine();
|
||||
for (String key : sortedRegionVariantMap.keySet()) {
|
||||
String value = sortedRegionVariantMap.get(key);
|
||||
writer.write(" regionVariantEquivMap.put(\""
|
||||
+ key + "\", \"" + value + "\");");
|
||||
writer.newLine();
|
||||
}
|
||||
|
||||
writer.write(footerText);
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace(System.err);
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static String getOpenJDKCopyright() {
|
||||
return String.format(Locale.US, COPYRIGHT, copyrightYear);
|
||||
}
|
||||
|
||||
private static final String COPYRIGHT =
|
||||
"""
|
||||
/*
|
||||
* Copyright (c) 2012, %d, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the \"Classpath\" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
""";
|
||||
|
||||
private static final String HEADER_TEXT =
|
||||
"""
|
||||
package sun.util.locale;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
final class LocaleEquivalentMaps {
|
||||
|
||||
static final Map<String, String> singleEquivMap;
|
||||
static final Map<String, String[]> multiEquivsMap;
|
||||
static final Map<String, String> regionVariantEquivMap;
|
||||
|
||||
""";
|
||||
|
||||
private static final String FOOTER_TEXT =
|
||||
"""
|
||||
}
|
||||
|
||||
}
|
||||
""";
|
||||
|
||||
private static String getMapsText() {
|
||||
return """
|
||||
static {
|
||||
singleEquivMap = HashMap.newHashMap(%s);
|
||||
multiEquivsMap = HashMap.newHashMap(%s);
|
||||
regionVariantEquivMap = HashMap.newHashMap(%s);
|
||||
|
||||
""".formatted(
|
||||
sortedLanguageMap1.size(),
|
||||
sortedLanguageMap2.size(),
|
||||
sortedRegionVariantMap.size());
|
||||
}
|
||||
|
||||
private static final String getLSRText(){
|
||||
return """
|
||||
// This is an auto-generated file and should not be manually edited.
|
||||
// LSR Revision: %s
|
||||
""".formatted(LSRrevisionDate);
|
||||
}
|
||||
|
||||
private static void writeMultiEquiv(BufferedWriter writer) throws IOException {
|
||||
for (String key : sortedLanguageMap2.keySet()) {
|
||||
String[] values = sortedLanguageMap2.get(key);
|
||||
if (values.length >= 2) {
|
||||
writer.write(String.format(
|
||||
" multiEquivsMap.put(\"%s\", new String[] {%s});"
|
||||
, key, generateValuesString(values)));
|
||||
writer.newLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Use for writing an equivlancy map with one value
|
||||
private static void writeEquiv(BufferedWriter writer, String name, Map<String, String> map) throws IOException {
|
||||
for (String key : map.keySet()) {
|
||||
String value = map.get(key);
|
||||
writer.write(String.format(
|
||||
" %s.put(\"%s\", \"%s\");"
|
||||
, name, key, value));
|
||||
writer.newLine();
|
||||
}
|
||||
}
|
||||
|
||||
private static String generateValuesString(String[] values) {
|
||||
String outputStr = "";
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
if (i != values.length - 1) {
|
||||
outputStr = String.format("%s\"%s\", ", outputStr, values[i]);
|
||||
} else {
|
||||
outputStr = String.format("%s\"%s\"", outputStr, values[i]);
|
||||
}
|
||||
|
||||
}
|
||||
return outputStr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -145,15 +145,11 @@ public final class SealedGraph implements Taglet {
|
||||
|
||||
static void traverse(State state, TypeElement node, Set<String> exports) {
|
||||
state.addNode(node);
|
||||
if (!(node.getModifiers().contains(Modifier.SEALED) || node.getModifiers().contains(Modifier.FINAL))) {
|
||||
state.addNonSealedEdge(node);
|
||||
} else {
|
||||
for (TypeElement subNode : permittedSubclasses(node, exports)) {
|
||||
if (isInPublicApi(node, exports) && isInPublicApi(subNode, exports)) {
|
||||
state.addEdge(node, subNode);
|
||||
}
|
||||
traverse(state, subNode, exports);
|
||||
for (TypeElement subNode : permittedSubclasses(node, exports)) {
|
||||
if (isInPublicApi(node, exports) && isInPublicApi(subNode, exports)) {
|
||||
state.addEdge(node, subNode);
|
||||
}
|
||||
traverse(state, subNode, exports);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,31 +158,13 @@ public final class SealedGraph implements Taglet {
|
||||
private static final String LABEL = "label";
|
||||
private static final String TOOLTIP = "tooltip";
|
||||
private static final String LINK = "href";
|
||||
private static final String STYLE = "style";
|
||||
|
||||
private final TypeElement rootNode;
|
||||
|
||||
private final StringBuilder builder;
|
||||
|
||||
private final Map<String, Map<String, StyleItem>> nodeStyleMap;
|
||||
|
||||
private int nonSealedHierarchyCount = 0;
|
||||
|
||||
private sealed interface StyleItem {
|
||||
String valueString();
|
||||
|
||||
record PlainString(String text) implements StyleItem {
|
||||
@Override
|
||||
public String valueString() {
|
||||
return "\"" + text + "\"";
|
||||
}
|
||||
}
|
||||
record HtmlString(String text) implements StyleItem {
|
||||
@Override
|
||||
public String valueString() {
|
||||
return "<" + text + ">";
|
||||
}
|
||||
}
|
||||
}
|
||||
private final Map<String, Map<String, String>> nodeStyleMap;
|
||||
|
||||
public State(TypeElement rootNode) {
|
||||
this.rootNode = rootNode;
|
||||
@@ -210,9 +188,13 @@ public final class SealedGraph implements Taglet {
|
||||
|
||||
public void addNode(TypeElement node) {
|
||||
var styles = nodeStyleMap.computeIfAbsent(id(node), n -> new LinkedHashMap<>());
|
||||
styles.put(LABEL, new StyleItem.PlainString(node.getSimpleName().toString()));
|
||||
styles.put(TOOLTIP, new StyleItem.PlainString(node.getQualifiedName().toString()));
|
||||
styles.put(LINK, new StyleItem.PlainString(relativeLink(node)));
|
||||
styles.put(LABEL, node.getSimpleName().toString());
|
||||
styles.put(TOOLTIP, node.getQualifiedName().toString());
|
||||
styles.put(LINK, relativeLink(node));
|
||||
if (!(node.getModifiers().contains(Modifier.SEALED) || node.getModifiers().contains(Modifier.FINAL))) {
|
||||
// This indicates that the hierarchy is not closed
|
||||
styles.put(STYLE, "dashed");
|
||||
}
|
||||
}
|
||||
|
||||
// A permitted class must be in the same package or in the same module.
|
||||
@@ -241,32 +223,12 @@ public final class SealedGraph implements Taglet {
|
||||
.append(lineSeparator());
|
||||
}
|
||||
|
||||
public void addNonSealedEdge(TypeElement node) {
|
||||
// prepare open node
|
||||
var openNodeId = "open node #" + nonSealedHierarchyCount++;
|
||||
var styles = nodeStyleMap.computeIfAbsent(openNodeId, n -> new LinkedHashMap<>());
|
||||
styles.put(LABEL, new StyleItem.HtmlString("<I><any></I>"));
|
||||
styles.put(TOOLTIP, new StyleItem.PlainString("Non-sealed Hierarchy"));
|
||||
|
||||
// add link to parent node
|
||||
builder.append(" ")
|
||||
.append('"')
|
||||
.append(openNodeId)
|
||||
.append('"')
|
||||
.append(" -> ")
|
||||
.append(quotedId(node))
|
||||
.append(" ")
|
||||
.append("[style=\"dashed\"]")
|
||||
.append(";")
|
||||
.append(lineSeparator());
|
||||
}
|
||||
|
||||
public String render() {
|
||||
nodeStyleMap.forEach((nodeName, styles) -> {
|
||||
builder.append(" ")
|
||||
.append('"').append(nodeName).append("\" ")
|
||||
.append(styles.entrySet().stream()
|
||||
.map(e -> e.getKey() + "=" + e.getValue().valueString())
|
||||
.map(e -> e.getKey() + "=\"" + e.getValue() + "\"")
|
||||
.collect(joining(" ", "[", "]")))
|
||||
.append(lineSeparator());
|
||||
});
|
||||
@@ -303,17 +265,16 @@ public final class SealedGraph implements Taglet {
|
||||
}
|
||||
|
||||
private static boolean isInPublicApi(TypeElement typeElement, Set<String> exports) {
|
||||
var packageName = packageName(typeElement);
|
||||
return packageName.isPresent() && exports.contains(packageName.get()) &&
|
||||
typeElement.getModifiers().contains(Modifier.PUBLIC);
|
||||
return (exports.contains(packageName(typeElement.getQualifiedName().toString())) ||
|
||||
exports.contains(packageName(typeElement.getSuperclass().toString()))) &&
|
||||
typeElement.getModifiers().contains(Modifier.PUBLIC);
|
||||
}
|
||||
|
||||
private static Optional<String> packageName(TypeElement element) {
|
||||
return switch (element.getNestingKind()) {
|
||||
case TOP_LEVEL -> Optional.of(((PackageElement) element.getEnclosingElement()).getQualifiedName().toString());
|
||||
case ANONYMOUS, LOCAL -> Optional.empty();
|
||||
case MEMBER -> packageName((TypeElement) element.getEnclosingElement());
|
||||
};
|
||||
private static String packageName(String name) {
|
||||
int lastDot = name.lastIndexOf('.');
|
||||
return lastDot < 0
|
||||
? ""
|
||||
: name.substring(0, lastDot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -2384,8 +2384,7 @@ public class CreateSymbols {
|
||||
MethodDescription method = (MethodDescription) feature;
|
||||
method.methodParameters = new ArrayList<>();
|
||||
for (MethodParameters_attribute.Entry e : params.method_parameter_table) {
|
||||
String name = e.name_index == 0 ? null
|
||||
: cf.constant_pool.getUTF8Value(e.name_index);
|
||||
String name = cf.constant_pool.getUTF8Value(e.name_index);
|
||||
MethodDescription.MethodParam param =
|
||||
new MethodDescription.MethodParam(e.flags, name);
|
||||
method.methodParameters.add(param);
|
||||
|
||||
@@ -27,7 +27,9 @@ DISABLED_WARNINGS_java += this-escape
|
||||
|
||||
DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
JAVAC_FLAGS += -XDstringConcat=inline
|
||||
JAVAC_FLAGS += -XDstringConcat=inline \
|
||||
--enable-preview
|
||||
DISABLED_WARNINGS_java += preview
|
||||
COPY += .icu .dat .spp .nrm content-types.properties \
|
||||
hijrah-config-Hijrah-umalqura_islamic-umalqura.properties
|
||||
CLEAN += intrinsic.properties
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -46,8 +46,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBNET, \
|
||||
DISABLED_WARNINGS_gcc_net_util_md.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_gcc_NetworkInterface.c := unused-function, \
|
||||
DISABLED_WARNINGS_clang_net_util_md.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_aix_DefaultProxySelector.c := deprecated-non-prototype, \
|
||||
DISABLED_WARNINGS_clang_aix_NetworkInterface.c := gnu-pointer-arith, \
|
||||
DISABLED_WARNINGS_microsoft_InetAddress.c := 4244, \
|
||||
DISABLED_WARNINGS_microsoft_ResolverConfigurationImpl.c := 4996, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
@@ -217,18 +215,3 @@ $(eval $(call SetupJdkLibrary, BUILD_SYSLOOKUPLIB, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_SYSLOOKUPLIB)
|
||||
|
||||
################################################################################
|
||||
# Create fallback linker lib
|
||||
|
||||
ifeq ($(ENABLE_FALLBACK_LINKER), true)
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBFALLBACKLINKER, \
|
||||
NAME := fallbackLinker, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFFI_CFLAGS), \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LIBS := $(LIBFFI_LIBS), \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBFALLBACKLINKER)
|
||||
endif
|
||||
|
||||
@@ -50,33 +50,11 @@ $(eval $(call SetupTextFileProcessing, BUILD_VERSION_JAVA, \
|
||||
@@VENDOR_URL_VM_BUG@@ => $(VENDOR_URL_VM_BUG), \
|
||||
))
|
||||
|
||||
|
||||
# Normalize OPENJDK_TARGET_CPU name to match jdk.internal.util.Architecture enum
|
||||
ifneq ($(filter $(OPENJDK_TARGET_CPU), ppc64le), )
|
||||
OPENJDK_TARGET_ARCH_CANONICAL = ppc64
|
||||
else ifneq ($(filter $(OPENJDK_TARGET_CPU), s390x), )
|
||||
OPENJDK_TARGET_ARCH_CANONICAL = s390
|
||||
else ifneq ($(filter $(OPENJDK_TARGET_CPU), x86_64 amd64), )
|
||||
OPENJDK_TARGET_ARCH_CANONICAL = x64
|
||||
else
|
||||
OPENJDK_TARGET_ARCH_CANONICAL := $(OPENJDK_TARGET_CPU)
|
||||
endif
|
||||
|
||||
# Normalize OPENJDK_TARGET_OS operating system name to match jdk.internal.util.OperatingSystem enum
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
OPENJDK_TARGET_OS_CANONICAL = macos
|
||||
else
|
||||
OPENJDK_TARGET_OS_CANONICAL := $(OPENJDK_TARGET_OS)
|
||||
endif
|
||||
|
||||
$(eval $(call SetupTextFileProcessing, BUILD_PLATFORMPROPERTIES_JAVA, \
|
||||
SOURCE_FILES := $(TOPDIR)/src/java.base/share/classes/jdk/internal/util/PlatformProps.java.template, \
|
||||
OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/util/PlatformProps.java, \
|
||||
SOURCE_FILES := $(TOPDIR)/src/java.base/share/classes/jdk/internal/util/OperatingSystemProps.java.template, \
|
||||
OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/util/OperatingSystemProps.java, \
|
||||
REPLACEMENTS := \
|
||||
@@OPENJDK_TARGET_OS@@ => $(OPENJDK_TARGET_OS_CANONICAL) ; \
|
||||
@@OPENJDK_TARGET_CPU@@ => $(OPENJDK_TARGET_ARCH_CANONICAL) ; \
|
||||
@@OPENJDK_TARGET_CPU_ENDIAN@@ => $(OPENJDK_TARGET_CPU_ENDIAN) ; \
|
||||
@@OPENJDK_TARGET_CPU_BITS@@ => $(OPENJDK_TARGET_CPU_BITS), \
|
||||
@@OPENJDK_TARGET_OS@@ => $(OPENJDK_TARGET_OS), \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_VERSION_JAVA) $(BUILD_PLATFORMPROPERTIES_JAVA)
|
||||
|
||||
@@ -198,7 +198,6 @@ ifeq ($(call isTargetOs, aix), true)
|
||||
OPTIMIZATION := HIGH, \
|
||||
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS) \
|
||||
$(addprefix -I, $(LIBJLI_SRC_DIRS)), \
|
||||
DISABLED_WARNINGS_clang_aix := format-nonliteral deprecated-non-prototype, \
|
||||
ARFLAGS := $(ARFLAGS), \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static))
|
||||
|
||||
|
||||
@@ -68,12 +68,10 @@ EXCLUDE_FILES += \
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
# exclude all X11 on Mac.
|
||||
EXCLUDES += \
|
||||
sun/awt/screencast \
|
||||
sun/awt/X11 \
|
||||
sun/awt/wl \
|
||||
sun/java2d/wl \
|
||||
sun/java2d/x11 \
|
||||
sun/java2d/vulkan \
|
||||
sun/java2d/jules \
|
||||
sun/java2d/xr \
|
||||
com/sun/java/swing/plaf/gtk \
|
||||
|
||||
@@ -219,34 +219,6 @@ ifeq ($(call isTargetOs, windows)+$(ENABLE_HEADLESS_ONLY)+$(A11Y_NVDA_ANNOUNCING
|
||||
TARGETS += $(COPY_NVDA_DEPENDENCIES)
|
||||
endif
|
||||
|
||||
# Compile Vulkan shaders
|
||||
define compile-spirv
|
||||
$(call MakeTargetDir)
|
||||
$(VULKAN_SHADER_COMPILER) '$(call DecodeSpace, $@)' '$(call DecodeSpace, $<)'
|
||||
endef
|
||||
spirv-name = $(strip $1).h
|
||||
|
||||
ifeq ($(VULKAN_ENABLED), true)
|
||||
$(eval $(call SetupCopyFiles, COMPILE_VULKAN_SHADERS, \
|
||||
SRC := $(TOPDIR)/src/$(MODULE)/share/glsl/vulkan, \
|
||||
FILES := $(call FindFiles, $(TOPDIR)/src/$(MODULE)/share/glsl/vulkan), \
|
||||
DEST := $(SUPPORT_OUTPUTDIR)/headers/java.desktop/vulkan/spirv, \
|
||||
MACRO := compile-spirv, \
|
||||
NAME_MACRO := spirv-name, \
|
||||
))
|
||||
VULKAN_SHADER_LIST = $(SUPPORT_OUTPUTDIR)/headers/java.desktop/vulkan/shader_list.h
|
||||
$(VULKAN_SHADER_LIST): $(COMPILE_VULKAN_SHADERS)
|
||||
> $(VULKAN_SHADER_LIST) $(NEWLINE) \
|
||||
$(foreach f, $(patsubst $(TOPDIR)/src/$(MODULE)/share/glsl/vulkan/%,%,$(call FindFiles, $(TOPDIR)/src/$(MODULE)/share/glsl/vulkan)), \
|
||||
$(ECHO) SHADER_ENTRY\($(subst .,$(COMMA),$(subst /,_,$f))\) >> $(VULKAN_SHADER_LIST) $(NEWLINE) \
|
||||
$(ECHO) '#ifdef INCLUDE_BYTECODE' >> $(VULKAN_SHADER_LIST) $(NEWLINE) \
|
||||
$(ECHO) '#include "spirv/$f.h"' >> $(VULKAN_SHADER_LIST) $(NEWLINE) \
|
||||
$(ECHO) BYTECODE_END >> $(VULKAN_SHADER_LIST) $(NEWLINE) \
|
||||
$(ECHO) '#endif' >> $(VULKAN_SHADER_LIST) $(NEWLINE) \
|
||||
)
|
||||
$(BUILD_LIBAWT): $(VULKAN_SHADER_LIST)
|
||||
endif
|
||||
|
||||
TARGETS += $(BUILD_LIBAWT)
|
||||
|
||||
################################################################################
|
||||
@@ -274,9 +246,6 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
|
||||
LIBAWT_XAWT_EXCLUDES := medialib debug wl vulkan
|
||||
|
||||
LIBPIPEWIRE_HEADER_DIRS := \
|
||||
$(TOPDIR)/src/$(MODULE)/unix/native/libpipewire/include
|
||||
|
||||
LIBAWT_XAWT_EXTRA_HEADER_DIRS := \
|
||||
$(LIBAWT_DEFAULT_HEADER_DIRS) \
|
||||
libawt_xawt/awt \
|
||||
@@ -286,7 +255,7 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
common/font \
|
||||
common/java2d/opengl \
|
||||
common/java2d/x11 \
|
||||
$(LIBPIPEWIRE_HEADER_DIRS)
|
||||
#
|
||||
|
||||
LIBAWT_XAWT_CFLAGS += -DXAWT -DXAWT_HACK \
|
||||
$(FONTCONFIG_CFLAGS) \
|
||||
@@ -330,14 +299,6 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
DISABLED_WARNINGS_gcc_XToolkit.c := unused-result, \
|
||||
DISABLED_WARNINGS_gcc_XWindow.c := unused-function, \
|
||||
DISABLED_WARNINGS_gcc_keycode_cache.c := unused-function, \
|
||||
DISABLED_WARNINGS_clang_aix := deprecated-non-prototype, \
|
||||
DISABLED_WARNINGS_clang_aix_awt_Taskbar.c := parentheses, \
|
||||
DISABLED_WARNINGS_clang_aix_OGLPaints.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_aix_OGLBufImgOps.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_aix_gtk2_interface.c := parentheses logical-op-parentheses, \
|
||||
DISABLED_WARNINGS_clang_aix_gtk3_interface.c := parentheses logical-op-parentheses, \
|
||||
DISABLED_WARNINGS_clang_aix_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \
|
||||
DISABLED_WARNINGS_clang_aix_awt_InputMethod.c := sign-compare, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN) \
|
||||
-L$(INSTALL_LIBRARIES_HERE), \
|
||||
@@ -382,7 +343,6 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
common/font \
|
||||
common/java2d/wl \
|
||||
common/java2d/vulkan \
|
||||
libvmahpp \
|
||||
#
|
||||
|
||||
# Enable 'wakefield' extension for java.awt.Robot support
|
||||
@@ -430,8 +390,6 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
DISABLED_WARNINGS_CXX_gcc := undef, \
|
||||
DISABLED_WARNINGS_clang := parentheses format undef \
|
||||
logical-op-parentheses format-nonliteral int-conversion, \
|
||||
DISABLED_WARNINGS_gcc_VKMemory.cpp := missing-field-initializers implicit-fallthrough parentheses, \
|
||||
DISABLED_WARNINGS_clang_VKMemory.cpp := missing-field-initializers implicit-fallthrough parentheses, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN) \
|
||||
-L$(INSTALL_LIBRARIES_HERE), \
|
||||
@@ -555,7 +513,6 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
common/awt/debug \
|
||||
common/font \
|
||||
common/java2d/opengl \
|
||||
common/java2d/vulkan \
|
||||
#
|
||||
|
||||
LIBAWT_HEADLESS_CFLAGS := $(CUPS_CFLAGS) $(FONTCONFIG_CFLAGS) $(X_CFLAGS) \
|
||||
@@ -568,7 +525,6 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
$(LIBAWT_HEADLESS_CFLAGS), \
|
||||
CXXFLAGS := $(CXXFLAGS_JDKLIB), \
|
||||
EXTRA_HEADER_DIRS := $(LIBAWT_HEADLESS_EXTRA_HEADER_DIRS), \
|
||||
DISABLED_WARNINGS_gcc_X11Renderer.c := unused-function, \
|
||||
DISABLED_WARNINGS_gcc_X11SurfaceData.c := unused-function, \
|
||||
@@ -641,19 +597,16 @@ else
|
||||
# Early re-canonizing has to be disabled to workaround an internal XlC compiler error
|
||||
# when building libharfbuzz
|
||||
ifeq ($(call isTargetOs, aix), true)
|
||||
ifneq ($(TOOLCHAIN_TYPE), clang)
|
||||
HARFBUZZ_CFLAGS += -qdebug=necan
|
||||
endif
|
||||
endif
|
||||
|
||||
# hb-ft.cc is not presently needed, and requires freetype 2.4.2 or later.
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += libharfbuzz/hb-ft.cc
|
||||
|
||||
HARFBUZZ_DISABLED_WARNINGS_gcc := missing-field-initializers strict-aliasing \
|
||||
unused-result array-bounds
|
||||
unused-result
|
||||
# noexcept-type required for GCC 7 builds. Not required for GCC 8+.
|
||||
# expansion-to-defined required for GCC 9 builds. Not required for GCC 10+.
|
||||
HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type expansion-to-defined dangling-reference
|
||||
HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type
|
||||
HARFBUZZ_DISABLED_WARNINGS_clang := missing-field-initializers range-loop-analysis
|
||||
HARFBUZZ_DISABLED_WARNINGS_microsoft := 4267 4244
|
||||
|
||||
@@ -691,10 +644,12 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
else ifeq ($(call isTargetOs, macosx), true)
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
|
||||
X11TextRenderer.c \
|
||||
fontpath.c \
|
||||
lcdglyph.c \
|
||||
lcdglyphDW.cpp
|
||||
else
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += lcdglyph.c \
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
|
||||
lcdglyph.c \
|
||||
lcdglyphDW.cpp
|
||||
endif
|
||||
|
||||
@@ -935,20 +890,6 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
||||
endif
|
||||
endif
|
||||
|
||||
# The external libpng submitted in the jdk is a reduced version
|
||||
# which does not contain .png_init_filter_functions_vsx.
|
||||
# Therefore we need to disable PNG_POWERPC_VSX_OPT explicitly by setting
|
||||
# it to 0. If this define is not set, it would be automatically set to 2,
|
||||
# because
|
||||
# "#if defined(__PPC64__) && defined(__ALTIVEC__) && defined(__VSX__)"
|
||||
# expands to true. This would results in the fact that
|
||||
# .png_init_filter_functions_vsx is needed in libpng.
|
||||
ifeq ($(call isTargetOs, aix), true)
|
||||
ifeq ($(TOOLCHAIN_TYPE), clang)
|
||||
LIBSPLASHSCREEN_CFLAGS += -DPNG_POWERPC_VSX_OPT=0
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -32,7 +32,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJ2GSS, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB), \
|
||||
DISABLED_WARNINGS_gcc := undef, \
|
||||
DISABLED_WARNINGS_clang_aix := undef, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LIBS := $(LIBDL), \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -45,7 +45,6 @@ CT_DATA_DESCRIPTION += $(MODULE_SRC)/share/data/symbols/symbols
|
||||
|
||||
COMPILECREATESYMBOLS_ADD_EXPORTS := \
|
||||
--add-exports java.base/jdk.internal.javac=java.compiler.interim,jdk.compiler.interim \
|
||||
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.compiler.interim,jdk.javadoc.interim \
|
||||
--add-exports jdk.compiler.interim/com.sun.tools.javac.api=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler.interim/com.sun.tools.javac.code=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler.interim/com.sun.tools.javac.util=ALL-UNNAMED \
|
||||
|
||||
@@ -27,16 +27,14 @@ include LibCommon.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
ifeq ($(call isTargetOs, linux macosx windows), true)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBLE, \
|
||||
NAME := le, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CXXFLAGS_JDKLIB), \
|
||||
CFLAGS := $(CFLAGS_JDKLIB), \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB), \
|
||||
LIBS_unix := $(JDKLIB_LIBS) $(LIBCXX), \
|
||||
LIBS_windows := $(JDKLIB_LIBS) user32.lib, \
|
||||
LIBS := $(JDKLIB_LIBS) user32.lib, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBLE)
|
||||
|
||||
@@ -25,3 +25,5 @@
|
||||
|
||||
DISABLED_WARNINGS_java += missing-explicit-ctor
|
||||
JAVAC_FLAGS += -XDstringConcat=inline
|
||||
JAVAC_FLAGS += --enable-preview
|
||||
DISABLED_WARNINGS_java += preview
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -43,7 +43,6 @@ CT_DATA_DESCRIPTION += $(TOPDIR)/src/jdk.compiler/share/data/symbols/symbols
|
||||
|
||||
COMPILECREATESYMBOLS_ADD_EXPORTS := \
|
||||
--add-exports java.base/jdk.internal=java.compiler.interim,jdk.compiler.interim \
|
||||
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.compiler.interim,jdk.javadoc.interim \
|
||||
--add-exports jdk.compiler.interim/com.sun.tools.javac.api=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler.interim/com.sun.tools.javac.code=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler.interim/com.sun.tools.javac.util=ALL-UNNAMED \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -30,7 +30,6 @@ include LibCommon.gmk
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBDT_SOCKET, \
|
||||
NAME := dt_socket, \
|
||||
OPTIMIZATION := LOW, \
|
||||
DISABLED_WARNINGS_clang_aix := missing-braces, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBDT_SOCKET_CPPFLAGS), \
|
||||
EXTRA_HEADER_DIRS := \
|
||||
include \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -24,5 +24,5 @@
|
||||
#
|
||||
|
||||
DISABLED_WARNINGS_java += exports
|
||||
COPY := .xsd .xml .dtd .ini
|
||||
COPY := .xsd .xml .dtd
|
||||
JAVAC_FLAGS := -XDstringConcat=inline
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
default: build
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
|
||||
TARGETS :=
|
||||
|
||||
################################################################################
|
||||
|
||||
TTF_BASEDIR := $(TOPDIR)/test/jtreg_test_thread_factory
|
||||
TTF_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/jtreg_test_thread_factory
|
||||
TTF_JAR := $(TTF_SUPPORT)/jtregTestThreadFactory.jar
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_JTREG_TEST_THREAD_FACTORY, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
|
||||
SRC := $(TTF_BASEDIR)/src/share/classes, \
|
||||
BIN := $(TTF_SUPPORT)/classes, \
|
||||
JAR := $(TTF_JAR), \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_JTREG_TEST_THREAD_FACTORY)
|
||||
|
||||
################################################################################
|
||||
# Targets for building test-image.
|
||||
################################################################################
|
||||
|
||||
# Copy to hotspot jtreg test image
|
||||
$(eval $(call SetupCopyFiles, COPY_TTF, \
|
||||
SRC := $(TTF_SUPPORT), \
|
||||
DEST := $(TEST_IMAGE_DIR)/jtreg_test_thread_factory, \
|
||||
FILES := $(TTF_JAR), \
|
||||
))
|
||||
|
||||
IMAGES_TARGETS += $(COPY_TTF)
|
||||
|
||||
build: $(TARGETS)
|
||||
images: $(IMAGES_TARGETS)
|
||||
|
||||
.PHONY: all images
|
||||
@@ -100,6 +100,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
|
||||
--add-exports java.base/jdk.internal.classfile.attribute=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.classfile.instruction=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.classfile.java.lang.constant=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.classfile.components=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.classfile.impl=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
|
||||
|
||||
@@ -36,7 +36,7 @@ TEST_LIB_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/lib
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_WB_JAR, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
|
||||
SRC := $(TEST_LIB_SOURCE_DIR)/jdk/test/whitebox/, \
|
||||
SRC := $(TEST_LIB_SOURCE_DIR)/jdk/test/whitebox/parser, \
|
||||
BIN := $(TEST_LIB_SUPPORT)/wb_classes, \
|
||||
JAR := $(TEST_LIB_SUPPORT)/wb.jar, \
|
||||
DISABLED_WARNINGS := deprecation removal preview, \
|
||||
@@ -53,12 +53,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \
|
||||
HEADERS := $(TEST_LIB_SUPPORT)/test-lib_headers, \
|
||||
JAR := $(TEST_LIB_SUPPORT)/test-lib.jar, \
|
||||
DISABLED_WARNINGS := try deprecation rawtypes unchecked serial cast removal preview, \
|
||||
JAVAC_FLAGS := --add-exports java.base/sun.security.util=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.classfile=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.classfile.attribute=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
|
||||
--enable-preview, \
|
||||
JAVAC_FLAGS := --enable-preview, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_TEST_LIB_JAR)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -99,6 +99,11 @@ NSK_GC_LOCK_JVMTI_INCLUDES := \
|
||||
-I$(VM_TESTBASE_DIR)/nsk/share/native \
|
||||
-I$(VM_TESTBASE_DIR)/nsk/share/jni
|
||||
|
||||
NSK_GC_LOCK_MALLOC_INCLUDES := \
|
||||
-I$(VM_TESTBASE_DIR)/nsk/share/gc/lock/malloc \
|
||||
-I$(VM_TESTBASE_DIR)/nsk/share/native \
|
||||
-I$(VM_TESTBASE_DIR)/nsk/share/jni
|
||||
|
||||
NSK_GC_LOCK_JNI_INCLUDES := \
|
||||
-I$(VM_TESTBASE_DIR)/nsk/share/gc/lock/jni \
|
||||
-I$(VM_TESTBASE_DIR)/nsk/share/native \
|
||||
@@ -174,6 +179,8 @@ BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libnativeAndMH := $(MLVM_STRESS_INCLUDES)
|
||||
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libJVMTIAllocLocker := $(NSK_GC_LOCK_JVMTI_INCLUDES)
|
||||
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libMallocLocker := $(NSK_GC_LOCK_MALLOC_INCLUDES)
|
||||
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libBooleanArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libByteArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libCharArrayCriticalLocker := $(NSK_GC_LOCK_JNI_INCLUDES)
|
||||
@@ -867,7 +874,7 @@ BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exesigtest := -ljvm
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
BUILD_HOTSPOT_JTREG_EXECUTABLES_CFLAGS_exeFPRegs := -MT
|
||||
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c libTestJNI.c libCompleteExit.c libTestPsig.c libnativeStack.c exeGetCreatedJavaVMs.c
|
||||
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c libTestJNI.c libCompleteExit.c libTestPsig.c libnativeStack.c
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libatExit := jvm.lib
|
||||
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exedaemonDestroy := jvm.lib
|
||||
else
|
||||
@@ -1509,7 +1516,6 @@ else
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libatExit += -ljvm
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libCompleteExit += -lpthread
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnativeStack += -lpthread
|
||||
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeGetCreatedJavaVMs := -ljvm -lpthread
|
||||
endif
|
||||
|
||||
ifeq ($(ASAN_ENABLED), true)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<target name="compile" depends="init"
|
||||
description="compile the source " >
|
||||
<!-- Compile the java code from ${src} into ${build} -->
|
||||
<javac debug="off" source="21" target="21" srcdir="${src}" destdir="${build}"/>
|
||||
<javac debug="off" source="1.7" target="1.7" srcdir="${src}" destdir="${build}"/>
|
||||
</target>
|
||||
|
||||
<target name="run" depends="dist"
|
||||
|
||||
@@ -664,6 +664,11 @@ reg_class method_reg(
|
||||
R12, R12_H
|
||||
);
|
||||
|
||||
// Class for heapbase register
|
||||
reg_class heapbase_reg(
|
||||
R27, R27_H
|
||||
);
|
||||
|
||||
// Class for thread register
|
||||
reg_class thread_reg(
|
||||
R28, R28_H
|
||||
@@ -1239,15 +1244,15 @@ source %{
|
||||
// zero, compressed klass pointers doesn't use r27 after JDK-8234794
|
||||
if (UseCompressedOops && (CompressedOops::ptrs_base() != NULL)) {
|
||||
_NO_SPECIAL_REG32_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));
|
||||
_NO_SPECIAL_REG_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));
|
||||
_NO_SPECIAL_PTR_REG_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));
|
||||
_NO_SPECIAL_REG_mask.SUBTRACT(_HEAPBASE_REG_mask);
|
||||
_NO_SPECIAL_PTR_REG_mask.SUBTRACT(_HEAPBASE_REG_mask);
|
||||
}
|
||||
|
||||
// r29 is not allocatable when PreserveFramePointer is on
|
||||
if (PreserveFramePointer) {
|
||||
_NO_SPECIAL_REG32_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
|
||||
_NO_SPECIAL_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
|
||||
_NO_SPECIAL_PTR_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
|
||||
_NO_SPECIAL_REG_mask.SUBTRACT(_FP_REG_mask);
|
||||
_NO_SPECIAL_PTR_REG_mask.SUBTRACT(_FP_REG_mask);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3817,7 +3822,7 @@ encode %{
|
||||
Register tmp = as_Register($tmp2$$reg);
|
||||
Label cont;
|
||||
Label object_has_monitor;
|
||||
Label count, no_count;
|
||||
Label no_count;
|
||||
|
||||
assert_different_registers(oop, box, tmp, disp_hdr);
|
||||
|
||||
@@ -3834,10 +3839,7 @@ encode %{
|
||||
// Check for existing monitor
|
||||
__ tbnz(disp_hdr, exact_log2(markWord::monitor_value), object_has_monitor);
|
||||
|
||||
if (LockingMode == LM_MONITOR) {
|
||||
__ tst(oop, oop); // Set NE to indicate 'failure' -> take slow-path. We know that oop != 0.
|
||||
__ b(cont);
|
||||
} else if (LockingMode == LM_LEGACY) {
|
||||
if (!UseHeavyMonitors) {
|
||||
// Set tmp to be (markWord of object | UNLOCK_VALUE).
|
||||
__ orr(tmp, disp_hdr, markWord::unlocked_value);
|
||||
|
||||
@@ -3865,12 +3867,10 @@ encode %{
|
||||
// displaced header in the box, which indicates that it is a recursive lock.
|
||||
__ ands(tmp/*==0?*/, disp_hdr, tmp); // Sets flags for result
|
||||
__ str(tmp/*==0, perhaps*/, Address(box, BasicLock::displaced_header_offset_in_bytes()));
|
||||
__ b(cont);
|
||||
} else {
|
||||
assert(LockingMode == LM_LIGHTWEIGHT, "must be");
|
||||
__ fast_lock(oop, disp_hdr, tmp, rscratch1, no_count);
|
||||
__ b(count);
|
||||
__ tst(oop, oop); // Set NE to indicate 'failure' -> take slow-path. We know that oop != 0.
|
||||
}
|
||||
__ b(cont);
|
||||
|
||||
// Handle existing monitor.
|
||||
__ bind(object_has_monitor);
|
||||
@@ -3879,25 +3879,24 @@ encode %{
|
||||
// otherwise m->owner may contain a thread or a stack address.
|
||||
//
|
||||
// Try to CAS m->owner from NULL to current thread.
|
||||
__ add(tmp, disp_hdr, (in_bytes(ObjectMonitor::owner_offset())-markWord::monitor_value));
|
||||
__ add(tmp, disp_hdr, (ObjectMonitor::owner_offset_in_bytes()-markWord::monitor_value));
|
||||
__ cmpxchg(tmp, zr, rthread, Assembler::xword, /*acquire*/ true,
|
||||
/*release*/ true, /*weak*/ false, rscratch1); // Sets flags for result
|
||||
|
||||
if (LockingMode != LM_LIGHTWEIGHT) {
|
||||
// Store a non-null value into the box to avoid looking like a re-entrant
|
||||
// lock. The fast-path monitor unlock code checks for
|
||||
// markWord::monitor_value so use markWord::unused_mark which has the
|
||||
// relevant bit set, and also matches ObjectSynchronizer::enter.
|
||||
__ mov(tmp, (address)markWord::unused_mark().value());
|
||||
__ str(tmp, Address(box, BasicLock::displaced_header_offset_in_bytes()));
|
||||
}
|
||||
// Store a non-null value into the box to avoid looking like a re-entrant
|
||||
// lock. The fast-path monitor unlock code checks for
|
||||
// markWord::monitor_value so use markWord::unused_mark which has the
|
||||
// relevant bit set, and also matches ObjectSynchronizer::enter.
|
||||
__ mov(tmp, (address)markWord::unused_mark().value());
|
||||
__ str(tmp, Address(box, BasicLock::displaced_header_offset_in_bytes()));
|
||||
|
||||
__ br(Assembler::EQ, cont); // CAS success means locking succeeded
|
||||
|
||||
__ cmp(rscratch1, rthread);
|
||||
__ br(Assembler::NE, cont); // Check for recursive locking
|
||||
|
||||
// Recursive lock case
|
||||
__ increment(Address(disp_hdr, in_bytes(ObjectMonitor::recursions_offset()) - markWord::monitor_value), 1);
|
||||
__ increment(Address(disp_hdr, ObjectMonitor::recursions_offset_in_bytes() - markWord::monitor_value), 1);
|
||||
// flag == EQ still from the cmp above, checking if this is a reentrant lock
|
||||
|
||||
__ bind(cont);
|
||||
@@ -3905,7 +3904,6 @@ encode %{
|
||||
// flag == NE indicates failure
|
||||
__ br(Assembler::NE, no_count);
|
||||
|
||||
__ bind(count);
|
||||
__ increment(Address(rthread, JavaThread::held_monitor_count_offset()));
|
||||
|
||||
__ bind(no_count);
|
||||
@@ -3919,11 +3917,11 @@ encode %{
|
||||
Register tmp = as_Register($tmp2$$reg);
|
||||
Label cont;
|
||||
Label object_has_monitor;
|
||||
Label count, no_count;
|
||||
Label no_count;
|
||||
|
||||
assert_different_registers(oop, box, tmp, disp_hdr);
|
||||
|
||||
if (LockingMode == LM_LEGACY) {
|
||||
if (!UseHeavyMonitors) {
|
||||
// Find the lock address and load the displaced header from the stack.
|
||||
__ ldr(disp_hdr, Address(box, BasicLock::displaced_header_offset_in_bytes()));
|
||||
|
||||
@@ -3936,22 +3934,17 @@ encode %{
|
||||
__ ldr(tmp, Address(oop, oopDesc::mark_offset_in_bytes()));
|
||||
__ tbnz(tmp, exact_log2(markWord::monitor_value), object_has_monitor);
|
||||
|
||||
if (LockingMode == LM_MONITOR) {
|
||||
__ tst(oop, oop); // Set NE to indicate 'failure' -> take slow-path. We know that oop != 0.
|
||||
__ b(cont);
|
||||
} else if (LockingMode == LM_LEGACY) {
|
||||
if (!UseHeavyMonitors) {
|
||||
// Check if it is still a light weight lock, this is is true if we
|
||||
// see the stack address of the basicLock in the markWord of the
|
||||
// object.
|
||||
|
||||
__ cmpxchg(oop, box, disp_hdr, Assembler::xword, /*acquire*/ false,
|
||||
/*release*/ true, /*weak*/ false, tmp);
|
||||
__ b(cont);
|
||||
} else {
|
||||
assert(LockingMode == LM_LIGHTWEIGHT, "must be");
|
||||
__ fast_unlock(oop, tmp, box, disp_hdr, no_count);
|
||||
__ b(count);
|
||||
__ tst(oop, oop); // Set NE to indicate 'failure' -> take slow-path. We know that oop != 0.
|
||||
}
|
||||
__ b(cont);
|
||||
|
||||
assert(oopDesc::mark_offset_in_bytes() == 0, "offset of _mark is not 0");
|
||||
|
||||
@@ -3959,39 +3952,25 @@ encode %{
|
||||
__ bind(object_has_monitor);
|
||||
STATIC_ASSERT(markWord::monitor_value <= INT_MAX);
|
||||
__ add(tmp, tmp, -(int)markWord::monitor_value); // monitor
|
||||
|
||||
if (LockingMode == LM_LIGHTWEIGHT) {
|
||||
// If the owner is anonymous, we need to fix it -- in an outline stub.
|
||||
Register tmp2 = disp_hdr;
|
||||
__ ldr(tmp2, Address(tmp, ObjectMonitor::owner_offset()));
|
||||
// We cannot use tbnz here, the target might be too far away and cannot
|
||||
// be encoded.
|
||||
__ tst(tmp2, (uint64_t)ObjectMonitor::ANONYMOUS_OWNER);
|
||||
C2HandleAnonOMOwnerStub* stub = new (Compile::current()->comp_arena()) C2HandleAnonOMOwnerStub(tmp, tmp2);
|
||||
Compile::current()->output()->add_stub(stub);
|
||||
__ br(Assembler::NE, stub->entry());
|
||||
__ bind(stub->continuation());
|
||||
}
|
||||
|
||||
__ ldr(disp_hdr, Address(tmp, ObjectMonitor::recursions_offset()));
|
||||
__ ldr(disp_hdr, Address(tmp, ObjectMonitor::recursions_offset_in_bytes()));
|
||||
|
||||
Label notRecursive;
|
||||
__ cbz(disp_hdr, notRecursive);
|
||||
|
||||
// Recursive lock
|
||||
__ sub(disp_hdr, disp_hdr, 1u);
|
||||
__ str(disp_hdr, Address(tmp, ObjectMonitor::recursions_offset()));
|
||||
__ str(disp_hdr, Address(tmp, ObjectMonitor::recursions_offset_in_bytes()));
|
||||
__ cmp(disp_hdr, disp_hdr); // Sets flags for result
|
||||
__ b(cont);
|
||||
|
||||
__ bind(notRecursive);
|
||||
__ ldr(rscratch1, Address(tmp, ObjectMonitor::EntryList_offset()));
|
||||
__ ldr(disp_hdr, Address(tmp, ObjectMonitor::cxq_offset()));
|
||||
__ ldr(rscratch1, Address(tmp, ObjectMonitor::EntryList_offset_in_bytes()));
|
||||
__ ldr(disp_hdr, Address(tmp, ObjectMonitor::cxq_offset_in_bytes()));
|
||||
__ orr(rscratch1, rscratch1, disp_hdr); // Will be 0 if both are 0.
|
||||
__ cmp(rscratch1, zr); // Sets flags for result
|
||||
__ cbnz(rscratch1, cont);
|
||||
// need a release store here
|
||||
__ lea(tmp, Address(tmp, ObjectMonitor::owner_offset()));
|
||||
__ lea(tmp, Address(tmp, ObjectMonitor::owner_offset_in_bytes()));
|
||||
__ stlr(zr, tmp); // set unowned
|
||||
|
||||
__ bind(cont);
|
||||
@@ -3999,7 +3978,6 @@ encode %{
|
||||
// flag == NE indicates failure
|
||||
__ br(Assembler::NE, no_count);
|
||||
|
||||
__ bind(count);
|
||||
__ decrement(Address(rthread, JavaThread::held_monitor_count_offset()));
|
||||
|
||||
__ bind(no_count);
|
||||
@@ -4340,18 +4318,7 @@ operand immI_positive()
|
||||
// BoolTest condition for signed compare
|
||||
operand immI_cmp_cond()
|
||||
%{
|
||||
predicate(!Matcher::is_unsigned_booltest_pred(n->get_int()));
|
||||
match(ConI);
|
||||
|
||||
op_cost(0);
|
||||
format %{ %}
|
||||
interface(CONST_INTER);
|
||||
%}
|
||||
|
||||
// BoolTest condition for unsigned compare
|
||||
operand immI_cmpU_cond()
|
||||
%{
|
||||
predicate(Matcher::is_unsigned_booltest_pred(n->get_int()));
|
||||
predicate(n->get_int() < (int)(BoolTest::unsigned_compare));
|
||||
match(ConI);
|
||||
|
||||
op_cost(0);
|
||||
@@ -4458,28 +4425,6 @@ operand immI19()
|
||||
interface(CONST_INTER);
|
||||
%}
|
||||
|
||||
// 5 bit signed integer
|
||||
operand immI5()
|
||||
%{
|
||||
predicate(Assembler::is_simm(n->get_int(), 5));
|
||||
match(ConI);
|
||||
|
||||
op_cost(0);
|
||||
format %{ %}
|
||||
interface(CONST_INTER);
|
||||
%}
|
||||
|
||||
// 7 bit unsigned integer
|
||||
operand immIU7()
|
||||
%{
|
||||
predicate(Assembler::is_uimm(n->get_int(), 7));
|
||||
match(ConI);
|
||||
|
||||
op_cost(0);
|
||||
format %{ %}
|
||||
interface(CONST_INTER);
|
||||
%}
|
||||
|
||||
// 12 bit unsigned offset -- for base plus immediate loads
|
||||
operand immIU12()
|
||||
%{
|
||||
@@ -4622,28 +4567,6 @@ operand immLoffset16()
|
||||
interface(CONST_INTER);
|
||||
%}
|
||||
|
||||
// 5 bit signed long integer
|
||||
operand immL5()
|
||||
%{
|
||||
predicate(Assembler::is_simm(n->get_long(), 5));
|
||||
match(ConL);
|
||||
|
||||
op_cost(0);
|
||||
format %{ %}
|
||||
interface(CONST_INTER);
|
||||
%}
|
||||
|
||||
// 7 bit unsigned long integer
|
||||
operand immLU7()
|
||||
%{
|
||||
predicate(Assembler::is_uimm(n->get_long(), 7));
|
||||
match(ConL);
|
||||
|
||||
op_cost(0);
|
||||
format %{ %}
|
||||
interface(CONST_INTER);
|
||||
%}
|
||||
|
||||
// 8 bit signed value.
|
||||
operand immI8()
|
||||
%{
|
||||
@@ -5315,6 +5238,17 @@ operand iRegNNoSp()
|
||||
interface(REG_INTER);
|
||||
%}
|
||||
|
||||
// heap base register -- used for encoding immN0
|
||||
|
||||
operand iRegIHeapbase()
|
||||
%{
|
||||
constraint(ALLOC_IN_RC(heapbase_reg));
|
||||
match(RegI);
|
||||
op_cost(0);
|
||||
format %{ %}
|
||||
interface(REG_INTER);
|
||||
%}
|
||||
|
||||
// Float Register
|
||||
// Float register operands
|
||||
operand vRegF()
|
||||
@@ -15018,6 +14952,42 @@ instruct convL2I_reg(iRegINoSp dst, iRegL src) %{
|
||||
ins_pipe(ialu_reg);
|
||||
%}
|
||||
|
||||
instruct convI2B(iRegINoSp dst, iRegIorL2I src, rFlagsReg cr)
|
||||
%{
|
||||
match(Set dst (Conv2B src));
|
||||
effect(KILL cr);
|
||||
|
||||
format %{
|
||||
"cmpw $src, zr\n\t"
|
||||
"cset $dst, ne"
|
||||
%}
|
||||
|
||||
ins_encode %{
|
||||
__ cmpw(as_Register($src$$reg), zr);
|
||||
__ cset(as_Register($dst$$reg), Assembler::NE);
|
||||
%}
|
||||
|
||||
ins_pipe(ialu_reg);
|
||||
%}
|
||||
|
||||
instruct convP2B(iRegINoSp dst, iRegP src, rFlagsReg cr)
|
||||
%{
|
||||
match(Set dst (Conv2B src));
|
||||
effect(KILL cr);
|
||||
|
||||
format %{
|
||||
"cmp $src, zr\n\t"
|
||||
"cset $dst, ne"
|
||||
%}
|
||||
|
||||
ins_encode %{
|
||||
__ cmp(as_Register($src$$reg), zr);
|
||||
__ cset(as_Register($dst$$reg), Assembler::NE);
|
||||
%}
|
||||
|
||||
ins_pipe(ialu_reg);
|
||||
%}
|
||||
|
||||
instruct convD2F_reg(vRegF dst, vRegD src) %{
|
||||
match(Set dst (ConvD2F src));
|
||||
|
||||
@@ -17053,17 +17023,14 @@ instruct string_compareUU_sve(iRegP_R1 str1, iRegI_R2 cnt1, iRegP_R3 str2, iRegI
|
||||
%}
|
||||
|
||||
instruct string_indexofUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2,
|
||||
iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
|
||||
iRegINoSp tmp3, iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6,
|
||||
vRegD_V0 vtmp0, vRegD_V1 vtmp1, rFlagsReg cr)
|
||||
iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3,
|
||||
iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6, rFlagsReg cr)
|
||||
%{
|
||||
predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UU);
|
||||
match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)));
|
||||
effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2,
|
||||
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5, TEMP tmp6,
|
||||
TEMP vtmp0, TEMP vtmp1, KILL cr);
|
||||
format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (UU) "
|
||||
"# KILL $str1 $cnt1 $str2 $cnt2 $tmp1 $tmp2 $tmp3 $tmp4 $tmp5 $tmp6 V0-V1 cr" %}
|
||||
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5, TEMP tmp6, KILL cr);
|
||||
format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (UU)" %}
|
||||
|
||||
ins_encode %{
|
||||
__ string_indexof($str1$$Register, $str2$$Register,
|
||||
@@ -17077,17 +17044,14 @@ instruct string_indexofUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2
|
||||
%}
|
||||
|
||||
instruct string_indexofLL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2,
|
||||
iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3,
|
||||
iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6,
|
||||
vRegD_V0 vtmp0, vRegD_V1 vtmp1, rFlagsReg cr)
|
||||
iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3,
|
||||
iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6, rFlagsReg cr)
|
||||
%{
|
||||
predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::LL);
|
||||
match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)));
|
||||
effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2,
|
||||
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5, TEMP tmp6,
|
||||
TEMP vtmp0, TEMP vtmp1, KILL cr);
|
||||
format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (LL) "
|
||||
"# KILL $str1 $cnt1 $str2 $cnt2 $tmp1 $tmp2 $tmp3 $tmp4 $tmp5 $tmp6 V0-V1 cr" %}
|
||||
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5, TEMP tmp6, KILL cr);
|
||||
format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (LL)" %}
|
||||
|
||||
ins_encode %{
|
||||
__ string_indexof($str1$$Register, $str2$$Register,
|
||||
@@ -17101,17 +17065,14 @@ instruct string_indexofLL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2
|
||||
%}
|
||||
|
||||
instruct string_indexofUL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2,
|
||||
iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,iRegINoSp tmp3,
|
||||
iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6,
|
||||
vRegD_V0 vtmp0, vRegD_V1 vtmp1, rFlagsReg cr)
|
||||
iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3,
|
||||
iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6, rFlagsReg cr)
|
||||
%{
|
||||
predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UL);
|
||||
match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)));
|
||||
effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2,
|
||||
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5,
|
||||
TEMP tmp6, TEMP vtmp0, TEMP vtmp1, KILL cr);
|
||||
format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (UL) "
|
||||
"# KILL $str1 cnt1 $str2 $cnt2 $tmp1 $tmp2 $tmp3 $tmp4 $tmp5 $tmp6 V0-V1 cr" %}
|
||||
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5, TEMP tmp6, KILL cr);
|
||||
format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (UL)" %}
|
||||
|
||||
ins_encode %{
|
||||
__ string_indexof($str1$$Register, $str2$$Register,
|
||||
@@ -17125,15 +17086,14 @@ instruct string_indexofUL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2
|
||||
%}
|
||||
|
||||
instruct string_indexof_conUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
|
||||
immI_le_4 int_cnt2, iRegI_R0 result, iRegINoSp tmp1,
|
||||
iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
|
||||
immI_le_4 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
|
||||
iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
|
||||
%{
|
||||
predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UU);
|
||||
match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2)));
|
||||
effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1,
|
||||
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
|
||||
format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (UU) "
|
||||
"# KILL $str1 $cnt1 $str2 $tmp1 $tmp2 $tmp3 $tmp4 cr" %}
|
||||
format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (UU)" %}
|
||||
|
||||
ins_encode %{
|
||||
int icnt2 = (int)$int_cnt2$$constant;
|
||||
@@ -17147,15 +17107,14 @@ instruct string_indexof_conUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
|
||||
%}
|
||||
|
||||
instruct string_indexof_conLL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
|
||||
immI_le_4 int_cnt2, iRegI_R0 result, iRegINoSp tmp1,
|
||||
iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
|
||||
immI_le_4 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
|
||||
iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
|
||||
%{
|
||||
predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::LL);
|
||||
match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2)));
|
||||
effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1,
|
||||
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
|
||||
format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (LL) "
|
||||
"# KILL $str1 $cnt1 $str2 $tmp1 $tmp2 $tmp3 $tmp4 cr" %}
|
||||
format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (LL)" %}
|
||||
|
||||
ins_encode %{
|
||||
int icnt2 = (int)$int_cnt2$$constant;
|
||||
@@ -17169,15 +17128,14 @@ instruct string_indexof_conLL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
|
||||
%}
|
||||
|
||||
instruct string_indexof_conUL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
|
||||
immI_1 int_cnt2, iRegI_R0 result, iRegINoSp tmp1,
|
||||
iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
|
||||
immI_1 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
|
||||
iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
|
||||
%{
|
||||
predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UL);
|
||||
match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2)));
|
||||
effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1,
|
||||
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
|
||||
format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (UL) "
|
||||
"# KILL $str1 $cnt1 $str2 $tmp1 $tmp2 $tmp3 $tmp4 cr" %}
|
||||
format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (UL)" %}
|
||||
|
||||
ins_encode %{
|
||||
int icnt2 = (int)$int_cnt2$$constant;
|
||||
@@ -17294,17 +17252,13 @@ instruct string_equalsU(iRegP_R1 str1, iRegP_R3 str2, iRegI_R4 cnt,
|
||||
|
||||
instruct array_equalsB(iRegP_R1 ary1, iRegP_R2 ary2, iRegI_R0 result,
|
||||
iRegP_R3 tmp1, iRegP_R4 tmp2, iRegP_R5 tmp3,
|
||||
vRegD_V0 vtmp0, vRegD_V1 vtmp1, vRegD_V2 vtmp2, vRegD_V3 vtmp3,
|
||||
vRegD_V4 vtmp4, vRegD_V5 vtmp5, vRegD_V6 vtmp6, vRegD_V7 vtmp7,
|
||||
iRegP_R10 tmp, rFlagsReg cr)
|
||||
%{
|
||||
predicate(((AryEqNode*)n)->encoding() == StrIntrinsicNode::LL);
|
||||
match(Set result (AryEq ary1 ary2));
|
||||
effect(KILL tmp, USE_KILL ary1, USE_KILL ary2, TEMP tmp1, TEMP tmp2, TEMP tmp3,
|
||||
TEMP vtmp0, TEMP vtmp1, TEMP vtmp2, TEMP vtmp3, TEMP vtmp4, TEMP vtmp5,
|
||||
TEMP vtmp6, TEMP vtmp7, KILL cr);
|
||||
effect(KILL tmp, USE_KILL ary1, USE_KILL ary2, TEMP tmp1, TEMP tmp2, TEMP tmp3, KILL cr);
|
||||
|
||||
format %{ "Array Equals $ary1,ary2 -> $result # KILL $ary1 $ary2 $tmp $tmp1 $tmp2 $tmp3 V0-V7 cr" %}
|
||||
format %{ "Array Equals $ary1,ary2 -> $result // KILL $tmp" %}
|
||||
ins_encode %{
|
||||
address tpc = __ arrays_equals($ary1$$Register, $ary2$$Register,
|
||||
$tmp1$$Register, $tmp2$$Register, $tmp3$$Register,
|
||||
@@ -17319,17 +17273,13 @@ instruct array_equalsB(iRegP_R1 ary1, iRegP_R2 ary2, iRegI_R0 result,
|
||||
|
||||
instruct array_equalsC(iRegP_R1 ary1, iRegP_R2 ary2, iRegI_R0 result,
|
||||
iRegP_R3 tmp1, iRegP_R4 tmp2, iRegP_R5 tmp3,
|
||||
vRegD_V0 vtmp0, vRegD_V1 vtmp1, vRegD_V2 vtmp2, vRegD_V3 vtmp3,
|
||||
vRegD_V4 vtmp4, vRegD_V5 vtmp5, vRegD_V6 vtmp6, vRegD_V7 vtmp7,
|
||||
iRegP_R10 tmp, rFlagsReg cr)
|
||||
%{
|
||||
predicate(((AryEqNode*)n)->encoding() == StrIntrinsicNode::UU);
|
||||
match(Set result (AryEq ary1 ary2));
|
||||
effect(KILL tmp, USE_KILL ary1, USE_KILL ary2, TEMP tmp1, TEMP tmp2, TEMP tmp3,
|
||||
TEMP vtmp0, TEMP vtmp1, TEMP vtmp2, TEMP vtmp3, TEMP vtmp4, TEMP vtmp5,
|
||||
TEMP vtmp6, TEMP vtmp7, KILL cr);
|
||||
effect(KILL tmp, USE_KILL ary1, USE_KILL ary2, TEMP tmp1, TEMP tmp2, TEMP tmp3, KILL cr);
|
||||
|
||||
format %{ "Array Equals $ary1,ary2 -> $result # KILL $ary1 $ary2 $tmp $tmp1 $tmp2 $tmp3 V0-V7 cr" %}
|
||||
format %{ "Array Equals $ary1,ary2 -> $result // KILL $tmp" %}
|
||||
ins_encode %{
|
||||
address tpc = __ arrays_equals($ary1$$Register, $ary2$$Register,
|
||||
$tmp1$$Register, $tmp2$$Register, $tmp3$$Register,
|
||||
@@ -17359,39 +17309,36 @@ instruct count_positives(iRegP_R1 ary1, iRegI_R2 len, iRegI_R0 result, rFlagsReg
|
||||
|
||||
// fast char[] to byte[] compression
|
||||
instruct string_compress(iRegP_R2 src, iRegP_R1 dst, iRegI_R3 len,
|
||||
vRegD_V0 vtmp0, vRegD_V1 vtmp1, vRegD_V2 vtmp2,
|
||||
vRegD_V3 vtmp3, vRegD_V4 vtmp4, vRegD_V5 vtmp5,
|
||||
vRegD_V0 tmp1, vRegD_V1 tmp2,
|
||||
vRegD_V2 tmp3, vRegD_V3 tmp4,
|
||||
iRegI_R0 result, rFlagsReg cr)
|
||||
%{
|
||||
match(Set result (StrCompressedCopy src (Binary dst len)));
|
||||
effect(TEMP vtmp0, TEMP vtmp1, TEMP vtmp2, TEMP vtmp3, TEMP vtmp4, TEMP vtmp5,
|
||||
effect(TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4,
|
||||
USE_KILL src, USE_KILL dst, USE len, KILL cr);
|
||||
|
||||
format %{ "String Compress $src,$dst,$len -> $result # KILL $src $dst V0-V5 cr" %}
|
||||
format %{ "String Compress $src,$dst,$len -> $result // KILL $src,$dst" %}
|
||||
ins_encode %{
|
||||
__ char_array_compress($src$$Register, $dst$$Register, $len$$Register,
|
||||
$result$$Register, $vtmp0$$FloatRegister, $vtmp1$$FloatRegister,
|
||||
$vtmp2$$FloatRegister, $vtmp3$$FloatRegister,
|
||||
$vtmp4$$FloatRegister, $vtmp5$$FloatRegister);
|
||||
$result$$Register,
|
||||
$tmp1$$FloatRegister, $tmp2$$FloatRegister,
|
||||
$tmp3$$FloatRegister, $tmp4$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// fast byte[] to char[] inflation
|
||||
instruct string_inflate(Universe dummy, iRegP_R0 src, iRegP_R1 dst, iRegI_R2 len, iRegP_R3 tmp,
|
||||
vRegD_V0 vtmp0, vRegD_V1 vtmp1, vRegD_V2 vtmp2, vRegD_V3 vtmp3,
|
||||
vRegD_V4 vtmp4, vRegD_V5 vtmp5, vRegD_V6 vtmp6, rFlagsReg cr)
|
||||
instruct string_inflate(Universe dummy, iRegP_R0 src, iRegP_R1 dst, iRegI_R2 len,
|
||||
vRegD_V0 tmp1, vRegD_V1 tmp2, vRegD_V2 tmp3, iRegP_R3 tmp4, rFlagsReg cr)
|
||||
%{
|
||||
match(Set dummy (StrInflatedCopy src (Binary dst len)));
|
||||
effect(TEMP vtmp0, TEMP vtmp1, TEMP vtmp2, TEMP vtmp3,
|
||||
TEMP vtmp4, TEMP vtmp5, TEMP vtmp6, TEMP tmp,
|
||||
USE_KILL src, USE_KILL dst, USE_KILL len, KILL cr);
|
||||
effect(TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, USE_KILL src, USE_KILL dst, USE_KILL len, KILL cr);
|
||||
|
||||
format %{ "String Inflate $src,$dst # KILL $tmp $src $dst $len V0-V6 cr" %}
|
||||
format %{ "String Inflate $src,$dst // KILL $tmp1, $tmp2" %}
|
||||
ins_encode %{
|
||||
address tpc = __ byte_array_inflate($src$$Register, $dst$$Register, $len$$Register,
|
||||
$vtmp0$$FloatRegister, $vtmp1$$FloatRegister,
|
||||
$vtmp2$$FloatRegister, $tmp$$Register);
|
||||
$tmp1$$FloatRegister, $tmp2$$FloatRegister,
|
||||
$tmp3$$FloatRegister, $tmp4$$Register);
|
||||
if (tpc == NULL) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return;
|
||||
@@ -17402,43 +17349,41 @@ instruct string_inflate(Universe dummy, iRegP_R0 src, iRegP_R1 dst, iRegI_R2 len
|
||||
|
||||
// encode char[] to byte[] in ISO_8859_1
|
||||
instruct encode_iso_array(iRegP_R2 src, iRegP_R1 dst, iRegI_R3 len,
|
||||
vRegD_V0 vtmp0, vRegD_V1 vtmp1, vRegD_V2 vtmp2,
|
||||
vRegD_V3 vtmp3, vRegD_V4 vtmp4, vRegD_V5 vtmp5,
|
||||
vRegD_V0 vtmp0, vRegD_V1 vtmp1,
|
||||
vRegD_V2 vtmp2, vRegD_V3 vtmp3,
|
||||
iRegI_R0 result, rFlagsReg cr)
|
||||
%{
|
||||
predicate(!((EncodeISOArrayNode*)n)->is_ascii());
|
||||
match(Set result (EncodeISOArray src (Binary dst len)));
|
||||
effect(USE_KILL src, USE_KILL dst, USE len, KILL vtmp0, KILL vtmp1,
|
||||
KILL vtmp2, KILL vtmp3, KILL vtmp4, KILL vtmp5, KILL cr);
|
||||
effect(USE_KILL src, USE_KILL dst, USE len,
|
||||
KILL vtmp0, KILL vtmp1, KILL vtmp2, KILL vtmp3, KILL cr);
|
||||
|
||||
format %{ "Encode ISO array $src,$dst,$len -> $result # KILL $src $dst V0-V5 cr" %}
|
||||
format %{ "Encode ISO array $src,$dst,$len -> $result" %}
|
||||
ins_encode %{
|
||||
__ encode_iso_array($src$$Register, $dst$$Register, $len$$Register,
|
||||
$result$$Register, false,
|
||||
$vtmp0$$FloatRegister, $vtmp1$$FloatRegister,
|
||||
$vtmp2$$FloatRegister, $vtmp3$$FloatRegister,
|
||||
$vtmp4$$FloatRegister, $vtmp5$$FloatRegister);
|
||||
$vtmp2$$FloatRegister, $vtmp3$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_class_memory);
|
||||
%}
|
||||
|
||||
instruct encode_ascii_array(iRegP_R2 src, iRegP_R1 dst, iRegI_R3 len,
|
||||
vRegD_V0 vtmp0, vRegD_V1 vtmp1, vRegD_V2 vtmp2,
|
||||
vRegD_V3 vtmp3, vRegD_V4 vtmp4, vRegD_V5 vtmp5,
|
||||
vRegD_V0 vtmp0, vRegD_V1 vtmp1,
|
||||
vRegD_V2 vtmp2, vRegD_V3 vtmp3,
|
||||
iRegI_R0 result, rFlagsReg cr)
|
||||
%{
|
||||
predicate(((EncodeISOArrayNode*)n)->is_ascii());
|
||||
match(Set result (EncodeISOArray src (Binary dst len)));
|
||||
effect(USE_KILL src, USE_KILL dst, USE len, KILL vtmp0, KILL vtmp1,
|
||||
KILL vtmp2, KILL vtmp3, KILL vtmp4, KILL vtmp5, KILL cr);
|
||||
effect(USE_KILL src, USE_KILL dst, USE len,
|
||||
KILL vtmp0, KILL vtmp1, KILL vtmp2, KILL vtmp3, KILL cr);
|
||||
|
||||
format %{ "Encode ASCII array $src,$dst,$len -> $result # KILL $src $dst V0-V5 cr" %}
|
||||
format %{ "Encode ASCII array $src,$dst,$len -> $result" %}
|
||||
ins_encode %{
|
||||
__ encode_iso_array($src$$Register, $dst$$Register, $len$$Register,
|
||||
$result$$Register, true,
|
||||
$vtmp0$$FloatRegister, $vtmp1$$FloatRegister,
|
||||
$vtmp2$$FloatRegister, $vtmp3$$FloatRegister,
|
||||
$vtmp4$$FloatRegister, $vtmp5$$FloatRegister);
|
||||
$vtmp2$$FloatRegister, $vtmp3$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_class_memory);
|
||||
%}
|
||||
|
||||
@@ -315,6 +315,10 @@ source %{
|
||||
}
|
||||
}
|
||||
|
||||
const bool Matcher::vector_needs_load_shuffle(BasicType elem_bt, int vlen) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Assert that the given node is not a variable shift.
|
||||
bool assert_not_var_shift(const Node* n) {
|
||||
assert(!n->as_ShiftV()->is_var_shift(), "illegal variable shift");
|
||||
@@ -5216,118 +5220,6 @@ instruct vmaskcmp_sve(pReg dst, vReg src1, vReg src2, immI cond, rFlagsReg cr) %
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcmp_immB_sve(pReg dst, vReg src, immI5 imm, immI_cmp_cond cond, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorMaskCmp (Binary src (ReplicateB imm)) cond));
|
||||
effect(KILL cr);
|
||||
format %{ "vmaskcmp_immB_sve $dst, $src, $imm, $cond\t# KILL cr" %}
|
||||
ins_encode %{
|
||||
Assembler::Condition condition = to_assembler_cond((BoolTest::mask)$cond$$constant);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
assert(length_in_bytes == MaxVectorSize, "invalid vector length");
|
||||
__ sve_cmp(condition, $dst$$PRegister, __ B, ptrue, $src$$FloatRegister, (int)$imm$$constant);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcmpU_immB_sve(pReg dst, vReg src, immIU7 imm, immI_cmpU_cond cond, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorMaskCmp (Binary src (ReplicateB imm)) cond));
|
||||
effect(KILL cr);
|
||||
format %{ "vmaskcmpU_immB_sve $dst, $src, $imm, $cond\t# KILL cr" %}
|
||||
ins_encode %{
|
||||
Assembler::Condition condition = to_assembler_cond((BoolTest::mask)$cond$$constant);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
assert(length_in_bytes == MaxVectorSize, "invalid vector length");
|
||||
__ sve_cmp(condition, $dst$$PRegister, __ B, ptrue, $src$$FloatRegister, (int)$imm$$constant);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcmp_immS_sve(pReg dst, vReg src, immI5 imm, immI_cmp_cond cond, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorMaskCmp (Binary src (ReplicateS imm)) cond));
|
||||
effect(KILL cr);
|
||||
format %{ "vmaskcmp_immS_sve $dst, $src, $imm, $cond\t# KILL cr" %}
|
||||
ins_encode %{
|
||||
Assembler::Condition condition = to_assembler_cond((BoolTest::mask)$cond$$constant);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
assert(length_in_bytes == MaxVectorSize, "invalid vector length");
|
||||
__ sve_cmp(condition, $dst$$PRegister, __ H, ptrue, $src$$FloatRegister, (int)$imm$$constant);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcmpU_immS_sve(pReg dst, vReg src, immIU7 imm, immI_cmpU_cond cond, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorMaskCmp (Binary src (ReplicateS imm)) cond));
|
||||
effect(KILL cr);
|
||||
format %{ "vmaskcmpU_immS_sve $dst, $src, $imm, $cond\t# KILL cr" %}
|
||||
ins_encode %{
|
||||
Assembler::Condition condition = to_assembler_cond((BoolTest::mask)$cond$$constant);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
assert(length_in_bytes == MaxVectorSize, "invalid vector length");
|
||||
__ sve_cmp(condition, $dst$$PRegister, __ H, ptrue, $src$$FloatRegister, (int)$imm$$constant);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcmp_immI_sve(pReg dst, vReg src, immI5 imm, immI_cmp_cond cond, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorMaskCmp (Binary src (ReplicateI imm)) cond));
|
||||
effect(KILL cr);
|
||||
format %{ "vmaskcmp_immI_sve $dst, $src, $imm, $cond\t# KILL cr" %}
|
||||
ins_encode %{
|
||||
Assembler::Condition condition = to_assembler_cond((BoolTest::mask)$cond$$constant);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
assert(length_in_bytes == MaxVectorSize, "invalid vector length");
|
||||
__ sve_cmp(condition, $dst$$PRegister, __ S, ptrue, $src$$FloatRegister, (int)$imm$$constant);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcmpU_immI_sve(pReg dst, vReg src, immIU7 imm, immI_cmpU_cond cond, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorMaskCmp (Binary src (ReplicateI imm)) cond));
|
||||
effect(KILL cr);
|
||||
format %{ "vmaskcmpU_immI_sve $dst, $src, $imm, $cond\t# KILL cr" %}
|
||||
ins_encode %{
|
||||
Assembler::Condition condition = to_assembler_cond((BoolTest::mask)$cond$$constant);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
assert(length_in_bytes == MaxVectorSize, "invalid vector length");
|
||||
__ sve_cmp(condition, $dst$$PRegister, __ S, ptrue, $src$$FloatRegister, (int)$imm$$constant);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcmp_immL_sve(pReg dst, vReg src, immL5 imm, immI_cmp_cond cond, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorMaskCmp (Binary src (ReplicateL imm)) cond));
|
||||
effect(KILL cr);
|
||||
format %{ "vmaskcmp_immL_sve $dst, $src, $imm, $cond\t# KILL cr" %}
|
||||
ins_encode %{
|
||||
Assembler::Condition condition = to_assembler_cond((BoolTest::mask)$cond$$constant);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
assert(length_in_bytes == MaxVectorSize, "invalid vector length");
|
||||
__ sve_cmp(condition, $dst$$PRegister, __ D, ptrue, $src$$FloatRegister, (int)$imm$$constant);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcmpU_immL_sve(pReg dst, vReg src, immLU7 imm, immI_cmpU_cond cond, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorMaskCmp (Binary src (ReplicateL imm)) cond));
|
||||
effect(KILL cr);
|
||||
format %{ "vmaskcmpU_immL_sve $dst, $src, $imm, $cond\t# KILL cr" %}
|
||||
ins_encode %{
|
||||
Assembler::Condition condition = to_assembler_cond((BoolTest::mask)$cond$$constant);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
assert(length_in_bytes == MaxVectorSize, "invalid vector length");
|
||||
__ sve_cmp(condition, $dst$$PRegister, __ D, ptrue, $src$$FloatRegister, (int)$imm$$constant);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcmp_masked(pReg dst, vReg src1, vReg src2, immI cond,
|
||||
pRegGov pg, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
@@ -5508,30 +5400,6 @@ instruct vmask_truecount_sve(iRegINoSp dst, pReg src) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// Combined rule for VectorMaskTrueCount (VectorStoreMask) when the vector element type is not T_BYTE.
|
||||
|
||||
instruct vstoremask_truecount_neon(iRegINoSp dst, vReg src, immI_gt_1 size, vReg vtmp) %{
|
||||
match(Set dst (VectorMaskTrueCount (VectorStoreMask src size)));
|
||||
effect(TEMP vtmp);
|
||||
format %{ "vstoremask_truecount_neon $dst, $src\t# KILL $vtmp" %}
|
||||
ins_encode %{
|
||||
// Input "src" is a vector mask represented as lanes with
|
||||
// 0/-1 as element values.
|
||||
uint esize = (uint)$size$$constant;
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this, $src);
|
||||
Assembler::SIMD_Arrangement arrangement = Assembler::esize2arrangement(esize,
|
||||
/* isQ */ length_in_bytes == 16);
|
||||
if (arrangement == __ T2D || arrangement == __ T2S) {
|
||||
__ addpv($vtmp$$FloatRegister, arrangement, $src$$FloatRegister, $src$$FloatRegister);
|
||||
} else {
|
||||
__ addv($vtmp$$FloatRegister, arrangement, $src$$FloatRegister);
|
||||
}
|
||||
__ smov($dst$$Register, $vtmp$$FloatRegister, __ B, 0);
|
||||
__ neg($dst$$Register, $dst$$Register);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// first true
|
||||
|
||||
instruct vmask_firsttrue_lt8e(iRegINoSp dst, vReg src, rFlagsReg cr) %{
|
||||
@@ -6012,6 +5880,49 @@ instruct vblend_sve(vReg dst, vReg src1, vReg src2, pReg pg) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// ------------------------- Vector conditional move --------------------------
|
||||
|
||||
instruct vcmove_neon(vReg dst, vReg src1, vReg src2, immI cond, cmpOp copnd) %{
|
||||
predicate(UseSVE == 0 ||
|
||||
(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)) &&
|
||||
n->in(1)->in(2)->get_int() != BoolTest::ne));
|
||||
match(Set dst (CMoveVF (Binary copnd cond) (Binary src1 src2)));
|
||||
match(Set dst (CMoveVD (Binary copnd cond) (Binary src1 src2)));
|
||||
effect(TEMP_DEF dst);
|
||||
format %{ "vcmove_neon.$copnd $dst, $src1, $src2\t# vector conditional move fp" %}
|
||||
ins_encode %{
|
||||
Assembler::Condition condition = to_assembler_cond((BoolTest::mask)$cond$$constant);
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
assert(length_in_bytes == 8 || length_in_bytes == 16, "must be");
|
||||
__ neon_compare($dst$$FloatRegister, bt, $src1$$FloatRegister,
|
||||
$src2$$FloatRegister, condition, /* isQ */ length_in_bytes == 16);
|
||||
__ bsl($dst$$FloatRegister, length_in_bytes == 16 ? __ T16B : __ T8B,
|
||||
$src2$$FloatRegister, $src1$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vcmove_sve(vReg dst, vReg src1, vReg src2, immI cond, cmpOp copnd, pRegGov pgtmp) %{
|
||||
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)) ||
|
||||
(UseSVE > 0 && n->in(1)->in(2)->get_int() == BoolTest::ne));
|
||||
match(Set dst (CMoveVF (Binary copnd cond) (Binary src1 src2)));
|
||||
match(Set dst (CMoveVD (Binary copnd cond) (Binary src1 src2)));
|
||||
effect(TEMP pgtmp);
|
||||
format %{ "vcmove_sve.$copnd $dst, $src1, $src2\t# vector conditional move fp. KILL $pgtmp" %}
|
||||
ins_encode %{
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
Assembler::Condition condition = to_assembler_cond((BoolTest::mask)$cond$$constant);
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
__ sve_compare($pgtmp$$PRegister, bt, ptrue, $src1$$FloatRegister,
|
||||
$src2$$FloatRegister, condition);
|
||||
__ sve_sel($dst$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
$pgtmp$$PRegister, $src2$$FloatRegister, $src1$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// ------------------------------ Vector round ---------------------------------
|
||||
|
||||
// vector Math.round
|
||||
@@ -6158,41 +6069,6 @@ instruct vtest_alltrue_sve(rFlagsReg cr, pReg src1, pReg src2, pReg ptmp) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// ------------------------------ Vector shuffle -------------------------------
|
||||
|
||||
instruct loadshuffle(vReg dst, vReg src) %{
|
||||
match(Set dst (VectorLoadShuffle src));
|
||||
format %{ "loadshuffle $dst, $src" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
if (bt == T_BYTE) {
|
||||
if ($dst$$FloatRegister != $src$$FloatRegister) {
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
__ orr($dst$$FloatRegister, length_in_bytes == 16 ? __ T16B : __ T8B,
|
||||
$src$$FloatRegister, $src$$FloatRegister);
|
||||
} else {
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ sve_orr($dst$$FloatRegister, $src$$FloatRegister, $src$$FloatRegister);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
// 4S/8S, 4I, 4F
|
||||
__ uxtl($dst$$FloatRegister, __ T8H, $src$$FloatRegister, __ T8B);
|
||||
if (type2aelembytes(bt) == 4) {
|
||||
__ uxtl($dst$$FloatRegister, __ T4S, $dst$$FloatRegister, __ T4H);
|
||||
}
|
||||
} else {
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ sve_vector_extend($dst$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
$src$$FloatRegister, __ B);
|
||||
}
|
||||
}
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// ------------------------------ Vector rearrange -----------------------------
|
||||
|
||||
// Here is an example that rearranges a NEON vector with 4 ints:
|
||||
@@ -6215,6 +6091,7 @@ instruct loadshuffle(vReg dst, vReg src) %{
|
||||
// need to lookup 2/4 bytes as a group. For VectorRearrange long, we use bsl
|
||||
// to implement rearrange.
|
||||
|
||||
// Maybe move the shuffle preparation to VectorLoadShuffle
|
||||
instruct rearrange_HS_neon(vReg dst, vReg src, vReg shuffle, vReg tmp1, vReg tmp2) %{
|
||||
predicate(UseSVE == 0 &&
|
||||
(Matcher::vector_element_basic_type(n) == T_SHORT ||
|
||||
|
||||
@@ -305,6 +305,10 @@ source %{
|
||||
}
|
||||
}
|
||||
|
||||
const bool Matcher::vector_needs_load_shuffle(BasicType elem_bt, int vlen) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Assert that the given node is not a variable shift.
|
||||
bool assert_not_var_shift(const Node* n) {
|
||||
assert(!n->as_ShiftV()->is_var_shift(), "illegal variable shift");
|
||||
@@ -3612,31 +3616,6 @@ instruct vmaskcmp_sve(pReg dst, vReg src1, vReg src2, immI cond, rFlagsReg cr) %
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
dnl
|
||||
dnl VMASKCMP_SVE_IMM($1 , $2 , $3 , $4 )
|
||||
dnl VMASKCMP_SVE_IMM(element_size, element_type, type_imm, type_condition)
|
||||
define(`VMASKCMP_SVE_IMM', `
|
||||
instruct vmask$4_imm$2_sve(pReg dst, vReg src, $3 imm, immI_$4_cond cond, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorMaskCmp (Binary src (Replicate$2 imm)) cond));
|
||||
effect(KILL cr);
|
||||
format %{ "vmask$4_imm$2_sve $dst, $src, $imm, $cond\t# KILL cr" %}
|
||||
ins_encode %{
|
||||
Assembler::Condition condition = to_assembler_cond((BoolTest::mask)$cond$$constant);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
assert(length_in_bytes == MaxVectorSize, "invalid vector length");
|
||||
__ sve_cmp(condition, $dst$$PRegister, __ $1, ptrue, $src$$FloatRegister, (int)$imm$$constant);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}')dnl
|
||||
VMASKCMP_SVE_IMM(B, B, immI5, cmp)
|
||||
VMASKCMP_SVE_IMM(B, B, immIU7, cmpU)
|
||||
VMASKCMP_SVE_IMM(H, S, immI5, cmp)
|
||||
VMASKCMP_SVE_IMM(H, S, immIU7, cmpU)
|
||||
VMASKCMP_SVE_IMM(S, I, immI5, cmp)
|
||||
VMASKCMP_SVE_IMM(S, I, immIU7, cmpU)
|
||||
VMASKCMP_SVE_IMM(D, L, immL5, cmp)
|
||||
VMASKCMP_SVE_IMM(D, L, immLU7, cmpU)
|
||||
|
||||
instruct vmaskcmp_masked(pReg dst, vReg src1, vReg src2, immI cond,
|
||||
pRegGov pg, rFlagsReg cr) %{
|
||||
@@ -3818,30 +3797,6 @@ instruct vmask_truecount_sve(iRegINoSp dst, pReg src) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// Combined rule for VectorMaskTrueCount (VectorStoreMask) when the vector element type is not T_BYTE.
|
||||
|
||||
instruct vstoremask_truecount_neon(iRegINoSp dst, vReg src, immI_gt_1 size, vReg vtmp) %{
|
||||
match(Set dst (VectorMaskTrueCount (VectorStoreMask src size)));
|
||||
effect(TEMP vtmp);
|
||||
format %{ "vstoremask_truecount_neon $dst, $src\t# KILL $vtmp" %}
|
||||
ins_encode %{
|
||||
// Input "src" is a vector mask represented as lanes with
|
||||
// 0/-1 as element values.
|
||||
uint esize = (uint)$size$$constant;
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this, $src);
|
||||
Assembler::SIMD_Arrangement arrangement = Assembler::esize2arrangement(esize,
|
||||
/* isQ */ length_in_bytes == 16);
|
||||
if (arrangement == __ T2D || arrangement == __ T2S) {
|
||||
__ addpv($vtmp$$FloatRegister, arrangement, $src$$FloatRegister, $src$$FloatRegister);
|
||||
} else {
|
||||
__ addv($vtmp$$FloatRegister, arrangement, $src$$FloatRegister);
|
||||
}
|
||||
__ smov($dst$$Register, $vtmp$$FloatRegister, __ B, 0);
|
||||
__ neg($dst$$Register, $dst$$Register);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// first true
|
||||
|
||||
instruct vmask_firsttrue_lt8e(iRegINoSp dst, vReg src, rFlagsReg cr) %{
|
||||
@@ -4278,6 +4233,49 @@ instruct vblend_sve(vReg dst, vReg src1, vReg src2, pReg pg) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// ------------------------- Vector conditional move --------------------------
|
||||
|
||||
instruct vcmove_neon(vReg dst, vReg src1, vReg src2, immI cond, cmpOp copnd) %{
|
||||
predicate(UseSVE == 0 ||
|
||||
(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)) &&
|
||||
n->in(1)->in(2)->get_int() != BoolTest::ne));
|
||||
match(Set dst (CMoveVF (Binary copnd cond) (Binary src1 src2)));
|
||||
match(Set dst (CMoveVD (Binary copnd cond) (Binary src1 src2)));
|
||||
effect(TEMP_DEF dst);
|
||||
format %{ "vcmove_neon.$copnd $dst, $src1, $src2\t# vector conditional move fp" %}
|
||||
ins_encode %{
|
||||
Assembler::Condition condition = to_assembler_cond((BoolTest::mask)$cond$$constant);
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
assert(length_in_bytes == 8 || length_in_bytes == 16, "must be");
|
||||
__ neon_compare($dst$$FloatRegister, bt, $src1$$FloatRegister,
|
||||
$src2$$FloatRegister, condition, /* isQ */ length_in_bytes == 16);
|
||||
__ bsl($dst$$FloatRegister, length_in_bytes == 16 ? __ T16B : __ T8B,
|
||||
$src2$$FloatRegister, $src1$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vcmove_sve(vReg dst, vReg src1, vReg src2, immI cond, cmpOp copnd, pRegGov pgtmp) %{
|
||||
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)) ||
|
||||
(UseSVE > 0 && n->in(1)->in(2)->get_int() == BoolTest::ne));
|
||||
match(Set dst (CMoveVF (Binary copnd cond) (Binary src1 src2)));
|
||||
match(Set dst (CMoveVD (Binary copnd cond) (Binary src1 src2)));
|
||||
effect(TEMP pgtmp);
|
||||
format %{ "vcmove_sve.$copnd $dst, $src1, $src2\t# vector conditional move fp. KILL $pgtmp" %}
|
||||
ins_encode %{
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
Assembler::Condition condition = to_assembler_cond((BoolTest::mask)$cond$$constant);
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
__ sve_compare($pgtmp$$PRegister, bt, ptrue, $src1$$FloatRegister,
|
||||
$src2$$FloatRegister, condition);
|
||||
__ sve_sel($dst$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
$pgtmp$$PRegister, $src2$$FloatRegister, $src1$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// ------------------------------ Vector round ---------------------------------
|
||||
|
||||
// vector Math.round
|
||||
@@ -4424,41 +4422,6 @@ instruct vtest_alltrue_sve(rFlagsReg cr, pReg src1, pReg src2, pReg ptmp) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// ------------------------------ Vector shuffle -------------------------------
|
||||
|
||||
instruct loadshuffle(vReg dst, vReg src) %{
|
||||
match(Set dst (VectorLoadShuffle src));
|
||||
format %{ "loadshuffle $dst, $src" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
if (bt == T_BYTE) {
|
||||
if ($dst$$FloatRegister != $src$$FloatRegister) {
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
__ orr($dst$$FloatRegister, length_in_bytes == 16 ? __ T16B : __ T8B,
|
||||
$src$$FloatRegister, $src$$FloatRegister);
|
||||
} else {
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ sve_orr($dst$$FloatRegister, $src$$FloatRegister, $src$$FloatRegister);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
// 4S/8S, 4I, 4F
|
||||
__ uxtl($dst$$FloatRegister, __ T8H, $src$$FloatRegister, __ T8B);
|
||||
if (type2aelembytes(bt) == 4) {
|
||||
__ uxtl($dst$$FloatRegister, __ T4S, $dst$$FloatRegister, __ T4H);
|
||||
}
|
||||
} else {
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ sve_vector_extend($dst$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
$src$$FloatRegister, __ B);
|
||||
}
|
||||
}
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// ------------------------------ Vector rearrange -----------------------------
|
||||
|
||||
// Here is an example that rearranges a NEON vector with 4 ints:
|
||||
@@ -4481,6 +4444,7 @@ instruct loadshuffle(vReg dst, vReg src) %{
|
||||
// need to lookup 2/4 bytes as a group. For VectorRearrange long, we use bsl
|
||||
// to implement rearrange.
|
||||
|
||||
// Maybe move the shuffle preparation to VectorLoadShuffle
|
||||
instruct rearrange_HS_neon(vReg dst, vReg src, vReg shuffle, vReg tmp1, vReg tmp2) %{
|
||||
predicate(UseSVE == 0 &&
|
||||
(Matcher::vector_element_basic_type(n) == T_SHORT ||
|
||||
|
||||
@@ -102,7 +102,7 @@ void Assembler::emit_data64(jlong data,
|
||||
RelocationHolder const& rspec,
|
||||
int format) {
|
||||
|
||||
assert(inst_mark() != nullptr, "must be inside InstructionMark");
|
||||
assert(inst_mark() != NULL, "must be inside InstructionMark");
|
||||
// Do not use AbstractAssembler::relocate, which is not intended for
|
||||
// embedded words. Instead, relocate to the enclosing instruction.
|
||||
code_section()->relocate(inst_mark(), rspec, format);
|
||||
|
||||
@@ -228,7 +228,7 @@ public:
|
||||
static void spatch(address a, int msb, int lsb, int64_t val) {
|
||||
int nbits = msb - lsb + 1;
|
||||
int64_t chk = val >> (nbits - 1);
|
||||
guarantee (chk == -1 || chk == 0, "Field too big for insn at " INTPTR_FORMAT, p2i(a));
|
||||
guarantee (chk == -1 || chk == 0, "Field too big for insn");
|
||||
unsigned uval = val;
|
||||
unsigned mask = checked_cast<unsigned>(right_n_bits(nbits));
|
||||
uval &= mask;
|
||||
@@ -3786,78 +3786,50 @@ public:
|
||||
INSN(sve_fac, 0b01100101, 0b11, 1); // Floating-point absolute compare vectors
|
||||
#undef INSN
|
||||
|
||||
private:
|
||||
// Convert Assembler::Condition to op encoding - used by sve integer compare encoding
|
||||
static int assembler_cond_to_sve_op(Condition cond, bool &is_unsigned) {
|
||||
if (cond == HI || cond == HS || cond == LO || cond == LS) {
|
||||
is_unsigned = true;
|
||||
} else {
|
||||
is_unsigned = false;
|
||||
}
|
||||
|
||||
switch (cond) {
|
||||
case HI:
|
||||
case GT:
|
||||
return 0b0001;
|
||||
case HS:
|
||||
case GE:
|
||||
return 0b0000;
|
||||
case LO:
|
||||
case LT:
|
||||
return 0b0010;
|
||||
case LS:
|
||||
case LE:
|
||||
return 0b0011;
|
||||
case EQ:
|
||||
return 0b1000;
|
||||
case NE:
|
||||
return 0b1001;
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
return -1;
|
||||
}
|
||||
// SVE Integer Compare - Signed Immediate
|
||||
void sve_cmp(Condition cond, PRegister Pd, SIMD_RegVariant T,
|
||||
PRegister Pg, FloatRegister Zn, int imm5) {
|
||||
starti;
|
||||
assert(T != Q, "invalid size");
|
||||
guarantee(-16 <= imm5 && imm5 <= 15, "invalid immediate");
|
||||
int cond_op;
|
||||
switch(cond) {
|
||||
case EQ: cond_op = 0b1000; break;
|
||||
case NE: cond_op = 0b1001; break;
|
||||
case GE: cond_op = 0b0000; break;
|
||||
case GT: cond_op = 0b0001; break;
|
||||
case LE: cond_op = 0b0011; break;
|
||||
case LT: cond_op = 0b0010; break;
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
f(0b00100101, 31, 24), f(T, 23, 22), f(0b0, 21), sf(imm5, 20, 16),
|
||||
f((cond_op >> 1) & 0x7, 15, 13), pgrf(Pg, 10), rf(Zn, 5);
|
||||
f(cond_op & 0x1, 4), prf(Pd, 0);
|
||||
}
|
||||
|
||||
public:
|
||||
// SVE Integer Compare - 5 bits signed imm and 7 bits unsigned imm
|
||||
void sve_cmp(Condition cond, PRegister Pd, SIMD_RegVariant T,
|
||||
PRegister Pg, FloatRegister Zn, int imm) {
|
||||
starti;
|
||||
assert(T != Q, "invalid size");
|
||||
bool is_unsigned = false;
|
||||
int cond_op = assembler_cond_to_sve_op(cond, is_unsigned);
|
||||
f(is_unsigned ? 0b00100100 : 0b00100101, 31, 24), f(T, 23, 22);
|
||||
f(is_unsigned ? 0b1 : 0b0, 21);
|
||||
if (is_unsigned) {
|
||||
f(imm, 20, 14), f((cond_op >> 1) & 0x1, 13);
|
||||
} else {
|
||||
sf(imm, 20, 16), f((cond_op >> 1) & 0x7, 15, 13);
|
||||
}
|
||||
pgrf(Pg, 10), rf(Zn, 5), f(cond_op & 0x1, 4), prf(Pd, 0);
|
||||
}
|
||||
|
||||
// SVE Floating-point compare vector with zero
|
||||
void sve_fcm(Condition cond, PRegister Pd, SIMD_RegVariant T,
|
||||
PRegister Pg, FloatRegister Zn, double d) {
|
||||
starti;
|
||||
assert(T != Q, "invalid size");
|
||||
guarantee(d == 0.0, "invalid immediate");
|
||||
int cond_op;
|
||||
switch(cond) {
|
||||
case EQ: cond_op = 0b100; break;
|
||||
case GT: cond_op = 0b001; break;
|
||||
case GE: cond_op = 0b000; break;
|
||||
case LT: cond_op = 0b010; break;
|
||||
case LE: cond_op = 0b011; break;
|
||||
case NE: cond_op = 0b110; break;
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
f(0b01100101, 31, 24), f(T, 23, 22), f(0b0100, 21, 18),
|
||||
f((cond_op >> 1) & 0x3, 17, 16), f(0b001, 15, 13),
|
||||
pgrf(Pg, 10), rf(Zn, 5);
|
||||
f(cond_op & 0x1, 4), prf(Pd, 0);
|
||||
// SVE Floating-point compare vector with zero
|
||||
void sve_fcm(Condition cond, PRegister Pd, SIMD_RegVariant T,
|
||||
PRegister Pg, FloatRegister Zn, double d) {
|
||||
starti;
|
||||
assert(T != Q, "invalid size");
|
||||
guarantee(d == 0.0, "invalid immediate");
|
||||
int cond_op;
|
||||
switch(cond) {
|
||||
case EQ: cond_op = 0b100; break;
|
||||
case GT: cond_op = 0b001; break;
|
||||
case GE: cond_op = 0b000; break;
|
||||
case LT: cond_op = 0b010; break;
|
||||
case LE: cond_op = 0b011; break;
|
||||
case NE: cond_op = 0b110; break;
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
f(0b01100101, 31, 24), f(T, 23, 22), f(0b0100, 21, 18),
|
||||
f((cond_op >> 1) & 0x3, 17, 16), f(0b001, 15, 13),
|
||||
pgrf(Pg, 10), rf(Zn, 5);
|
||||
f(cond_op & 0x1, 4), prf(Pd, 0);
|
||||
}
|
||||
|
||||
// SVE unpack vector elements
|
||||
#define INSN(NAME, op) \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -44,7 +44,7 @@ void C1SafepointPollStub::emit_code(LIR_Assembler* ce) {
|
||||
__ adr(rscratch1, safepoint_pc);
|
||||
__ str(rscratch1, Address(rthread, JavaThread::saved_exception_pc_offset()));
|
||||
|
||||
assert(SharedRuntime::polling_page_return_handler_blob() != nullptr,
|
||||
assert(SharedRuntime::polling_page_return_handler_blob() != NULL,
|
||||
"polling page return stub not created yet");
|
||||
address stub = SharedRuntime::polling_page_return_handler_blob()->entry_point();
|
||||
|
||||
@@ -334,7 +334,7 @@ void ArrayCopyStub::emit_code(LIR_Assembler* ce) {
|
||||
Address resolve(SharedRuntime::get_resolve_static_call_stub(),
|
||||
relocInfo::static_call_type);
|
||||
address call = __ trampoline_call(resolve);
|
||||
if (call == nullptr) {
|
||||
if (call == NULL) {
|
||||
ce->bailout("trampoline stub overflow");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ LIR_Opr LIR_Assembler::osrBufferPointer() {
|
||||
|
||||
address LIR_Assembler::float_constant(float f) {
|
||||
address const_addr = __ float_constant(f);
|
||||
if (const_addr == nullptr) {
|
||||
if (const_addr == NULL) {
|
||||
bailout("const section overflow");
|
||||
return __ code()->consts()->start();
|
||||
} else {
|
||||
@@ -122,7 +122,7 @@ address LIR_Assembler::float_constant(float f) {
|
||||
|
||||
address LIR_Assembler::double_constant(double d) {
|
||||
address const_addr = __ double_constant(d);
|
||||
if (const_addr == nullptr) {
|
||||
if (const_addr == NULL) {
|
||||
bailout("const section overflow");
|
||||
return __ code()->consts()->start();
|
||||
} else {
|
||||
@@ -132,7 +132,7 @@ address LIR_Assembler::double_constant(double d) {
|
||||
|
||||
address LIR_Assembler::int_constant(jlong n) {
|
||||
address const_addr = __ long_constant(n);
|
||||
if (const_addr == nullptr) {
|
||||
if (const_addr == NULL) {
|
||||
bailout("const section overflow");
|
||||
return __ code()->consts()->start();
|
||||
} else {
|
||||
@@ -278,7 +278,7 @@ void LIR_Assembler::osr_entry() {
|
||||
Label L;
|
||||
__ ldr(rscratch1, Address(OSR_buf, slot_offset + 1*BytesPerWord));
|
||||
__ cbnz(rscratch1, L);
|
||||
__ stop("locked object is null");
|
||||
__ stop("locked object is NULL");
|
||||
__ bind(L);
|
||||
}
|
||||
#endif
|
||||
@@ -328,7 +328,7 @@ void LIR_Assembler::clinit_barrier(ciMethod* method) {
|
||||
}
|
||||
|
||||
void LIR_Assembler::jobject2reg(jobject o, Register reg) {
|
||||
if (o == nullptr) {
|
||||
if (o == NULL) {
|
||||
__ mov(reg, zr);
|
||||
} else {
|
||||
__ movoop(reg, o);
|
||||
@@ -336,7 +336,7 @@ void LIR_Assembler::jobject2reg(jobject o, Register reg) {
|
||||
}
|
||||
|
||||
void LIR_Assembler::deoptimize_trap(CodeEmitInfo *info) {
|
||||
address target = nullptr;
|
||||
address target = NULL;
|
||||
relocInfo::relocType reloc_type = relocInfo::none;
|
||||
|
||||
switch (patching_id(info)) {
|
||||
@@ -379,7 +379,7 @@ int LIR_Assembler::initial_frame_size_in_bytes() const {
|
||||
int LIR_Assembler::emit_exception_handler() {
|
||||
// generate code for exception handler
|
||||
address handler_base = __ start_a_stub(exception_handler_size());
|
||||
if (handler_base == nullptr) {
|
||||
if (handler_base == NULL) {
|
||||
// not enough space left for the handler
|
||||
bailout("exception handler overflow");
|
||||
return -1;
|
||||
@@ -427,11 +427,11 @@ int LIR_Assembler::emit_unwind_handler() {
|
||||
}
|
||||
|
||||
// Perform needed unlocking
|
||||
MonitorExitStub* stub = nullptr;
|
||||
MonitorExitStub* stub = NULL;
|
||||
if (method()->is_synchronized()) {
|
||||
monitor_address(0, FrameMap::r0_opr);
|
||||
stub = new MonitorExitStub(FrameMap::r0_opr, true, 0);
|
||||
if (LockingMode == LM_MONITOR) {
|
||||
if (UseHeavyMonitors) {
|
||||
__ b(*stub->entry());
|
||||
} else {
|
||||
__ unlock_object(r5, r4, r0, *stub->entry());
|
||||
@@ -455,7 +455,7 @@ int LIR_Assembler::emit_unwind_handler() {
|
||||
__ far_jump(RuntimeAddress(Runtime1::entry_for(Runtime1::unwind_exception_id)));
|
||||
|
||||
// Emit the slow path assembly
|
||||
if (stub != nullptr) {
|
||||
if (stub != NULL) {
|
||||
stub->emit_code(this);
|
||||
}
|
||||
|
||||
@@ -466,7 +466,7 @@ int LIR_Assembler::emit_unwind_handler() {
|
||||
int LIR_Assembler::emit_deopt_handler() {
|
||||
// generate code for exception handler
|
||||
address handler_base = __ start_a_stub(deopt_handler_size());
|
||||
if (handler_base == nullptr) {
|
||||
if (handler_base == NULL) {
|
||||
// not enough space left for the handler
|
||||
bailout("deopt handler overflow");
|
||||
return -1;
|
||||
@@ -487,7 +487,7 @@ void LIR_Assembler::add_debug_info_for_branch(address adr, CodeEmitInfo* info) {
|
||||
int pc_offset = code_offset();
|
||||
flush_debug_info(pc_offset);
|
||||
info->record_debug_info(compilation()->debug_info_recorder(), pc_offset);
|
||||
if (info->exception_handlers() != nullptr) {
|
||||
if (info->exception_handlers() != NULL) {
|
||||
compilation()->add_exception_handlers_for_pco(pc_offset, info->exception_handlers());
|
||||
}
|
||||
}
|
||||
@@ -509,7 +509,7 @@ void LIR_Assembler::return_op(LIR_Opr result, C1SafepointPollStub* code_stub) {
|
||||
}
|
||||
|
||||
int LIR_Assembler::safepoint_poll(LIR_Opr tmp, CodeEmitInfo* info) {
|
||||
guarantee(info != nullptr, "Shouldn't be null");
|
||||
guarantee(info != NULL, "Shouldn't be NULL");
|
||||
__ get_polling_page(rscratch1, relocInfo::poll_type);
|
||||
add_debug_info_for_branch(info); // This isn't just debug info:
|
||||
// it's the oop map
|
||||
@@ -604,14 +604,14 @@ void LIR_Assembler::const2stack(LIR_Opr src, LIR_Opr dest) {
|
||||
if (! c->as_jobject())
|
||||
__ str(zr, frame_map()->address_for_slot(dest->single_stack_ix()));
|
||||
else {
|
||||
const2reg(src, FrameMap::rscratch1_opr, lir_patch_none, nullptr);
|
||||
const2reg(src, FrameMap::rscratch1_opr, lir_patch_none, NULL);
|
||||
reg2stack(FrameMap::rscratch1_opr, dest, c->type(), false);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case T_ADDRESS:
|
||||
{
|
||||
const2reg(src, FrameMap::rscratch1_opr, lir_patch_none, nullptr);
|
||||
const2reg(src, FrameMap::rscratch1_opr, lir_patch_none, NULL);
|
||||
reg2stack(FrameMap::rscratch1_opr, dest, c->type(), false);
|
||||
}
|
||||
case T_INT:
|
||||
@@ -775,7 +775,7 @@ void LIR_Assembler::reg2stack(LIR_Opr src, LIR_Opr dest, BasicType type, bool po
|
||||
|
||||
void LIR_Assembler::reg2mem(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool pop_fpu_stack, bool wide) {
|
||||
LIR_Address* to_addr = dest->as_address_ptr();
|
||||
PatchingStub* patch = nullptr;
|
||||
PatchingStub* patch = NULL;
|
||||
Register compressed_src = rscratch1;
|
||||
|
||||
if (patch_code != lir_patch_none) {
|
||||
@@ -847,7 +847,7 @@ void LIR_Assembler::reg2mem(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
if (info != nullptr) {
|
||||
if (info != NULL) {
|
||||
add_debug_info_for_null_check(null_check_here, info);
|
||||
}
|
||||
}
|
||||
@@ -890,7 +890,7 @@ void LIR_Assembler::stack2reg(LIR_Opr src, LIR_Opr dest, BasicType type) {
|
||||
|
||||
|
||||
void LIR_Assembler::klass2reg_with_patching(Register reg, CodeEmitInfo* info) {
|
||||
address target = nullptr;
|
||||
address target = NULL;
|
||||
relocInfo::relocType reloc_type = relocInfo::none;
|
||||
|
||||
switch (patching_id(info)) {
|
||||
@@ -943,7 +943,7 @@ void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
|
||||
return;
|
||||
}
|
||||
|
||||
if (info != nullptr) {
|
||||
if (info != NULL) {
|
||||
add_debug_info_for_null_check_here(info);
|
||||
}
|
||||
int null_check_here = code_offset();
|
||||
@@ -1010,7 +1010,7 @@ void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
|
||||
__ decode_heap_oop(dest->as_register());
|
||||
}
|
||||
|
||||
if (!(UseZGC && !ZGenerational)) {
|
||||
if (!UseZGC) {
|
||||
// Load barrier has not yet been applied, so ZGC can't verify the oop here
|
||||
__ verify_oop(dest->as_register());
|
||||
}
|
||||
@@ -1053,13 +1053,13 @@ void LIR_Assembler::emit_op3(LIR_Op3* op) {
|
||||
|
||||
void LIR_Assembler::emit_opBranch(LIR_OpBranch* op) {
|
||||
#ifdef ASSERT
|
||||
assert(op->block() == nullptr || op->block()->label() == op->label(), "wrong label");
|
||||
if (op->block() != nullptr) _branch_target_blocks.append(op->block());
|
||||
if (op->ublock() != nullptr) _branch_target_blocks.append(op->ublock());
|
||||
assert(op->block() == NULL || op->block()->label() == op->label(), "wrong label");
|
||||
if (op->block() != NULL) _branch_target_blocks.append(op->block());
|
||||
if (op->ublock() != NULL) _branch_target_blocks.append(op->ublock());
|
||||
#endif
|
||||
|
||||
if (op->cond() == lir_cond_always) {
|
||||
if (op->info() != nullptr) add_debug_info_for_branch(op->info());
|
||||
if (op->info() != NULL) add_debug_info_for_branch(op->info());
|
||||
__ b(*(op->label()));
|
||||
} else {
|
||||
Assembler::Condition acond;
|
||||
@@ -1288,12 +1288,12 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
|
||||
|
||||
if (should_profile) {
|
||||
ciMethod* method = op->profiled_method();
|
||||
assert(method != nullptr, "Should have method");
|
||||
assert(method != NULL, "Should have method");
|
||||
int bci = op->profiled_bci();
|
||||
md = method->method_data_or_null();
|
||||
assert(md != nullptr, "Sanity");
|
||||
assert(md != NULL, "Sanity");
|
||||
data = md->bci_to_data(bci);
|
||||
assert(data != nullptr, "need data for type check");
|
||||
assert(data != NULL, "need data for type check");
|
||||
assert(data->is_ReceiverTypeData(), "need ReceiverTypeData for type check");
|
||||
}
|
||||
Label profile_cast_success, profile_cast_failure;
|
||||
@@ -1375,7 +1375,7 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
|
||||
}
|
||||
} else {
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, success_target, failure_target, nullptr);
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, success_target, failure_target, NULL);
|
||||
// call out-of-line instance of __ check_klass_subtype_slow_path(...):
|
||||
__ stp(klass_RInfo, k_RInfo, Address(__ pre(sp, -2 * wordSize)));
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id)));
|
||||
@@ -1428,12 +1428,12 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
|
||||
|
||||
if (should_profile) {
|
||||
ciMethod* method = op->profiled_method();
|
||||
assert(method != nullptr, "Should have method");
|
||||
assert(method != NULL, "Should have method");
|
||||
int bci = op->profiled_bci();
|
||||
md = method->method_data_or_null();
|
||||
assert(md != nullptr, "Sanity");
|
||||
assert(md != NULL, "Sanity");
|
||||
data = md->bci_to_data(bci);
|
||||
assert(data != nullptr, "need data for type check");
|
||||
assert(data != NULL, "need data for type check");
|
||||
assert(data->is_ReceiverTypeData(), "need ReceiverTypeData for type check");
|
||||
}
|
||||
Label profile_cast_success, profile_cast_failure, done;
|
||||
@@ -1466,7 +1466,7 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
|
||||
// get instance klass (it's already uncompressed)
|
||||
__ ldr(k_RInfo, Address(k_RInfo, ObjArrayKlass::element_klass_offset()));
|
||||
// perform the fast part of the checking logic
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, success_target, failure_target, nullptr);
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, success_target, failure_target, NULL);
|
||||
// call out-of-line instance of __ check_klass_subtype_slow_path(...):
|
||||
__ stp(klass_RInfo, k_RInfo, Address(__ pre(sp, -2 * wordSize)));
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id)));
|
||||
@@ -1620,7 +1620,7 @@ void LIR_Assembler::cmove(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, L
|
||||
} else if (opr1->is_constant()) {
|
||||
LIR_Opr tmp
|
||||
= opr1->type() == T_LONG ? FrameMap::rscratch1_long_opr : FrameMap::rscratch1_opr;
|
||||
const2reg(opr1, tmp, lir_patch_none, nullptr);
|
||||
const2reg(opr1, tmp, lir_patch_none, NULL);
|
||||
opr1 = tmp;
|
||||
}
|
||||
|
||||
@@ -1630,7 +1630,7 @@ void LIR_Assembler::cmove(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, L
|
||||
} else if (opr2->is_constant()) {
|
||||
LIR_Opr tmp
|
||||
= opr2->type() == T_LONG ? FrameMap::rscratch2_long_opr : FrameMap::rscratch2_opr;
|
||||
const2reg(opr2, tmp, lir_patch_none, nullptr);
|
||||
const2reg(opr2, tmp, lir_patch_none, NULL);
|
||||
opr2 = tmp;
|
||||
}
|
||||
|
||||
@@ -1641,7 +1641,7 @@ void LIR_Assembler::cmove(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, L
|
||||
}
|
||||
|
||||
void LIR_Assembler::arith_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr dest, CodeEmitInfo* info, bool pop_fpu_stack) {
|
||||
assert(info == nullptr, "should never be used, idiv/irem and ldiv/lrem not handled by this method");
|
||||
assert(info == NULL, "should never be used, idiv/irem and ldiv/lrem not handled by this method");
|
||||
|
||||
if (left->is_single_cpu()) {
|
||||
Register lreg = left->as_register();
|
||||
@@ -2033,7 +2033,7 @@ void LIR_Assembler::align_call(LIR_Code code) { }
|
||||
|
||||
void LIR_Assembler::call(LIR_OpJavaCall* op, relocInfo::relocType rtype) {
|
||||
address call = __ trampoline_call(Address(op->addr(), rtype));
|
||||
if (call == nullptr) {
|
||||
if (call == NULL) {
|
||||
bailout("trampoline stub overflow");
|
||||
return;
|
||||
}
|
||||
@@ -2044,7 +2044,7 @@ void LIR_Assembler::call(LIR_OpJavaCall* op, relocInfo::relocType rtype) {
|
||||
|
||||
void LIR_Assembler::ic_call(LIR_OpJavaCall* op) {
|
||||
address call = __ ic_call(op->addr());
|
||||
if (call == nullptr) {
|
||||
if (call == NULL) {
|
||||
bailout("trampoline stub overflow");
|
||||
return;
|
||||
}
|
||||
@@ -2055,7 +2055,7 @@ void LIR_Assembler::ic_call(LIR_OpJavaCall* op) {
|
||||
void LIR_Assembler::emit_static_call_stub() {
|
||||
address call_pc = __ pc();
|
||||
address stub = __ start_a_stub(call_stub_size());
|
||||
if (stub == nullptr) {
|
||||
if (stub == NULL) {
|
||||
bailout("static call stub overflow");
|
||||
return;
|
||||
}
|
||||
@@ -2226,11 +2226,11 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
|
||||
|
||||
CodeStub* stub = op->stub();
|
||||
int flags = op->flags();
|
||||
BasicType basic_type = default_type != nullptr ? default_type->element_type()->basic_type() : T_ILLEGAL;
|
||||
BasicType basic_type = default_type != NULL ? default_type->element_type()->basic_type() : T_ILLEGAL;
|
||||
if (is_reference_type(basic_type)) basic_type = T_OBJECT;
|
||||
|
||||
// if we don't know anything, just go through the generic arraycopy
|
||||
if (default_type == nullptr // || basic_type == T_OBJECT
|
||||
if (default_type == NULL // || basic_type == T_OBJECT
|
||||
) {
|
||||
Label done;
|
||||
assert(src == r1 && src_pos == r2, "mismatch in calling convention");
|
||||
@@ -2242,7 +2242,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
|
||||
__ str(src, Address(sp, 4*BytesPerWord));
|
||||
|
||||
address copyfunc_addr = StubRoutines::generic_arraycopy();
|
||||
assert(copyfunc_addr != nullptr, "generic arraycopy stub required");
|
||||
assert(copyfunc_addr != NULL, "generic arraycopy stub required");
|
||||
|
||||
// The arguments are in java calling convention so we shift them
|
||||
// to C convention
|
||||
@@ -2282,7 +2282,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
|
||||
return;
|
||||
}
|
||||
|
||||
assert(default_type != nullptr && default_type->is_array_klass() && default_type->is_loaded(), "must be true at this point");
|
||||
assert(default_type != NULL && default_type->is_array_klass() && default_type->is_loaded(), "must be true at this point");
|
||||
|
||||
int elem_size = type2aelembytes(basic_type);
|
||||
int scale = exact_log2(elem_size);
|
||||
@@ -2292,7 +2292,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
|
||||
Address src_klass_addr = Address(src, oopDesc::klass_offset_in_bytes());
|
||||
Address dst_klass_addr = Address(dst, oopDesc::klass_offset_in_bytes());
|
||||
|
||||
// test for null
|
||||
// test for NULL
|
||||
if (flags & LIR_OpArrayCopy::src_null_check) {
|
||||
__ cbz(src, *stub->entry());
|
||||
}
|
||||
@@ -2377,7 +2377,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
|
||||
__ load_klass(src, src);
|
||||
__ load_klass(dst, dst);
|
||||
|
||||
__ check_klass_subtype_fast_path(src, dst, tmp, &cont, &slow, nullptr);
|
||||
__ check_klass_subtype_fast_path(src, dst, tmp, &cont, &slow, NULL);
|
||||
|
||||
__ PUSH(src, dst);
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(Runtime1::slow_subtype_check_id)));
|
||||
@@ -2389,7 +2389,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
|
||||
__ POP(src, dst);
|
||||
|
||||
address copyfunc_addr = StubRoutines::checkcast_arraycopy();
|
||||
if (copyfunc_addr != nullptr) { // use stub if available
|
||||
if (copyfunc_addr != NULL) { // use stub if available
|
||||
// src is not a sub class of dst so we have to do a
|
||||
// per-element check.
|
||||
|
||||
@@ -2558,8 +2558,8 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
|
||||
Register obj = op->obj_opr()->as_register(); // may not be an oop
|
||||
Register hdr = op->hdr_opr()->as_register();
|
||||
Register lock = op->lock_opr()->as_register();
|
||||
if (LockingMode == LM_MONITOR) {
|
||||
if (op->info() != nullptr) {
|
||||
if (UseHeavyMonitors) {
|
||||
if (op->info() != NULL) {
|
||||
add_debug_info_for_null_check_here(op->info());
|
||||
__ null_check(obj, -1);
|
||||
}
|
||||
@@ -2568,7 +2568,7 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
|
||||
assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
|
||||
// add debug info for NullPointerException only if one is possible
|
||||
int null_check_offset = __ lock_object(hdr, obj, lock, *op->stub()->entry());
|
||||
if (op->info() != nullptr) {
|
||||
if (op->info() != NULL) {
|
||||
add_debug_info_for_null_check(null_check_offset, op->info());
|
||||
}
|
||||
// done
|
||||
@@ -2586,7 +2586,7 @@ void LIR_Assembler::emit_load_klass(LIR_OpLoadKlass* op) {
|
||||
Register result = op->result_opr()->as_pointer_register();
|
||||
|
||||
CodeEmitInfo* info = op->info();
|
||||
if (info != nullptr) {
|
||||
if (info != NULL) {
|
||||
add_debug_info_for_null_check_here(info);
|
||||
}
|
||||
|
||||
@@ -2605,9 +2605,9 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
|
||||
|
||||
// Update counter for all call types
|
||||
ciMethodData* md = method->method_data_or_null();
|
||||
assert(md != nullptr, "Sanity");
|
||||
assert(md != NULL, "Sanity");
|
||||
ciProfileData* data = md->bci_to_data(bci);
|
||||
assert(data != nullptr && data->is_CounterData(), "need CounterData for calls");
|
||||
assert(data != NULL && data->is_CounterData(), "need CounterData for calls");
|
||||
assert(op->mdo()->is_single_cpu(), "mdo must be allocated");
|
||||
Register mdo = op->mdo()->as_register();
|
||||
__ mov_metadata(mdo, md->constant_encoding());
|
||||
@@ -2620,7 +2620,7 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
|
||||
assert_different_registers(mdo, recv);
|
||||
assert(data->is_VirtualCallData(), "need VirtualCallData for virtual calls");
|
||||
ciKlass* known_klass = op->known_holder();
|
||||
if (C1OptimizeVirtualCallProfiling && known_klass != nullptr) {
|
||||
if (C1OptimizeVirtualCallProfiling && known_klass != NULL) {
|
||||
// We know the type that will be seen at this call site; we can
|
||||
// statically update the MethodData* rather than needing to do
|
||||
// dynamic tests on the receiver type
|
||||
@@ -2645,7 +2645,7 @@ void LIR_Assembler::emit_profile_call(LIR_OpProfileCall* op) {
|
||||
// VirtualCallData rather than just the first time
|
||||
for (i = 0; i < VirtualCallData::row_limit(); i++) {
|
||||
ciKlass* receiver = vc_data->receiver(i);
|
||||
if (receiver == nullptr) {
|
||||
if (receiver == NULL) {
|
||||
Address recv_addr(mdo, md->byte_offset_of_slot(data, VirtualCallData::receiver_offset(i)));
|
||||
__ mov_metadata(rscratch1, known_klass->constant_encoding());
|
||||
__ lea(rscratch2, recv_addr);
|
||||
@@ -2712,7 +2712,7 @@ void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
|
||||
Label update, next, none;
|
||||
|
||||
bool do_null = !not_null;
|
||||
bool exact_klass_set = exact_klass != nullptr && ciTypeEntries::valid_ciklass(current_klass) == exact_klass;
|
||||
bool exact_klass_set = exact_klass != NULL && ciTypeEntries::valid_ciklass(current_klass) == exact_klass;
|
||||
bool do_update = !TypeEntries::is_type_unknown(current_klass) && !exact_klass_set;
|
||||
|
||||
assert(do_null || do_update, "why are we here?");
|
||||
@@ -2748,7 +2748,7 @@ void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
|
||||
|
||||
if (do_update) {
|
||||
#ifdef ASSERT
|
||||
if (exact_klass != nullptr) {
|
||||
if (exact_klass != NULL) {
|
||||
Label ok;
|
||||
__ load_klass(tmp, tmp);
|
||||
__ mov_metadata(rscratch1, exact_klass->constant_encoding());
|
||||
@@ -2759,8 +2759,8 @@ void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
|
||||
}
|
||||
#endif
|
||||
if (!no_conflict) {
|
||||
if (exact_klass == nullptr || TypeEntries::is_type_none(current_klass)) {
|
||||
if (exact_klass != nullptr) {
|
||||
if (exact_klass == NULL || TypeEntries::is_type_none(current_klass)) {
|
||||
if (exact_klass != NULL) {
|
||||
__ mov_metadata(tmp, exact_klass->constant_encoding());
|
||||
} else {
|
||||
__ load_klass(tmp, tmp);
|
||||
@@ -2789,7 +2789,7 @@ void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
|
||||
__ cbz(rscratch1, next);
|
||||
}
|
||||
} else {
|
||||
assert(ciTypeEntries::valid_ciklass(current_klass) != nullptr &&
|
||||
assert(ciTypeEntries::valid_ciklass(current_klass) != NULL &&
|
||||
ciTypeEntries::valid_ciklass(current_klass) != exact_klass, "conflict only");
|
||||
|
||||
__ ldr(tmp, mdo_addr);
|
||||
@@ -2810,7 +2810,7 @@ void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
|
||||
}
|
||||
} else {
|
||||
// There's a single possible klass at this profile point
|
||||
assert(exact_klass != nullptr, "should be");
|
||||
assert(exact_klass != NULL, "should be");
|
||||
if (TypeEntries::is_type_none(current_klass)) {
|
||||
__ mov_metadata(tmp, exact_klass->constant_encoding());
|
||||
__ ldr(rscratch2, mdo_addr);
|
||||
@@ -2839,7 +2839,7 @@ void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
|
||||
// first time here. Set profile type.
|
||||
__ str(tmp, mdo_addr);
|
||||
} else {
|
||||
assert(ciTypeEntries::valid_ciklass(current_klass) != nullptr &&
|
||||
assert(ciTypeEntries::valid_ciklass(current_klass) != NULL &&
|
||||
ciTypeEntries::valid_ciklass(current_klass) != exact_klass, "inconsistent");
|
||||
|
||||
__ ldr(tmp, mdo_addr);
|
||||
@@ -2903,7 +2903,7 @@ void LIR_Assembler::rt_call(LIR_Opr result, address dest, const LIR_OprList* arg
|
||||
__ blr(rscratch1);
|
||||
}
|
||||
|
||||
if (info != nullptr) {
|
||||
if (info != NULL) {
|
||||
add_call_info_here(info);
|
||||
}
|
||||
__ post_call_nop();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -60,7 +60,7 @@ friend class ArrayCopyStub;
|
||||
void casw(Register addr, Register newval, Register cmpval);
|
||||
void casl(Register addr, Register newval, Register cmpval);
|
||||
|
||||
void poll_for_safepoint(relocInfo::relocType rtype, CodeEmitInfo* info = nullptr);
|
||||
void poll_for_safepoint(relocInfo::relocType rtype, CodeEmitInfo* info = NULL);
|
||||
|
||||
static const int max_tableswitches = 20;
|
||||
struct tableswitch switches[max_tableswitches];
|
||||
|
||||
@@ -107,11 +107,11 @@ LIR_Opr LIRGenerator::rlock_byte(BasicType type) {
|
||||
|
||||
|
||||
bool LIRGenerator::can_store_as_constant(Value v, BasicType type) const {
|
||||
if (v->type()->as_IntConstant() != nullptr) {
|
||||
if (v->type()->as_IntConstant() != NULL) {
|
||||
return v->type()->as_IntConstant()->value() == 0L;
|
||||
} else if (v->type()->as_LongConstant() != nullptr) {
|
||||
} else if (v->type()->as_LongConstant() != NULL) {
|
||||
return v->type()->as_LongConstant()->value() == 0L;
|
||||
} else if (v->type()->as_ObjectConstant() != nullptr) {
|
||||
} else if (v->type()->as_ObjectConstant() != NULL) {
|
||||
return v->type()->as_ObjectConstant()->value()->is_null_object();
|
||||
} else {
|
||||
return false;
|
||||
@@ -120,11 +120,11 @@ bool LIRGenerator::can_store_as_constant(Value v, BasicType type) const {
|
||||
|
||||
bool LIRGenerator::can_inline_as_constant(Value v) const {
|
||||
// FIXME: Just a guess
|
||||
if (v->type()->as_IntConstant() != nullptr) {
|
||||
if (v->type()->as_IntConstant() != NULL) {
|
||||
return Assembler::operand_valid_for_add_sub_immediate(v->type()->as_IntConstant()->value());
|
||||
} else if (v->type()->as_LongConstant() != nullptr) {
|
||||
} else if (v->type()->as_LongConstant() != NULL) {
|
||||
return v->type()->as_LongConstant()->value() == 0L;
|
||||
} else if (v->type()->as_ObjectConstant() != nullptr) {
|
||||
} else if (v->type()->as_ObjectConstant() != NULL) {
|
||||
return v->type()->as_ObjectConstant()->value()->is_null_object();
|
||||
} else {
|
||||
return false;
|
||||
@@ -315,7 +315,7 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
|
||||
// "lock" stores the address of the monitor stack slot, so this is not an oop
|
||||
LIR_Opr lock = new_register(T_INT);
|
||||
|
||||
CodeEmitInfo* info_for_exception = nullptr;
|
||||
CodeEmitInfo* info_for_exception = NULL;
|
||||
if (x->needs_null_check()) {
|
||||
info_for_exception = state_for(x);
|
||||
}
|
||||
@@ -466,7 +466,7 @@ void LIRGenerator::do_ArithmeticOp_Long(ArithmeticOp* x) {
|
||||
}
|
||||
}
|
||||
rlock_result(x);
|
||||
arithmetic_op_long(x->op(), x->operand(), left.result(), right.result(), nullptr);
|
||||
arithmetic_op_long(x->op(), x->operand(), left.result(), right.result(), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -512,9 +512,9 @@ void LIRGenerator::do_ArithmeticOp_Int(ArithmeticOp* x) {
|
||||
|
||||
LIR_Opr ill = LIR_OprFact::illegalOpr;
|
||||
if (x->op() == Bytecodes::_irem) {
|
||||
__ irem(left_arg->result(), right_arg->result(), x->operand(), ill, nullptr);
|
||||
__ irem(left_arg->result(), right_arg->result(), x->operand(), ill, NULL);
|
||||
} else if (x->op() == Bytecodes::_idiv) {
|
||||
__ idiv(left_arg->result(), right_arg->result(), x->operand(), ill, nullptr);
|
||||
__ idiv(left_arg->result(), right_arg->result(), x->operand(), ill, NULL);
|
||||
}
|
||||
|
||||
} else if (x->op() == Bytecodes::_iadd || x->op() == Bytecodes::_isub) {
|
||||
@@ -547,7 +547,7 @@ void LIRGenerator::do_ArithmeticOp_Int(ArithmeticOp* x) {
|
||||
void LIRGenerator::do_ArithmeticOp(ArithmeticOp* x) {
|
||||
// when an operand with use count 1 is the left operand, then it is
|
||||
// likely that no move for 2-operand-LIR-form is necessary
|
||||
if (x->is_commutative() && x->y()->as_Constant() == nullptr && x->x()->use_count() > x->y()->use_count()) {
|
||||
if (x->is_commutative() && x->y()->as_Constant() == NULL && x->x()->use_count() > x->y()->use_count()) {
|
||||
x->swap_operands();
|
||||
}
|
||||
|
||||
@@ -800,7 +800,7 @@ void LIRGenerator::do_LibmIntrinsic(Intrinsic* x) {
|
||||
LIR_Opr calc_result = rlock_result(x);
|
||||
LIR_Opr result_reg = result_register_for(x->type());
|
||||
|
||||
CallingConvention* cc = nullptr;
|
||||
CallingConvention* cc = NULL;
|
||||
|
||||
if (x->id() == vmIntrinsics::_dpow) {
|
||||
LIRItem value1(x->argument_at(1), this);
|
||||
@@ -822,49 +822,49 @@ void LIRGenerator::do_LibmIntrinsic(Intrinsic* x) {
|
||||
|
||||
switch (x->id()) {
|
||||
case vmIntrinsics::_dexp:
|
||||
if (StubRoutines::dexp() != nullptr) {
|
||||
if (StubRoutines::dexp() != NULL) {
|
||||
__ call_runtime_leaf(StubRoutines::dexp(), getThreadTemp(), result_reg, cc->args());
|
||||
} else {
|
||||
__ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dexp), getThreadTemp(), result_reg, cc->args());
|
||||
}
|
||||
break;
|
||||
case vmIntrinsics::_dlog:
|
||||
if (StubRoutines::dlog() != nullptr) {
|
||||
if (StubRoutines::dlog() != NULL) {
|
||||
__ call_runtime_leaf(StubRoutines::dlog(), getThreadTemp(), result_reg, cc->args());
|
||||
} else {
|
||||
__ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dlog), getThreadTemp(), result_reg, cc->args());
|
||||
}
|
||||
break;
|
||||
case vmIntrinsics::_dlog10:
|
||||
if (StubRoutines::dlog10() != nullptr) {
|
||||
if (StubRoutines::dlog10() != NULL) {
|
||||
__ call_runtime_leaf(StubRoutines::dlog10(), getThreadTemp(), result_reg, cc->args());
|
||||
} else {
|
||||
__ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dlog10), getThreadTemp(), result_reg, cc->args());
|
||||
}
|
||||
break;
|
||||
case vmIntrinsics::_dpow:
|
||||
if (StubRoutines::dpow() != nullptr) {
|
||||
if (StubRoutines::dpow() != NULL) {
|
||||
__ call_runtime_leaf(StubRoutines::dpow(), getThreadTemp(), result_reg, cc->args());
|
||||
} else {
|
||||
__ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dpow), getThreadTemp(), result_reg, cc->args());
|
||||
}
|
||||
break;
|
||||
case vmIntrinsics::_dsin:
|
||||
if (StubRoutines::dsin() != nullptr) {
|
||||
if (StubRoutines::dsin() != NULL) {
|
||||
__ call_runtime_leaf(StubRoutines::dsin(), getThreadTemp(), result_reg, cc->args());
|
||||
} else {
|
||||
__ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dsin), getThreadTemp(), result_reg, cc->args());
|
||||
}
|
||||
break;
|
||||
case vmIntrinsics::_dcos:
|
||||
if (StubRoutines::dcos() != nullptr) {
|
||||
if (StubRoutines::dcos() != NULL) {
|
||||
__ call_runtime_leaf(StubRoutines::dcos(), getThreadTemp(), result_reg, cc->args());
|
||||
} else {
|
||||
__ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dcos), getThreadTemp(), result_reg, cc->args());
|
||||
}
|
||||
break;
|
||||
case vmIntrinsics::_dtan:
|
||||
if (StubRoutines::dtan() != nullptr) {
|
||||
if (StubRoutines::dtan() != NULL) {
|
||||
__ call_runtime_leaf(StubRoutines::dtan(), getThreadTemp(), result_reg, cc->args());
|
||||
} else {
|
||||
__ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtan), getThreadTemp(), result_reg, cc->args());
|
||||
@@ -1161,7 +1161,7 @@ void LIRGenerator::do_NewObjectArray(NewObjectArray* x) {
|
||||
LIRItem length(x->length(), this);
|
||||
// in case of patching (i.e., object class is not yet loaded), we need to reexecute the instruction
|
||||
// and therefore provide the state before the parameters have been consumed
|
||||
CodeEmitInfo* patching_info = nullptr;
|
||||
CodeEmitInfo* patching_info = NULL;
|
||||
if (!x->klass()->is_loaded() || PatchALot) {
|
||||
patching_info = state_for(x, x->state_before());
|
||||
}
|
||||
@@ -1194,14 +1194,14 @@ void LIRGenerator::do_NewObjectArray(NewObjectArray* x) {
|
||||
void LIRGenerator::do_NewMultiArray(NewMultiArray* x) {
|
||||
Values* dims = x->dims();
|
||||
int i = dims->length();
|
||||
LIRItemList* items = new LIRItemList(i, i, nullptr);
|
||||
LIRItemList* items = new LIRItemList(i, i, NULL);
|
||||
while (i-- > 0) {
|
||||
LIRItem* size = new LIRItem(dims->at(i), this);
|
||||
items->at_put(i, size);
|
||||
}
|
||||
|
||||
// Evaluate state_for early since it may emit code.
|
||||
CodeEmitInfo* patching_info = nullptr;
|
||||
CodeEmitInfo* patching_info = NULL;
|
||||
if (!x->klass()->is_loaded() || PatchALot) {
|
||||
patching_info = state_for(x, x->state_before());
|
||||
|
||||
@@ -1248,7 +1248,7 @@ void LIRGenerator::do_BlockBegin(BlockBegin* x) {
|
||||
void LIRGenerator::do_CheckCast(CheckCast* x) {
|
||||
LIRItem obj(x->obj(), this);
|
||||
|
||||
CodeEmitInfo* patching_info = nullptr;
|
||||
CodeEmitInfo* patching_info = NULL;
|
||||
if (!x->klass()->is_loaded() || (PatchALot && !x->is_incompatible_class_change_check() && !x->is_invokespecial_receiver_check())) {
|
||||
// must do this before locking the destination register as an oop register,
|
||||
// and before the obj is loaded (the latter is for deoptimization)
|
||||
@@ -1263,10 +1263,10 @@ void LIRGenerator::do_CheckCast(CheckCast* x) {
|
||||
|
||||
CodeStub* stub;
|
||||
if (x->is_incompatible_class_change_check()) {
|
||||
assert(patching_info == nullptr, "can't patch this");
|
||||
assert(patching_info == NULL, "can't patch this");
|
||||
stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception);
|
||||
} else if (x->is_invokespecial_receiver_check()) {
|
||||
assert(patching_info == nullptr, "can't patch this");
|
||||
assert(patching_info == NULL, "can't patch this");
|
||||
stub = new DeoptimizeStub(info_for_exception,
|
||||
Deoptimization::Reason_class_check,
|
||||
Deoptimization::Action_none);
|
||||
@@ -1289,7 +1289,7 @@ void LIRGenerator::do_InstanceOf(InstanceOf* x) {
|
||||
|
||||
// result and test object may not be in same register
|
||||
LIR_Opr reg = rlock_result(x);
|
||||
CodeEmitInfo* patching_info = nullptr;
|
||||
CodeEmitInfo* patching_info = NULL;
|
||||
if ((!x->klass()->is_loaded() || PatchALot)) {
|
||||
// must do this before locking the destination register as an oop register
|
||||
patching_info = state_for(x, x->state_before());
|
||||
|
||||
@@ -63,13 +63,14 @@ void C1_MacroAssembler::float_cmp(bool is_float, int unordered_result,
|
||||
int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr, Label& slow_case) {
|
||||
const int aligned_mask = BytesPerWord -1;
|
||||
const int hdr_offset = oopDesc::mark_offset_in_bytes();
|
||||
assert_different_registers(hdr, obj, disp_hdr);
|
||||
assert(hdr != obj && hdr != disp_hdr && obj != disp_hdr, "registers must be different");
|
||||
Label done;
|
||||
int null_check_offset = -1;
|
||||
|
||||
verify_oop(obj);
|
||||
|
||||
// save object being locked into the BasicObjectLock
|
||||
str(obj, Address(disp_hdr, BasicObjectLock::obj_offset()));
|
||||
str(obj, Address(disp_hdr, BasicObjectLock::obj_offset_in_bytes()));
|
||||
|
||||
null_check_offset = offset();
|
||||
|
||||
@@ -82,44 +83,39 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
|
||||
|
||||
// Load object header
|
||||
ldr(hdr, Address(obj, hdr_offset));
|
||||
if (LockingMode == LM_LIGHTWEIGHT) {
|
||||
fast_lock(obj, hdr, rscratch1, rscratch2, slow_case);
|
||||
} else if (LockingMode == LM_LEGACY) {
|
||||
Label done;
|
||||
// and mark it as unlocked
|
||||
orr(hdr, hdr, markWord::unlocked_value);
|
||||
// save unlocked object header into the displaced header location on the stack
|
||||
str(hdr, Address(disp_hdr, 0));
|
||||
// test if object header is still the same (i.e. unlocked), and if so, store the
|
||||
// displaced header address in the object header - if it is not the same, get the
|
||||
// object header instead
|
||||
lea(rscratch2, Address(obj, hdr_offset));
|
||||
cmpxchgptr(hdr, disp_hdr, rscratch2, rscratch1, done, /*fallthough*/nullptr);
|
||||
// if the object header was the same, we're done
|
||||
// if the object header was not the same, it is now in the hdr register
|
||||
// => test if it is a stack pointer into the same stack (recursive locking), i.e.:
|
||||
//
|
||||
// 1) (hdr & aligned_mask) == 0
|
||||
// 2) sp <= hdr
|
||||
// 3) hdr <= sp + page_size
|
||||
//
|
||||
// these 3 tests can be done by evaluating the following expression:
|
||||
//
|
||||
// (hdr - sp) & (aligned_mask - page_size)
|
||||
//
|
||||
// assuming both the stack pointer and page_size have their least
|
||||
// significant 2 bits cleared and page_size is a power of 2
|
||||
mov(rscratch1, sp);
|
||||
sub(hdr, hdr, rscratch1);
|
||||
ands(hdr, hdr, aligned_mask - (int)os::vm_page_size());
|
||||
// for recursive locking, the result is zero => save it in the displaced header
|
||||
// location (null in the displaced hdr location indicates recursive locking)
|
||||
str(hdr, Address(disp_hdr, 0));
|
||||
// otherwise we don't care about the result and handle locking via runtime call
|
||||
cbnz(hdr, slow_case);
|
||||
// done
|
||||
bind(done);
|
||||
}
|
||||
// and mark it as unlocked
|
||||
orr(hdr, hdr, markWord::unlocked_value);
|
||||
// save unlocked object header into the displaced header location on the stack
|
||||
str(hdr, Address(disp_hdr, 0));
|
||||
// test if object header is still the same (i.e. unlocked), and if so, store the
|
||||
// displaced header address in the object header - if it is not the same, get the
|
||||
// object header instead
|
||||
lea(rscratch2, Address(obj, hdr_offset));
|
||||
cmpxchgptr(hdr, disp_hdr, rscratch2, rscratch1, done, /*fallthough*/NULL);
|
||||
// if the object header was the same, we're done
|
||||
// if the object header was not the same, it is now in the hdr register
|
||||
// => test if it is a stack pointer into the same stack (recursive locking), i.e.:
|
||||
//
|
||||
// 1) (hdr & aligned_mask) == 0
|
||||
// 2) sp <= hdr
|
||||
// 3) hdr <= sp + page_size
|
||||
//
|
||||
// these 3 tests can be done by evaluating the following expression:
|
||||
//
|
||||
// (hdr - sp) & (aligned_mask - page_size)
|
||||
//
|
||||
// assuming both the stack pointer and page_size have their least
|
||||
// significant 2 bits cleared and page_size is a power of 2
|
||||
mov(rscratch1, sp);
|
||||
sub(hdr, hdr, rscratch1);
|
||||
ands(hdr, hdr, aligned_mask - (int)os::vm_page_size());
|
||||
// for recursive locking, the result is zero => save it in the displaced header
|
||||
// location (NULL in the displaced hdr location indicates recursive locking)
|
||||
str(hdr, Address(disp_hdr, 0));
|
||||
// otherwise we don't care about the result and handle locking via runtime call
|
||||
cbnz(hdr, slow_case);
|
||||
// done
|
||||
bind(done);
|
||||
increment(Address(rthread, JavaThread::held_monitor_count_offset()));
|
||||
return null_check_offset;
|
||||
}
|
||||
@@ -131,40 +127,27 @@ void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register disp_
|
||||
assert(hdr != obj && hdr != disp_hdr && obj != disp_hdr, "registers must be different");
|
||||
Label done;
|
||||
|
||||
if (LockingMode != LM_LIGHTWEIGHT) {
|
||||
// load displaced header
|
||||
ldr(hdr, Address(disp_hdr, 0));
|
||||
// if the loaded hdr is null we had recursive locking
|
||||
// if we had recursive locking, we are done
|
||||
cbz(hdr, done);
|
||||
}
|
||||
|
||||
// load displaced header
|
||||
ldr(hdr, Address(disp_hdr, 0));
|
||||
// if the loaded hdr is NULL we had recursive locking
|
||||
// if we had recursive locking, we are done
|
||||
cbz(hdr, done);
|
||||
// load object
|
||||
ldr(obj, Address(disp_hdr, BasicObjectLock::obj_offset()));
|
||||
ldr(obj, Address(disp_hdr, BasicObjectLock::obj_offset_in_bytes()));
|
||||
verify_oop(obj);
|
||||
|
||||
if (LockingMode == LM_LIGHTWEIGHT) {
|
||||
ldr(hdr, Address(obj, oopDesc::mark_offset_in_bytes()));
|
||||
// We cannot use tbnz here, the target might be too far away and cannot
|
||||
// be encoded.
|
||||
tst(hdr, markWord::monitor_value);
|
||||
br(Assembler::NE, slow_case);
|
||||
fast_unlock(obj, hdr, rscratch1, rscratch2, slow_case);
|
||||
} else if (LockingMode == LM_LEGACY) {
|
||||
// test if object header is pointing to the displaced header, and if so, restore
|
||||
// the displaced header in the object - if the object header is not pointing to
|
||||
// the displaced header, get the object header instead
|
||||
// if the object header was not pointing to the displaced header,
|
||||
// we do unlocking via runtime call
|
||||
if (hdr_offset) {
|
||||
lea(rscratch1, Address(obj, hdr_offset));
|
||||
cmpxchgptr(disp_hdr, hdr, rscratch1, rscratch2, done, &slow_case);
|
||||
} else {
|
||||
cmpxchgptr(disp_hdr, hdr, obj, rscratch2, done, &slow_case);
|
||||
}
|
||||
// done
|
||||
bind(done);
|
||||
// test if object header is pointing to the displaced header, and if so, restore
|
||||
// the displaced header in the object - if the object header is not pointing to
|
||||
// the displaced header, get the object header instead
|
||||
// if the object header was not pointing to the displaced header,
|
||||
// we do unlocking via runtime call
|
||||
if (hdr_offset) {
|
||||
lea(rscratch1, Address(obj, hdr_offset));
|
||||
cmpxchgptr(disp_hdr, hdr, rscratch1, rscratch2, done, &slow_case);
|
||||
} else {
|
||||
cmpxchgptr(disp_hdr, hdr, obj, rscratch2, done, &slow_case);
|
||||
}
|
||||
// done
|
||||
bind(done);
|
||||
decrement(Address(rthread, JavaThread::held_monitor_count_offset()));
|
||||
}
|
||||
|
||||
@@ -311,7 +294,7 @@ void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1,
|
||||
|
||||
void C1_MacroAssembler::inline_cache_check(Register receiver, Register iCache) {
|
||||
verify_oop(receiver);
|
||||
// explicit null check not needed since load from [klass_offset] causes a trap
|
||||
// explicit NULL check not needed since load from [klass_offset] causes a trap
|
||||
// check against inline cache
|
||||
assert(!MacroAssembler::needs_explicit_null_check(oopDesc::klass_offset_in_bytes()), "must add explicit null check");
|
||||
|
||||
@@ -328,7 +311,7 @@ void C1_MacroAssembler::build_frame(int framesize, int bang_size_in_bytes) {
|
||||
|
||||
// Insert nmethod entry barrier into frame.
|
||||
BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
|
||||
bs->nmethod_entry_barrier(this, nullptr /* slow_path */, nullptr /* continuation */, nullptr /* guard */);
|
||||
bs->nmethod_entry_barrier(this, NULL /* slow_path */, NULL /* continuation */, NULL /* guard */);
|
||||
}
|
||||
|
||||
void C1_MacroAssembler::remove_frame(int framesize) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -106,7 +106,7 @@ using MacroAssembler::null_check;
|
||||
void invalidate_registers(bool inv_r0, bool inv_r19, bool inv_r2, bool inv_r3, bool inv_r4, bool inv_r5) PRODUCT_RETURN;
|
||||
|
||||
// This platform only uses signal-based null checks. The Label is not needed.
|
||||
void null_check(Register r, Label *Lnull = nullptr) { MacroAssembler::null_check(r); }
|
||||
void null_check(Register r, Label *Lnull = NULL) { MacroAssembler::null_check(r); }
|
||||
|
||||
void load_parameter(int offset_in_words, Register reg);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -369,7 +369,7 @@ OopMapSet* Runtime1::generate_handle_exception(StubID id, StubAssembler *sasm) {
|
||||
|
||||
// Save registers, if required.
|
||||
OopMapSet* oop_maps = new OopMapSet();
|
||||
OopMap* oop_map = nullptr;
|
||||
OopMap* oop_map = NULL;
|
||||
switch (id) {
|
||||
case forward_exception_id:
|
||||
// We're handling an exception in the context of a compiled frame.
|
||||
@@ -542,7 +542,7 @@ OopMapSet* Runtime1::generate_patching(StubAssembler* sasm, address target) {
|
||||
// Note: This number affects also the RT-Call in generate_handle_exception because
|
||||
// the oop-map is shared for all calls.
|
||||
DeoptimizationBlob* deopt_blob = SharedRuntime::deopt_blob();
|
||||
assert(deopt_blob != nullptr, "deoptimization blob must have been created");
|
||||
assert(deopt_blob != NULL, "deoptimization blob must have been created");
|
||||
|
||||
OopMap* oop_map = save_live_registers(sasm);
|
||||
|
||||
@@ -616,8 +616,8 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
bool save_fpu_registers = true;
|
||||
|
||||
// stub code & info for the different stubs
|
||||
OopMapSet* oop_maps = nullptr;
|
||||
OopMap* oop_map = nullptr;
|
||||
OopMapSet* oop_maps = NULL;
|
||||
OopMap* oop_map = NULL;
|
||||
switch (id) {
|
||||
{
|
||||
case forward_exception_id:
|
||||
@@ -834,7 +834,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
__ ldp(r4, r0, Address(sp, (sup_k_off) * VMRegImpl::stack_slot_size));
|
||||
|
||||
Label miss;
|
||||
__ check_klass_subtype_slow_path(r4, r0, r2, r5, nullptr, &miss);
|
||||
__ check_klass_subtype_slow_path(r4, r0, r2, r5, NULL, &miss);
|
||||
|
||||
// fallthrough on success:
|
||||
__ mov(rscratch1, 1);
|
||||
@@ -904,7 +904,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
oop_maps->add_gc_map(call_offset, oop_map);
|
||||
restore_live_registers(sasm);
|
||||
DeoptimizationBlob* deopt_blob = SharedRuntime::deopt_blob();
|
||||
assert(deopt_blob != nullptr, "deoptimization blob must have been created");
|
||||
assert(deopt_blob != NULL, "deoptimization blob must have been created");
|
||||
__ leave();
|
||||
__ far_jump(RuntimeAddress(deopt_blob->unpack_with_reexecution()));
|
||||
}
|
||||
@@ -991,7 +991,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
restore_live_registers(sasm);
|
||||
__ leave();
|
||||
DeoptimizationBlob* deopt_blob = SharedRuntime::deopt_blob();
|
||||
assert(deopt_blob != nullptr, "deoptimization blob must have been created");
|
||||
assert(deopt_blob != NULL, "deoptimization blob must have been created");
|
||||
|
||||
__ far_jump(RuntimeAddress(deopt_blob->unpack_with_reexecution()));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "precompiled.hpp"
|
||||
#include "opto/c2_MacroAssembler.hpp"
|
||||
#include "opto/c2_CodeStubs.hpp"
|
||||
#include "runtime/objectMonitor.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
|
||||
@@ -36,7 +35,7 @@ int C2SafepointPollStub::max_size() const {
|
||||
}
|
||||
|
||||
void C2SafepointPollStub::emit(C2_MacroAssembler& masm) {
|
||||
assert(SharedRuntime::polling_page_return_handler_blob() != nullptr,
|
||||
assert(SharedRuntime::polling_page_return_handler_blob() != NULL,
|
||||
"polling page return stub not created yet");
|
||||
address stub = SharedRuntime::polling_page_return_handler_blob()->entry_point();
|
||||
|
||||
@@ -64,31 +63,4 @@ void C2EntryBarrierStub::emit(C2_MacroAssembler& masm) {
|
||||
__ emit_int32(0); // nmethod guard value
|
||||
}
|
||||
|
||||
int C2HandleAnonOMOwnerStub::max_size() const {
|
||||
// Max size of stub has been determined by testing with 0, in which case
|
||||
// C2CodeStubList::emit() will throw an assertion and report the actual size that
|
||||
// is needed.
|
||||
return 24;
|
||||
}
|
||||
|
||||
void C2HandleAnonOMOwnerStub::emit(C2_MacroAssembler& masm) {
|
||||
__ bind(entry());
|
||||
Register mon = monitor();
|
||||
Register t = tmp();
|
||||
assert(t != noreg, "need tmp register");
|
||||
|
||||
// Fix owner to be the current thread.
|
||||
__ str(rthread, Address(mon, ObjectMonitor::owner_offset()));
|
||||
|
||||
// Pop owner object from lock-stack.
|
||||
__ ldrw(t, Address(rthread, JavaThread::lock_stack_top_offset()));
|
||||
__ subw(t, t, oopSize);
|
||||
#ifdef ASSERT
|
||||
__ str(zr, Address(rthread, t));
|
||||
#endif
|
||||
__ strw(t, Address(rthread, JavaThread::lock_stack_top_offset()));
|
||||
|
||||
__ b(continuation());
|
||||
}
|
||||
|
||||
#undef __
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
typedef void (MacroAssembler::* chr_insn)(Register Rt, const Address &adr);
|
||||
|
||||
// Search for str1 in str2 and return index or -1
|
||||
// Clobbers: rscratch1, rscratch2, rflags. May also clobber v0-v1, when icnt1==-1.
|
||||
void C2_MacroAssembler::string_indexof(Register str2, Register str1,
|
||||
Register cnt2, Register cnt1,
|
||||
Register tmp1, Register tmp2,
|
||||
@@ -288,16 +287,16 @@ void C2_MacroAssembler::string_indexof(Register str2, Register str1,
|
||||
cmp(cnt1, (u1)16); // small patterns still should be handled by simple algorithm
|
||||
br(LT, LINEAR_MEDIUM);
|
||||
mov(result, zr);
|
||||
RuntimeAddress stub = nullptr;
|
||||
RuntimeAddress stub = NULL;
|
||||
if (isL) {
|
||||
stub = RuntimeAddress(StubRoutines::aarch64::string_indexof_linear_ll());
|
||||
assert(stub.target() != nullptr, "string_indexof_linear_ll stub has not been generated");
|
||||
assert(stub.target() != NULL, "string_indexof_linear_ll stub has not been generated");
|
||||
} else if (str1_isL) {
|
||||
stub = RuntimeAddress(StubRoutines::aarch64::string_indexof_linear_ul());
|
||||
assert(stub.target() != nullptr, "string_indexof_linear_ul stub has not been generated");
|
||||
assert(stub.target() != NULL, "string_indexof_linear_ul stub has not been generated");
|
||||
} else {
|
||||
stub = RuntimeAddress(StubRoutines::aarch64::string_indexof_linear_uu());
|
||||
assert(stub.target() != nullptr, "string_indexof_linear_uu stub has not been generated");
|
||||
assert(stub.target() != NULL, "string_indexof_linear_uu stub has not been generated");
|
||||
}
|
||||
address call = trampoline_call(stub);
|
||||
if (call == nullptr) {
|
||||
@@ -845,7 +844,7 @@ void C2_MacroAssembler::string_compare(Register str1, Register str2,
|
||||
}
|
||||
|
||||
bind(STUB);
|
||||
RuntimeAddress stub = nullptr;
|
||||
RuntimeAddress stub = NULL;
|
||||
switch(ae) {
|
||||
case StrIntrinsicNode::LL:
|
||||
stub = RuntimeAddress(StubRoutines::aarch64::compare_long_string_LL());
|
||||
@@ -862,7 +861,7 @@ void C2_MacroAssembler::string_compare(Register str1, Register str2,
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
assert(stub.target() != nullptr, "compare_long_string stub has not been generated");
|
||||
assert(stub.target() != NULL, "compare_long_string stub has not been generated");
|
||||
address call = trampoline_call(stub);
|
||||
if (call == nullptr) {
|
||||
DEBUG_ONLY(reset_labels(DONE, SHORT_LOOP, SHORT_STRING, SHORT_LAST, SHORT_LOOP_TAIL, SHORT_LAST2, SHORT_LAST_INIT, SHORT_LOOP_START));
|
||||
@@ -2050,9 +2049,9 @@ void C2_MacroAssembler::vector_signum_sve(FloatRegister dst, FloatRegister src,
|
||||
}
|
||||
|
||||
bool C2_MacroAssembler::in_scratch_emit_size() {
|
||||
if (ciEnv::current()->task() != nullptr) {
|
||||
if (ciEnv::current()->task() != NULL) {
|
||||
PhaseOutput* phase_output = Compile::current()->output();
|
||||
if (phase_output != nullptr && phase_output->in_scratch_emit_size()) {
|
||||
if (phase_output != NULL && phase_output->in_scratch_emit_size()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ static bool emit_shared_trampolines(CodeBuffer* cb, CodeBuffer::SharedTrampoline
|
||||
|
||||
assert(requests->number_of_entries() >= 1, "at least one");
|
||||
const int total_requested_size = MacroAssembler::max_trampoline_stub_size() * requests->number_of_entries();
|
||||
if (cb->stubs()->maybe_expand_to_ensure_remaining(total_requested_size) && cb->blob() == nullptr) {
|
||||
if (cb->stubs()->maybe_expand_to_ensure_remaining(total_requested_size) && cb->blob() == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark)
|
||||
// mov rmethod, 0
|
||||
// jmp -4 # to self
|
||||
|
||||
if (mark == nullptr) {
|
||||
if (mark == NULL) {
|
||||
mark = cbuf.insts_mark(); // Get mark within main instrs section.
|
||||
}
|
||||
|
||||
@@ -54,8 +54,8 @@ address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark)
|
||||
|
||||
address base = __ start_a_stub(to_interp_stub_size());
|
||||
int offset = __ offset();
|
||||
if (base == nullptr) {
|
||||
return nullptr; // CodeBuffer::expand failed
|
||||
if (base == NULL) {
|
||||
return NULL; // CodeBuffer::expand failed
|
||||
}
|
||||
// static stub relocation stores the instruction address of the call
|
||||
__ relocate(static_stub_Relocation::spec(mark));
|
||||
@@ -88,7 +88,7 @@ int CompiledStaticCall::reloc_to_interp_stub() {
|
||||
|
||||
void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, address entry) {
|
||||
address stub = find_stub();
|
||||
guarantee(stub != nullptr, "stub not found");
|
||||
guarantee(stub != NULL, "stub not found");
|
||||
|
||||
if (TraceICs) {
|
||||
ResourceMark rm;
|
||||
@@ -117,7 +117,7 @@ void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, ad
|
||||
void CompiledDirectStaticCall::set_stub_to_clean(static_stub_Relocation* static_stub) {
|
||||
// Reset stub.
|
||||
address stub = static_stub->addr();
|
||||
assert(stub != nullptr, "stub not found");
|
||||
assert(stub != NULL, "stub not found");
|
||||
assert(CompiledICLocker::is_safe(stub), "mt unsafe call");
|
||||
// Creation also verifies the object.
|
||||
NativeMovConstReg* method_holder
|
||||
@@ -138,7 +138,7 @@ void CompiledDirectStaticCall::verify() {
|
||||
|
||||
// Verify stub.
|
||||
address stub = find_stub();
|
||||
assert(stub != nullptr, "no stub found for static call");
|
||||
assert(stub != NULL, "no stub found for static call");
|
||||
// Creation also verifies the object.
|
||||
NativeMovConstReg* method_holder
|
||||
= nativeMovConstReg_at(stub + NativeInstruction::instruction_size);
|
||||
|
||||
@@ -84,11 +84,11 @@ frame FreezeBase::new_heap_frame(frame& f, frame& caller) {
|
||||
if (FKind::interpreted) {
|
||||
assert((intptr_t*)f.at(frame::interpreter_frame_last_sp_offset) == nullptr
|
||||
|| f.unextended_sp() == (intptr_t*)f.at(frame::interpreter_frame_last_sp_offset), "");
|
||||
intptr_t locals_offset = *f.addr_at(frame::interpreter_frame_locals_offset);
|
||||
int locals = f.interpreter_frame_method()->max_locals();
|
||||
// If the caller.is_empty(), i.e. we're freezing into an empty chunk, then we set
|
||||
// the chunk's argsize in finalize_freeze and make room for it above the unextended_sp
|
||||
bool overlap_caller = caller.is_interpreted_frame() || caller.is_empty();
|
||||
fp = caller.unextended_sp() - 1 - locals_offset + (overlap_caller ? ContinuationHelper::InterpretedFrame::stack_argsize(f) : 0);
|
||||
fp = caller.unextended_sp() - (locals + frame::sender_sp_offset) + (overlap_caller ? ContinuationHelper::InterpretedFrame::stack_argsize(f) : 0);
|
||||
sp = fp - (f.fp() - f.unextended_sp());
|
||||
assert(sp <= fp, "");
|
||||
assert(fp <= caller.unextended_sp(), "");
|
||||
@@ -97,8 +97,7 @@ frame FreezeBase::new_heap_frame(frame& f, frame& caller) {
|
||||
assert(_cont.tail()->is_in_chunk(sp), "");
|
||||
|
||||
frame hf(sp, sp, fp, f.pc(), nullptr, nullptr, true /* on_heap */);
|
||||
// copy relativized locals from the stack frame
|
||||
*hf.addr_at(frame::interpreter_frame_locals_offset) = locals_offset;
|
||||
*hf.addr_at(frame::interpreter_frame_locals_offset) = frame::sender_sp_offset + locals - 1;
|
||||
return hf;
|
||||
} else {
|
||||
// We need to re-read fp out of the frame because it may be an oop and we might have
|
||||
@@ -146,11 +145,13 @@ inline void FreezeBase::relativize_interpreted_frame_metadata(const frame& f, co
|
||||
|
||||
// on AARCH64, we may insert padding between the locals and the rest of the frame
|
||||
// (see TemplateInterpreterGenerator::generate_normal_entry, and AbstractInterpreter::layout_activation)
|
||||
// because we freeze the padding word (see recurse_freeze_interpreted_frame) in order to keep the same relativized
|
||||
// locals value, we don't need to change the locals value here.
|
||||
// so we compute locals "from scratch" rather than relativizing the value in the stack frame, which might include padding,
|
||||
// since we don't freeze the padding word (see recurse_freeze_interpreted_frame).
|
||||
|
||||
// at(frame::interpreter_frame_last_sp_offset) can be null at safepoint preempts
|
||||
// at(frame::interpreter_frame_last_sp_offset) can be NULL at safepoint preempts
|
||||
*hf.addr_at(frame::interpreter_frame_last_sp_offset) = hf.unextended_sp() - hf.fp();
|
||||
// This line can be changed into an assert when we have fixed the "frame padding problem", see JDK-8300197
|
||||
*hf.addr_at(frame::interpreter_frame_locals_offset) = frame::sender_sp_offset + f.interpreter_frame_method()->max_locals() - 1;
|
||||
|
||||
relativize_one(vfp, hfp, frame::interpreter_frame_initial_sp_offset); // == block_top == block_bottom
|
||||
relativize_one(vfp, hfp, frame::interpreter_frame_extended_sp_offset);
|
||||
@@ -221,9 +222,11 @@ template<typename FKind> frame ThawBase::new_stack_frame(const frame& hf, frame&
|
||||
const int locals = hf.interpreter_frame_method()->max_locals();
|
||||
intptr_t* frame_sp = caller.unextended_sp() - fsize;
|
||||
intptr_t* fp = frame_sp + (hf.fp() - heap_sp);
|
||||
int padding = 0;
|
||||
if ((intptr_t)fp % frame::frame_alignment != 0) {
|
||||
fp--;
|
||||
frame_sp--;
|
||||
padding++;
|
||||
log_develop_trace(continuations)("Adding internal interpreted frame alignment");
|
||||
}
|
||||
DEBUG_ONLY(intptr_t* unextended_sp = fp + *hf.addr_at(frame::interpreter_frame_last_sp_offset);)
|
||||
@@ -232,8 +235,10 @@ template<typename FKind> frame ThawBase::new_stack_frame(const frame& hf, frame&
|
||||
frame f(frame_sp, frame_sp, fp, hf.pc());
|
||||
// we need to set the locals so that the caller of new_stack_frame() can call
|
||||
// ContinuationHelper::InterpretedFrame::frame_bottom
|
||||
// copy relativized locals from the heap frame
|
||||
*f.addr_at(frame::interpreter_frame_locals_offset) = *hf.addr_at(frame::interpreter_frame_locals_offset);
|
||||
intptr_t offset = *hf.addr_at(frame::interpreter_frame_locals_offset);
|
||||
assert((int)offset == frame::sender_sp_offset + locals - 1, "");
|
||||
// set relativized locals
|
||||
*f.addr_at(frame::interpreter_frame_locals_offset) = padding + offset;
|
||||
assert((intptr_t)f.fp() % frame::frame_alignment == 0, "");
|
||||
return f;
|
||||
} else {
|
||||
@@ -295,4 +300,10 @@ inline void ThawBase::derelativize_interpreted_frame_metadata(const frame& hf, c
|
||||
derelativize_one(vfp, frame::interpreter_frame_extended_sp_offset);
|
||||
}
|
||||
|
||||
inline void ThawBase::set_interpreter_frame_bottom(const frame& f, intptr_t* bottom) {
|
||||
// set relativized locals
|
||||
// this line can be changed into an assert when we have fixed the "frame padding problem", see JDK-8300197
|
||||
*f.addr_at(frame::interpreter_frame_locals_offset) = (bottom - 1) - f.fp();
|
||||
}
|
||||
|
||||
#endif // CPU_AARCH64_CONTINUATIONFREEZETHAW_AARCH64_INLINE_HPP
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -39,7 +39,7 @@
|
||||
// the perfect job. In those cases, decode_instruction0 may kick in
|
||||
// and do it right.
|
||||
// If nothing had to be done, just return "here", otherwise return "here + instr_len(here)"
|
||||
static address decode_instruction0(address here, outputStream* st, address virtual_begin = nullptr) {
|
||||
static address decode_instruction0(address here, outputStream* st, address virtual_begin = NULL) {
|
||||
return here;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ class DowncallStubGenerator : public StubCodeGenerator {
|
||||
|
||||
bool _needs_return_buffer;
|
||||
int _captured_state_mask;
|
||||
bool _needs_transition;
|
||||
|
||||
int _frame_complete;
|
||||
int _frame_size_slots;
|
||||
@@ -61,8 +60,7 @@ public:
|
||||
const GrowableArray<VMStorage>& input_registers,
|
||||
const GrowableArray<VMStorage>& output_registers,
|
||||
bool needs_return_buffer,
|
||||
int captured_state_mask,
|
||||
bool needs_transition)
|
||||
int captured_state_mask)
|
||||
: StubCodeGenerator(buffer, PrintMethodHandleStubs),
|
||||
_signature(signature),
|
||||
_num_args(num_args),
|
||||
@@ -72,10 +70,9 @@ public:
|
||||
_output_registers(output_registers),
|
||||
_needs_return_buffer(needs_return_buffer),
|
||||
_captured_state_mask(captured_state_mask),
|
||||
_needs_transition(needs_transition),
|
||||
_frame_complete(0),
|
||||
_frame_size_slots(0),
|
||||
_oop_maps(nullptr) {
|
||||
_oop_maps(NULL) {
|
||||
}
|
||||
|
||||
void generate();
|
||||
@@ -103,15 +100,13 @@ RuntimeStub* DowncallLinker::make_downcall_stub(BasicType* signature,
|
||||
const GrowableArray<VMStorage>& input_registers,
|
||||
const GrowableArray<VMStorage>& output_registers,
|
||||
bool needs_return_buffer,
|
||||
int captured_state_mask,
|
||||
bool needs_transition) {
|
||||
int captured_state_mask) {
|
||||
int code_size = native_invoker_code_base_size + (num_args * native_invoker_size_per_arg);
|
||||
int locs_size = 1; // must be non-zero
|
||||
CodeBuffer code("nep_invoker_blob", code_size, locs_size);
|
||||
DowncallStubGenerator g(&code, signature, num_args, ret_bt, abi,
|
||||
input_registers, output_registers,
|
||||
needs_return_buffer, captured_state_mask,
|
||||
needs_transition);
|
||||
needs_return_buffer, captured_state_mask);
|
||||
g.generate();
|
||||
code.log_section_sizes("nep_invoker_blob");
|
||||
|
||||
@@ -196,7 +191,7 @@ void DowncallStubGenerator::generate() {
|
||||
_frame_size_slots = align_up(framesize + (allocated_frame_size >> LogBytesPerInt), 4);
|
||||
assert(is_even(_frame_size_slots/2), "sp not 16-byte aligned");
|
||||
|
||||
_oop_maps = _needs_transition ? new OopMapSet() : nullptr;
|
||||
_oop_maps = new OopMapSet();
|
||||
address start = __ pc();
|
||||
|
||||
__ enter();
|
||||
@@ -206,17 +201,15 @@ void DowncallStubGenerator::generate() {
|
||||
|
||||
_frame_complete = __ pc() - start;
|
||||
|
||||
if (_needs_transition) {
|
||||
address the_pc = __ pc();
|
||||
__ set_last_Java_frame(sp, rfp, the_pc, tmp1);
|
||||
OopMap* map = new OopMap(_frame_size_slots, 0);
|
||||
_oop_maps->add_gc_map(the_pc - start, map);
|
||||
address the_pc = __ pc();
|
||||
__ set_last_Java_frame(sp, rfp, the_pc, tmp1);
|
||||
OopMap* map = new OopMap(_frame_size_slots, 0);
|
||||
_oop_maps->add_gc_map(the_pc - start, map);
|
||||
|
||||
// State transition
|
||||
__ mov(tmp1, _thread_in_native);
|
||||
__ lea(tmp2, Address(rthread, JavaThread::thread_state_offset()));
|
||||
__ stlrw(tmp1, tmp2);
|
||||
}
|
||||
// State transition
|
||||
__ mov(tmp1, _thread_in_native);
|
||||
__ lea(tmp2, Address(rthread, JavaThread::thread_state_offset()));
|
||||
__ stlrw(tmp1, tmp2);
|
||||
|
||||
__ block_comment("{ argument shuffle");
|
||||
arg_shuffle.generate(_masm, shuffle_reg, 0, _abi._shadow_space_bytes, locs);
|
||||
@@ -264,89 +257,86 @@ void DowncallStubGenerator::generate() {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__ mov(tmp1, _thread_in_native_trans);
|
||||
__ strw(tmp1, Address(rthread, JavaThread::thread_state_offset()));
|
||||
|
||||
// Force this write out before the read below
|
||||
if (!UseSystemMemoryBarrier) {
|
||||
__ membar(Assembler::LoadLoad | Assembler::LoadStore |
|
||||
Assembler::StoreLoad | Assembler::StoreStore);
|
||||
}
|
||||
|
||||
__ verify_sve_vector_length(tmp1);
|
||||
|
||||
Label L_after_safepoint_poll;
|
||||
Label L_safepoint_poll_slow_path;
|
||||
|
||||
__ safepoint_poll(L_safepoint_poll_slow_path, true /* at_return */, true /* acquire */, false /* in_nmethod */, tmp1);
|
||||
|
||||
__ ldrw(tmp1, Address(rthread, JavaThread::suspend_flags_offset()));
|
||||
__ cbnzw(tmp1, L_safepoint_poll_slow_path);
|
||||
|
||||
__ bind(L_after_safepoint_poll);
|
||||
|
||||
// change thread state
|
||||
__ mov(tmp1, _thread_in_Java);
|
||||
__ lea(tmp2, Address(rthread, JavaThread::thread_state_offset()));
|
||||
__ stlrw(tmp1, tmp2);
|
||||
|
||||
__ block_comment("reguard stack check");
|
||||
Label L_reguard;
|
||||
Label L_after_reguard;
|
||||
if (_needs_transition) {
|
||||
__ mov(tmp1, _thread_in_native_trans);
|
||||
__ strw(tmp1, Address(rthread, JavaThread::thread_state_offset()));
|
||||
__ ldrb(tmp1, Address(rthread, JavaThread::stack_guard_state_offset()));
|
||||
__ cmpw(tmp1, StackOverflow::stack_guard_yellow_reserved_disabled);
|
||||
__ br(Assembler::EQ, L_reguard);
|
||||
__ bind(L_after_reguard);
|
||||
|
||||
// Force this write out before the read below
|
||||
if (!UseSystemMemoryBarrier) {
|
||||
__ membar(Assembler::LoadLoad | Assembler::LoadStore |
|
||||
Assembler::StoreLoad | Assembler::StoreStore);
|
||||
}
|
||||
|
||||
__ verify_sve_vector_length(tmp1);
|
||||
|
||||
__ safepoint_poll(L_safepoint_poll_slow_path, true /* at_return */, true /* acquire */, false /* in_nmethod */, tmp1);
|
||||
|
||||
__ ldrw(tmp1, Address(rthread, JavaThread::suspend_flags_offset()));
|
||||
__ cbnzw(tmp1, L_safepoint_poll_slow_path);
|
||||
|
||||
__ bind(L_after_safepoint_poll);
|
||||
|
||||
// change thread state
|
||||
__ mov(tmp1, _thread_in_Java);
|
||||
__ lea(tmp2, Address(rthread, JavaThread::thread_state_offset()));
|
||||
__ stlrw(tmp1, tmp2);
|
||||
|
||||
__ block_comment("reguard stack check");
|
||||
__ ldrb(tmp1, Address(rthread, JavaThread::stack_guard_state_offset()));
|
||||
__ cmpw(tmp1, StackOverflow::stack_guard_yellow_reserved_disabled);
|
||||
__ br(Assembler::EQ, L_reguard);
|
||||
__ bind(L_after_reguard);
|
||||
|
||||
__ reset_last_Java_frame(true);
|
||||
}
|
||||
__ reset_last_Java_frame(true);
|
||||
|
||||
__ leave(); // required for proper stackwalking of RuntimeStub frame
|
||||
__ ret(lr);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
if (_needs_transition) {
|
||||
__ block_comment("{ L_safepoint_poll_slow_path");
|
||||
__ bind(L_safepoint_poll_slow_path);
|
||||
__ block_comment("{ L_safepoint_poll_slow_path");
|
||||
__ bind(L_safepoint_poll_slow_path);
|
||||
|
||||
if (should_save_return_value) {
|
||||
// Need to save the native result registers around any runtime calls.
|
||||
out_reg_spiller.generate_spill(_masm, spill_offset);
|
||||
}
|
||||
if (should_save_return_value) {
|
||||
// Need to save the native result registers around any runtime calls.
|
||||
out_reg_spiller.generate_spill(_masm, spill_offset);
|
||||
}
|
||||
|
||||
__ mov(c_rarg0, rthread);
|
||||
assert(frame::arg_reg_save_area_bytes == 0, "not expecting frame reg save area");
|
||||
__ lea(tmp1, RuntimeAddress(CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans)));
|
||||
__ blr(tmp1);
|
||||
__ mov(c_rarg0, rthread);
|
||||
assert(frame::arg_reg_save_area_bytes == 0, "not expecting frame reg save area");
|
||||
__ lea(tmp1, RuntimeAddress(CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans)));
|
||||
__ blr(tmp1);
|
||||
|
||||
if (should_save_return_value) {
|
||||
out_reg_spiller.generate_fill(_masm, spill_offset);
|
||||
}
|
||||
if (should_save_return_value) {
|
||||
out_reg_spiller.generate_fill(_masm, spill_offset);
|
||||
}
|
||||
|
||||
__ b(L_after_safepoint_poll);
|
||||
__ block_comment("} L_safepoint_poll_slow_path");
|
||||
__ b(L_after_safepoint_poll);
|
||||
__ block_comment("} L_safepoint_poll_slow_path");
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__ block_comment("{ L_reguard");
|
||||
__ bind(L_reguard);
|
||||
__ block_comment("{ L_reguard");
|
||||
__ bind(L_reguard);
|
||||
|
||||
if (should_save_return_value) {
|
||||
out_reg_spiller.generate_spill(_masm, spill_offset);
|
||||
}
|
||||
|
||||
__ rt_call(CAST_FROM_FN_PTR(address, SharedRuntime::reguard_yellow_pages), tmp1);
|
||||
|
||||
if (should_save_return_value) {
|
||||
out_reg_spiller.generate_fill(_masm, spill_offset);
|
||||
}
|
||||
|
||||
__ b(L_after_reguard);
|
||||
|
||||
__ block_comment("} L_reguard");
|
||||
if (should_save_return_value) {
|
||||
out_reg_spiller.generate_spill(_masm, spill_offset);
|
||||
}
|
||||
|
||||
__ rt_call(CAST_FROM_FN_PTR(address, SharedRuntime::reguard_yellow_pages), tmp1);
|
||||
|
||||
if (should_save_return_value) {
|
||||
out_reg_spiller.generate_fill(_masm, spill_offset);
|
||||
}
|
||||
|
||||
__ b(L_after_reguard);
|
||||
|
||||
__ block_comment("} L_reguard");
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
__ flush();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2019, 2022, Arm Limited. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -33,10 +33,6 @@
|
||||
#include "prims/vmstorage.hpp"
|
||||
#include "utilities/formatBuffer.hpp"
|
||||
|
||||
bool ForeignGlobals::is_foreign_linker_supported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ABIDescriptor::is_volatile_reg(Register reg) const {
|
||||
return _integer_argument_registers.contains(reg)
|
||||
|| _integer_additional_volatile_registers.contains(reg);
|
||||
|
||||
@@ -96,7 +96,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
// to construct the sender and do some validation of it. This goes a long way
|
||||
// toward eliminating issues when we get in frame construction code
|
||||
|
||||
if (_cb != nullptr ) {
|
||||
if (_cb != NULL ) {
|
||||
|
||||
// First check if frame is complete and tester is reliable
|
||||
// Unfortunately we can only check frame complete for runtime stubs and nmethod
|
||||
@@ -122,10 +122,10 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
return fp_safe;
|
||||
}
|
||||
|
||||
intptr_t* sender_sp = nullptr;
|
||||
intptr_t* sender_unextended_sp = nullptr;
|
||||
address sender_pc = nullptr;
|
||||
intptr_t* saved_fp = nullptr;
|
||||
intptr_t* sender_sp = NULL;
|
||||
intptr_t* sender_unextended_sp = NULL;
|
||||
address sender_pc = NULL;
|
||||
intptr_t* saved_fp = NULL;
|
||||
|
||||
if (is_interpreted_frame()) {
|
||||
// fp must be safe
|
||||
@@ -189,7 +189,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
|
||||
// We must always be able to find a recognizable pc
|
||||
CodeBlob* sender_blob = CodeCache::find_blob(sender_pc);
|
||||
if (sender_pc == nullptr || sender_blob == nullptr) {
|
||||
if (sender_pc == NULL || sender_blob == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
}
|
||||
|
||||
CompiledMethod* nm = sender_blob->as_compiled_method_or_null();
|
||||
if (nm != nullptr) {
|
||||
if (nm != NULL) {
|
||||
if (nm->is_deopt_mh_entry(sender_pc) || nm->is_deopt_entry(sender_pc) ||
|
||||
nm->method()->is_method_handle_intrinsic()) {
|
||||
return false;
|
||||
@@ -264,7 +264,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
|
||||
// Will the pc we fetch be non-zero (which we'll find at the oldest frame)
|
||||
|
||||
if ( (address) this->fp()[return_addr_offset] == nullptr) return false;
|
||||
if ( (address) this->fp()[return_addr_offset] == NULL) return false;
|
||||
|
||||
|
||||
// could try and do some more potential verification of native frame if we could think of some...
|
||||
@@ -298,7 +298,7 @@ void frame::patch_pc(Thread* thread, address pc) {
|
||||
*pc_addr = signed_pc;
|
||||
_pc = pc; // must be set before call to get_deopt_original_pc
|
||||
address original_pc = CompiledMethod::get_deopt_original_pc(this);
|
||||
if (original_pc != nullptr) {
|
||||
if (original_pc != NULL) {
|
||||
assert(original_pc == old_pc, "expected original PC to be stored before patching");
|
||||
_deopt_state = is_deoptimized;
|
||||
_pc = original_pc;
|
||||
@@ -364,7 +364,7 @@ void frame::interpreter_frame_set_extended_sp(intptr_t* sp) {
|
||||
}
|
||||
|
||||
frame frame::sender_for_entry_frame(RegisterMap* map) const {
|
||||
assert(map != nullptr, "map must be set");
|
||||
assert(map != NULL, "map must be set");
|
||||
// Java frame called from C; skip all C frames and return top C
|
||||
// frame of that chunk as the sender
|
||||
JavaFrameAnchor* jfa = entry_frame_call_wrapper()->anchor();
|
||||
@@ -392,11 +392,11 @@ bool frame::upcall_stub_frame_is_first() const {
|
||||
assert(is_upcall_stub_frame(), "must be optimzed entry frame");
|
||||
UpcallStub* blob = _cb->as_upcall_stub();
|
||||
JavaFrameAnchor* jfa = blob->jfa_for_frame(*this);
|
||||
return jfa->last_Java_sp() == nullptr;
|
||||
return jfa->last_Java_sp() == NULL;
|
||||
}
|
||||
|
||||
frame frame::sender_for_upcall_stub_frame(RegisterMap* map) const {
|
||||
assert(map != nullptr, "map must be set");
|
||||
assert(map != NULL, "map must be set");
|
||||
UpcallStub* blob = _cb->as_upcall_stub();
|
||||
// Java frame called from C; skip all C frames and return top C
|
||||
// frame of that chunk as the sender
|
||||
@@ -441,9 +441,9 @@ void frame::adjust_unextended_sp() {
|
||||
// as any other call site. Therefore, no special action is needed when we are
|
||||
// returning to any of these call sites.
|
||||
|
||||
if (_cb != nullptr) {
|
||||
if (_cb != NULL) {
|
||||
CompiledMethod* sender_cm = _cb->as_compiled_method_or_null();
|
||||
if (sender_cm != nullptr) {
|
||||
if (sender_cm != NULL) {
|
||||
// If the sender PC is a deoptimization point, get the original PC.
|
||||
if (sender_cm->is_deopt_entry(_pc) ||
|
||||
sender_cm->is_deopt_mh_entry(_pc)) {
|
||||
@@ -568,7 +568,7 @@ BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result)
|
||||
obj = cast_to_oop(at(interpreter_frame_oop_temp_offset));
|
||||
} else {
|
||||
oop* obj_p = (oop*)tos_addr;
|
||||
obj = (obj_p == nullptr) ? (oop)nullptr : *obj_p;
|
||||
obj = (obj_p == NULL) ? (oop)NULL : *obj_p;
|
||||
}
|
||||
assert(Universe::is_in_heap_or_null(obj), "sanity check");
|
||||
*oop_result = obj;
|
||||
@@ -636,7 +636,7 @@ void frame::describe_pd(FrameValues& values, int frame_no) {
|
||||
|
||||
intptr_t *frame::initial_deoptimization_info() {
|
||||
// Not used on aarch64, but we must return something.
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#undef DESCRIBE_FP_OFFSET
|
||||
@@ -716,7 +716,7 @@ void internal_pf(uintptr_t sp, uintptr_t fp, uintptr_t pc, uintptr_t bcx) {
|
||||
printf("not a Method\n");
|
||||
} else {
|
||||
CodeBlob *cb = CodeCache::find_blob((address)pc);
|
||||
if (cb != nullptr) {
|
||||
if (cb != NULL) {
|
||||
if (cb->is_nmethod()) {
|
||||
ResourceMark rm;
|
||||
nmethod* nm = (nmethod*)cb;
|
||||
@@ -782,11 +782,11 @@ frame::frame(void* sp, void* fp, void* pc) {
|
||||
|
||||
void JavaFrameAnchor::make_walkable() {
|
||||
// last frame set?
|
||||
if (last_Java_sp() == nullptr) return;
|
||||
if (last_Java_sp() == NULL) return;
|
||||
// already walkable?
|
||||
if (walkable()) return;
|
||||
vmassert(last_Java_sp() != nullptr, "not called from Java code?");
|
||||
vmassert(last_Java_pc() == nullptr, "already walkable");
|
||||
vmassert(last_Java_sp() != NULL, "not called from Java code?");
|
||||
vmassert(last_Java_pc() == NULL, "already walkable");
|
||||
_last_Java_pc = (address)_last_Java_sp[-1];
|
||||
vmassert(walkable(), "something went wrong");
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user