mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-12 12:29:41 +01:00
Compare commits
397 Commits
jbr-dev-vm
...
moklev-fix
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
871fbb45e0 | ||
|
|
f9d78954c6 | ||
|
|
1bdb9d291f | ||
|
|
d57330da6b | ||
|
|
d8378498a1 | ||
|
|
bec1b51441 | ||
|
|
a47d0d0f04 | ||
|
|
285656cb58 | ||
|
|
5d016e02f4 | ||
|
|
1153da9d05 | ||
|
|
a6da53aae9 | ||
|
|
f04b644f00 | ||
|
|
6b296f9a8a | ||
|
|
8621994718 | ||
|
|
907601d37d | ||
|
|
45072c51b2 | ||
|
|
a72d27bea1 | ||
|
|
84743c0534 | ||
|
|
c6bb789459 | ||
|
|
505423d878 | ||
|
|
78b73c40d3 | ||
|
|
e394f0f966 | ||
|
|
6541014b7a | ||
|
|
c166685074 | ||
|
|
2d2709331a | ||
|
|
48bc17eb27 | ||
|
|
ff4f9c6e77 | ||
|
|
5a117a2019 | ||
|
|
ffdf42678c | ||
|
|
b31994453d | ||
|
|
6da27f795d | ||
|
|
641eb013d3 | ||
|
|
31bce7b3db | ||
|
|
2ec797612e | ||
|
|
8c0c8f72bb | ||
|
|
2d368311d3 | ||
|
|
15c5ca53ba | ||
|
|
ee9ff54a2a | ||
|
|
af58835c19 | ||
|
|
4f0294d522 | ||
|
|
3abd56b5b6 | ||
|
|
8e602d500a | ||
|
|
596535310e | ||
|
|
c6594d9285 | ||
|
|
023f704cf7 | ||
|
|
40d3966f87 | ||
|
|
70333efefe | ||
|
|
949b0d688c | ||
|
|
7d3cc7f4db | ||
|
|
d47dfe10c0 | ||
|
|
fb6d2d32ad | ||
|
|
4013153a0f | ||
|
|
bca36ea84a | ||
|
|
ee03038cbe | ||
|
|
32c58721c2 | ||
|
|
08637a0bb0 | ||
|
|
9c7f5362fb | ||
|
|
92efdda997 | ||
|
|
a4b5841588 | ||
|
|
d23aab807b | ||
|
|
55d430f807 | ||
|
|
ace6ce7439 | ||
|
|
a86dd9ea57 | ||
|
|
8b46f96794 | ||
|
|
5b7a5b2e98 | ||
|
|
90ea04d331 | ||
|
|
62b34ca27a | ||
|
|
4d60acffc3 | ||
|
|
1f96fab51d | ||
|
|
08c39c6055 | ||
|
|
cfc82b8af8 | ||
|
|
1e19017900 | ||
|
|
fe0cfae0a9 | ||
|
|
4ea982615d | ||
|
|
fe68ecb28d | ||
|
|
3584c2dc5a | ||
|
|
fcc479e437 | ||
|
|
324be919c4 | ||
|
|
952d17da7d | ||
|
|
2f5fd5633e | ||
|
|
ef77e22a57 | ||
|
|
8ae392da23 | ||
|
|
eb321704cf | ||
|
|
9ef17a2b66 | ||
|
|
2d89645335 | ||
|
|
5d47aec5a1 | ||
|
|
4565ea48ed | ||
|
|
89175d258e | ||
|
|
5d222bfaa3 | ||
|
|
51ada575f6 | ||
|
|
4c0a601857 | ||
|
|
2280f9b637 | ||
|
|
422b9cee97 | ||
|
|
b7389b6c4e | ||
|
|
35f84ca05e | ||
|
|
2c499871f7 | ||
|
|
c628e34c55 | ||
|
|
a0fcbe9a72 | ||
|
|
6ea4422fd5 | ||
|
|
a3cefd997d | ||
|
|
f86241dd4b | ||
|
|
0a1724146b | ||
|
|
30d679351b | ||
|
|
fa4d7cb32b | ||
|
|
5a09b36d9f | ||
|
|
6ff63947e5 | ||
|
|
a3775f11db | ||
|
|
e83b2c76a5 | ||
|
|
f2c16a8fff | ||
|
|
6c9e41cdde | ||
|
|
d4e56a8430 | ||
|
|
f055c1bad6 | ||
|
|
1850b7e13f | ||
|
|
626a7bc3a5 | ||
|
|
c84ea20fe5 | ||
|
|
3c2c79d80b | ||
|
|
f8ca5f3221 | ||
|
|
aee2ad6b61 | ||
|
|
cf99b64876 | ||
|
|
5205cea1cd | ||
|
|
6e2eaa860e | ||
|
|
ea66dc1b38 | ||
|
|
d9011e2a09 | ||
|
|
7ef929571a | ||
|
|
fcd0c47015 | ||
|
|
8f19077100 | ||
|
|
7ffc1bc236 | ||
|
|
070b0ec84e | ||
|
|
ee723f0740 | ||
|
|
25c7fe161b | ||
|
|
a1954f8391 | ||
|
|
6ee307f196 | ||
|
|
a75500c9e7 | ||
|
|
aa1bad552d | ||
|
|
940eaad7a6 | ||
|
|
7ad36e8033 | ||
|
|
87f931bdcf | ||
|
|
bc25c4eabe | ||
|
|
1c620b5dde | ||
|
|
14d6f07974 | ||
|
|
7597c79ec3 | ||
|
|
a82cacb8fd | ||
|
|
9bca8c0609 | ||
|
|
9c8b7a4638 | ||
|
|
fb8f212a89 | ||
|
|
2fd46484b2 | ||
|
|
0a1fdd7d3b | ||
|
|
39057baa11 | ||
|
|
3cdfe6629d | ||
|
|
bd2df7986d | ||
|
|
31b6c234b0 | ||
|
|
b05b735da5 | ||
|
|
b6df2597cf | ||
|
|
8ee98f99ae | ||
|
|
a72fd4a4e8 | ||
|
|
c47a6a1bf6 | ||
|
|
7ac64cfb7e | ||
|
|
4449d0269a | ||
|
|
17e87e199d | ||
|
|
daa553a6a5 | ||
|
|
d97dfd8d24 | ||
|
|
922d7cbe8f | ||
|
|
2d9ff62530 | ||
|
|
a29d6e371b | ||
|
|
29e7aed94b | ||
|
|
e92a3d3d0e | ||
|
|
8ccbabcd0b | ||
|
|
8cfb14ce8e | ||
|
|
2238489d6f | ||
|
|
9b7b5155fe | ||
|
|
b996a98bdf | ||
|
|
fb250a69b3 | ||
|
|
5cbfc7a28a | ||
|
|
4d97d66887 | ||
|
|
64f8f02f99 | ||
|
|
f0ffb67a4c | ||
|
|
485ad8a83b | ||
|
|
e813da2fd3 | ||
|
|
1d7c2a5e51 | ||
|
|
a1591245e8 | ||
|
|
d48d6186dc | ||
|
|
fc95ace2d5 | ||
|
|
3399aca3fc | ||
|
|
440bb7ee22 | ||
|
|
ddb262a8c4 | ||
|
|
9888e9212e | ||
|
|
26a083c9ca | ||
|
|
f910b91e4a | ||
|
|
5416f1ab7c | ||
|
|
ba51f5c85b | ||
|
|
e67cb3eb13 | ||
|
|
9a3146dadc | ||
|
|
2524289f29 | ||
|
|
0e3a35b3df | ||
|
|
24c617d90b | ||
|
|
9bc56eab37 | ||
|
|
ffba5e94e4 | ||
|
|
7e9dea7873 | ||
|
|
c7644552aa | ||
|
|
6ef1f24703 | ||
|
|
a89a363e74 | ||
|
|
bf5163fd2d | ||
|
|
dfe81916cb | ||
|
|
53696a2d70 | ||
|
|
aa2a43a729 | ||
|
|
a65d9ae337 | ||
|
|
7e71b4ad32 | ||
|
|
d781d9d29f | ||
|
|
902c61ef20 | ||
|
|
350c292819 | ||
|
|
06f6da66a0 | ||
|
|
a82405e151 | ||
|
|
ccb61bda56 | ||
|
|
8e25a46a9a | ||
|
|
e1193869ae | ||
|
|
5c174e7b08 | ||
|
|
e63309eefa | ||
|
|
b1926d5019 | ||
|
|
14b000be9c | ||
|
|
282721afed | ||
|
|
e2c3abb34c | ||
|
|
37279a5fde | ||
|
|
321bb26c0f | ||
|
|
f0ceae850f | ||
|
|
0a306de427 | ||
|
|
b976fedbfa | ||
|
|
9c052ef63a | ||
|
|
e2e4094334 | ||
|
|
23d85d392e | ||
|
|
42aa34b029 | ||
|
|
27cb94583f | ||
|
|
b241188993 | ||
|
|
d52cbc6a6e | ||
|
|
99615b11df | ||
|
|
c132899a95 | ||
|
|
89745fe2dc | ||
|
|
37486c1df5 | ||
|
|
97a705863e | ||
|
|
f28d999eae | ||
|
|
ca08f5b03f | ||
|
|
d12d3c0dcb | ||
|
|
239cb29f70 | ||
|
|
1cf4ae27c7 | ||
|
|
30eb852987 | ||
|
|
a2eb48301f | ||
|
|
ba2ea7ff2f | ||
|
|
9084a8000f | ||
|
|
2e6b37b0af | ||
|
|
010c6db0f9 | ||
|
|
a9d90ef40d | ||
|
|
c062063331 | ||
|
|
3eaa3f7009 | ||
|
|
944d93e1dc | ||
|
|
32a05500a8 | ||
|
|
d7908fee54 | ||
|
|
914afa05f6 | ||
|
|
c710ba7926 | ||
|
|
17a7c818cf | ||
|
|
3647a66ef5 | ||
|
|
8316dc4ae5 | ||
|
|
96fd4dc70d | ||
|
|
4f8b7d2527 | ||
|
|
99d2c87ce5 | ||
|
|
963d452ff0 | ||
|
|
8ea62039eb | ||
|
|
90e5595461 | ||
|
|
1d63013ef7 | ||
|
|
736a33ec9c | ||
|
|
756d9e02b6 | ||
|
|
664956746e | ||
|
|
4b27beb8ad | ||
|
|
7d4deefcb9 | ||
|
|
390d7b3efc | ||
|
|
79ea09cd08 | ||
|
|
64e80c7f24 | ||
|
|
ac5ed14839 | ||
|
|
987a7543f3 | ||
|
|
c69a5d366a | ||
|
|
225da06427 | ||
|
|
3b12ea78d5 | ||
|
|
0dfd62f8db | ||
|
|
662cd04716 | ||
|
|
44e428f1da | ||
|
|
3b25b421d5 | ||
|
|
fbce996294 | ||
|
|
8203d376f4 | ||
|
|
d3a216048e | ||
|
|
5e0335a5f8 | ||
|
|
5c6cdaaa1d | ||
|
|
4eb2e97813 | ||
|
|
0a747f52f9 | ||
|
|
4e396c0812 | ||
|
|
a7823270d4 | ||
|
|
d8d99dceb8 | ||
|
|
a2183407ed | ||
|
|
3e427efc38 | ||
|
|
12cdd62353 | ||
|
|
db22fb94ff | ||
|
|
a16c687417 | ||
|
|
9b3b83c508 | ||
|
|
8baf2b7712 | ||
|
|
c31990d48d | ||
|
|
8d7c9fe827 | ||
|
|
50eb295651 | ||
|
|
09d2af4d1e | ||
|
|
df45b36a86 | ||
|
|
8f3775e3df | ||
|
|
893e40817b | ||
|
|
a8f3b5f8ce | ||
|
|
cf227a0b5d | ||
|
|
ab83445821 | ||
|
|
342cb06f85 | ||
|
|
c8f8e87794 | ||
|
|
0a6c279c07 | ||
|
|
eddf2c3a40 | ||
|
|
35b57e8adb | ||
|
|
21419a9e34 | ||
|
|
0698ab3f88 | ||
|
|
e898c250d1 | ||
|
|
61e7b5c536 | ||
|
|
e632dc3eb1 | ||
|
|
d4b0957c91 | ||
|
|
fc06b53a93 | ||
|
|
498c82f2f9 | ||
|
|
83281dbcdb | ||
|
|
355e97897c | ||
|
|
ec5ece3591 | ||
|
|
42e94234c5 | ||
|
|
8d04a0719f | ||
|
|
a11472fe46 | ||
|
|
2a9f80a866 | ||
|
|
0223808597 | ||
|
|
7e788e826a | ||
|
|
ce103929f0 | ||
|
|
348ab47df8 | ||
|
|
529fdfba23 | ||
|
|
e9f9662544 | ||
|
|
d45d3e3cd5 | ||
|
|
4990440333 | ||
|
|
5537f7c29d | ||
|
|
ee8ebc2de4 | ||
|
|
c810c54f60 | ||
|
|
298ba6dd06 | ||
|
|
0b9a36ea8c | ||
|
|
eb0e42273b | ||
|
|
98da0d4641 | ||
|
|
29dc4dd3ca | ||
|
|
e167df4a9e | ||
|
|
ec87f6d2dd | ||
|
|
d26eded198 | ||
|
|
63cad9789b | ||
|
|
e0d83f4569 | ||
|
|
3f6f737b26 | ||
|
|
ce5a3fcd0d | ||
|
|
773fc3d95b | ||
|
|
c8a4d9b440 | ||
|
|
060815822b | ||
|
|
27dba0a337 | ||
|
|
1035968704 | ||
|
|
456c5541dc | ||
|
|
10a39fc954 | ||
|
|
6a810f9f2d | ||
|
|
af8882714f | ||
|
|
e4d6d86c6e | ||
|
|
2a38e08b63 | ||
|
|
5a1dc1457e | ||
|
|
05a06e6fd4 | ||
|
|
cb1503709a | ||
|
|
34f042312b | ||
|
|
c30712e635 | ||
|
|
2250a00e31 | ||
|
|
842335850d | ||
|
|
fca9c144ee | ||
|
|
e503e1871e | ||
|
|
b8f99ef569 | ||
|
|
de84f3315e | ||
|
|
a8b48cca0c | ||
|
|
13b4f47559 | ||
|
|
41af21c89d | ||
|
|
2f507a4f09 | ||
|
|
f6fb8e26e6 | ||
|
|
f3ae1dc69b | ||
|
|
9a9656503f | ||
|
|
73acb84e01 | ||
|
|
7a7565b3f2 | ||
|
|
bd1e7f09e2 | ||
|
|
367ff82787 | ||
|
|
0f7b33d42e | ||
|
|
e01241ff3c | ||
|
|
55af4833cf | ||
|
|
2e2896c187 | ||
|
|
8828372c87 | ||
|
|
844c7cd32b | ||
|
|
08229cf68a | ||
|
|
d474ded3f5 | ||
|
|
3671b2330b | ||
|
|
95560b7c2b |
99
.github/workflows/submit.yml
vendored
99
.github/workflows/submit.yml
vendored
@@ -10,7 +10,7 @@ on:
|
||||
platforms:
|
||||
description: "Platform(s) to execute on"
|
||||
required: true
|
||||
default: "Linux additional (hotspot only), Linux x64, Linux x86, Windows aarch64, Windows x64, macOS x64"
|
||||
default: "Linux additional (hotspot only), Linux x64, Linux x86, Windows x64, macOS x64"
|
||||
|
||||
jobs:
|
||||
prerequisites:
|
||||
@@ -22,7 +22,6 @@ jobs:
|
||||
platform_linux_additional: ${{ steps.check_platforms.outputs.platform_linux_additional }}
|
||||
platform_linux_x64: ${{ steps.check_platforms.outputs.platform_linux_x64 }}
|
||||
platform_linux_x86: ${{ steps.check_platforms.outputs.platform_linux_x86 }}
|
||||
platform_windows_aarch64: ${{ steps.check_platforms.outputs.platform_windows_aarch64 }}
|
||||
platform_windows_x64: ${{ steps.check_platforms.outputs.platform_windows_x64 }}
|
||||
platform_macos_x64: ${{ steps.check_platforms.outputs.platform_macos_x64 }}
|
||||
platform_macos_aarch64: ${{ steps.check_platforms.outputs.platform_macos_aarch64 }}
|
||||
@@ -39,7 +38,6 @@ jobs:
|
||||
echo "::set-output name=platform_linux_additional::${{ contains(github.event.inputs.platforms, 'linux additional (hotspot only)') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'linux additional (hotspot only)'))) }}"
|
||||
echo "::set-output name=platform_linux_x64::${{ contains(github.event.inputs.platforms, 'linux x64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'linux x64'))) }}"
|
||||
echo "::set-output name=platform_linux_x86::${{ contains(github.event.inputs.platforms, 'linux x86') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'linux x86'))) }}"
|
||||
echo "::set-output name=platform_windows_aarch64::${{ contains(github.event.inputs.platforms, 'windows aarch64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'windows aarch64'))) }}"
|
||||
echo "::set-output name=platform_windows_x64::${{ contains(github.event.inputs.platforms, 'windows x64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'windows x64'))) }}"
|
||||
echo "::set-output name=platform_macos_x64::${{ contains(github.event.inputs.platforms, 'macos x64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'macos x64'))) }}"
|
||||
echo "::set-output name=platform_macos_aarch64::${{ contains(github.event.inputs.platforms, 'macos aarch64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'macos aarch64'))) }}"
|
||||
@@ -174,7 +172,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc-10=10.3.0-1ubuntu1~20.04 g++-10=10.3.0-1ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
|
||||
sudo apt-get install gcc-10=10.2.0-5ubuntu1~20.04 g++-10=10.2.0-5ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
||||
|
||||
- name: Configure
|
||||
@@ -489,12 +487,12 @@ jobs:
|
||||
|
||||
- name: Install native host dependencies
|
||||
run: |
|
||||
sudo apt-get install gcc-10=10.3.0-1ubuntu1~20.04 g++-10=10.3.0-1ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
|
||||
sudo apt-get install gcc-10=10.2.0-5ubuntu1~20.04 g++-10=10.2.0-5ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
||||
if: matrix.debian-arch == ''
|
||||
|
||||
- name: Install cross-compilation host dependencies
|
||||
run: sudo apt-get install gcc-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.3.0-1ubuntu1~20.04cross1 g++-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.3.0-1ubuntu1~20.04cross1
|
||||
run: sudo apt-get install gcc-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.2.0-5ubuntu1~20.04cross1 g++-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.2.0-5ubuntu1~20.04cross1
|
||||
if: matrix.debian-arch != ''
|
||||
|
||||
- name: Cache sysroot
|
||||
@@ -849,94 +847,6 @@ jobs:
|
||||
path: ~/linux-x86${{ matrix.artifact }}_testsupport_${{ env.logsuffix }}.zip
|
||||
continue-on-error: true
|
||||
|
||||
windows_aarch64_build:
|
||||
name: Windows aarch64
|
||||
runs-on: "windows-2019"
|
||||
needs: prerequisites
|
||||
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_windows_aarch64 != 'false'
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
flavor:
|
||||
- build debug
|
||||
include:
|
||||
- flavor: build debug
|
||||
flags: --enable-debug
|
||||
artifact: -debug
|
||||
|
||||
env:
|
||||
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}"
|
||||
BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
|
||||
BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_FILENAME }}"
|
||||
BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_URL }}"
|
||||
BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_SHA256 }}"
|
||||
|
||||
steps:
|
||||
- name: Restore cygwin packages from cache
|
||||
id: cygwin
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/cygwin/packages
|
||||
key: cygwin-packages-${{ runner.os }}-v1
|
||||
|
||||
- name: Install cygwin
|
||||
run: |
|
||||
New-Item -Force -ItemType directory -Path "$HOME\cygwin"
|
||||
& curl -L "https://www.cygwin.com/setup-x86_64.exe" -o "$HOME/cygwin/setup-x86_64.exe"
|
||||
Start-Process -FilePath "$HOME\cygwin\setup-x86_64.exe" -ArgumentList "--quiet-mode --packages autoconf,make,zip,unzip --root $HOME\cygwin\cygwin64 --local-package-dir $HOME\cygwin\packages --site http://mirrors.kernel.org/sourceware/cygwin --no-desktop --no-shortcuts --no-startmenu --no-admin" -Wait -NoNewWindow
|
||||
|
||||
- name: Checkout the source
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: jdk
|
||||
|
||||
- name: Restore boot JDK from cache
|
||||
id: bootjdk
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
|
||||
key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
|
||||
|
||||
- name: Download boot JDK
|
||||
run: |
|
||||
mkdir -p "$HOME\bootjdk\$env:BOOT_JDK_VERSION"
|
||||
& curl -L "$env:BOOT_JDK_URL" -o "$HOME/bootjdk/$env:BOOT_JDK_FILENAME"
|
||||
$FileHash = Get-FileHash -Algorithm SHA256 "$HOME/bootjdk/$env:BOOT_JDK_FILENAME"
|
||||
$FileHash.Hash -eq $env:BOOT_JDK_SHA256
|
||||
& tar -xf "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" -C "$HOME/bootjdk/$env:BOOT_JDK_VERSION"
|
||||
Get-ChildItem "$HOME\bootjdk\$env:BOOT_JDK_VERSION\*\*" | Move-Item -Destination "$HOME\bootjdk\$env:BOOT_JDK_VERSION"
|
||||
if: steps.bootjdk.outputs.cache-hit != 'true'
|
||||
|
||||
- name: Ensure a specific version of MSVC is installed
|
||||
run: >
|
||||
Start-Process -FilePath 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe' -Wait -NoNewWindow -ArgumentList
|
||||
'modify --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" --quiet
|
||||
--add Microsoft.VisualStudio.Component.VC.14.29.arm64'
|
||||
|
||||
- name: Configure
|
||||
run: >
|
||||
$env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ;
|
||||
$env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ;
|
||||
$env:BOOT_JDK = cygpath "$HOME/bootjdk/$env:BOOT_JDK_VERSION" ;
|
||||
& bash configure
|
||||
--with-conf-name=windows-aarch64
|
||||
--with-msvc-toolset-version=14.29
|
||||
--openjdk-target=aarch64-unknown-cygwin
|
||||
${{ matrix.flags }}
|
||||
--with-version-opt="$env:GITHUB_ACTOR-$env:GITHUB_SHA"
|
||||
--with-version-build=0
|
||||
--with-boot-jdk="$env:BOOT_JDK"
|
||||
--with-default-make-target="hotspot"
|
||||
working-directory: jdk
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
$env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ;
|
||||
$env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ;
|
||||
& make CONF_NAME=windows-aarch64
|
||||
working-directory: jdk
|
||||
|
||||
windows_x64_build:
|
||||
name: Windows x64
|
||||
runs-on: "windows-2019"
|
||||
@@ -1661,7 +1571,6 @@ jobs:
|
||||
needs:
|
||||
- prerequisites
|
||||
- linux_additional_build
|
||||
- windows_aarch64_build
|
||||
- linux_x64_test
|
||||
- linux_x86_test
|
||||
- windows_x64_test
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -16,7 +16,5 @@ NashornProfile.txt
|
||||
**/JTreport/**
|
||||
**/JTwork/**
|
||||
/src/utils/LogCompilation/target/
|
||||
/.project/
|
||||
/.settings/
|
||||
*.class
|
||||
.idea/workspace.xml
|
||||
|
||||
177
README.md
177
README.md
@@ -1,174 +1,13 @@
|
||||
[](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
|
||||
|
||||
# Welcome to JetBrains Runtime!
|
||||
# Welcome to the JDK!
|
||||
|
||||
JetBrains Runtime is a fork of [OpenJDK](https://github.com/openjdk/jdk) available for Windows, Mac OS X, and Linux.
|
||||
It includes a number enhancements in font rendering, HiDPI support, ligatures, performance improvements, and bugfixes.
|
||||
For build instructions please see the
|
||||
[online documentation](https://openjdk.java.net/groups/build/doc/building.html),
|
||||
or either of these files:
|
||||
|
||||
> **_NOTE_**: This is a **development** branch that is periodically synhronized with
|
||||
> the [OpenJDK master](https://github.com/openjdk/jdk/tree/master) branch.
|
||||
>
|
||||
> Release builds are based on these branches:
|
||||
> * [master](https://github.com/JetBrains/JetBrainsRuntime/tree/master) (JDK 11)
|
||||
> * [master17](https://github.com/JetBrains/JetBrainsRuntime/tree/master17) (JDK 17)
|
||||
- [doc/building.html](doc/building.html) (html version)
|
||||
- [doc/building.md](doc/building.md) (markdown version)
|
||||
|
||||
|
||||
## Contents
|
||||
- [Welcome to JetBrains Runtime](#jetbrains-runtime)
|
||||
- [Products Built on JetBrains Runtime](#products-built-on-jetbrains-runtime)
|
||||
- [Getting Sources](#getting-sources)
|
||||
- [macOS, Linux](#macos-linux)
|
||||
- [Windows](#sources-windows)
|
||||
- [Configuring the Build Environment](#configuring-the-build-environment)
|
||||
- [Linux (Docker)](#linux-docker)
|
||||
- [Ubuntu Linux](#ubuntu-linux)
|
||||
- [Windows](#build-windows)
|
||||
- [macOS](#macos)
|
||||
- [Developing](#developing)
|
||||
- [Contributing](#contributing)
|
||||
- [Resources](#resources)
|
||||
|
||||
## Products Built on JetBrains Runtime
|
||||
* [Android Studio](https://developer.android.com/studio). The official IDE for Google's Android operating system.
|
||||
* [CLion](https://www.jetbrains.com/clion/). A cross-platform IDE for C and C++ from JetBrains.
|
||||
* [DataGrip](https://www.jetbrains.com/datagrip/). The IDE for Databases and SQL from JetBrains.
|
||||
* [GoLand](https://www.jetbrains.com/go/). The cross-platform Go IDE from JetBrains.
|
||||
* [IntelliJ IDEA](https://www.jetbrains.com/idea/). The IDE for JVM from JetBrains.
|
||||
* [JProfiler](https://www.ej-technologies.com/products/jprofiler/overview.html). The Java profiler.
|
||||
* [PhpStorm](https://www.jetbrains.com/phpstorm/). The PHP IDE from JetBrains.
|
||||
* [PyCharm](https://www.jetbrains.com/pycharm/). The Python IDE from JetBrains.
|
||||
* [Rider](https://www.jetbrains.com/rider/). The cross-platform .NET IDE from JetBrains.
|
||||
* [RubyMine](https://www.jetbrains.com/ruby/). The Ruby and Rails IDE from JetBrains.
|
||||
* [WebStorm](https://www.jetbrains.com/webstorm/). The JavaScript IDE from JetBrains.
|
||||
* [YourKit](https://www.yourkit.com/). Java and .NET profilers.
|
||||
|
||||
## Getting Sources
|
||||
### macOS, Linux
|
||||
```
|
||||
git config --global core.autocrlf input
|
||||
git clone git@github.com:JetBrains/JetBrainsRuntime.git
|
||||
```
|
||||
|
||||
### Windows
|
||||
<a name="sources-windows"></a>
|
||||
```
|
||||
git config --global core.autocrlf false
|
||||
git clone git@github.com:JetBrains/JetBrainsRuntime.git
|
||||
```
|
||||
|
||||
## Configuring the Build Environment
|
||||
Here are quick per-platform instructions for those who can't wait to get started.
|
||||
Please refer to [OpenJDK build docs](https://openjdk.java.net/groups/build/doc/building.html) for in-depth
|
||||
coverage of all the details.
|
||||
|
||||
> **_TIP:_** To get a preliminary report of what's missing, run `./configure` and check its output.
|
||||
> It would usually have a meaningful advice on how to solve the problem.
|
||||
|
||||
### Linux (Docker)
|
||||
Create a container:
|
||||
```
|
||||
$ cd jb/project/docker
|
||||
$ docker build .
|
||||
...
|
||||
Successfully built 942ea9900054
|
||||
```
|
||||
Run these commands in the new container:
|
||||
```
|
||||
$ docker run -v `pwd`../../../../:/JetBrainsRuntime -it 942ea9900054
|
||||
# cd /JetBrainsRuntime
|
||||
# sh ./configure
|
||||
# make images CONF=linux-x86_64-normal-server-release
|
||||
```
|
||||
|
||||
### Ubuntu Linux
|
||||
Install the necessary tools, libraries, and headers with:
|
||||
```
|
||||
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev libxtst-dev \
|
||||
libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev
|
||||
```
|
||||
Get Java 17 (for instance, [Azul Zulu Builds of OpenJDK 17](https://www.azul.com/downloads/?version=java-17-ea&package=jdk)).
|
||||
|
||||
Then run the following:
|
||||
```
|
||||
$ cd JetBrainsRuntime
|
||||
$ git checkout jbr-dev
|
||||
$ sh ./configure
|
||||
$ make images
|
||||
```
|
||||
This will build the release configuration under `./build/linux-x86_64-server-release/`.
|
||||
|
||||
### Windows
|
||||
<a name="build-windows"></a>
|
||||
Install the following:
|
||||
* [Cygwin x64](http://www.cygwin.com/).
|
||||
Required packages: `autoconf`, `binutils`, `cpio`, `diffutils`, `file`, `gawk`, `gcc-core`, `make`, `m4`, `unzip`, `zip`.
|
||||
Install those together with Cygwin.
|
||||
* [Visual Studio compiler toolset](https://visualstudio.microsoft.com/downloads/).
|
||||
Install with the desktop development kit, which includes Windows SDK and compilers.
|
||||
Visual Studio 2019 is supported by default.
|
||||
* Java 17 (for instance, [Azul Zulu Builds of OpenJDK 17](https://www.azul.com/downloads/?version=java-17-ea&os=windows&architecture=x86-64-bit&package=jdk).
|
||||
If you have problems while configuring, read [Java tips on Cygwin](http://horstmann.com/articles/cygwin-tips.html).
|
||||
|
||||
From the command line:
|
||||
```
|
||||
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
|
||||
"c:\Program_Files\cygwin64\bin\mintty.exe" /bin/bash -l
|
||||
```
|
||||
The first command sets up environment variables, the second starts a Cygwin shell with the proper environment.
|
||||
|
||||
In the Cygwin shell:
|
||||
```
|
||||
$ cd JetBrainsRuntime
|
||||
$ git checkout jbr-dev
|
||||
$ bash configure --with-toolchain-version=2019
|
||||
$ make images
|
||||
```
|
||||
This will build the release configuration under `./build/windows-x86_64-server-release/`.
|
||||
|
||||
### macOS
|
||||
Install the following:
|
||||
* Xcode command line developer tools and `autoconf` via [Homebrew](https://brew.sh/).
|
||||
* Java 17 (for instance, [Azul Zulu Builds of OpenJDK 17](https://www.azul.com/downloads/?version=java-17-ea&package=jdk)).
|
||||
|
||||
From the command line:
|
||||
```
|
||||
$ cd JetBrainsRuntime
|
||||
$ git checkout jbr-dev
|
||||
$ sh ./configure
|
||||
$ make images
|
||||
```
|
||||
This will build the release configuration under `./build/macosx-x86_64-server-release/`.
|
||||
|
||||
## Developing
|
||||
You can use [CLion](https://www.jetbrains.com/clion/) to develop native parts of the JetBrains Runtime and
|
||||
[IntelliJ IDEA](https://www.jetbrains.com/idea/) for the parts written in Java.
|
||||
Both require projects to be created.
|
||||
|
||||
### CLion
|
||||
Run
|
||||
```
|
||||
$ make compile-commands
|
||||
```
|
||||
in the git root and open the resulting `build/.../compile_commands.json` file as a project.
|
||||
Then use `Tools | Compilation Database | Change Project Root` to point to git root of this repository.
|
||||
|
||||
See also this detailed step-by-step tutorial for all platforms:
|
||||
[How to develop OpenJDK with CLion](https://blog.jetbrains.com/clion/2020/03/openjdk-with-clion/).
|
||||
|
||||
### IDEA
|
||||
Run
|
||||
```
|
||||
$ sh ./bin/idea.sh
|
||||
```
|
||||
in the git root to generate project files (add `--help` for options). If you have multiple
|
||||
configurations (for example, `release` and `fastdebug`), supply the `--conf <conf_name>` argument.
|
||||
Then open the git root directory as a project in IDEA.
|
||||
|
||||
## Contributing
|
||||
We are happy to receive your pull requests!
|
||||
Before you submit one, please sign our [Contributor License Agreement (CLA)](https://www.jetbrains.com/agreements/cla/).
|
||||
|
||||
## Resources
|
||||
* [JetBrains Runtime on github](https://github.com/JetBrains/JetBrainsRuntime).
|
||||
* [OpenJDK build instructions](https://openjdk.java.net/groups/build/doc/building.html).
|
||||
* [OpenJDK test instructions](https://htmlpreview.github.io/?https://raw.githubusercontent.com/openjdk/jdk/master/doc/building.html#running-tests).
|
||||
See <https://openjdk.java.net/> for more information about
|
||||
the OpenJDK Community and the JDK.
|
||||
|
||||
15
bin/idea.sh
15
bin/idea.sh
@@ -25,7 +25,7 @@
|
||||
# Shell script for generating an IDEA project from a given list of modules
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [-h|--help] [-q|--quiet] [-a|--absolute-paths] [-r|--root <path>] [-o|--output <path>] [-c|--conf <conf_name>] [modules...]"
|
||||
echo "Usage: $0 [-h|--help] [-q|--quiet] [-a|--absolute-paths] [-r|--root <path>] [-o|--output <path>] [modules...]"
|
||||
echo " -h | --help"
|
||||
echo " -q | --quiet
|
||||
No stdout output"
|
||||
@@ -39,8 +39,6 @@ usage() {
|
||||
Where .idea directory with project files will be generated
|
||||
(e.g. using '-o .' will place project files in './.idea')
|
||||
Default: same as --root"
|
||||
echo " -c | --conf <conf_name>
|
||||
make configuration (release, slowdebug etc)"
|
||||
echo " [modules...]
|
||||
Generate project modules for specific java modules
|
||||
(e.g. 'java.base java.desktop')
|
||||
@@ -59,7 +57,6 @@ cd $TOP;
|
||||
|
||||
VERBOSE=true
|
||||
ABSOLUTE_PATHS=false
|
||||
CONF_ARG=
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case $1 in
|
||||
@@ -85,11 +82,6 @@ do
|
||||
shift
|
||||
;;
|
||||
|
||||
-c | --conf )
|
||||
CONF_ARG="CONF_NAME=$2"
|
||||
shift
|
||||
;;
|
||||
|
||||
-*) # bad option
|
||||
usage
|
||||
;;
|
||||
@@ -129,7 +121,7 @@ if [ "$VERBOSE" = true ] ; then
|
||||
fi
|
||||
|
||||
cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I "$OPENJDK_DIR" idea TOPLEVEL_DIR="$TOPLEVEL_DIR" \
|
||||
MAKEOVERRIDES= IDEA_OUTPUT_PARENT="$IDEA_OUTPUT_PARENT" OUT="$IDEA_OUTPUT/env.cfg" MODULES="$*" $CONF_ARG || exit 1
|
||||
MAKEOVERRIDES= IDEA_OUTPUT_PARENT="$IDEA_OUTPUT_PARENT" OUT="$IDEA_OUTPUT/env.cfg" MODULES="$*" || exit 1
|
||||
cd $SCRIPT_DIR
|
||||
|
||||
. $IDEA_OUTPUT/env.cfg
|
||||
@@ -274,9 +266,8 @@ for value in $MODULES; do
|
||||
CONTENT_ROOTS=""
|
||||
IFS=' '
|
||||
for dir in $moduleSrcDirs; do
|
||||
case $dir in
|
||||
case $dir in # See https://youtrack.jetbrains.com/issue/IDEA-185108
|
||||
"src/"*) MAIN_SOURCE_DIRS="$MAIN_SOURCE_DIRS <sourceFolder url=\"file://$MODULE_DIR/$dir\" isTestSource=\"false\" />" ;;
|
||||
*"/support/gensrc/$module") ;; # Exclude generated sources to avoid module-info conflicts, see https://youtrack.jetbrains.com/issue/IDEA-185108
|
||||
*) CONTENT_ROOTS="$CONTENT_ROOTS <content url=\"file://$MODULE_DIR/$dir\">\
|
||||
<sourceFolder url=\"file://$MODULE_DIR/$dir\" isTestSource=\"false\" generated=\"true\" /></content>" ;;
|
||||
esac
|
||||
|
||||
@@ -488,7 +488,7 @@
|
||||
<li><code>CONF</code> and <code>CONF_NAME</code> - Selecting the configuration(s) to use. See <a href="#using-multiple-configurations">Using Multiple Configurations</a></li>
|
||||
</ul>
|
||||
<h4 id="test-make-control-variables">Test Make Control Variables</h4>
|
||||
<p>These make control variables only make sense when running tests. Please see <strong>Testing the JDK</strong> (<a href="testing.html">html</a>, <a href="testing.md">markdown</a>) for details.</p>
|
||||
<p>These make control variables only make sense when running tests. Please see <a href="testing.html">Testing the JDK</a> for details.</p>
|
||||
<ul>
|
||||
<li><code>TEST</code></li>
|
||||
<li><code>TEST_JOBS</code></li>
|
||||
@@ -506,7 +506,7 @@
|
||||
</ul>
|
||||
<h2 id="running-tests">Running Tests</h2>
|
||||
<p>Most of the JDK tests are using the <a href="http://openjdk.java.net/jtreg">JTReg</a> test framework. Make sure that your configuration knows where to find your installation of JTReg. If this is not picked up automatically, use the <code>--with-jtreg=<path to jtreg home></code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc.</p>
|
||||
<p>The <a href="https://wiki.openjdk.java.net/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
|
||||
<p>The <a href="https://wiki.openjdk.java.net/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://ci.adoptopenjdk.net/view/Dependencies/job/jtreg/lastSuccessfulBuild/artifact">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
|
||||
<p>Building of Hotspot Gtest suite requires the source code of Google Test framework. The top directory, which contains both <code>googletest</code> and <code>googlemock</code> directories, should be specified via <code>--with-gtest</code>. The supported version of Google Test is 1.8.1, whose source code can be obtained:</p>
|
||||
<ul>
|
||||
<li>by downloading and unpacking the source bundle from <a href="https://github.com/google/googletest/releases/tag/release-1.8.1">here</a></li>
|
||||
@@ -514,7 +514,7 @@
|
||||
</ul>
|
||||
<p>To execute the most basic tests (tier 1), use:</p>
|
||||
<pre><code>make run-test-tier1</code></pre>
|
||||
<p>For more details on how to run tests, please see <strong>Testing the JDK</strong> (<a href="testing.html">html</a>, <a href="testing.md">markdown</a>).</p>
|
||||
<p>For more details on how to run tests, please see the <a href="testing.html">Testing the JDK</a> document.</p>
|
||||
<h2 id="cross-compiling">Cross-compiling</h2>
|
||||
<p>Cross-compiling means using one platform (the <em>build</em> platform) to generate output that can ran on another platform (the <em>target</em> platform).</p>
|
||||
<p>The typical reason for cross-compiling is that the build is performed on a more powerful desktop computer, but the resulting binaries will be able to run on a different, typically low-performing system. Most of the complications that arise when building for embedded is due to this separation of <em>build</em> and <em>target</em> systems.</p>
|
||||
|
||||
@@ -818,7 +818,7 @@ configuration, as opposed to the "configure time" configuration.
|
||||
#### Test Make Control Variables
|
||||
|
||||
These make control variables only make sense when running tests. Please see
|
||||
**Testing the JDK** ([html](testing.html), [markdown](testing.md)) for details.
|
||||
[Testing the JDK](testing.html) for details.
|
||||
|
||||
* `TEST`
|
||||
* `TEST_JOBS`
|
||||
@@ -848,7 +848,7 @@ containing `lib/jtreg.jar` etc.
|
||||
|
||||
The [Adoption Group](https://wiki.openjdk.java.net/display/Adoption) provides
|
||||
recent builds of jtreg [here](
|
||||
https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/).
|
||||
https://ci.adoptopenjdk.net/view/Dependencies/job/jtreg/lastSuccessfulBuild/artifact).
|
||||
Download the latest `.tar.gz` file, unpack it, and point `--with-jtreg` to the
|
||||
`jtreg` directory that you just unpacked.
|
||||
|
||||
@@ -865,8 +865,8 @@ To execute the most basic tests (tier 1), use:
|
||||
make run-test-tier1
|
||||
```
|
||||
|
||||
For more details on how to run tests, please see **Testing the JDK**
|
||||
([html](testing.html), [markdown](testing.md)).
|
||||
For more details on how to run tests, please see the [Testing
|
||||
the JDK](testing.html) document.
|
||||
|
||||
## Cross-compiling
|
||||
|
||||
|
||||
230
jb/jdkdiff.py
230
jb/jdkdiff.py
@@ -1,230 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import math
|
||||
import os.path
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
def fatal(msg):
|
||||
sys.stderr.write(f"[fatal] {msg}\n")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def verbose(options, *msg):
|
||||
if options.verbose:
|
||||
sys.stdout.write(f"[verbose] ")
|
||||
sys.stdout.write(*msg)
|
||||
sys.stdout.write('\n')
|
||||
|
||||
|
||||
def first_line(str):
|
||||
return "" if not str else str.splitlines()[0]
|
||||
|
||||
|
||||
class Options:
|
||||
def __init__(self):
|
||||
ap = argparse.ArgumentParser(description="Show bugfixes differences between JBR and OpenJDK git repos",
|
||||
epilog="Example: %(prog)s --jdk ./jdk11u/ --jbr ./JetBrainsRuntime/ --path src/hotspot --limit 200")
|
||||
ap.add_argument('--jdk', dest='jdkpath', help='path to OpenJDK git repo', required=True)
|
||||
ap.add_argument('--jbr', dest='jbrpath', help='path to JBR git repo', required=True)
|
||||
ap.add_argument('--path', dest='path', help='limit to changes in this path (relative to git root)')
|
||||
ap.add_argument('--limit', dest='limit', help='limit to this many log entries in --jdk repo', type=int, default=-1)
|
||||
ap.add_argument('-o', dest="output_dir", help="save patches to this directory (created if necessary)")
|
||||
ap.add_argument('-v', dest='verbose', help="verbose output", default=False, action='store_true')
|
||||
args = ap.parse_args()
|
||||
|
||||
if not os.path.isdir(args.jdkpath):
|
||||
fatal(f"{args.jdkpath} not a directory")
|
||||
|
||||
if not os.path.isdir(args.jbrpath):
|
||||
fatal(f"{args.jbrpath} not a directory")
|
||||
|
||||
if not git_is_available():
|
||||
fatal("can't run git commands; make sure git is in PATH")
|
||||
|
||||
self.jdkpath = args.jdkpath
|
||||
self.jbrpath = args.jbrpath
|
||||
self.path = args.path
|
||||
self.limit = args.limit
|
||||
self.output_dir = args.output_dir
|
||||
self.verbose = args.verbose
|
||||
|
||||
|
||||
class GitRepo:
|
||||
def __init__(self, rootpath):
|
||||
self.rootpath = rootpath
|
||||
|
||||
def run_git_cmd(self, git_args):
|
||||
args = ["git", "-C", self.rootpath]
|
||||
args.extend(git_args)
|
||||
# print(f"Runnig git cmd '{' '.join(args)}'")
|
||||
p = subprocess.run(args, capture_output=True, text=True)
|
||||
if p.returncode != 0:
|
||||
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
|
||||
return p.stdout
|
||||
|
||||
def save_git_cmd(self, fname, git_args):
|
||||
args = ["git", "-C", self.rootpath]
|
||||
args.extend(git_args)
|
||||
# print(f"Runnig git cmd '{' '.join(args)}'")
|
||||
with open(fname, "w") as stdout_file:
|
||||
p = subprocess.run(args, stdout=stdout_file)
|
||||
if p.returncode != 0:
|
||||
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
|
||||
|
||||
def current_branch(self):
|
||||
branch_name = self.run_git_cmd(["branch", "--show-current"]).strip()
|
||||
return branch_name
|
||||
|
||||
def log(self, path=None, limit=None):
|
||||
cmds = ["log", "--no-decorate"]
|
||||
if limit:
|
||||
cmds.extend(["-n", str(limit)])
|
||||
if path:
|
||||
cmds.append(path)
|
||||
full_log = self.run_git_cmd(cmds)
|
||||
return full_log
|
||||
|
||||
|
||||
class Commit:
|
||||
def __init__(self, lines):
|
||||
self.sha = lines[0].split()[1]
|
||||
self.message = ""
|
||||
self.bugid = None
|
||||
|
||||
# Commit message starts after one blank line
|
||||
read_message = False
|
||||
for l in lines:
|
||||
if read_message:
|
||||
self.message += l + "\n"
|
||||
if not read_message and l == "":
|
||||
read_message = True
|
||||
|
||||
if self.message and self.message != "" and ":" in self.message:
|
||||
maybe_bugid = self.message.split(":")[0].strip()
|
||||
if 10 >= len(maybe_bugid) >= 4:
|
||||
self.bugid = maybe_bugid
|
||||
|
||||
|
||||
class History:
|
||||
def __init__(self, log):
|
||||
log_itr = iter(log.splitlines())
|
||||
self.commits = []
|
||||
commit_lines = []
|
||||
for line in log_itr:
|
||||
if line.startswith("commit ") and len(commit_lines) > 0:
|
||||
commit = Commit(commit_lines)
|
||||
self.commits.append(commit)
|
||||
commit_lines = []
|
||||
commit_lines.append(line)
|
||||
|
||||
if len(commit_lines) > 0:
|
||||
commit = Commit(commit_lines)
|
||||
self.commits.append(commit)
|
||||
|
||||
def contains(self, str):
|
||||
return any(str in commit.message for commit in self.commits)
|
||||
|
||||
def size(self):
|
||||
return len(self.commits)
|
||||
|
||||
|
||||
def print_explanation(options, jdk, jbr):
|
||||
verbose(options, f"Reading history from '{jdk.rootpath}' on branch '{jdk.current_branch()}'")
|
||||
if options.path:
|
||||
verbose(options, f"\t(only under '{options.path}')")
|
||||
verbose(options, f"Searching for same fixes in '{jbr.rootpath}' on branch '{jbr.current_branch()}'")
|
||||
|
||||
|
||||
def git_is_available():
|
||||
p = None
|
||||
try:
|
||||
p = subprocess.run(["git", "--help"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
except:
|
||||
pass
|
||||
return p is not None and p.returncode == 0
|
||||
|
||||
|
||||
def main():
|
||||
check_python_min_requirements()
|
||||
|
||||
options = Options()
|
||||
|
||||
jdk = GitRepo(options.jdkpath)
|
||||
jbr = GitRepo(options.jbrpath)
|
||||
|
||||
print_explanation(options, jdk, jbr)
|
||||
|
||||
commits_to_save = []
|
||||
try:
|
||||
jdk_log = jdk.log(options.path, options.limit)
|
||||
jdk_history = History(jdk_log)
|
||||
|
||||
jbr_log = jbr.log(options.path)
|
||||
jbr_history = History(jbr_log)
|
||||
|
||||
verbose(options, f"Read {jdk_history.size()} commits in JDK, {jbr_history.size()} in JBR")
|
||||
|
||||
for c in jdk_history.commits:
|
||||
if c.bugid:
|
||||
verbose(options, f"Looking for bugfix for {c.bugid}")
|
||||
if not jbr_history.contains(c.bugid):
|
||||
commits_to_save.append(c)
|
||||
print(f"[note] Fix for {c.bugid} not found in JBR ({jbr.rootpath})")
|
||||
print(f" commit {c.sha}")
|
||||
print(f" {first_line(c.message).strip()}")
|
||||
except KeyboardInterrupt:
|
||||
fatal("Interrupted")
|
||||
|
||||
if len(commits_to_save) > 0 and options.output_dir:
|
||||
print()
|
||||
if not os.path.exists(options.output_dir):
|
||||
verbose(options, f"Creating output directory {options.output_dir}")
|
||||
os.makedirs(options.output_dir)
|
||||
nzeroes = len(str(len(commits_to_save)))
|
||||
for i, c in enumerate(reversed(commits_to_save)):
|
||||
fname = os.path.join(options.output_dir, f"{str(i).zfill(nzeroes)}-{c.bugid}.patch")
|
||||
print(f"[note] {c.bugid} saved as {fname}")
|
||||
fname = os.path.abspath(fname)
|
||||
jdk.save_git_cmd(fname, ["format-patch", "-1", c.sha, "--stdout"])
|
||||
|
||||
script_fname = os.path.join(options.output_dir, "apply.sh")
|
||||
with open(script_fname, "w") as script_file:
|
||||
print(apply_script_code.format(os.path.abspath(jbr.rootpath), os.path.abspath(options.output_dir)),
|
||||
file=script_file)
|
||||
print(f"[note] Execute 'bash {script_fname}' to apply patches to {jbr.rootpath}")
|
||||
|
||||
|
||||
def check_python_min_requirements():
|
||||
if sys.version_info < (3, 6):
|
||||
fatal("Minimum version 3.6 is required to run this script")
|
||||
|
||||
|
||||
apply_script_code = """
|
||||
#!/bin/bash
|
||||
|
||||
GITROOT={0}
|
||||
PATCHROOT={1}
|
||||
|
||||
cd $PATCHROOT || exit 1
|
||||
PATCHES=$(find $PATCHROOT -name '*.patch' | sort -n)
|
||||
|
||||
for P in $PATCHES; do
|
||||
git -C $GITROOT am $P
|
||||
if [ $? != 0 ]; then
|
||||
mv "$P" "$P.failed"
|
||||
echo "[ERROR] Patch $P did not apply cleanly. Try applying it manually."
|
||||
echo "[NOTE] Execute this script to apply the remaining patches."
|
||||
exit 1
|
||||
else
|
||||
mv "$P" "$P.done"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "[NOTE] Done applying patches; check $PATCHROOT for .patch and .patch.failed to see if all have been applied."
|
||||
"""
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -1,7 +0,0 @@
|
||||
FROM i386/ubuntu:xenial
|
||||
|
||||
RUN linux32 apt-get update && apt-get install -y --no-install-recommends apt-utils
|
||||
COPY jbrsdk-11.0.5-b1 /jbrsdk-11.0.5-b1
|
||||
RUN linux32 apt-get -y install file build-essential zip unzip curl libx11-dev libxext-dev \
|
||||
libxrender-dev libxrandr-dev libxtst-dev libxt-dev libcups2-dev libasound2-data \
|
||||
libpng12-0 libasound2 libfreetype6 libfontconfig1-dev libasound2-dev autoconf
|
||||
@@ -1,6 +1,6 @@
|
||||
<component name="CopyrightManager">
|
||||
<copyright>
|
||||
<option name="notice" value="Copyright &#36;originalComment.match("Copyright (\d+)", 1, "-")&#36;today.year JetBrains s.r.o. 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. 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." />
|
||||
<option name="notice" value="Copyright 2000-&#36;today.year JetBrains s.r.o. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License." />
|
||||
<option name="keyword" value="Copyright" />
|
||||
<option name="allowReplaceKeyword" value="JetBrains" />
|
||||
<option name="myName" value="JetBrains" />
|
||||
|
||||
@@ -52,13 +52,3 @@ function get_mods_list() {
|
||||
__mods=$1
|
||||
echo $(ls $__mods) | sed s/\.jmod/,/g | sed s/,$//g | sed s/' '//g
|
||||
}
|
||||
|
||||
function copy_jmods() {
|
||||
__mods_list=$1
|
||||
__jmods_from=$2
|
||||
__jmods_to=$3
|
||||
|
||||
mkdir -p $__jmods_to
|
||||
|
||||
echo "${__mods_list}," | while read -d, mod; do cp $__jmods_from/$mod.jmod $__jmods_to/; done
|
||||
}
|
||||
|
||||
@@ -30,9 +30,8 @@ sh configure \
|
||||
--with-debug-level=release \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build="${JDK_BUILD_NUMBER}" \
|
||||
--with-version-build=${JDK_BUILD_NUMBER} \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-boot-jdk=${BOOT_JDK} \
|
||||
--enable-cds=yes || exit $?
|
||||
@@ -68,7 +67,7 @@ grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules
|
||||
echo Running jlink....
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
||||
--add-modules $(xargs < modules.list.aarch64 | sed s/" "//g | sed s/',$'//g) \
|
||||
--add-modules $(xargs < modules.list.aarch64 | sed s/" "//g | sed s/,$//g) \
|
||||
--output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
|
||||
|
||||
echo Modifying release info ...
|
||||
|
||||
@@ -36,7 +36,7 @@ function create_image_bundle {
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
[ "$bundle_type" == "fd" ] && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-x64-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Running jlink....
|
||||
@@ -46,10 +46,9 @@ function create_image_bundle {
|
||||
--add-modules "$__modules" --output "$IMAGES_DIR"/"$__arch_name"
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__arch_name"/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
if [ "$__bundle_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__arch_name"/release > release
|
||||
mv release "$IMAGES_DIR"/"$__arch_name"/release
|
||||
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__arch_name"/jmods
|
||||
fi
|
||||
|
||||
# jmod does not preserve file permissions (JDK-8173610)
|
||||
@@ -67,19 +66,19 @@ RELEASE_NAME=linux-x86_64-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=0
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"dcevm")
|
||||
HEAD_REVISION=$(git rev-parse HEAD)
|
||||
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
|
||||
do_reset_dcevm=0
|
||||
do_reset_changes=0
|
||||
do_reset_dcevm=1
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=0
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=linux-x86_64-server-fastdebug
|
||||
;;
|
||||
@@ -89,7 +88,6 @@ sh configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build="$JDK_BUILD_NUMBER" \
|
||||
--with-version-opt=b"$build_number" \
|
||||
@@ -113,7 +111,6 @@ if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_t
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
[ "$bundle_type" != "fd" ] && jbrsdk_name_postfix="_${bundle_type}"
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
@@ -121,11 +118,11 @@ modules=$(xargs < modules.list | sed s/" "//g) || do_exit $?
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/,/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
create_image_bundle $JBRSDK_BUNDLE $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
if [ -z "$bundle_type" ]; then
|
||||
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-linux-test-x64-b${build_number}
|
||||
|
||||
@@ -51,7 +51,7 @@ function create_image_bundle {
|
||||
tmp=.bundle.$$.tmp
|
||||
mkdir "$tmp" || do_exit $?
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
[ "$bundle_type" == "fd" ] && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-osx-${architecture}-${fastdebug_infix}b${build_number}
|
||||
|
||||
JRE_CONTENTS=$tmp/$__arch_name/Contents
|
||||
@@ -63,10 +63,9 @@ function create_image_bundle {
|
||||
--add-modules "$__modules" --output "$JRE_CONTENTS/Home" || do_exit $?
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$JRE_CONTENTS/Home/release"
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
if [ "$__bundle_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' $JRE_CONTENTS/Home/release > release
|
||||
mv release $JRE_CONTENTS/Home/release
|
||||
copy_jmods "$__modules" "$__modules_path" "$JRE_CONTENTS"/Home/jmods
|
||||
fi
|
||||
|
||||
cp -R "$JSDK"/../MacOS "$JRE_CONTENTS"
|
||||
@@ -94,19 +93,19 @@ RELEASE_NAME=macosx-${CONF_ARCHITECTURE}-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=0
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"dcevm")
|
||||
HEAD_REVISION=$(git rev-parse HEAD)
|
||||
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
|
||||
do_reset_dcevm=0
|
||||
do_reset_changes=0
|
||||
do_reset_dcevm=1
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=0
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=macosx-${CONF_ARCHITECTURE}-server-fastdebug
|
||||
JBSDK=macosx-${architecture}-server-release
|
||||
@@ -118,7 +117,6 @@ if [[ "${architecture}" == *aarch64* ]]; then
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="${VENDOR_NAME}" \
|
||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build="${JDK_BUILD_NUMBER}" \
|
||||
--with-version-opt=b"${build_number}" \
|
||||
@@ -133,7 +131,6 @@ else
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build="$JDK_BUILD_NUMBER" \
|
||||
--with-version-opt=b"$build_number" \
|
||||
@@ -161,11 +158,11 @@ modules=$(xargs < modules.list | sed s/" "//g) || do_exit $?
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat "$JSDK"/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
modules=$(cat "$JSDK"/release | grep MODULES | sed s/MODULES=//g | sed s/' '/,/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
create_image_bundle "$JBRSDK_BUNDLE" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
|
||||
if [ -z "$bundle_type" ]; then
|
||||
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-osx-test-${architecture}-b${build_number}
|
||||
|
||||
@@ -58,7 +58,7 @@ file="$APP_NAME.zip"
|
||||
|
||||
log "Zipping $file..."
|
||||
rm -rf "$file"
|
||||
ditto -c -k --sequesterRsrc --keepParent "$APP_DIRECTORY" "$file"
|
||||
ditto -c -k --sequesterRsrc --keepParent "$APP_DIRECTORY/Contents" "$file"
|
||||
|
||||
log "Notarizing $file..."
|
||||
rm -rf "altool.init.out" "altool.check.out"
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# How to call this script:
|
||||
# eval $(jb/project/tools/mkjbrapi.sh)
|
||||
|
||||
# It is used to build jetbrains.api module
|
||||
# After properly calling this script, you can use following variables:
|
||||
# JBR_API_JAR - absolute path to resulting JAR
|
||||
# JBR_API_SOURCES_JAR - absolute path to JAR with sources
|
||||
# JBR_API_VERSION - JBR API version in form <major>.<minor>
|
||||
# JBR_API_VERSION_MAJOR, JBR_API_VERSION_MINOR - JBR API version components
|
||||
# JBR_BUILD_DIR - absolute path to JBR build directory
|
||||
# JBR_BOOT_JDK - absolute path to used boot JDK
|
||||
|
||||
ROOT=$(pwd)
|
||||
|
||||
sh configure --with-debug-level=release --disable-warnings-as-errors 1>&2 || exit $?
|
||||
|
||||
# Get boot JDK & build directory using make script
|
||||
make -f $ROOT/make/JBRApi.gmk -I $ROOT jbr-api MAKEOVERRIDES= CONF=release OUT="$ROOT/build/jbr-api.cfg" 1>&2 || exit $?
|
||||
source "$ROOT/build/jbr-api.cfg" || exit $?
|
||||
|
||||
# Build module
|
||||
make jetbrains.api 1>&2 || exit $?
|
||||
|
||||
# Get JBR API version from compiled class
|
||||
JSHELL_COMMAND='
|
||||
System.out.println("\nVERSION_MAJOR=" + com.jetbrains.JBRApi.getMajorVersion());
|
||||
System.out.println("\nVERSION_MINOR=" + com.jetbrains.JBRApi.getMinorVersion());
|
||||
/exit'
|
||||
VERSION_VARIABLES=$("$BOOT_JDK/bin/jshell" -s --module-path "$BUILD_DIR/jdk/modules/jetbrains.api" \
|
||||
--add-modules jetbrains.api <<< "$JSHELL_COMMAND" | grep "^VERSION\|^|") || exit $?
|
||||
eval "$VERSION_VARIABLES" || exit $?
|
||||
|
||||
# Create JAR
|
||||
(
|
||||
cd "$BUILD_DIR/jdk/modules/jetbrains.api"
|
||||
"$BOOT_JDK/bin/jar" -cf "$BUILD_DIR/jbr-api.jar" * 1>&2
|
||||
) || exit $?
|
||||
|
||||
# Create source JAR
|
||||
(
|
||||
cd "src/jetbrains.api/share/classes"
|
||||
"$BOOT_JDK/bin/jar" -cf "$BUILD_DIR/jbr-api-sources.jar" * 1>&2
|
||||
) || exit $?
|
||||
|
||||
# Print output values
|
||||
echo "JBR_API_JAR=$BUILD_DIR/jbr-api.jar"
|
||||
echo "JBR_API_SOURCES_JAR=$BUILD_DIR/jbr-api-sources.jar"
|
||||
echo "JBR_API_VERSION=$VERSION_MAJOR.$VERSION_MINOR"
|
||||
echo "JBR_API_VERSION_MAJOR=$VERSION_MAJOR"
|
||||
echo "JBR_API_VERSION_MINOR=$VERSION_MINOR"
|
||||
echo "JBR_BUILD_DIR=$BUILD_DIR"
|
||||
echo "JBR_BOOT_JDK=$BOOT_JDK"
|
||||
|
||||
echo "Success!" 1>&2
|
||||
@@ -1,21 +1,21 @@
|
||||
diff --git modules.list modules.list
|
||||
index dcf610a6a56..f8797505c23 100644
|
||||
index 7c4b3e9cb6d..5ed60349ca7 100644
|
||||
--- modules.list
|
||||
+++ modules.list
|
||||
@@ -51,4 +51,7 @@ jdk.zipfs,
|
||||
jdk.hotspot.agent,
|
||||
jetbrains.api,
|
||||
jetbrains.api.impl,
|
||||
-jdk.jcmd
|
||||
+jdk.jcmd,
|
||||
@@ -53,4 +53,7 @@ jdk.security.jgss,
|
||||
jdk.unsupported,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
-jdk.hotspot.agent
|
||||
+jdk.hotspot.agent,
|
||||
+jcef,
|
||||
+gluegen.rt,
|
||||
+jogl.all
|
||||
diff --git src/java.desktop/share/classes/module-info.java src/java.desktop/share/classes/module-info.java
|
||||
index 897647ee368..781d1809493 100644
|
||||
index b663b382f52..3e9acdc0c27 100644
|
||||
--- src/java.desktop/share/classes/module-info.java
|
||||
+++ src/java.desktop/share/classes/module-info.java
|
||||
@@ -116,7 +116,11 @@ module java.desktop {
|
||||
@@ -109,7 +109,11 @@ module java.desktop {
|
||||
// see make/GensrcModuleInfo.gmk
|
||||
exports sun.awt to
|
||||
jdk.accessibility,
|
||||
|
||||
@@ -33,9 +33,8 @@ source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
__modules_path=$2
|
||||
__modules=$3
|
||||
|
||||
[ -d $__bundle_name ] && rm -rf $__bundle_name
|
||||
|
||||
@@ -45,10 +44,9 @@ function create_image_bundle {
|
||||
--add-modules $__modules --output $__bundle_name || do_exit $?
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__bundle_name/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
if [ "$__bundle_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' $__bundle_name/release > release
|
||||
mv release $__bundle_name/release
|
||||
copy_jmods "$__modules" "$__modules_path" "$__bundle_name"/jmods
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -57,19 +55,19 @@ RELEASE_NAME=windows-x86_64-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=0
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"dcevm")
|
||||
HEAD_REVISION=$(git rev-parse HEAD)
|
||||
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
|
||||
do_reset_dcevm=0
|
||||
do_reset_changes=0
|
||||
do_reset_dcevm=1
|
||||
do_reset_changes=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=0
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-x86_64-server-fastdebug
|
||||
;;
|
||||
@@ -79,7 +77,6 @@ sh ./configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=$JDK_BUILD_NUMBER \
|
||||
--with-version-opt=b${build_number} \
|
||||
@@ -99,11 +96,6 @@ JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
where cygpath
|
||||
if [ $? -eq 0 ]; then
|
||||
JCEF_PATH="$(cygpath -w $JCEF_PATH | sed 's/\\/\//g')"
|
||||
fi
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
@@ -114,13 +106,13 @@ fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(xargs < modules.list | sed s/" "//g) || do_exit $?
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
create_image_bundle "jbr${jbr_name_postfix}" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat ${JSDK}/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\r//g | sed s/\\n//g)
|
||||
modules=$(cat ${JSDK}/release | grep MODULES | sed s/MODULES=//g | sed s/' '/,/g | sed s/\"//g | sed s/\\r//g | sed s/\\n//g)
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
create_image_bundle "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
|
||||
do_exit 0
|
||||
@@ -26,30 +26,49 @@ build_number=$3
|
||||
bundle_type=$4
|
||||
|
||||
function pack_jbr {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-windows-x64-${fastdebug_infix}b${build_number}
|
||||
if [ -z "${bundle_type}" ]; then
|
||||
JBR_BUNDLE=jbr
|
||||
else
|
||||
JBR_BUNDLE=jbr_${bundle_type}
|
||||
[ -d ${BASE_DIR}/jbr ] && rm -rf ${BASE_DIR}/jbr
|
||||
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
|
||||
fi
|
||||
JBR_BASE_NAME=${JBR_BUNDLE}-${JBSDK_VERSION}
|
||||
|
||||
JBR=$JBR_BASE_NAME-windows-x64-b$build_number
|
||||
echo Creating $JBR.tar.gz ...
|
||||
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__bundle_name || do_exit $?
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR jbr || do_exit $?
|
||||
}
|
||||
|
||||
[ "$bundle_type" == "nomod" ] && bundle_type=""
|
||||
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
|
||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
||||
RELEASE_NAME=windows-x86_64-server-release
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-b${build_number}
|
||||
case "$bundle_type" in
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
RELEASE_NAME=macosx-x86_64-server-fastdebug
|
||||
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-fastdebug-b${build_number}
|
||||
;;
|
||||
esac
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JBSDK=$JBRSDK_BASE_NAME-windows-x64-b$build_number
|
||||
BASE_DIR=.
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
echo Creating $JBSDK.tar.gz ...
|
||||
[ -f "$JBSDK.tar.gz" ] && rm "$JBSDK.tar.gz"
|
||||
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || do_exit $?
|
||||
fi
|
||||
|
||||
pack_jbr jbr${jbr_name_postfix}
|
||||
pack_jbr jbrsdk${jbr_name_postfix}
|
||||
pack_jbr $bundle_type
|
||||
|
||||
if [ -z "$bundle_type" ]; then
|
||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-windows-test-x64-b$build_number
|
||||
|
||||
@@ -213,12 +213,12 @@ endif
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), )
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.pdb,*.map}'
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.pdb,*.map}'
|
||||
else
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.map}'
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.map}'
|
||||
endif
|
||||
else
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
|
||||
endif
|
||||
|
||||
# Create jmods in the support dir and then move them into place to keep the
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 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
|
||||
@@ -88,10 +88,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
|
||||
$(CAT) $(LINK_OPT_DIR)/stderr $(JLI_TRACE_FILE) ; \
|
||||
exit $$exitcode \
|
||||
)
|
||||
$(GREP) -v HelloClasslist $@.raw.2 > $@.raw.3
|
||||
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java \
|
||||
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
||||
build.tools.classlist.SortClasslist $@.raw.3 > $@
|
||||
$(GREP) -v HelloClasslist $@.raw.2 > $@
|
||||
|
||||
# The jli trace is created by the same recipe as classlist. By declaring these
|
||||
# dependencies, make will correctly rebuild both jli trace and classlist
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
include Makefile
|
||||
include make/MainSupport.gmk
|
||||
|
||||
.PHONY: jbr-api
|
||||
|
||||
ifeq ($(SPEC),)
|
||||
ifneq ($(words $(SPECS)),1)
|
||||
@echo "Error: Multiple build specification files found. Please select one explicitly."
|
||||
@exit 2
|
||||
endif
|
||||
jbr-api:
|
||||
@cd $(topdir)
|
||||
@$(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -j 1 -f $(topdir)/make/JBRApi.gmk SPEC=$(SPECS) HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) MODULES="$(MODULES)" jbr-api
|
||||
else #with SPEC
|
||||
|
||||
jbr-api:
|
||||
$(ECHO) "BUILD_DIR=$(OUTPUTDIR)" > $(OUT)
|
||||
$(ECHO) "BOOT_JDK=\"$(BOOT_JDK)\"" >> $(OUT)
|
||||
|
||||
endif
|
||||
@@ -857,9 +857,6 @@ else
|
||||
# virtual target.
|
||||
jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
|
||||
|
||||
# jdk.jfr-gendata uses TOOL_JFR_GEN from buildtools-hotspot
|
||||
jdk.jfr-gendata: buildtools-hotspot
|
||||
|
||||
# The swing beans need to have java base properly generated to avoid errors
|
||||
# in javadoc. The X11 wrappers need the java.base include files to have been
|
||||
# copied and processed.
|
||||
|
||||
@@ -298,28 +298,6 @@ AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK],
|
||||
])
|
||||
])
|
||||
|
||||
# Setup CLASSPATH environment variable
|
||||
AC_DEFUN([BOOTJDK_SETUP_CLASSPATH],
|
||||
[
|
||||
AC_ARG_WITH([classpath], [AS_HELP_STRING([--with-classpath],
|
||||
[Optional classpath to set as CLASSPATH to all Java invocations @<:@none@:>@])])
|
||||
|
||||
if test "x$CLASSPATH" != x; then
|
||||
AC_MSG_WARN([CLASSPATH is set in the environment. This will be ignored. Use --with-classpath instead.])
|
||||
fi
|
||||
|
||||
CLASSPATH=
|
||||
|
||||
if test "x$with_classpath" != x && test "x$with_classpath" != xyes &&
|
||||
test "x$with_classpath" != xno ; then
|
||||
CLASSPATH="$with_classpath"
|
||||
AC_MSG_CHECKING([for classpath to use for all Java invocations])
|
||||
AC_MSG_RESULT([$CLASSPATH])
|
||||
fi
|
||||
|
||||
AC_SUBST(CLASSPATH)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# We need a Boot JDK to bootstrap the build.
|
||||
@@ -416,8 +394,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
||||
BOOTJDK_USE_LOCAL_CDS=false
|
||||
AC_MSG_RESULT([no, -XX:SharedArchiveFile not supported])
|
||||
fi
|
||||
|
||||
BOOTJDK_SETUP_CLASSPATH
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
|
||||
9
make/autoconf/build-aux/config.guess
vendored
9
make/autoconf/build-aux/config.guess
vendored
@@ -102,15 +102,6 @@ if [ "x$OUT" = x ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test and fix LoongArch64.
|
||||
if [ "x$OUT" = x ]; then
|
||||
if [ `uname -s` = Linux ]; then
|
||||
if [ `uname -m` = loongarch64 ]; then
|
||||
OUT=loongarch64-unknown-linux-gnu
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test and fix cpu on macos-aarch64, uname -p reports arm, buildsys expects aarch64
|
||||
echo $OUT | grep arm-apple-darwin > /dev/null 2> /dev/null
|
||||
if test $? != 0; then
|
||||
|
||||
@@ -137,7 +137,7 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
|
||||
DISABLED_WARNINGS="4800"
|
||||
if test "x$TOOLCHAIN_VERSION" = x2017; then
|
||||
# VS2017 incorrectly triggers this warning for constexpr
|
||||
DISABLED_WARNINGS="$DISABLED_WARNINGS 4307"
|
||||
DISABLED_WARNINGS+=" 4307"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
@@ -33,11 +33,11 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS],
|
||||
# Setup the target toolchain
|
||||
|
||||
# On some platforms (mac) the linker warns about non existing -L dirs.
|
||||
# For any of the variants server, client, minimal or zero, the dir matches the
|
||||
# For any of the variants server, client or minimal, the dir matches the
|
||||
# variant name. The "main" variant should be used for linking. For the
|
||||
# rest, the dir is just server.
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client) \
|
||||
|| HOTSPOT_CHECK_JVM_VARIANT(minimal) || HOTSPOT_CHECK_JVM_VARIANT(zero); then
|
||||
|| HOTSPOT_CHECK_JVM_VARIANT(minimal); then
|
||||
TARGET_JVM_VARIANT_PATH=$JVM_VARIANT_MAIN
|
||||
else
|
||||
TARGET_JVM_VARIANT_PATH=server
|
||||
|
||||
@@ -89,12 +89,11 @@ AC_DEFUN([FLAGS_SETUP_ASFLAGS],
|
||||
|
||||
# Fix linker warning.
|
||||
# Code taken from make/autoconf/flags-cflags.m4 and adapted.
|
||||
JVM_BASIC_ASFLAGS="$JVM_BASIC_ASFLAGS \
|
||||
-DMAC_OS_X_VERSION_MIN_REQUIRED=$MACOSX_VERSION_MIN_NODOTS \
|
||||
JVM_BASIC_ASFLAGS+="-DMAC_OS_X_VERSION_MIN_REQUIRED=$MACOSX_VERSION_MIN_NODOTS \
|
||||
-mmacosx-version-min=$MACOSX_VERSION_MIN"
|
||||
|
||||
if test -n "$MACOSX_VERSION_MAX"; then
|
||||
JVM_BASIC_ASFLAGS="$JVM_BASIC_ASFLAGS $OS_CFLAGS \
|
||||
JVM_BASIC_ASFLAGS+="$OS_CFLAGS \
|
||||
-DMAC_OS_X_VERSION_MAX_ALLOWED=$MACOSX_VERSION_MAX_NODOTS"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 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
|
||||
@@ -42,21 +42,21 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
|
||||
PKGHANDLER_COMMAND=
|
||||
|
||||
case $PKGHANDLER in
|
||||
*apt-get)
|
||||
apt-get)
|
||||
apt_help $MISSING_DEPENDENCY ;;
|
||||
*yum)
|
||||
yum)
|
||||
yum_help $MISSING_DEPENDENCY ;;
|
||||
*brew)
|
||||
brew)
|
||||
brew_help $MISSING_DEPENDENCY ;;
|
||||
*port)
|
||||
port)
|
||||
port_help $MISSING_DEPENDENCY ;;
|
||||
*pkgutil)
|
||||
pkgutil)
|
||||
pkgutil_help $MISSING_DEPENDENCY ;;
|
||||
*pkgadd)
|
||||
pkgadd)
|
||||
pkgadd_help $MISSING_DEPENDENCY ;;
|
||||
*zypper)
|
||||
zypper)
|
||||
zypper_help $MISSING_DEPENDENCY ;;
|
||||
*pacman)
|
||||
pacman)
|
||||
pacman_help $MISSING_DEPENDENCY ;;
|
||||
esac
|
||||
|
||||
@@ -274,7 +274,7 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
|
||||
printf "\n"
|
||||
printf "Build performance summary:\n"
|
||||
printf "* Build jobs: $JOBS\n"
|
||||
printf "* Cores to use: $JOBS\n"
|
||||
printf "* Memory limit: $MEMORY_SIZE MB\n"
|
||||
if test "x$CCACHE_STATUS" != "x"; then
|
||||
printf "* ccache status: $CCACHE_STATUS\n"
|
||||
|
||||
@@ -84,7 +84,7 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
|
||||
fi
|
||||
|
||||
# All "special" variants share the same output directory ("server")
|
||||
VALID_MULTIPLE_JVM_VARIANTS="server client minimal zero"
|
||||
VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
|
||||
UTIL_GET_NON_MATCHING_VALUES(INVALID_MULTIPLE_VARIANTS, $JVM_VARIANTS, \
|
||||
$VALID_MULTIPLE_JVM_VARIANTS)
|
||||
if test "x$INVALID_MULTIPLE_VARIANTS" != x && \
|
||||
@@ -95,7 +95,7 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
|
||||
# The "main" variant is the one used by other libs to link against during the
|
||||
# build.
|
||||
if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
|
||||
MAIN_VARIANT_PRIO_ORDER="server client minimal zero"
|
||||
MAIN_VARIANT_PRIO_ORDER="server client minimal"
|
||||
for variant in $MAIN_VARIANT_PRIO_ORDER; do
|
||||
if HOTSPOT_CHECK_JVM_VARIANT($variant); then
|
||||
JVM_VARIANT_MAIN="$variant"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2019, 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
|
||||
@@ -525,7 +525,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
MACOSX_BUNDLE_BUILD_VERSION="$VERSION_BUILD"
|
||||
# If VERSION_OPT consists of only numbers and periods, add it.
|
||||
if [ [[ $VERSION_OPT =~ ^[0-9\.]+$ ]] ]; then
|
||||
MACOSX_BUNDLE_BUILD_VERSION="$MACOSX_BUNDLE_BUILD_VERSION.$VERSION_OPT"
|
||||
MACOSX_BUNDLE_BUILD_VERSION+=".$VERSION_OPT"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(MACOSX_BUNDLE_BUILD_VERSION)
|
||||
|
||||
@@ -43,9 +43,11 @@ AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# No X11 support on windows or macosx
|
||||
NEEDS_LIB_X11=false
|
||||
elif test "x$ENABLE_HEADLESS_ONLY" = xtrue; then
|
||||
# No X11 support needed when building headless only
|
||||
NEEDS_LIB_X11=false
|
||||
else
|
||||
# All other instances need X11, even if building headless only, libawt still
|
||||
# needs X11 headers.
|
||||
# All other instances need X11
|
||||
NEEDS_LIB_X11=true
|
||||
fi
|
||||
|
||||
|
||||
@@ -72,12 +72,6 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=little
|
||||
;;
|
||||
loongarch64)
|
||||
VAR_CPU=loongarch64
|
||||
VAR_CPU_ARCH=loongarch
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=little
|
||||
;;
|
||||
m68k)
|
||||
VAR_CPU=m68k
|
||||
VAR_CPU_ARCH=m68k
|
||||
|
||||
@@ -54,9 +54,6 @@ MAKE := @MAKE@
|
||||
# Make sure all shell commands are executed with the C locale
|
||||
export LC_ALL := C
|
||||
|
||||
# Make sure we override any local CLASSPATH variable
|
||||
export CLASSPATH := @CLASSPATH@
|
||||
|
||||
# The default make arguments
|
||||
MAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \
|
||||
MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" $(MAKE_LOG_VARS)
|
||||
|
||||
@@ -51,7 +51,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
|
||||
|
||||
# Minimum supported versions, empty means unspecified
|
||||
TOOLCHAIN_MINIMUM_VERSION_clang="3.5"
|
||||
TOOLCHAIN_MINIMUM_VERSION_gcc="6.0"
|
||||
TOOLCHAIN_MINIMUM_VERSION_gcc="5.0"
|
||||
TOOLCHAIN_MINIMUM_VERSION_microsoft="19.10.0.0" # VS2017
|
||||
TOOLCHAIN_MINIMUM_VERSION_xlc=""
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ define ProcessMarkdown
|
||||
$$(call LogInfo, Post-processing markdown file $2)
|
||||
$$(call MakeDir, $$(SUPPORT_OUTPUTDIR)/markdown $$($1_$2_TARGET_DIR))
|
||||
$$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER)_post, \
|
||||
( $$($1_POST_PROCESS) $$($1_$2_PANDOC_OUTPUT) > $$($1_$2_OUTPUT_FILE) ) )
|
||||
( $$($1_POST_PROCESS) < $$($1_$2_PANDOC_OUTPUT) > $$($1_$2_OUTPUT_FILE) ) )
|
||||
endif
|
||||
|
||||
$1 += $$($1_$2_OUTPUT_FILE)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2020, 2021, 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
|
||||
@@ -23,9 +23,9 @@
|
||||
#
|
||||
|
||||
# URLs
|
||||
JAVADOC_BASE_URL=https://docs.oracle.com/pls/topic/lookup?ctx=javase$(VERSION_FEATURE)&id=homepage
|
||||
JAVADOC_BASE_URL=https://docs.oracle.com/pls/topic/lookup?ctx=javase$(VERSION_NUMBER)&id=homepage
|
||||
BUG_SUBMIT_URL=https://bugreport.java.com/bugreport/
|
||||
COPYRIGHT_URL=legal/copyright.html
|
||||
LICENSE_URL=https://www.oracle.com/java/javase/terms/license/java$(VERSION_FEATURE)speclicense.html
|
||||
LICENSE_URL=https://www.oracle.com/java/javase/terms/license/java$(VERSION_NUMBER)speclicense.html
|
||||
REDISTRIBUTION_URL=https://www.oracle.com/technetwork/java/redist-137594.html
|
||||
OTHER_JDK_VERSIONS_URL=https://docs.oracle.com/en/java/javase/index.html
|
||||
|
||||
@@ -249,7 +249,7 @@ var getJibProfilesCommon = function (input, data) {
|
||||
dependencies: ["boot_jdk", "gnumake", "jtreg", "jib", "autoconf", "jmh", "jcov"],
|
||||
default_make_targets: ["product-bundles", "test-bundles", "static-libs-bundles"],
|
||||
configure_args: concat("--enable-jtreg-failure-handler",
|
||||
"--with-exclude-translations=es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK",
|
||||
"--with-exclude-translations=de,es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK",
|
||||
"--disable-manpages",
|
||||
"--disable-jvm-feature-shenandoahgc",
|
||||
versionArgs(input, common))
|
||||
@@ -1164,7 +1164,7 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
// build_number: "b07",
|
||||
// file: "bundles/jcov-3_0.zip",
|
||||
organization: common.organization,
|
||||
revision: "3.0-9-jdk-asm+1.0",
|
||||
revision: "3.0-7-jdk-asm+1.0",
|
||||
ext: "zip",
|
||||
environment_name: "JCOV_HOME",
|
||||
},
|
||||
|
||||
@@ -55,8 +55,6 @@ BOOT_MODULES= \
|
||||
jdk.sctp \
|
||||
jdk.unsupported \
|
||||
jdk.naming.rmi \
|
||||
jetbrains.api \
|
||||
jetbrains.api.impl \
|
||||
#
|
||||
|
||||
# Modules that directly or indirectly requiring upgradeable modules
|
||||
|
||||
29
make/data/cacerts/globalsignr2ca
Normal file
29
make/data/cacerts/globalsignr2ca
Normal file
@@ -0,0 +1,29 @@
|
||||
Owner: CN=GlobalSign, O=GlobalSign, OU=GlobalSign Root CA - R2
|
||||
Issuer: CN=GlobalSign, O=GlobalSign, OU=GlobalSign Root CA - R2
|
||||
Serial number: 400000000010f8626e60d
|
||||
Valid from: Fri Dec 15 08:00:00 GMT 2006 until: Wed Dec 15 08:00:00 GMT 2021
|
||||
Signature algorithm name: SHA1withRSA
|
||||
Subject Public Key Algorithm: 2048-bit RSA key
|
||||
Version: 3
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G
|
||||
A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp
|
||||
Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1
|
||||
MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEG
|
||||
A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
|
||||
hvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL
|
||||
v4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8
|
||||
eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq
|
||||
tTleiDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd
|
||||
C9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pa
|
||||
zq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCB
|
||||
mTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IH
|
||||
V2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5n
|
||||
bG9iYWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG
|
||||
3lm0mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs
|
||||
J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO
|
||||
291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS
|
||||
ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd
|
||||
AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
|
||||
TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
|
||||
-----END CERTIFICATE-----
|
||||
27
make/data/cacerts/identrustdstx3
Normal file
27
make/data/cacerts/identrustdstx3
Normal file
@@ -0,0 +1,27 @@
|
||||
Owner: CN=DST Root CA X3, O=Digital Signature Trust Co.
|
||||
Issuer: CN=DST Root CA X3, O=Digital Signature Trust Co.
|
||||
Serial number: 44afb080d6a327ba893039862ef8406b
|
||||
Valid from: Sat Sep 30 21:12:19 GMT 2000 until: Thu Sep 30 14:01:15 GMT 2021
|
||||
Signature algorithm name: SHA1withRSA
|
||||
Subject Public Key Algorithm: 2048-bit RSA key
|
||||
Version: 3
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
|
||||
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
|
||||
DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
|
||||
PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
|
||||
Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
|
||||
AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
|
||||
rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
|
||||
OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
|
||||
xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
|
||||
7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD
|
||||
aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
|
||||
HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG
|
||||
SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69
|
||||
ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr
|
||||
AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz
|
||||
R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5
|
||||
JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
|
||||
Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
|
||||
-----END CERTIFICATE-----
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2000, 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
|
||||
@@ -49,6 +49,7 @@ charset US-ASCII US_ASCII
|
||||
alias IBM367
|
||||
alias cp367
|
||||
alias csASCII
|
||||
alias default
|
||||
# Other aliases
|
||||
alias 646 # Solaris POSIX locale
|
||||
alias iso_646.irv:1983
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2000, 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
|
||||
@@ -317,8 +317,6 @@ KI=AUD
|
||||
KP=KPW
|
||||
# KOREA (THE REPUBLIC OF)
|
||||
KR=KRW
|
||||
# KOSOVO - Not in ISO 3166/4217
|
||||
XK=EUR
|
||||
# KUWAIT
|
||||
KW=KWD
|
||||
# KYRGYZSTAN
|
||||
|
||||
@@ -114,8 +114,8 @@ header extends java/lang/Object implements java/lang/annotation/Annotation flags
|
||||
class name java/lang/System
|
||||
-method name setSecurityManager descriptor (Ljava/lang/SecurityManager;)V
|
||||
-method name getSecurityManager descriptor ()Ljava/lang/SecurityManager;
|
||||
method name setSecurityManager descriptor (Ljava/lang/SecurityManager;)V flags 9 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="17")
|
||||
method name getSecurityManager descriptor ()Ljava/lang/SecurityManager; flags 9 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="17")
|
||||
method name setSecurityManager descriptor (Ljava/lang/SecurityManager;)V flags 9 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="17")@Ljdk/internal/reflect/CallerSensitive;
|
||||
|
||||
class name java/lang/Thread
|
||||
-method name checkAccess descriptor ()V
|
||||
@@ -209,8 +209,7 @@ header extends java/lang/RuntimeException flags 21
|
||||
class name java/lang/runtime/SwitchBootstraps
|
||||
header extends java/lang/Object flags 21 classAnnotations @Ljdk/internal/javac/PreviewFeature;(feature=eLjdk/internal/javac/PreviewFeature$Feature;SWITCH_PATTERN_MATCHING;)
|
||||
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
|
||||
method name typeSwitch descriptor (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; flags 89
|
||||
method name enumSwitch descriptor (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; flags 89
|
||||
method name typeSwitch descriptor (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; thrownTypes java/lang/Throwable flags 89
|
||||
|
||||
class name java/net/DatagramSocket
|
||||
-method name setDatagramSocketImplFactory descriptor (Ljava/net/DatagramSocketImplFactory;)V
|
||||
@@ -455,7 +454,8 @@ innerclass innerClass java/io/ObjectInputStream$GetField outerClass java/io/Obje
|
||||
innerclass innerClass java/io/ObjectOutputStream$PutField outerClass java/io/ObjectOutputStream innerClassName PutField flags 409
|
||||
|
||||
class name java/util/SplittableRandom
|
||||
header extends java/lang/Object implements java/util/random/RandomGenerator,java/util/random/RandomGenerator$SplittableGenerator flags 31 runtimeAnnotations @Ljdk/internal/util/random/RandomSupport$RandomGeneratorProperties;(name="SplittableRandom",i=I64,j=I0,k=I0,equidistribution=I1)
|
||||
header extends jdk/internal/util/random/RandomSupport$AbstractSplittableGenerator flags 31 runtimeAnnotations @Ljdk/internal/util/random/RandomSupport$RandomGeneratorProperties;(name="SplittableRandom",i=I64,j=I0,k=I0,equidistribution=I1)
|
||||
innerclass innerClass jdk/internal/util/random/RandomSupport$AbstractSplittableGenerator outerClass jdk/internal/util/random/RandomSupport innerClassName AbstractSplittableGenerator flags 409
|
||||
innerclass innerClass java/util/random/RandomGenerator$SplittableGenerator outerClass java/util/random/RandomGenerator innerClassName SplittableGenerator flags 609
|
||||
-method name nextInt descriptor (I)I
|
||||
-method name nextInt descriptor (II)I
|
||||
|
||||
@@ -39,7 +39,6 @@ innerclass innerClass jdk/incubator/foreign/CLinker$VaList$Builder outerClass jd
|
||||
-method name toCString descriptor (Ljava/lang/String;Ljava/nio/charset/Charset;Ljdk/incubator/foreign/NativeScope;)Ljdk/incubator/foreign/MemorySegment;
|
||||
-method name toJavaStringRestricted descriptor (Ljdk/incubator/foreign/MemoryAddress;)Ljava/lang/String;
|
||||
-method name toJavaStringRestricted descriptor (Ljdk/incubator/foreign/MemoryAddress;Ljava/nio/charset/Charset;)Ljava/lang/String;
|
||||
-method name toJavaString descriptor (Ljdk/incubator/foreign/MemorySegment;Ljava/nio/charset/Charset;)Ljava/lang/String;
|
||||
-method name allocateMemoryRestricted descriptor (J)Ljdk/incubator/foreign/MemoryAddress;
|
||||
-method name freeMemoryRestricted descriptor (Ljdk/incubator/foreign/MemoryAddress;)V
|
||||
method name getInstance descriptor ()Ljdk/incubator/foreign/CLinker; flags 9 runtimeAnnotations @Ljdk/internal/reflect/CallerSensitive;
|
||||
@@ -48,7 +47,10 @@ method name downcallHandle descriptor (Ljava/lang/invoke/MethodType;Ljdk/incubat
|
||||
method name upcallStub descriptor (Ljava/lang/invoke/MethodHandle;Ljdk/incubator/foreign/FunctionDescriptor;Ljdk/incubator/foreign/ResourceScope;)Ljdk/incubator/foreign/MemoryAddress; flags 401
|
||||
method name toCString descriptor (Ljava/lang/String;Ljdk/incubator/foreign/SegmentAllocator;)Ljdk/incubator/foreign/MemorySegment; flags 9
|
||||
method name toCString descriptor (Ljava/lang/String;Ljdk/incubator/foreign/ResourceScope;)Ljdk/incubator/foreign/MemorySegment; flags 9
|
||||
method name toCString descriptor (Ljava/lang/String;Ljava/nio/charset/Charset;Ljdk/incubator/foreign/SegmentAllocator;)Ljdk/incubator/foreign/MemorySegment; flags 9
|
||||
method name toCString descriptor (Ljava/lang/String;Ljava/nio/charset/Charset;Ljdk/incubator/foreign/ResourceScope;)Ljdk/incubator/foreign/MemorySegment; flags 9
|
||||
method name toJavaString descriptor (Ljdk/incubator/foreign/MemoryAddress;)Ljava/lang/String; flags 9 runtimeAnnotations @Ljdk/internal/reflect/CallerSensitive;
|
||||
method name toJavaString descriptor (Ljdk/incubator/foreign/MemoryAddress;Ljava/nio/charset/Charset;)Ljava/lang/String; flags 9 runtimeAnnotations @Ljdk/internal/reflect/CallerSensitive;
|
||||
method name allocateMemory descriptor (J)Ljdk/incubator/foreign/MemoryAddress; flags 9 runtimeAnnotations @Ljdk/internal/reflect/CallerSensitive;
|
||||
method name freeMemory descriptor (Ljdk/incubator/foreign/MemoryAddress;)V flags 9 runtimeAnnotations @Ljdk/internal/reflect/CallerSensitive;
|
||||
method name systemLookup descriptor ()Ljdk/incubator/foreign/SymbolLookup; flags 9 runtimeAnnotations @Ljdk/internal/reflect/CallerSensitive;
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
class name jdk/javadoc/doclet/Reporter
|
||||
header extends java/lang/Object flags 601
|
||||
innerclass innerClass javax/tools/Diagnostic$Kind outerClass javax/tools/Diagnostic innerClassName Kind flags 4019
|
||||
method name print descriptor (Ljavax/tools/Diagnostic$Kind;Ljavax/tools/FileObject;IIILjava/lang/String;)V flags 401
|
||||
method name getStandardWriter descriptor ()Ljava/io/PrintWriter; flags 1
|
||||
method name getDiagnosticWriter descriptor ()Ljava/io/PrintWriter; flags 1
|
||||
method name print descriptor (Ljavax/tools/Diagnostic$Kind;Ljavax/tools/FileObject;IIILjava/lang/String;)V flags 1
|
||||
|
||||
class name jdk/javadoc/doclet/StandardDoclet
|
||||
header extends java/lang/Object implements jdk/javadoc/doclet/Doclet flags 21
|
||||
|
||||
@@ -272,14 +272,12 @@ XEvent.xclient 0
|
||||
XEvent.xcolormap 0
|
||||
XEvent.xconfigure 0
|
||||
XEvent.xconfigurerequest 0
|
||||
XEvent.xcookie 0
|
||||
XEvent.xcreatewindow 0
|
||||
XEvent.xcrossing 0
|
||||
XEvent.xdestroywindow 0
|
||||
XEvent.xerror 0
|
||||
XEvent.xexpose 0
|
||||
XEvent.xfocus 0
|
||||
XEvent.xgeneric 0
|
||||
XEvent.xgraphicsexpose 0
|
||||
XEvent.xgravity 0
|
||||
XEvent.xkey 0
|
||||
@@ -372,22 +370,6 @@ XGCValues.subwindow_mode 64
|
||||
XGCValues.tile 44
|
||||
XGCValues.ts_x_origin 52
|
||||
XGCValues.ts_y_origin 56
|
||||
XGenericEvent 24
|
||||
XGenericEventCookie 32
|
||||
XGenericEventCookie.cookie 24
|
||||
XGenericEventCookie.data 28
|
||||
XGenericEventCookie.display 12
|
||||
XGenericEventCookie.evtype 20
|
||||
XGenericEventCookie.extension 16
|
||||
XGenericEventCookie.send_event 8
|
||||
XGenericEventCookie.serial 4
|
||||
XGenericEventCookie.type 0
|
||||
XGenericEvent.display 12
|
||||
XGenericEvent.evtype 20
|
||||
XGenericEvent.extension 16
|
||||
XGenericEvent.send_event 8
|
||||
XGenericEvent.serial 4
|
||||
XGenericEvent.type 0
|
||||
XGraphicsExposeEvent 48
|
||||
XGraphicsExposeEvent.count 36
|
||||
XGraphicsExposeEvent.display 12
|
||||
@@ -414,9 +396,6 @@ XHostAddress 12
|
||||
XHostAddress.address 8
|
||||
XHostAddress.family 0
|
||||
XHostAddress.length 4
|
||||
XIButtonState 8
|
||||
XIButtonState.mask 4
|
||||
XIButtonState.mask_len 0
|
||||
XIconSize 24
|
||||
XIconSize.height_inc 20
|
||||
XIconSize.max_height 12
|
||||
@@ -424,29 +403,6 @@ XIconSize.max_width 8
|
||||
XIconSize.min_height 4
|
||||
XIconSize.min_width 0
|
||||
XIconSize.width_inc 16
|
||||
XIDeviceEvent 140
|
||||
XIDeviceEvent.buttons 88
|
||||
XIDeviceEvent.child 48
|
||||
XIDeviceEvent.detail 36
|
||||
XIDeviceEvent.deviceid 28
|
||||
XIDeviceEvent.display 12
|
||||
XIDeviceEvent.event 44
|
||||
XIDeviceEvent.event_x 68
|
||||
XIDeviceEvent.event_y 76
|
||||
XIDeviceEvent.evtype 20
|
||||
XIDeviceEvent.extension 16
|
||||
XIDeviceEvent.flags 84
|
||||
XIDeviceEvent.group 124
|
||||
XIDeviceEvent.mods 108
|
||||
XIDeviceEvent.root 40
|
||||
XIDeviceEvent.root_x 52
|
||||
XIDeviceEvent.root_y 60
|
||||
XIDeviceEvent.send_event 8
|
||||
XIDeviceEvent.serial 4
|
||||
XIDeviceEvent.sourceid 32
|
||||
XIDeviceEvent.time 24
|
||||
XIDeviceEvent.type 0
|
||||
XIDeviceEvent.valuators 96
|
||||
XImage 88
|
||||
XImage.bitmap_bit_order 28
|
||||
XImage.bitmap_pad 32
|
||||
@@ -480,11 +436,6 @@ XIMHotKeyTrigger.modifier_mask 8
|
||||
XIMHotKeyTriggers 8
|
||||
XIMHotKeyTriggers.key 4
|
||||
XIMHotKeyTriggers.num_hot_key 0
|
||||
XIModifierState 16
|
||||
XIModifierState.base 0
|
||||
XIModifierState.effective 12
|
||||
XIModifierState.latched 4
|
||||
XIModifierState.locked 8
|
||||
XIMPreeditCaretCallbackStruct 12
|
||||
XIMPreeditCaretCallbackStruct.direction 4
|
||||
XIMPreeditCaretCallbackStruct.position 0
|
||||
@@ -521,10 +472,6 @@ XIMText.string 12
|
||||
XIMValuesList 8
|
||||
XIMValuesList.count_values 0
|
||||
XIMValuesList.supported_values 4
|
||||
XIValuatorState 12
|
||||
XIValuatorState.mask 4
|
||||
XIValuatorState.mask_len 0
|
||||
XIValuatorState.values 8
|
||||
XkbAccessXNotifyEvent 44
|
||||
XkbAccessXNotifyEvent.debounce_delay 40
|
||||
XkbAccessXNotifyEvent.detail 28
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2018, 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
|
||||
@@ -26,7 +26,7 @@
|
||||
# Create a bundle in the build directory, containing what's needed to
|
||||
# build and run JMH microbenchmarks from the OpenJDK build.
|
||||
|
||||
JMH_VERSION=1.32
|
||||
JMH_VERSION=1.28
|
||||
COMMONS_MATH3_VERSION=3.2
|
||||
JOPT_SIMPLE_VERSION=4.6
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 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
|
||||
@@ -102,7 +102,7 @@ EXCLUDE_DIRS=" \
|
||||
"
|
||||
|
||||
for ex in $EXCLUDE_DIRS; do
|
||||
EXCLUDE_ARGS="$EXCLUDE_ARGS --exclude=$ex"
|
||||
EXCLUDE_ARGS+="--exclude=$ex "
|
||||
done
|
||||
|
||||
echo "Copying Xcode.app..."
|
||||
|
||||
@@ -34,7 +34,7 @@ JVM_SUPPORT_DIR := $(JVM_VARIANT_OUTPUTDIR)/support
|
||||
DTRACE_SUPPORT_DIR := $(JVM_SUPPORT_DIR)/dtrace
|
||||
|
||||
LIB_OUTPUTDIR := $(call FindLibDirForModule, java.base)
|
||||
ifneq ($(filter client minimal zero, $(JVM_VARIANT)), )
|
||||
ifneq ($(filter client minimal, $(JVM_VARIANT)), )
|
||||
JVM_VARIANT_SUBDIR := $(JVM_VARIANT)
|
||||
else
|
||||
# Use 'server' as default target directory name for all other variants.
|
||||
|
||||
@@ -116,12 +116,8 @@ endif
|
||||
ifneq ($(call check-jvm-feature, cds), true)
|
||||
JVM_CFLAGS_FEATURES += -DINCLUDE_CDS=0
|
||||
JVM_EXCLUDE_FILES += \
|
||||
cdsProtectionDomain.cpp \
|
||||
classLoaderDataShared.cpp \
|
||||
classLoaderExt.cpp \
|
||||
dumpTimeSharedClassInfo.cpp \
|
||||
lambdaProxyClassDictionary.cpp \
|
||||
runTimeSharedClassInfo.cpp \
|
||||
systemDictionaryShared.cpp
|
||||
JVM_EXCLUDE_PATTERNS += cds/
|
||||
endif
|
||||
@@ -187,6 +183,7 @@ ifeq ($(call check-jvm-feature, opt-size), true)
|
||||
assembler.cpp \
|
||||
barrierSet.cpp \
|
||||
basicLock.cpp \
|
||||
biasedLocking.cpp \
|
||||
bytecode.cpp \
|
||||
bytecodeInterpreter.cpp \
|
||||
c1_Compilation.cpp \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 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
|
||||
@@ -36,7 +36,6 @@ ifeq ($(TOOLCHAIN_TYPE), gcc)
|
||||
BUILD_LIBJVM_assembler_x86.cpp_CXXFLAGS := -Wno-maybe-uninitialized
|
||||
BUILD_LIBJVM_cardTableBarrierSetAssembler_x86.cpp_CXXFLAGS := -Wno-maybe-uninitialized
|
||||
BUILD_LIBJVM_interp_masm_x86.cpp_CXXFLAGS := -Wno-uninitialized
|
||||
BUILD_LIBJVM_ad_$(HOTSPOT_TARGET_CPU_ARCH).cpp_CXXFLAGS := -Wno-nonnull
|
||||
ifeq ($(DEBUG_LEVEL), release)
|
||||
# Need extra inlining to collapse shared marking code into the hot marking loop
|
||||
BUILD_LIBJVM_shenandoahMark.cpp_CXXFLAGS := --param inline-unit-growth=1000
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<jre alt="true" value="###BUILD_DIR###/images/jdk" />
|
||||
<options></options>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_X" assert-keyword="true" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_X" assert-keyword="true" jdk-15="true">
|
||||
<output url="file://###BUILD_DIR###/idea" />
|
||||
</component>
|
||||
</project>
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 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
|
||||
* 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 application is meant to be run to create a classlist file representing
|
||||
* common use.
|
||||
*
|
||||
* The classlist is produced by adding -XX:DumpLoadedClassList=classlist
|
||||
*/
|
||||
package build.tools.classlist;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* The classlist generated by build.tools.classlist.HelloClasslist
|
||||
* may have non-deterministic contents, affected by Java thread execution order.
|
||||
* SortClasslist sorts the file to make the JDK image's contents more deterministic.
|
||||
*/
|
||||
public class SortClasslist {
|
||||
public static void main(String args[]) throws FileNotFoundException {
|
||||
ArrayList<String> classes = new ArrayList<>();
|
||||
ArrayList<String> lambdas = new ArrayList<>();
|
||||
|
||||
FileInputStream fis = new FileInputStream(args[0]);
|
||||
Scanner scanner = new Scanner(fis);
|
||||
Pattern p = Pattern.compile("^(.*)[ ]+id:[ ]+([0-9]+)$");
|
||||
while (scanner.hasNextLine()) {
|
||||
String line = scanner.nextLine();
|
||||
Matcher m = p.matcher(line);
|
||||
if (line.startsWith("#")) {
|
||||
// Comments -- print them first without sorting. These appear only at the top
|
||||
// of the file.
|
||||
System.out.println(line);
|
||||
} else if (line.startsWith("@")) {
|
||||
// @lambda-form-invoker, @lambda-proxy, etc.
|
||||
lambdas.add(line);
|
||||
} else if (m.find()) {
|
||||
// We found a pattern like this:
|
||||
//
|
||||
// <beginning of line>java/lang/Object id: 0<end of line>
|
||||
//
|
||||
// This is a class used by one of the three builtin class loaders
|
||||
// (boot/platform/app). Since the default classlist does not support unregistered
|
||||
// classes, the ID is unused. Let's omit the ID, as it may be non-deterministic.
|
||||
String className = m.group(1); // matches the (.*) part of the pattern.
|
||||
classes.add(className);
|
||||
} else {
|
||||
// HelloClasslist should not load classes in custom class loaders, or else
|
||||
// we might end up with output like this:
|
||||
//
|
||||
// SomeClass id: 123 super: 0 source: foo.jar
|
||||
//
|
||||
// Such classes won't be usable for common applications, so they should
|
||||
// not be included in the JDK's default classlist.
|
||||
System.err.println("Unexpected line: " + line);
|
||||
System.err.println("The default classlist should not contain unregistered classes");
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
Collections.sort(classes);
|
||||
Collections.sort(lambdas);
|
||||
|
||||
for (String s : classes) {
|
||||
System.out.println(s);
|
||||
}
|
||||
for (String s : lambdas) {
|
||||
System.out.println(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 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
|
||||
@@ -27,6 +27,7 @@ package build.tools.generatelsrequivmaps;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.time.ZoneId;
|
||||
@@ -78,7 +79,8 @@ public class EquivMapsGenerator {
|
||||
String preferred = null;
|
||||
String prefix = null;
|
||||
|
||||
for (String line : Files.readAllLines(Paths.get(filename))) {
|
||||
for (String line : Files.readAllLines(Paths.get(filename),
|
||||
Charset.forName("UTF-8"))) {
|
||||
line = line.toLowerCase(Locale.ROOT);
|
||||
int index = line.indexOf(' ') + 1;
|
||||
if (line.startsWith("file-date:")) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2018, 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
|
||||
@@ -229,7 +229,6 @@ public class CreateSymbols {
|
||||
: null,
|
||||
Paths.get(ctDescriptionFile));
|
||||
|
||||
stripNonExistentAnnotations(data);
|
||||
splitHeaders(data.classes);
|
||||
|
||||
Map<String, Map<Character, String>> package2Version2Module = new HashMap<>();
|
||||
@@ -302,50 +301,6 @@ public class CreateSymbols {
|
||||
}
|
||||
}
|
||||
|
||||
private static final String PREVIEW_FEATURE_ANNOTATION_OLD =
|
||||
"Ljdk/internal/PreviewFeature;";
|
||||
private static final String PREVIEW_FEATURE_ANNOTATION_NEW =
|
||||
"Ljdk/internal/javac/PreviewFeature;";
|
||||
private static final String PREVIEW_FEATURE_ANNOTATION_INTERNAL =
|
||||
"Ljdk/internal/PreviewFeature+Annotation;";
|
||||
private static final String VALUE_BASED_ANNOTATION =
|
||||
"Ljdk/internal/ValueBased;";
|
||||
private static final String VALUE_BASED_ANNOTATION_INTERNAL =
|
||||
"Ljdk/internal/ValueBased+Annotation;";
|
||||
public static final Set<String> HARDCODED_ANNOTATIONS = new HashSet<>(
|
||||
List.of("Ljdk/Profile+Annotation;",
|
||||
"Lsun/Proprietary+Annotation;",
|
||||
PREVIEW_FEATURE_ANNOTATION_OLD,
|
||||
PREVIEW_FEATURE_ANNOTATION_NEW,
|
||||
VALUE_BASED_ANNOTATION));
|
||||
|
||||
private void stripNonExistentAnnotations(LoadDescriptions data) {
|
||||
Set<String> allClasses = data.classes.name2Class.keySet();
|
||||
data.modules.values().forEach(mod -> {
|
||||
stripNonExistentAnnotations(allClasses, mod.header);
|
||||
});
|
||||
data.classes.classes.forEach(clazz -> {
|
||||
stripNonExistentAnnotations(allClasses, clazz.header);
|
||||
stripNonExistentAnnotations(allClasses, clazz.fields);
|
||||
stripNonExistentAnnotations(allClasses, clazz.methods);
|
||||
});
|
||||
}
|
||||
|
||||
private void stripNonExistentAnnotations(Set<String> allClasses, Iterable<? extends FeatureDescription> descs) {
|
||||
descs.forEach(d -> stripNonExistentAnnotations(allClasses, d));
|
||||
}
|
||||
|
||||
private void stripNonExistentAnnotations(Set<String> allClasses, FeatureDescription d) {
|
||||
stripNonExistentAnnotations(allClasses, d.classAnnotations);
|
||||
stripNonExistentAnnotations(allClasses, d.runtimeAnnotations);
|
||||
}
|
||||
|
||||
private void stripNonExistentAnnotations(Set<String> allClasses, List<AnnotationDescription> annotations) {
|
||||
if (annotations != null)
|
||||
annotations.removeIf(ann -> !HARDCODED_ANNOTATIONS.contains(ann.annotationType) &&
|
||||
!allClasses.contains(ann.annotationType.substring(1, ann.annotationType.length() - 1)));
|
||||
}
|
||||
|
||||
private ZipEntry createZipEntry(String name, long timestamp) {
|
||||
ZipEntry ze = new ZipEntry(name);
|
||||
|
||||
@@ -1185,16 +1140,17 @@ public class CreateSymbols {
|
||||
values.put("reflective", essentialAPI != null && !essentialAPI);
|
||||
}
|
||||
|
||||
if (VALUE_BASED_ANNOTATION.equals(annotationType)) {
|
||||
//the non-public ValueBased annotation will not be available in ct.sym,
|
||||
//replace with purely synthetic javac-internal annotation:
|
||||
annotationType = VALUE_BASED_ANNOTATION_INTERNAL;
|
||||
}
|
||||
|
||||
return new Annotation(null,
|
||||
addString(constantPool, annotationType),
|
||||
createElementPairs(constantPool, values));
|
||||
}
|
||||
//where:
|
||||
private static final String PREVIEW_FEATURE_ANNOTATION_OLD =
|
||||
"Ljdk/internal/PreviewFeature;";
|
||||
private static final String PREVIEW_FEATURE_ANNOTATION_NEW =
|
||||
"Ljdk/internal/javac/PreviewFeature;";
|
||||
private static final String PREVIEW_FEATURE_ANNOTATION_INTERNAL =
|
||||
"Ljdk/internal/PreviewFeature+Annotation;";
|
||||
|
||||
private element_value_pair[] createElementPairs(List<CPInfo> constantPool, Map<String, Object> annotationAttributes) {
|
||||
element_value_pair[] pairs = new element_value_pair[annotationAttributes.size()];
|
||||
|
||||
@@ -95,9 +95,9 @@ ifeq ($(call And, $(call isTargetOs, windows) $(call isTargetCpu, x86)), true)
|
||||
endif
|
||||
DEFAULT_CFG_VARIANT ?= server
|
||||
|
||||
# Any variant other than server, client, minimal, or zero is represented as server in
|
||||
# Any variant other than server, client or minimal is represented as server in
|
||||
# the cfg file.
|
||||
VALID_CFG_VARIANTS := server client minimal zero
|
||||
VALID_CFG_VARIANTS := server client minimal
|
||||
CFG_VARIANTS := $(filter $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)) \
|
||||
$(if $(filter-out $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)), server)
|
||||
|
||||
|
||||
@@ -156,10 +156,10 @@ ifeq ($(call isTargetOsType, unix), true)
|
||||
TARGETS += $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig)
|
||||
endef
|
||||
|
||||
# The subdir is the same as the variant for client, minimal or zero, for all
|
||||
# The subdir is the same as the variant for client and minimal, for all
|
||||
# others it's server.
|
||||
VARIANT_SUBDIRS := $(filter client minimal zero, $(JVM_VARIANTS)) \
|
||||
$(if $(filter-out client minimal zero, $(JVM_VARIANTS)), server)
|
||||
VARIANT_SUBDIRS := $(filter client minimal, $(JVM_VARIANTS)) \
|
||||
$(if $(filter-out client minimal, $(JVM_VARIANTS)), server)
|
||||
$(foreach v, $(VARIANT_SUBDIRS), $(eval $(call CreateSymlinks,$v)))
|
||||
endif
|
||||
############################################################################
|
||||
|
||||
@@ -84,7 +84,7 @@ TARGETS += $(COPY_LEGAL)
|
||||
################################################################################
|
||||
|
||||
FONTFILE_SRC_DIR := $(TOPDIR)/src/java.desktop/share
|
||||
FONTFILE_SRCS := $(wildcard $(FONTFILE_SRC_DIR)/fonts/*.ttf) $(wildcard $(FONTFILE_SRC_DIR)/fonts/*.otf) $(FONTFILE_SRC_DIR)/fonts/fonts.dir $(FONTFILE_SRC_DIR)/fonts/font.conf
|
||||
FONTFILE_SRCS := $(wildcard $(FONTFILE_SRC_DIR)/fonts/*.ttf) $(FONTFILE_SRC_DIR)/fonts/fonts.dir $(FONTFILE_SRC_DIR)/fonts/font.conf
|
||||
FONTFILE_TARGET_FILES := $(subst $(FONTFILE_SRC_DIR),$(LIB_DST_DIR),$(FONTFILE_SRCS))
|
||||
|
||||
$(LIB_DST_DIR)/fonts/%: $(FONTFILE_SRC_DIR)/fonts/%
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
DOCLINT += -Xdoclint:all/protected,-reference,-missing \
|
||||
DOCLINT += -Xdoclint:all/protected,-reference \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
COPY += .gif .png .wav .txt .xml .css .pf
|
||||
CLEAN += iio-plugin.properties cursors.properties
|
||||
|
||||
@@ -436,7 +436,7 @@ endif
|
||||
|
||||
ifeq ($(USE_EXTERNAL_HARFBUZZ), true)
|
||||
LIBFONTMANAGER_EXTRA_SRC =
|
||||
BUILD_LIBFONTMANAGER_FONTLIB += $(HARFBUZZ_LIBS)
|
||||
BUILD_LIBFONTMANAGER_FONTLIB += $(LIBHARFBUZZ_LIBS)
|
||||
else
|
||||
LIBFONTMANAGER_EXTRA_SRC = libharfbuzz
|
||||
|
||||
|
||||
@@ -61,54 +61,36 @@ $(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
|
||||
$(COMPILECREATESYMBOLS_ADD_EXPORTS), \
|
||||
))
|
||||
|
||||
GENERATE_SYMBOLS_FROM_JDK_VERSION := 11
|
||||
JDK_JAVADOC_DIR := $(JDK_OUTPUTDIR)/modules/jdk.javadoc
|
||||
ELEMENT_LISTS_PKG := jdk/javadoc/internal/doclets/toolkit/resources/releases
|
||||
ELEMENT_LISTS_DIR := $(JDK_JAVADOC_DIR)/$(ELEMENT_LISTS_PKG)
|
||||
|
||||
$(JDK_JAVADOC_DIR)/_element_lists.marker: \
|
||||
$(SUPPORT_OUTPUTDIR)/javadoc-symbols/symbols: \
|
||||
$(COMPILE_CREATE_SYMBOLS) \
|
||||
$(wildcard $(TOPDIR)/make/data/symbols/*) \
|
||||
$(MODULE_INFOS)
|
||||
$(call MakeTargetDir)
|
||||
$(call LogInfo, Creating javadoc element lists)
|
||||
$(RM) -r $(ELEMENT_LISTS_DIR)
|
||||
# Generate element-list files for JDK 11 to current-1
|
||||
$(call ExecuteWithLog, $@_historic, \
|
||||
$(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \
|
||||
$(COMPILECREATESYMBOLS_ADD_EXPORTS) \
|
||||
-classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols_javadoc \
|
||||
build.tools.symbolgenerator.CreateSymbols \
|
||||
build-javadoc-data \
|
||||
$(CT_DATA_DESCRIPTION) \
|
||||
$(ELEMENT_LISTS_DIR) \
|
||||
$(GENERATE_SYMBOLS_FROM_JDK_VERSION) \
|
||||
)
|
||||
# Generate element-list file for the current JDK version
|
||||
$(call ExecuteWithLog, $@_current, \
|
||||
$(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \
|
||||
$(COMPILECREATESYMBOLS_ADD_EXPORTS) \
|
||||
-classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols_javadoc \
|
||||
build.tools.symbolgenerator.JavadocElementList \
|
||||
$(ELEMENT_LISTS_DIR)/element-list-$(JDK_SOURCE_TARGET_VERSION).txt \
|
||||
$(JAVADOC_MODULESOURCEPATH) \
|
||||
$(JAVADOC_MODULES) \
|
||||
)
|
||||
$(RM) -r $(@D)
|
||||
$(MKDIR) -p $(@D)
|
||||
$(ECHO) Creating javadoc element list
|
||||
$(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \
|
||||
$(COMPILECREATESYMBOLS_ADD_EXPORTS) \
|
||||
-classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols_javadoc \
|
||||
build.tools.symbolgenerator.CreateSymbols \
|
||||
build-javadoc-data \
|
||||
$(CT_DATA_DESCRIPTION) \
|
||||
$(JDK_OUTPUTDIR)/modules/jdk.javadoc/jdk/javadoc/internal/doclets/toolkit/resources/releases \
|
||||
11
|
||||
$(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \
|
||||
$(COMPILECREATESYMBOLS_ADD_EXPORTS) \
|
||||
-classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols_javadoc \
|
||||
build.tools.symbolgenerator.JavadocElementList \
|
||||
$(JDK_OUTPUTDIR)/modules/jdk.javadoc/jdk/javadoc/internal/doclets/toolkit/resources/releases/element-list-$(JDK_SOURCE_TARGET_VERSION).txt \
|
||||
$(JAVADOC_MODULESOURCEPATH) \
|
||||
$(JAVADOC_MODULES)
|
||||
$(TOUCH) $@
|
||||
|
||||
################################################################################
|
||||
# Copy element-lists to interim langtools
|
||||
# Copy ct.sym to the modules libs dir
|
||||
$(eval $(call SetupCopyFiles, COPY_TO_LIBS, \
|
||||
FILES := $(SUPPORT_OUTPUTDIR)/javadoc-symbols/*.txt, \
|
||||
DEST := $(JDK_OUTPUTDIR)/modules/jdk.javadoc/jdk/javadoc/internal/doclets/toolkit/resources/releases, \
|
||||
))
|
||||
|
||||
INTERIM_JDK_JAVADOC_DIR := $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules/jdk.javadoc.interim
|
||||
INTERIM_ELEMENT_LISTS_DIR := $(INTERIM_JDK_JAVADOC_DIR)/$(ELEMENT_LISTS_PKG)
|
||||
|
||||
$(INTERIM_JDK_JAVADOC_DIR)/_element_lists.marker: $(JDK_JAVADOC_DIR)/_element_lists.marker
|
||||
$(call MakeDir, $(INTERIM_ELEMENT_LISTS_DIR))
|
||||
$(RM) -r $(INTERIM_ELEMENT_LISTS_DIR)/*
|
||||
$(CP) -R $(ELEMENT_LISTS_DIR)/* $(INTERIM_ELEMENT_LISTS_DIR)/
|
||||
$(TOUCH) $@
|
||||
TARGETS += $(SUPPORT_OUTPUTDIR)/javadoc-symbols/symbols
|
||||
|
||||
################################################################################
|
||||
|
||||
TARGETS += $(JDK_JAVADOC_DIR)/_element_lists.marker \
|
||||
$(INTERIM_JDK_JAVADOC_DIR)/_element_lists.marker
|
||||
|
||||
@@ -356,8 +356,8 @@ compare_general_files() {
|
||||
"
|
||||
$CAT $OTHER_DIR/$f | eval "$SVG_FILTER" > $OTHER_FILE
|
||||
$CAT $THIS_DIR/$f | eval "$SVG_FILTER" > $THIS_FILE
|
||||
elif [ "$SUFFIX" = "jar_contents" ]; then
|
||||
# The jar_contents files may have some lines in random order
|
||||
elif [[ "$f" = *"/lib/classlist" ]] || [ "$SUFFIX" = "jar_contents" ]; then
|
||||
# The classlist files may have some lines in random order
|
||||
OTHER_FILE=$WORK_DIR/$f.other
|
||||
THIS_FILE=$WORK_DIR/$f.this
|
||||
$MKDIR -p $(dirname $OTHER_FILE) $(dirname $THIS_FILE)
|
||||
|
||||
@@ -863,7 +863,7 @@ ifeq ($(call isTargetOs, linux), true)
|
||||
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeFPRegs := -ldl
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libAsyncGetCallTraceTest := -ldl
|
||||
else
|
||||
BUILD_HOTSPOT_JTREG_EXCLUDE += libtest-rw.c libtest-rwx.c \
|
||||
BUILD_HOTSPOT_JTREG_EXCLUDE += libtest-rw.c libtest-rwx.c libTestJNI.c \
|
||||
exeinvoke.c exestack-gap.c exestack-tls.c libAsyncGetCallTraceTest.cpp
|
||||
endif
|
||||
|
||||
@@ -871,7 +871,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
|
||||
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libatExit := jvm.lib
|
||||
else
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbootclssearch_agent += -lpthread
|
||||
|
||||
@@ -48,7 +48,4 @@ jdk.security.jgss,
|
||||
jdk.unsupported,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
jdk.hotspot.agent,
|
||||
jetbrains.api,
|
||||
jetbrains.api.impl,
|
||||
jdk.jcmd
|
||||
jdk.hotspot.agent
|
||||
|
||||
49
src/demo/share/jfc/Font2DTest/Font2DTest.html
Normal file
49
src/demo/share/jfc/Font2DTest/Font2DTest.html
Normal file
@@ -0,0 +1,49 @@
|
||||
<html>
|
||||
<!-- Changed by: Shinsuke Fukuda, 4-Aug-2000 -->
|
||||
<head>
|
||||
<title>
|
||||
Font2DTest Demo
|
||||
</title>
|
||||
</head>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<font size=-1>
|
||||
<hr>
|
||||
</font>
|
||||
|
||||
<h1>
|
||||
Font2DTest
|
||||
</h1>
|
||||
|
||||
An encompassing font/glyph demo application.
|
||||
Source code is in <BR>
|
||||
<a href=src/Font2DTest.java>Font2DTest.java</a>,<BR>
|
||||
<a href=src/Font2DTestApplet.java>Font2DTestApplet.java</a>,<BR>
|
||||
<a href=src/RangeMenu.java>RangeMenu.java</a> and<BR>
|
||||
<a href=src/FontPanel.java>FontPanel.java</a>.<BR>
|
||||
You can run this program either as an applet or as an application.<BR>
|
||||
Detailed information about the program can be found in
|
||||
<a href=README.txt>README.txt</a><BR>
|
||||
|
||||
<p>To run it as an application,
|
||||
execute the <code>Font2DTest</code> class.
|
||||
For example:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
% <b>java -jar Font2DTest.jar</b>
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<p>
|
||||
Note: If AWTPermission's showWindowWithoutWarningBanner permission is not given,<BR>
|
||||
the zoom feature will not look as good, as characters may be hidden by the warning banner.<BR>
|
||||
|
||||
<APPLET code="Font2DTestApplet.class" archive="Font2DTest.jar" width="850" height="700">
|
||||
</APPLET>
|
||||
|
||||
<hr>
|
||||
<font size=-1>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -72,8 +72,6 @@ import java.util.BitSet;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.*;
|
||||
|
||||
import static java.nio.charset.StandardCharsets.UTF_16;
|
||||
|
||||
/**
|
||||
* Font2DTest.java
|
||||
*
|
||||
@@ -135,7 +133,7 @@ public final class Font2DTest extends JPanel
|
||||
private static boolean canDisplayCheck = true;
|
||||
|
||||
/// Initialize GUI variables and its layouts
|
||||
public Font2DTest( JFrame f) {
|
||||
public Font2DTest( JFrame f, boolean isApplet ) {
|
||||
parent = f;
|
||||
|
||||
rm = new RangeMenu( this, parent );
|
||||
@@ -167,8 +165,8 @@ public final class Font2DTest extends JPanel
|
||||
contrastSlider.setPaintLabels(true);
|
||||
contrastSlider.addChangeListener(this);
|
||||
setupPanel();
|
||||
setupMenu();
|
||||
setupDialog();
|
||||
setupMenu( isApplet );
|
||||
setupDialog( isApplet );
|
||||
|
||||
if(canDisplayCheck) {
|
||||
fireRangeChanged();
|
||||
@@ -258,7 +256,7 @@ public final class Font2DTest extends JPanel
|
||||
}
|
||||
|
||||
/// Sets up menu entries
|
||||
private void setupMenu() {
|
||||
private void setupMenu( boolean isApplet ) {
|
||||
JMenu fileMenu = new JMenu( "File" );
|
||||
JMenu optionMenu = new JMenu( "Option" );
|
||||
|
||||
@@ -270,7 +268,11 @@ public final class Font2DTest extends JPanel
|
||||
fileMenu.add( new MenuItemV2( "Page Setup...", this ));
|
||||
fileMenu.add( new MenuItemV2( "Print...", this ));
|
||||
fileMenu.addSeparator();
|
||||
fileMenu.add( new MenuItemV2( "Exit", this ));
|
||||
if ( !isApplet )
|
||||
fileMenu.add( new MenuItemV2( "Exit", this ));
|
||||
else
|
||||
fileMenu.add( new MenuItemV2( "Close", this ));
|
||||
|
||||
displayGridCBMI = new CheckboxMenuItemV2( "Display Grid", true, this );
|
||||
force16ColsCBMI = new CheckboxMenuItemV2( "Force 16 Columns", false, this );
|
||||
showFontInfoCBMI = new CheckboxMenuItemV2( "Display Font Info", false, this );
|
||||
@@ -324,8 +326,11 @@ public final class Font2DTest extends JPanel
|
||||
}
|
||||
|
||||
/// Sets up the all dialogs used in Font2DTest...
|
||||
private void setupDialog() {
|
||||
filePromptDialog = new JFileChooser();
|
||||
private void setupDialog( boolean isApplet ) {
|
||||
if (!isApplet)
|
||||
filePromptDialog = new JFileChooser( );
|
||||
else
|
||||
filePromptDialog = null;
|
||||
|
||||
/// Prepare user text dialog...
|
||||
userTextDialog = new JDialog( parent, "User Text", false );
|
||||
@@ -427,6 +432,8 @@ public final class Font2DTest extends JPanel
|
||||
|
||||
/// Changes the message on the status bar
|
||||
public void fireChangeStatus( String message, boolean error ) {
|
||||
/// If this is not ran as an applet, use own status bar,
|
||||
/// Otherwise, use the appletviewer/browser's status bar
|
||||
statusBar.setText( message );
|
||||
if ( error )
|
||||
fp.showingError = true;
|
||||
@@ -591,7 +598,7 @@ public final class Font2DTest extends JPanel
|
||||
if (numBytes >= 2 &&
|
||||
(( byteData[0] == (byte) 0xFF && byteData[1] == (byte) 0xFE ) ||
|
||||
( byteData[0] == (byte) 0xFE && byteData[1] == (byte) 0xFF )))
|
||||
fileText = new String(byteData, UTF_16);
|
||||
fileText = new String( byteData, "UTF-16" );
|
||||
/// Otherwise, use system default encoding
|
||||
else
|
||||
fileText = new String( byteData );
|
||||
@@ -649,7 +656,7 @@ public final class Font2DTest extends JPanel
|
||||
showFontInfoCBMI.getState() + "\n" +
|
||||
rm.getSelectedItem() + "\n" +
|
||||
range[0] + "\n" + range[1] + "\n" + curOptions + tFileName);
|
||||
byte[] toBeWritten = completeOptions.getBytes(UTF_16);
|
||||
byte[] toBeWritten = completeOptions.getBytes( "UTF-16" );
|
||||
bos.write( toBeWritten, 0, toBeWritten.length );
|
||||
bos.close();
|
||||
}
|
||||
@@ -714,7 +721,7 @@ public final class Font2DTest extends JPanel
|
||||
(byteData[0] != (byte) 0xFE || byteData[1] != (byte) 0xFF) )
|
||||
throw new Exception( "Not a Font2DTest options file" );
|
||||
|
||||
String options = new String(byteData, UTF_16);
|
||||
String options = new String( byteData, "UTF-16" );
|
||||
StringTokenizer perLine = new StringTokenizer( options, "\n" );
|
||||
String title = perLine.nextToken();
|
||||
if ( !title.equals( "Font2DTest Option File" ))
|
||||
@@ -1023,7 +1030,7 @@ public final class Font2DTest extends JPanel
|
||||
|
||||
UIManager.put("swing.boldMetal", Boolean.FALSE);
|
||||
final JFrame f = new JFrame( "Font2DTest" );
|
||||
final Font2DTest f2dt = new Font2DTest( f);
|
||||
final Font2DTest f2dt = new Font2DTest( f, false );
|
||||
f.addWindowListener( new WindowAdapter() {
|
||||
public void windowOpening( WindowEvent e ) { f2dt.repaint(); }
|
||||
public void windowClosing( WindowEvent e ) { System.exit(0); }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -80,7 +80,6 @@ import javax.imageio.*;
|
||||
import javax.swing.*;
|
||||
|
||||
import static java.awt.RenderingHints.*;
|
||||
import static java.nio.charset.StandardCharsets.ISO_8859_1;
|
||||
|
||||
/**
|
||||
* FontPanel.java
|
||||
@@ -644,7 +643,7 @@ public final class FontPanel extends JPanel implements AdjustmentListener {
|
||||
break;
|
||||
case DRAW_BYTES:
|
||||
try {
|
||||
byte[] lineBytes = line.getBytes(ISO_8859_1);
|
||||
byte[] lineBytes = line.getBytes( "ISO-8859-1" );
|
||||
g2.drawBytes( lineBytes, 0, lineBytes.length, 0, 0 );
|
||||
}
|
||||
catch ( Exception e ) {
|
||||
|
||||
@@ -4,17 +4,35 @@ Font2DTest
|
||||
To run Font2DTest:
|
||||
|
||||
% java -jar Font2DTest.jar
|
||||
or
|
||||
% appletviewer Font2DTest.html
|
||||
|
||||
These instructions assume that the java command is in your path.
|
||||
If they aren't, then you should either specify the complete path to the commands
|
||||
These instructions assume that the 1.7 versions of the java
|
||||
and appletviewer commands are in your path. If they aren't,
|
||||
then you should either specify the complete path to the commands
|
||||
or update your PATH environment variable as described in the
|
||||
installation instructions for the Java(TM) SE Development Kit.
|
||||
|
||||
To view Font2DTest within a web browser with Java Plugin,
|
||||
load Font2DTest.html.
|
||||
|
||||
If you wish to modify any of the source code, you may want to extract
|
||||
the contents of the Font2DTest.jar file by executing this command:
|
||||
|
||||
% jar -xvf Font2DTest.jar
|
||||
|
||||
NOTE:
|
||||
|
||||
When Font2DTest is ran as an applet, the browser plugin/viewer needs
|
||||
following permissions given in order to run properly:
|
||||
|
||||
AWTPermission "showWindowWithoutWarningBanner"
|
||||
RuntimePermission "queuePrintJob"
|
||||
|
||||
The program will run without these properties set,
|
||||
but some of its features will be limited.
|
||||
To enable all features, please add these permissions.
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
Introduction
|
||||
-----------------------------------------------------------------------
|
||||
@@ -111,3 +129,23 @@ that are within the selected range. Third option, "Print all text..."
|
||||
is similar, and it will print all lines of text that user has put in.
|
||||
|
||||
====================================================================
|
||||
|
||||
Known Problems:
|
||||
|
||||
- When a PostScript font is used, the characters may extend beyond the
|
||||
enclosing grid or zoom rectangle. This is due to the problem with
|
||||
FontMetrics.getMaxAscent() and getMaxDescent() functions; the functions
|
||||
do not always return the right values for PostScript fonts.
|
||||
|
||||
- There are still some bugs around the error handling.
|
||||
Most of these problems will usually get fixed when some parameters
|
||||
are changed, or the screen is refreshed.
|
||||
|
||||
- Many fonts on Solaris fails to retrieve outlines properly,
|
||||
and as the result, they do not align within the grid properly.
|
||||
These are mainly F3 and fonts that was returned by X server.
|
||||
|
||||
- When showWindowWithoutWarningBanner AWTPermission is not given,
|
||||
the "zoom" window will look really bad because of the
|
||||
Applet warning label tacked at the bottom of the zoom window.
|
||||
To remove this, follow the "NOTE:" instruction at the top.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -45,8 +46,6 @@ import java.io.*;
|
||||
import java.applet.*;
|
||||
import java.net.*;
|
||||
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
/**
|
||||
* A generic SwingSet2 demo module
|
||||
*
|
||||
@@ -156,7 +155,7 @@ public class DemoModule extends JFrame {
|
||||
try {
|
||||
url = getClass().getResource(filename);
|
||||
is = url.openStream();
|
||||
isr = new InputStreamReader(is, UTF_8);
|
||||
isr = new InputStreamReader(is, "UTF-8");
|
||||
BufferedReader reader = new BufferedReader(isr);
|
||||
|
||||
// Read one line at a time, htmlize using super-spiffy
|
||||
|
||||
@@ -549,10 +549,7 @@ public class TableDemo extends DemoModule {
|
||||
public int getRowCount() { return data.length;}
|
||||
public Object getValueAt(int row, int col) {return data[row][col];}
|
||||
public String getColumnName(int column) {return names[column];}
|
||||
public Class<?> getColumnClass(int c) {
|
||||
Object obj = getValueAt(0, c);
|
||||
return obj != null ? obj.getClass() : Object.class;
|
||||
}
|
||||
public Class<?> getColumnClass(int c) {return getValueAt(0, c).getClass();}
|
||||
public boolean isCellEditable(int row, int col) {return col != 5;}
|
||||
public void setValueAt(Object aValue, int row, int column) { data[row][column] = aValue; }
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -43,8 +44,6 @@ import java.io.*;
|
||||
import java.applet.*;
|
||||
import java.net.*;
|
||||
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
/**
|
||||
* JTree Demo
|
||||
*
|
||||
@@ -85,7 +84,7 @@ public class TreeDemo extends DemoModule {
|
||||
try {
|
||||
// convert url to buffered string
|
||||
InputStream is = url.openStream();
|
||||
InputStreamReader isr = new InputStreamReader(is, UTF_8);
|
||||
InputStreamReader isr = new InputStreamReader(is, "UTF-8");
|
||||
BufferedReader reader = new BufferedReader(isr);
|
||||
|
||||
// read one line at a time, put into tree
|
||||
|
||||
@@ -1295,7 +1295,7 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
bool is_CAS(int opcode, bool maybe_volatile);
|
||||
bool is_CAS(int opcode, bool maybe_volatile);
|
||||
|
||||
// predicates controlling emit of ldr<x>/ldar<x> and associated dmb
|
||||
|
||||
@@ -2161,7 +2161,7 @@ uint MachSpillCopyNode::implementation(CodeBuffer *cbuf, PhaseRegAlloc *ra_, boo
|
||||
as_FloatRegister(Matcher::_regEncode[src_lo]));
|
||||
}
|
||||
} else if (dst_lo_rc == rc_float) { // fpr --> fpr copy
|
||||
if (is64) {
|
||||
if (cbuf) {
|
||||
__ fmovd(as_FloatRegister(Matcher::_regEncode[dst_lo]),
|
||||
as_FloatRegister(Matcher::_regEncode[src_lo]));
|
||||
} else {
|
||||
@@ -2400,14 +2400,6 @@ const bool Matcher::match_rule_supported_vector(int opcode, int vlen, BasicType
|
||||
} else { // NEON
|
||||
// Special cases
|
||||
switch (opcode) {
|
||||
case Op_VectorMaskCmp:
|
||||
// We don't have VectorReinterpret with bit_size less than 64 support for
|
||||
// now, even for byte type. To be refined with fully VectorCast support.
|
||||
case Op_VectorReinterpret:
|
||||
if (vlen < 2 || bit_size < 64) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case Op_MulAddVS2VI:
|
||||
if (bit_size < 128) {
|
||||
return false;
|
||||
@@ -2421,23 +2413,6 @@ const bool Matcher::match_rule_supported_vector(int opcode, int vlen, BasicType
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
// Some types of VectorCast are not implemented for now.
|
||||
case Op_VectorCastI2X:
|
||||
if (bt == T_BYTE) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case Op_VectorCastS2X:
|
||||
if (vlen < 4 || bit_size < 64) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case Op_VectorCastF2X:
|
||||
case Op_VectorCastD2X:
|
||||
if (bt == T_INT || bt == T_SHORT || bt == T_BYTE || bt == T_LONG) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -2534,7 +2509,7 @@ MachOper* Matcher::pd_specialize_generic_vector_operand(MachOper* original_opnd,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool Matcher::is_reg2reg_move(MachNode* m) {
|
||||
bool Matcher::is_generic_reg2reg_move(MachNode* m) {
|
||||
ShouldNotReachHere(); // generic vector operands not supported
|
||||
return false;
|
||||
}
|
||||
@@ -2591,14 +2566,6 @@ uint Matcher::int_pressure_limit()
|
||||
// a high register pressure area of the code so that split_DEF can
|
||||
// generate DefinitionSpillCopy for the derived pointer.
|
||||
uint default_int_pressure_threshold = _NO_SPECIAL_REG32_mask.Size() - 1;
|
||||
if (!PreserveFramePointer) {
|
||||
// When PreserveFramePointer is off, frame pointer is allocatable,
|
||||
// but different from other SOC registers, it is excluded from
|
||||
// fatproj's mask because its save type is No-Save. Decrease 1 to
|
||||
// ensure high pressure at fatproj when PreserveFramePointer is off.
|
||||
// See check_pressure_at_fatproj().
|
||||
default_int_pressure_threshold--;
|
||||
}
|
||||
return (INTPRESSURE == -1) ? default_int_pressure_threshold : INTPRESSURE;
|
||||
}
|
||||
|
||||
@@ -2642,13 +2609,6 @@ const RegMask Matcher::method_handle_invoke_SP_save_mask() {
|
||||
bool size_fits_all_mem_uses(AddPNode* addp, int shift) {
|
||||
for (DUIterator_Fast imax, i = addp->fast_outs(imax); i < imax; i++) {
|
||||
Node* u = addp->fast_out(i);
|
||||
if (u->is_LoadStore()) {
|
||||
// On AArch64, LoadStoreNodes (i.e. compare and swap
|
||||
// instructions) only take register indirect as an operand, so
|
||||
// any attempt to use an AddPNode as an input to a LoadStoreNode
|
||||
// must fail.
|
||||
return false;
|
||||
}
|
||||
if (u->is_Mem()) {
|
||||
int opsize = u->as_Mem()->memory_size();
|
||||
assert(opsize > 0, "unexpected memory operand size");
|
||||
@@ -3828,6 +3788,10 @@ encode %{
|
||||
__ br(Assembler::NE, cont);
|
||||
}
|
||||
|
||||
if (UseBiasedLocking && !UseOptoBiasInlining) {
|
||||
__ biased_locking_enter(box, oop, disp_hdr, tmp, true, cont);
|
||||
}
|
||||
|
||||
// Check for existing monitor
|
||||
__ tbnz(disp_hdr, exact_log2(markWord::monitor_value), object_has_monitor);
|
||||
|
||||
@@ -3898,6 +3862,10 @@ encode %{
|
||||
|
||||
assert_different_registers(oop, box, tmp, disp_hdr);
|
||||
|
||||
if (UseBiasedLocking && !UseOptoBiasInlining) {
|
||||
__ biased_locking_exit(oop, tmp, cont);
|
||||
}
|
||||
|
||||
// Find the lock address and load the displaced header from the stack.
|
||||
__ ldr(disp_hdr, Address(box, BasicLock::displaced_header_offset_in_bytes()));
|
||||
|
||||
@@ -5510,15 +5478,6 @@ operand vRegD_V31()
|
||||
interface(REG_INTER);
|
||||
%}
|
||||
|
||||
operand pReg()
|
||||
%{
|
||||
constraint(ALLOC_IN_RC(pr_reg));
|
||||
match(RegVectMask);
|
||||
op_cost(0);
|
||||
format %{ %}
|
||||
interface(REG_INTER);
|
||||
%}
|
||||
|
||||
operand pRegGov()
|
||||
%{
|
||||
constraint(ALLOC_IN_RC(gov_pr));
|
||||
@@ -8928,6 +8887,11 @@ instruct storePConditional(memory8 heap_top_ptr, iRegP oldval, iRegP newval, rFl
|
||||
ins_pipe(pipe_serial);
|
||||
%}
|
||||
|
||||
|
||||
// storeLConditional is used by PhaseMacroExpand::expand_lock_node
|
||||
// when attempting to rebias a lock towards the current thread. We
|
||||
// must use the acquire form of cmpxchg in order to guarantee acquire
|
||||
// semantics in this case.
|
||||
instruct storeLConditional(indirect mem, iRegLNoSp oldval, iRegLNoSp newval, rFlagsReg cr)
|
||||
%{
|
||||
match(Set cr (StoreLConditional mem (Binary oldval newval)));
|
||||
@@ -14990,12 +14954,12 @@ instruct clearArray_reg_reg(iRegL_R11 cnt, iRegP_R10 base, Universe dummy, rFlag
|
||||
ins_pipe(pipe_class_memory);
|
||||
%}
|
||||
|
||||
instruct clearArray_imm_reg(immL cnt, iRegP_R10 base, iRegL_R11 temp, Universe dummy, rFlagsReg cr)
|
||||
instruct clearArray_imm_reg(immL cnt, iRegP_R10 base, Universe dummy, rFlagsReg cr)
|
||||
%{
|
||||
predicate((uint64_t)n->in(2)->get_long()
|
||||
< (uint64_t)(BlockZeroingLowLimit >> LogBytesPerWord));
|
||||
match(Set dummy (ClearArray cnt base));
|
||||
effect(TEMP temp, USE_KILL base, KILL cr);
|
||||
effect(USE_KILL base);
|
||||
|
||||
ins_cost(4 * INSN_COST);
|
||||
format %{ "ClearArray $cnt, $base" %}
|
||||
@@ -16684,11 +16648,11 @@ instruct string_indexof_conUL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
|
||||
%}
|
||||
|
||||
instruct string_indexof_char(iRegP_R1 str1, iRegI_R2 cnt1, iRegI_R3 ch,
|
||||
iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
|
||||
iRegINoSp tmp3, rFlagsReg cr)
|
||||
iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
|
||||
iRegINoSp tmp3, rFlagsReg cr)
|
||||
%{
|
||||
match(Set result (StrIndexOfChar (Binary str1 cnt1) ch));
|
||||
predicate((UseSVE == 0) && (((StrIndexOfCharNode*)n)->encoding() == StrIntrinsicNode::U));
|
||||
predicate(((StrIndexOfCharNode*)n)->encoding() == StrIntrinsicNode::U);
|
||||
effect(USE_KILL str1, USE_KILL cnt1, USE_KILL ch,
|
||||
TEMP tmp1, TEMP tmp2, TEMP tmp3, KILL cr);
|
||||
|
||||
@@ -16707,7 +16671,7 @@ instruct stringL_indexof_char(iRegP_R1 str1, iRegI_R2 cnt1, iRegI_R3 ch,
|
||||
iRegINoSp tmp3, rFlagsReg cr)
|
||||
%{
|
||||
match(Set result (StrIndexOfChar (Binary str1 cnt1) ch));
|
||||
predicate((UseSVE == 0) && (((StrIndexOfCharNode*)n)->encoding() == StrIntrinsicNode::L));
|
||||
predicate(((StrIndexOfCharNode*)n)->encoding() == StrIntrinsicNode::L);
|
||||
effect(USE_KILL str1, USE_KILL cnt1, USE_KILL ch,
|
||||
TEMP tmp1, TEMP tmp2, TEMP tmp3, KILL cr);
|
||||
|
||||
@@ -16715,8 +16679,8 @@ instruct stringL_indexof_char(iRegP_R1 str1, iRegI_R2 cnt1, iRegI_R3 ch,
|
||||
|
||||
ins_encode %{
|
||||
__ stringL_indexof_char($str1$$Register, $cnt1$$Register, $ch$$Register,
|
||||
$result$$Register, $tmp1$$Register, $tmp2$$Register,
|
||||
$tmp3$$Register);
|
||||
$result$$Register, $tmp1$$Register, $tmp2$$Register,
|
||||
$tmp3$$Register);
|
||||
%}
|
||||
ins_pipe(pipe_class_memory);
|
||||
%}
|
||||
|
||||
@@ -1850,7 +1850,7 @@ instruct vcmpD(vecD dst, vecD src1, vecD src2, immI cond)
|
||||
format %{ "vcmpD $dst, $src1, $src2\t# vector compare " %}
|
||||
ins_cost(INSN_COST);
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
BasicType bt = vector_element_basic_type(this);
|
||||
assert(type2aelembytes(bt) != 8, "not supported");
|
||||
__ neon_compare(as_FloatRegister($dst$$reg), bt, as_FloatRegister($src1$$reg),
|
||||
as_FloatRegister($src2$$reg), (int)$cond$$constant, /*isQ*/ false);
|
||||
@@ -1865,7 +1865,7 @@ instruct vcmpX(vecX dst, vecX src1, vecX src2, immI cond)
|
||||
format %{ "vcmpX $dst, $src1, $src2\t# vector compare " %}
|
||||
ins_cost(INSN_COST);
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
BasicType bt = vector_element_basic_type(this);
|
||||
__ neon_compare(as_FloatRegister($dst$$reg), bt, as_FloatRegister($src1$$reg),
|
||||
as_FloatRegister($src2$$reg), (int)$cond$$constant, /*isQ*/ true);
|
||||
%}
|
||||
@@ -5296,172 +5296,3 @@ instruct vpopcount2I(vecD dst, vecD src) %{
|
||||
%}
|
||||
ins_pipe(pipe_class_default);
|
||||
%}
|
||||
|
||||
// vector mask reductions
|
||||
|
||||
instruct vmask_truecount8B(iRegINoSp dst, vecD src, vecD tmp) %{
|
||||
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
|
||||
match(Set dst (VectorMaskTrueCount src));
|
||||
effect(TEMP tmp);
|
||||
ins_cost(2 * INSN_COST);
|
||||
format %{ "addv $tmp, $src\n\t"
|
||||
"umov $dst, $tmp, B, 0\t# vector (8B)" %}
|
||||
ins_encode %{
|
||||
// Input "src" is a vector of boolean represented as bytes with
|
||||
// 0x00/0x01 as element values.
|
||||
__ addv(as_FloatRegister($tmp$$reg), __ T8B, as_FloatRegister($src$$reg));
|
||||
__ umov($dst$$Register, as_FloatRegister($tmp$$reg), __ B, 0);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmask_truecount16B(iRegINoSp dst, vecX src, vecX tmp) %{
|
||||
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
|
||||
match(Set dst (VectorMaskTrueCount src));
|
||||
effect(TEMP tmp);
|
||||
ins_cost(2 * INSN_COST);
|
||||
format %{ "addv $tmp, $src\n\t"
|
||||
"umov $dst, $tmp, B, 0\t# vector (16B)" %}
|
||||
ins_encode %{
|
||||
// Input "src" is a vector of boolean represented as bytes with
|
||||
// 0x00/0x01 as element values.
|
||||
__ addv(as_FloatRegister($tmp$$reg), __ T16B, as_FloatRegister($src$$reg));
|
||||
__ umov($dst$$Register, as_FloatRegister($tmp$$reg), __ B, 0);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmask_firsttrue_LT8B(iRegINoSp dst, vecD src, rFlagsReg cr) %{
|
||||
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN &&
|
||||
n->in(1)->bottom_type()->is_vect()->length() < 8);
|
||||
match(Set dst (VectorMaskFirstTrue src));
|
||||
effect(KILL cr);
|
||||
ins_cost(7 * INSN_COST);
|
||||
format %{ "vmask_firsttrue $dst, $src\t# vector (4I/4S/2I)" %}
|
||||
ins_encode %{
|
||||
// Returns the index of the first active lane of the
|
||||
// vector mask, or VLENGTH if no lane is active.
|
||||
//
|
||||
// Input "src" is a vector of boolean represented as
|
||||
// bytes with 0x00/0x01 as element values.
|
||||
//
|
||||
// Computed by reversing the bits and counting the leading
|
||||
// zero bytes.
|
||||
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
|
||||
__ rbit($dst$$Register, $dst$$Register);
|
||||
__ clz($dst$$Register, $dst$$Register);
|
||||
__ lsrw($dst$$Register, $dst$$Register, 3);
|
||||
__ movw(rscratch1, Matcher::vector_length(this, $src));
|
||||
__ cmpw($dst$$Register, rscratch1);
|
||||
__ cselw($dst$$Register, rscratch1, $dst$$Register, Assembler::GE);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmask_firsttrue8B(iRegINoSp dst, vecD src) %{
|
||||
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN &&
|
||||
n->in(1)->bottom_type()->is_vect()->length() == 8);
|
||||
match(Set dst (VectorMaskFirstTrue src));
|
||||
ins_cost(4 * INSN_COST);
|
||||
format %{ "vmask_firsttrue $dst, $src\t# vector (8B)" %}
|
||||
ins_encode %{
|
||||
// Returns the index of the first active lane of the
|
||||
// vector mask, or VLENGTH if no lane is active.
|
||||
//
|
||||
// Input "src" is a vector of boolean represented as
|
||||
// bytes with 0x00/0x01 as element values.
|
||||
//
|
||||
// Computed by reversing the bits and counting the leading
|
||||
// zero bytes.
|
||||
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
|
||||
__ rbit($dst$$Register, $dst$$Register);
|
||||
__ clz($dst$$Register, $dst$$Register);
|
||||
__ lsrw($dst$$Register, $dst$$Register, 3);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmask_firsttrue16B(iRegINoSp dst, vecX src) %{
|
||||
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
|
||||
match(Set dst (VectorMaskFirstTrue src));
|
||||
ins_cost(6 * INSN_COST);
|
||||
format %{ "vmask_firsttrue $dst, $src\t# vector (16B)" %}
|
||||
ins_encode %{
|
||||
// Returns the index of the first active lane of the
|
||||
// vector mask, or 16 (VLENGTH) if no lane is active.
|
||||
//
|
||||
// Input "src" is a vector of boolean represented as
|
||||
// bytes with 0x00/0x01 as element values.
|
||||
|
||||
Label FIRST_TRUE_INDEX;
|
||||
|
||||
// Try to compute the result from lower 64 bits.
|
||||
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
|
||||
__ movw(rscratch1, zr);
|
||||
__ cbnz($dst$$Register, FIRST_TRUE_INDEX);
|
||||
|
||||
// Compute the result from the higher 64 bits.
|
||||
__ fmovhid($dst$$Register, as_FloatRegister($src$$reg));
|
||||
__ movw(rscratch1, 8);
|
||||
|
||||
// Reverse the bits and count the leading zero bytes.
|
||||
__ bind(FIRST_TRUE_INDEX);
|
||||
__ rbit($dst$$Register, $dst$$Register);
|
||||
__ clz($dst$$Register, $dst$$Register);
|
||||
__ addw($dst$$Register, rscratch1, $dst$$Register, Assembler::LSR, 3);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmask_lasttrue8B(iRegINoSp dst, vecD src) %{
|
||||
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
|
||||
match(Set dst (VectorMaskLastTrue src));
|
||||
ins_cost(4 * INSN_COST);
|
||||
format %{ "vmask_lasttrue $dst, $src\t# vector (8B)" %}
|
||||
ins_encode %{
|
||||
// Returns the index of the last active lane of the
|
||||
// vector mask, or -1 if no lane is active.
|
||||
//
|
||||
// Input "src" is a vector of boolean represented as
|
||||
// bytes with 0x00/0x01 as element values.
|
||||
//
|
||||
// Computed by counting the leading zero bytes and
|
||||
// substracting it by 7 (VLENGTH - 1).
|
||||
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
|
||||
__ clz($dst$$Register, $dst$$Register);
|
||||
__ movw(rscratch1, 7);
|
||||
__ subw($dst$$Register, rscratch1, $dst$$Register, Assembler::LSR, 3);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmask_lasttrue16B(iRegINoSp dst, vecX src) %{
|
||||
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
|
||||
match(Set dst (VectorMaskLastTrue src));
|
||||
ins_cost(5 * INSN_COST);
|
||||
format %{ "vmask_lasttrue $dst, $src\t# vector (16B)" %}
|
||||
ins_encode %{
|
||||
// Returns the index of the last active lane of the
|
||||
// vector mask, or -1 if no lane is active.
|
||||
//
|
||||
// Input "src" is a vector of boolean represented as
|
||||
// bytes with 0x00/0x01 as element values.
|
||||
|
||||
Label LAST_TRUE_INDEX;
|
||||
|
||||
// Try to compute the result from higher 64 bits.
|
||||
__ fmovhid($dst$$Register, as_FloatRegister($src$$reg));
|
||||
__ movw(rscratch1, 16 - 1);
|
||||
__ cbnz($dst$$Register, LAST_TRUE_INDEX);
|
||||
|
||||
// Compute the result from the lower 64 bits.
|
||||
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
|
||||
__ movw(rscratch1, 8 - 1);
|
||||
|
||||
// Count the leading zero bytes and substract it by 15 (VLENGTH - 1).
|
||||
__ bind(LAST_TRUE_INDEX);
|
||||
__ clz($dst$$Register, $dst$$Register);
|
||||
__ subw($dst$$Register, rscratch1, $dst$$Register, Assembler::LSR, 3);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
@@ -872,7 +872,7 @@ instruct vcmpD(vecD dst, vecD src1, vecD src2, immI cond)
|
||||
format %{ "vcmpD $dst, $src1, $src2\t# vector compare " %}
|
||||
ins_cost(INSN_COST);
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
BasicType bt = vector_element_basic_type(this);
|
||||
assert(type2aelembytes(bt) != 8, "not supported");
|
||||
__ neon_compare(as_FloatRegister($dst$$reg), bt, as_FloatRegister($src1$$reg),
|
||||
as_FloatRegister($src2$$reg), (int)$cond$$constant, /*isQ*/ false);
|
||||
@@ -887,7 +887,7 @@ instruct vcmpX(vecX dst, vecX src1, vecX src2, immI cond)
|
||||
format %{ "vcmpX $dst, $src1, $src2\t# vector compare " %}
|
||||
ins_cost(INSN_COST);
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
BasicType bt = vector_element_basic_type(this);
|
||||
__ neon_compare(as_FloatRegister($dst$$reg), bt, as_FloatRegister($src1$$reg),
|
||||
as_FloatRegister($src2$$reg), (int)$cond$$constant, /*isQ*/ true);
|
||||
%}
|
||||
@@ -2243,151 +2243,3 @@ instruct vpopcount$1$2`'(vec$5 dst, vec$5 src) %{
|
||||
dnl $1 $2 $3 $4 $5
|
||||
VPOPCOUNT(4, I, 16, 8, X)
|
||||
VPOPCOUNT(2, I, 8, 4, D)
|
||||
dnl
|
||||
dnl VMASK_TRUECOUNT($1, $2 )
|
||||
dnl VMASK_TRUECOUNT(suffix, reg)
|
||||
define(`VMASK_TRUECOUNT', `
|
||||
instruct vmask_truecount$1(iRegINoSp dst, $2 src, $2 tmp) %{
|
||||
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
|
||||
match(Set dst (VectorMaskTrueCount src));
|
||||
effect(TEMP tmp);
|
||||
ins_cost(2 * INSN_COST);
|
||||
format %{ "addv $tmp, $src\n\t"
|
||||
"umov $dst, $tmp, B, 0\t# vector ($1)" %}
|
||||
ins_encode %{
|
||||
// Input "src" is a vector of boolean represented as bytes with
|
||||
// 0x00/0x01 as element values.
|
||||
__ addv(as_FloatRegister($tmp$$reg), __ T$1, as_FloatRegister($src$$reg));
|
||||
__ umov($dst$$Register, as_FloatRegister($tmp$$reg), __ B, 0);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}')dnl
|
||||
dnl
|
||||
dnl
|
||||
define(`ARGLIST',
|
||||
`ifelse($1, `_LT8B', `iRegINoSp dst, vecD src, rFlagsReg cr', `iRegINoSp dst, vecD src')')
|
||||
dnl
|
||||
dnl VMASK_FIRSTTRUE_D($1, $2, $3, $4 )
|
||||
dnl VMASK_FIRSTTRUE_D(suffix, cond, cost, size)
|
||||
define(`VMASK_FIRSTTRUE_D', `
|
||||
instruct vmask_firsttrue$1(ARGLIST($1)) %{
|
||||
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN &&
|
||||
n->in(1)->bottom_type()->is_vect()->length() $2 8);
|
||||
match(Set dst (VectorMaskFirstTrue src));dnl
|
||||
ifelse($1, `_LT8B', `
|
||||
effect(KILL cr);')
|
||||
ins_cost($3 * INSN_COST);
|
||||
format %{ "vmask_firsttrue $dst, $src\t# vector ($4)" %}
|
||||
ins_encode %{
|
||||
// Returns the index of the first active lane of the
|
||||
// vector mask, or VLENGTH if no lane is active.
|
||||
//
|
||||
// Input "src" is a vector of boolean represented as
|
||||
// bytes with 0x00/0x01 as element values.
|
||||
//
|
||||
// Computed by reversing the bits and counting the leading
|
||||
// zero bytes.
|
||||
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
|
||||
__ rbit($dst$$Register, $dst$$Register);
|
||||
__ clz($dst$$Register, $dst$$Register);
|
||||
__ lsrw($dst$$Register, $dst$$Register, 3);dnl
|
||||
ifelse(`$1', `_LT8B', `
|
||||
__ movw(rscratch1, Matcher::vector_length(this, $src));
|
||||
__ cmpw($dst$$Register, rscratch1);
|
||||
__ cselw($dst$$Register, rscratch1, $dst$$Register, Assembler::GE);')
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}')dnl
|
||||
dnl
|
||||
undefine(ARGLIST)dnl
|
||||
dnl
|
||||
// vector mask reductions
|
||||
VMASK_TRUECOUNT(8B, vecD)
|
||||
VMASK_TRUECOUNT(16B, vecX)
|
||||
VMASK_FIRSTTRUE_D(_LT8B, <, 7, 4I/4S/2I)
|
||||
VMASK_FIRSTTRUE_D(8B, ==, 4, 8B)
|
||||
|
||||
instruct vmask_firsttrue16B(iRegINoSp dst, vecX src) %{
|
||||
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
|
||||
match(Set dst (VectorMaskFirstTrue src));
|
||||
ins_cost(6 * INSN_COST);
|
||||
format %{ "vmask_firsttrue $dst, $src\t# vector (16B)" %}
|
||||
ins_encode %{
|
||||
// Returns the index of the first active lane of the
|
||||
// vector mask, or 16 (VLENGTH) if no lane is active.
|
||||
//
|
||||
// Input "src" is a vector of boolean represented as
|
||||
// bytes with 0x00/0x01 as element values.
|
||||
|
||||
Label FIRST_TRUE_INDEX;
|
||||
|
||||
// Try to compute the result from lower 64 bits.
|
||||
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
|
||||
__ movw(rscratch1, zr);
|
||||
__ cbnz($dst$$Register, FIRST_TRUE_INDEX);
|
||||
|
||||
// Compute the result from the higher 64 bits.
|
||||
__ fmovhid($dst$$Register, as_FloatRegister($src$$reg));
|
||||
__ movw(rscratch1, 8);
|
||||
|
||||
// Reverse the bits and count the leading zero bytes.
|
||||
__ bind(FIRST_TRUE_INDEX);
|
||||
__ rbit($dst$$Register, $dst$$Register);
|
||||
__ clz($dst$$Register, $dst$$Register);
|
||||
__ addw($dst$$Register, rscratch1, $dst$$Register, Assembler::LSR, 3);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmask_lasttrue8B(iRegINoSp dst, vecD src) %{
|
||||
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
|
||||
match(Set dst (VectorMaskLastTrue src));
|
||||
ins_cost(4 * INSN_COST);
|
||||
format %{ "vmask_lasttrue $dst, $src\t# vector (8B)" %}
|
||||
ins_encode %{
|
||||
// Returns the index of the last active lane of the
|
||||
// vector mask, or -1 if no lane is active.
|
||||
//
|
||||
// Input "src" is a vector of boolean represented as
|
||||
// bytes with 0x00/0x01 as element values.
|
||||
//
|
||||
// Computed by counting the leading zero bytes and
|
||||
// substracting it by 7 (VLENGTH - 1).
|
||||
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
|
||||
__ clz($dst$$Register, $dst$$Register);
|
||||
__ movw(rscratch1, 7);
|
||||
__ subw($dst$$Register, rscratch1, $dst$$Register, Assembler::LSR, 3);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmask_lasttrue16B(iRegINoSp dst, vecX src) %{
|
||||
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
|
||||
match(Set dst (VectorMaskLastTrue src));
|
||||
ins_cost(5 * INSN_COST);
|
||||
format %{ "vmask_lasttrue $dst, $src\t# vector (16B)" %}
|
||||
ins_encode %{
|
||||
// Returns the index of the last active lane of the
|
||||
// vector mask, or -1 if no lane is active.
|
||||
//
|
||||
// Input "src" is a vector of boolean represented as
|
||||
// bytes with 0x00/0x01 as element values.
|
||||
|
||||
Label LAST_TRUE_INDEX;
|
||||
|
||||
// Try to compute the result from higher 64 bits.
|
||||
__ fmovhid($dst$$Register, as_FloatRegister($src$$reg));
|
||||
__ movw(rscratch1, 16 - 1);
|
||||
__ cbnz($dst$$Register, LAST_TRUE_INDEX);
|
||||
|
||||
// Compute the result from the lower 64 bits.
|
||||
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
|
||||
__ movw(rscratch1, 8 - 1);
|
||||
|
||||
// Count the leading zero bytes and substract it by 15 (VLENGTH - 1).
|
||||
__ bind(LAST_TRUE_INDEX);
|
||||
__ clz($dst$$Register, $dst$$Register);
|
||||
__ subw($dst$$Register, rscratch1, $dst$$Register, Assembler::LSR, 3);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
@@ -87,6 +87,18 @@ source_hpp %{
|
||||
%}
|
||||
|
||||
source %{
|
||||
static inline BasicType vector_element_basic_type(const MachNode* n) {
|
||||
const TypeVect* vt = n->bottom_type()->is_vect();
|
||||
return vt->element_basic_type();
|
||||
}
|
||||
|
||||
static inline BasicType vector_element_basic_type(const MachNode* use, const MachOper* opnd) {
|
||||
int def_idx = use->operand_index(opnd);
|
||||
Node* def = use->in(def_idx);
|
||||
const TypeVect* vt = def->bottom_type()->is_vect();
|
||||
return vt->element_basic_type();
|
||||
}
|
||||
|
||||
static Assembler::SIMD_RegVariant elemBytes_to_regVariant(int esize) {
|
||||
switch(esize) {
|
||||
case 1:
|
||||
@@ -191,9 +203,6 @@ source %{
|
||||
case Op_VectorReinterpret:
|
||||
case Op_VectorStoreMask:
|
||||
case Op_VectorTest:
|
||||
case Op_VectorMaskTrueCount:
|
||||
case Op_VectorMaskLastTrue:
|
||||
case Op_VectorMaskFirstTrue:
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
@@ -219,7 +228,7 @@ instruct loadV(vReg dst, vmemA mem) %{
|
||||
ins_encode %{
|
||||
FloatRegister dst_reg = as_FloatRegister($dst$$reg);
|
||||
loadStoreA_predicate(C2_MacroAssembler(&cbuf), false, dst_reg, ptrue,
|
||||
Matcher::vector_element_basic_type(this), $mem->opcode(),
|
||||
vector_element_basic_type(this), $mem->opcode(),
|
||||
as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
@@ -233,7 +242,7 @@ instruct storeV(vReg src, vmemA mem) %{
|
||||
ins_encode %{
|
||||
FloatRegister src_reg = as_FloatRegister($src$$reg);
|
||||
loadStoreA_predicate(C2_MacroAssembler(&cbuf), true, src_reg, ptrue,
|
||||
Matcher::vector_element_basic_type(this, $src), $mem->opcode(),
|
||||
vector_element_basic_type(this, $src), $mem->opcode(),
|
||||
as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
@@ -538,7 +547,7 @@ instruct vmin(vReg dst_src1, vReg src2) %{
|
||||
ins_cost(SVE_COST);
|
||||
format %{ "sve_min $dst_src1, $dst_src1, $src2\t # vector (sve)" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
BasicType bt = vector_element_basic_type(this);
|
||||
Assembler::SIMD_RegVariant size = elemType_to_regVariant(bt);
|
||||
if (is_floating_point_type(bt)) {
|
||||
__ sve_fmin(as_FloatRegister($dst_src1$$reg), size,
|
||||
@@ -558,7 +567,7 @@ instruct vmax(vReg dst_src1, vReg src2) %{
|
||||
ins_cost(SVE_COST);
|
||||
format %{ "sve_max $dst_src1, $dst_src1, $src2\t # vector (sve)" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
BasicType bt = vector_element_basic_type(this);
|
||||
Assembler::SIMD_RegVariant size = elemType_to_regVariant(bt);
|
||||
if (is_floating_point_type(bt)) {
|
||||
__ sve_fmax(as_FloatRegister($dst_src1$$reg), size,
|
||||
@@ -1766,42 +1775,3 @@ instruct vmaskcast(vReg dst) %{
|
||||
ins_pipe(pipe_class_empty);
|
||||
%}
|
||||
|
||||
// Intrisics for String.indexOf(char)
|
||||
|
||||
|
||||
instruct stringL_indexof_char_sve(iRegP_R1 str1, iRegI_R2 cnt1, iRegI_R3 ch,
|
||||
iRegI_R0 result, vReg ztmp1, vReg ztmp2,
|
||||
pRegGov pgtmp, pReg ptmp, rFlagsReg cr)
|
||||
%{
|
||||
match(Set result (StrIndexOfChar (Binary str1 cnt1) ch));
|
||||
predicate((UseSVE > 0) && (((StrIndexOfCharNode*)n)->encoding() == StrIntrinsicNode::L));
|
||||
effect(TEMP ztmp1, TEMP ztmp2, TEMP pgtmp, TEMP ptmp, KILL cr);
|
||||
|
||||
format %{ "StringLatin1 IndexOf char[] $str1,$cnt1,$ch -> $result # use sve" %}
|
||||
|
||||
ins_encode %{
|
||||
__ string_indexof_char_sve($str1$$Register, $cnt1$$Register, $ch$$Register, $result$$Register,
|
||||
as_FloatRegister($ztmp1$$reg), as_FloatRegister($ztmp2$$reg),
|
||||
as_PRegister($pgtmp$$reg), as_PRegister($ptmp$$reg), true /* isL */);
|
||||
%}
|
||||
ins_pipe(pipe_class_memory);
|
||||
%}
|
||||
|
||||
instruct stringU_indexof_char_sve(iRegP_R1 str1, iRegI_R2 cnt1, iRegI_R3 ch,
|
||||
iRegI_R0 result, vReg ztmp1, vReg ztmp2,
|
||||
pRegGov pgtmp, pReg ptmp, rFlagsReg cr)
|
||||
%{
|
||||
match(Set result (StrIndexOfChar (Binary str1 cnt1) ch));
|
||||
predicate((UseSVE > 0) && (((StrIndexOfCharNode*)n)->encoding() == StrIntrinsicNode::U));
|
||||
effect(TEMP ztmp1, TEMP ztmp2, TEMP pgtmp, TEMP ptmp, KILL cr);
|
||||
|
||||
format %{ "StringUTF16 IndexOf char[] $str1,$cnt1,$ch -> $result # use sve" %}
|
||||
|
||||
ins_encode %{
|
||||
__ string_indexof_char_sve($str1$$Register, $cnt1$$Register, $ch$$Register, $result$$Register,
|
||||
as_FloatRegister($ztmp1$$reg), as_FloatRegister($ztmp2$$reg),
|
||||
as_PRegister($pgtmp$$reg), as_PRegister($ptmp$$reg), false /* isL */);
|
||||
%}
|
||||
ins_pipe(pipe_class_memory);
|
||||
%}
|
||||
|
||||
|
||||
@@ -74,6 +74,18 @@ source_hpp %{
|
||||
%}
|
||||
|
||||
source %{
|
||||
static inline BasicType vector_element_basic_type(const MachNode* n) {
|
||||
const TypeVect* vt = n->bottom_type()->is_vect();
|
||||
return vt->element_basic_type();
|
||||
}
|
||||
|
||||
static inline BasicType vector_element_basic_type(const MachNode* use, const MachOper* opnd) {
|
||||
int def_idx = use->operand_index(opnd);
|
||||
Node* def = use->in(def_idx);
|
||||
const TypeVect* vt = def->bottom_type()->is_vect();
|
||||
return vt->element_basic_type();
|
||||
}
|
||||
|
||||
static Assembler::SIMD_RegVariant elemBytes_to_regVariant(int esize) {
|
||||
switch(esize) {
|
||||
case 1:
|
||||
@@ -178,9 +190,6 @@ source %{
|
||||
case Op_VectorReinterpret:
|
||||
case Op_VectorStoreMask:
|
||||
case Op_VectorTest:
|
||||
case Op_VectorMaskTrueCount:
|
||||
case Op_VectorMaskLastTrue:
|
||||
case Op_VectorMaskFirstTrue:
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
@@ -214,7 +223,7 @@ instruct loadV(vReg dst, vmemA mem) %{
|
||||
ins_encode %{
|
||||
FloatRegister dst_reg = as_FloatRegister($dst$$reg);
|
||||
loadStoreA_predicate(C2_MacroAssembler(&cbuf), false, dst_reg, ptrue,
|
||||
Matcher::vector_element_basic_type(this), $mem->opcode(),
|
||||
vector_element_basic_type(this), $mem->opcode(),
|
||||
as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
@@ -228,7 +237,7 @@ instruct storeV(vReg src, vmemA mem) %{
|
||||
ins_encode %{
|
||||
FloatRegister src_reg = as_FloatRegister($src$$reg);
|
||||
loadStoreA_predicate(C2_MacroAssembler(&cbuf), true, src_reg, ptrue,
|
||||
Matcher::vector_element_basic_type(this, $src), $mem->opcode(),
|
||||
vector_element_basic_type(this, $src), $mem->opcode(),
|
||||
as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
@@ -386,7 +395,7 @@ instruct vmin(vReg dst_src1, vReg src2) %{
|
||||
ins_cost(SVE_COST);
|
||||
format %{ "sve_min $dst_src1, $dst_src1, $src2\t # vector (sve)" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
BasicType bt = vector_element_basic_type(this);
|
||||
Assembler::SIMD_RegVariant size = elemType_to_regVariant(bt);
|
||||
if (is_floating_point_type(bt)) {
|
||||
__ sve_fmin(as_FloatRegister($dst_src1$$reg), size,
|
||||
@@ -406,7 +415,7 @@ instruct vmax(vReg dst_src1, vReg src2) %{
|
||||
ins_cost(SVE_COST);
|
||||
format %{ "sve_max $dst_src1, $dst_src1, $src2\t # vector (sve)" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
BasicType bt = vector_element_basic_type(this);
|
||||
Assembler::SIMD_RegVariant size = elemType_to_regVariant(bt);
|
||||
if (is_floating_point_type(bt)) {
|
||||
__ sve_fmax(as_FloatRegister($dst_src1$$reg), size,
|
||||
@@ -910,29 +919,3 @@ instruct vmaskcast(vReg dst) %{
|
||||
ins_pipe(pipe_class_empty);
|
||||
%}
|
||||
|
||||
// Intrisics for String.indexOf(char)
|
||||
|
||||
dnl
|
||||
define(`STRING_INDEXOF_CHAR', `
|
||||
instruct string$1_indexof_char_sve(iRegP_R1 str1, iRegI_R2 cnt1, iRegI_R3 ch,
|
||||
iRegI_R0 result, vReg ztmp1, vReg ztmp2,
|
||||
pRegGov pgtmp, pReg ptmp, rFlagsReg cr)
|
||||
%{
|
||||
match(Set result (StrIndexOfChar (Binary str1 cnt1) ch));
|
||||
predicate((UseSVE > 0) && (((StrIndexOfCharNode*)n)->encoding() == StrIntrinsicNode::$1));
|
||||
effect(TEMP ztmp1, TEMP ztmp2, TEMP pgtmp, TEMP ptmp, KILL cr);
|
||||
|
||||
format %{ "String$2 IndexOf char[] $str1,$cnt1,$ch -> $result # use sve" %}
|
||||
|
||||
ins_encode %{
|
||||
__ string_indexof_char_sve($str1$$Register, $cnt1$$Register, $ch$$Register, $result$$Register,
|
||||
as_FloatRegister($ztmp1$$reg), as_FloatRegister($ztmp2$$reg),
|
||||
as_PRegister($pgtmp$$reg), as_PRegister($ptmp$$reg), $3 /* isL */);
|
||||
%}
|
||||
ins_pipe(pipe_class_memory);
|
||||
%}')dnl
|
||||
dnl $1 $2 $3
|
||||
STRING_INDEXOF_CHAR(L, Latin1, true)
|
||||
STRING_INDEXOF_CHAR(U, UTF16, false)
|
||||
dnl
|
||||
|
||||
|
||||
@@ -134,16 +134,7 @@ void Assembler::adrp(Register reg1, const Address &dest, uint64_t &byte_offset)
|
||||
|
||||
#undef __
|
||||
|
||||
#define starti Instruction_aarch64 current_insn(this);
|
||||
|
||||
#define f current_insn.f
|
||||
#define sf current_insn.sf
|
||||
#define rf current_insn.rf
|
||||
#define srf current_insn.srf
|
||||
#define zrf current_insn.zrf
|
||||
#define prf current_insn.prf
|
||||
#define pgrf current_insn.pgrf
|
||||
#define fixed current_insn.fixed
|
||||
#define starti Instruction_aarch64 do_not_use(this); set_current(&do_not_use)
|
||||
|
||||
void Assembler::adr(Register Rd, address adr) {
|
||||
intptr_t offset = adr - pc();
|
||||
@@ -165,53 +156,6 @@ void Assembler::adrp(Register reg1, const Address &dest, uint64_t &byte_offset)
|
||||
rf(Rd, 0);
|
||||
}
|
||||
|
||||
// An "all-purpose" add/subtract immediate, per ARM documentation:
|
||||
// A "programmer-friendly" assembler may accept a negative immediate
|
||||
// between -(2^24 -1) and -1 inclusive, causing it to convert a
|
||||
// requested ADD operation to a SUB, or vice versa, and then encode
|
||||
// the absolute value of the immediate as for uimm24.
|
||||
void Assembler::add_sub_immediate(Instruction_aarch64 ¤t_insn,
|
||||
Register Rd, Register Rn, unsigned uimm, int op,
|
||||
int negated_op) {
|
||||
bool sets_flags = op & 1; // this op sets flags
|
||||
union {
|
||||
unsigned u;
|
||||
int imm;
|
||||
};
|
||||
u = uimm;
|
||||
bool shift = false;
|
||||
bool neg = imm < 0;
|
||||
if (neg) {
|
||||
imm = -imm;
|
||||
op = negated_op;
|
||||
}
|
||||
assert(Rd != sp || imm % 16 == 0, "misaligned stack");
|
||||
if (imm >= (1 << 11)
|
||||
&& ((imm >> 12) << 12 == imm)) {
|
||||
imm >>= 12;
|
||||
shift = true;
|
||||
}
|
||||
f(op, 31, 29), f(0b10001, 28, 24), f(shift, 23, 22), f(imm, 21, 10);
|
||||
|
||||
// add/subtract immediate ops with the S bit set treat r31 as zr;
|
||||
// with S unset they use sp.
|
||||
if (sets_flags)
|
||||
zrf(Rd, 0);
|
||||
else
|
||||
srf(Rd, 0);
|
||||
|
||||
srf(Rn, 5);
|
||||
}
|
||||
|
||||
#undef f
|
||||
#undef sf
|
||||
#undef rf
|
||||
#undef srf
|
||||
#undef zrf
|
||||
#undef prf
|
||||
#undef pgrf
|
||||
#undef fixed
|
||||
|
||||
#undef starti
|
||||
|
||||
Address::Address(address target, relocInfo::relocType rtype) : _mode(literal){
|
||||
@@ -316,6 +260,43 @@ void Assembler::wrap_label(Label &L, prfop op, prefetch_insn insn) {
|
||||
}
|
||||
}
|
||||
|
||||
// An "all-purpose" add/subtract immediate, per ARM documentation:
|
||||
// A "programmer-friendly" assembler may accept a negative immediate
|
||||
// between -(2^24 -1) and -1 inclusive, causing it to convert a
|
||||
// requested ADD operation to a SUB, or vice versa, and then encode
|
||||
// the absolute value of the immediate as for uimm24.
|
||||
void Assembler::add_sub_immediate(Register Rd, Register Rn, unsigned uimm, int op,
|
||||
int negated_op) {
|
||||
bool sets_flags = op & 1; // this op sets flags
|
||||
union {
|
||||
unsigned u;
|
||||
int imm;
|
||||
};
|
||||
u = uimm;
|
||||
bool shift = false;
|
||||
bool neg = imm < 0;
|
||||
if (neg) {
|
||||
imm = -imm;
|
||||
op = negated_op;
|
||||
}
|
||||
assert(Rd != sp || imm % 16 == 0, "misaligned stack");
|
||||
if (imm >= (1 << 11)
|
||||
&& ((imm >> 12) << 12 == imm)) {
|
||||
imm >>= 12;
|
||||
shift = true;
|
||||
}
|
||||
f(op, 31, 29), f(0b10001, 28, 24), f(shift, 23, 22), f(imm, 21, 10);
|
||||
|
||||
// add/subtract immediate ops with the S bit set treat r31 as zr;
|
||||
// with S unset they use sp.
|
||||
if (sets_flags)
|
||||
zrf(Rd, 0);
|
||||
else
|
||||
srf(Rd, 0);
|
||||
|
||||
srf(Rn, 5);
|
||||
}
|
||||
|
||||
bool Assembler::operand_valid_for_add_sub_immediate(int64_t imm) {
|
||||
bool shift = false;
|
||||
uint64_t uimm = (uint64_t)uabs((jlong)imm);
|
||||
|
||||
@@ -247,12 +247,12 @@ public:
|
||||
int nbits = msb - lsb + 1;
|
||||
guarantee(val < (1ULL << nbits), "Field too big for insn");
|
||||
assert_cond(msb >= lsb);
|
||||
val <<= lsb;
|
||||
insn |= val;
|
||||
#ifdef ASSERT
|
||||
unsigned mask = checked_cast<unsigned>(right_n_bits(nbits));
|
||||
val <<= lsb;
|
||||
mask <<= lsb;
|
||||
insn |= val;
|
||||
assert_cond((bits & mask) == 0);
|
||||
#ifdef ASSERT
|
||||
bits |= mask;
|
||||
#endif
|
||||
}
|
||||
@@ -313,7 +313,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#define starti Instruction_aarch64 current_insn(this);
|
||||
#define starti Instruction_aarch64 do_not_use(this); set_current(&do_not_use)
|
||||
|
||||
class PrePost {
|
||||
int _offset;
|
||||
@@ -694,14 +694,46 @@ public:
|
||||
|
||||
static address locate_next_instruction(address inst);
|
||||
|
||||
#define f current_insn.f
|
||||
#define sf current_insn.sf
|
||||
#define rf current_insn.rf
|
||||
#define srf current_insn.srf
|
||||
#define zrf current_insn.zrf
|
||||
#define prf current_insn.prf
|
||||
#define pgrf current_insn.pgrf
|
||||
#define fixed current_insn.fixed
|
||||
Instruction_aarch64* current;
|
||||
|
||||
void set_current(Instruction_aarch64* i) { current = i; }
|
||||
|
||||
void f(unsigned val, int msb, int lsb) {
|
||||
current->f(val, msb, lsb);
|
||||
}
|
||||
void f(unsigned val, int msb) {
|
||||
current->f(val, msb, msb);
|
||||
}
|
||||
void sf(int64_t val, int msb, int lsb) {
|
||||
current->sf(val, msb, lsb);
|
||||
}
|
||||
void rf(Register reg, int lsb) {
|
||||
current->rf(reg, lsb);
|
||||
}
|
||||
void srf(Register reg, int lsb) {
|
||||
current->srf(reg, lsb);
|
||||
}
|
||||
void zrf(Register reg, int lsb) {
|
||||
current->zrf(reg, lsb);
|
||||
}
|
||||
void rf(FloatRegister reg, int lsb) {
|
||||
current->rf(reg, lsb);
|
||||
}
|
||||
void prf(PRegister reg, int lsb) {
|
||||
current->prf(reg, lsb);
|
||||
}
|
||||
void pgrf(PRegister reg, int lsb) {
|
||||
current->pgrf(reg, lsb);
|
||||
}
|
||||
void fixed(unsigned value, unsigned mask) {
|
||||
current->fixed(value, mask);
|
||||
}
|
||||
|
||||
void emit() {
|
||||
emit_long(current->get_insn());
|
||||
assert_cond(current->get_bits() == 0xffffffff);
|
||||
current = NULL;
|
||||
}
|
||||
|
||||
typedef void (Assembler::* uncond_branch_insn)(address dest);
|
||||
typedef void (Assembler::* compare_and_branch_insn)(Register Rt, address dest);
|
||||
@@ -732,8 +764,8 @@ public:
|
||||
|
||||
#undef INSN
|
||||
|
||||
void add_sub_immediate(Instruction_aarch64 ¤t_insn, Register Rd, Register Rn,
|
||||
unsigned uimm, int op, int negated_op);
|
||||
void add_sub_immediate(Register Rd, Register Rn, unsigned uimm, int op,
|
||||
int negated_op);
|
||||
|
||||
// Add/subtract (immediate)
|
||||
#define INSN(NAME, decode, negated) \
|
||||
@@ -745,7 +777,7 @@ public:
|
||||
\
|
||||
void NAME(Register Rd, Register Rn, unsigned imm) { \
|
||||
starti; \
|
||||
add_sub_immediate(current_insn, Rd, Rn, imm, decode, negated); \
|
||||
add_sub_immediate(Rd, Rn, imm, decode, negated); \
|
||||
}
|
||||
|
||||
INSN(addsw, 0b001, 0b011);
|
||||
@@ -758,7 +790,7 @@ public:
|
||||
#define INSN(NAME, decode, negated) \
|
||||
void NAME(Register Rd, Register Rn, unsigned imm) { \
|
||||
starti; \
|
||||
add_sub_immediate(current_insn, Rd, Rn, imm, decode, negated); \
|
||||
add_sub_immediate(Rd, Rn, imm, decode, negated); \
|
||||
}
|
||||
|
||||
INSN(addw, 0b000, 0b010);
|
||||
@@ -1060,7 +1092,7 @@ public:
|
||||
}
|
||||
|
||||
void sys(int op1, int CRn, int CRm, int op2,
|
||||
Register rt = as_Register(0b11111)) {
|
||||
Register rt = (Register)0b11111) {
|
||||
system(0b01, op1, CRn, CRm, op2, rt);
|
||||
}
|
||||
|
||||
@@ -1329,7 +1361,7 @@ public:
|
||||
starti; \
|
||||
f(opc, 31, 30), f(0b011, 29, 27), f(V, 26), f(0b00, 25, 24), \
|
||||
sf(offset, 23, 5); \
|
||||
rf(as_Register(Rt), 0); \
|
||||
rf((Register)Rt, 0); \
|
||||
}
|
||||
|
||||
INSN(ldrs, 0b00, 1);
|
||||
@@ -1343,7 +1375,7 @@ public:
|
||||
starti; \
|
||||
f(size, 31, 30), f(0b111100, 29, 24), f(opc, 23, 22), f(0, 21); \
|
||||
f(0, 20, 12), f(0b01, 11, 10); \
|
||||
rf(Rn, 5), rf(as_Register(Rt), 0); \
|
||||
rf(Rn, 5), rf((Register)Rt, 0); \
|
||||
}
|
||||
|
||||
INSN(ldrs, 0b10, 0b01);
|
||||
@@ -1376,9 +1408,9 @@ public:
|
||||
f(opc, 31, 30), f(p1, 29, 27), f(V, 26), f(L, 22);
|
||||
zrf(Rt2, 10), zrf(Rt1, 0);
|
||||
if (no_allocate) {
|
||||
adr.encode_nontemporal_pair(¤t_insn);
|
||||
adr.encode_nontemporal_pair(current);
|
||||
} else {
|
||||
adr.encode_pair(¤t_insn);
|
||||
adr.encode_pair(current);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1404,8 +1436,7 @@ public:
|
||||
|
||||
#define INSN(NAME, size, p1, V, L, no_allocate) \
|
||||
void NAME(FloatRegister Rt1, FloatRegister Rt2, Address adr) { \
|
||||
ld_st1(size, p1, V, L, \
|
||||
as_Register(Rt1), as_Register(Rt2), adr, no_allocate); \
|
||||
ld_st1(size, p1, V, L, (Register)Rt1, (Register)Rt2, adr, no_allocate); \
|
||||
}
|
||||
|
||||
INSN(stps, 0b00, 0b101, 1, 0, false);
|
||||
@@ -1440,7 +1471,7 @@ public:
|
||||
|
||||
f(size, 31, 30);
|
||||
f(op, 23, 22); // str
|
||||
adr.encode(¤t_insn);
|
||||
adr.encode(current);
|
||||
}
|
||||
|
||||
#define INSN(NAME, size, op) \
|
||||
@@ -1468,7 +1499,7 @@ public:
|
||||
|
||||
#define INSN(NAME, size, op) \
|
||||
void NAME(const Address &adr, prfop pfop = PLDL1KEEP) { \
|
||||
ld_st2(as_Register(pfop), adr, size, op); \
|
||||
ld_st2((Register)pfop, adr, size, op); \
|
||||
}
|
||||
|
||||
INSN(prfm, 0b11, 0b10); // FIXME: PRFM should not be used with
|
||||
@@ -1479,7 +1510,7 @@ public:
|
||||
|
||||
#define INSN(NAME, size, op) \
|
||||
void NAME(FloatRegister Rt, const Address &adr) { \
|
||||
ld_st2(as_Register(Rt), adr, size, op, 1); \
|
||||
ld_st2((Register)Rt, adr, size, op, 1); \
|
||||
}
|
||||
|
||||
INSN(strd, 0b11, 0b00);
|
||||
@@ -1516,7 +1547,7 @@ public:
|
||||
|
||||
enum shift_kind { LSL, LSR, ASR, ROR };
|
||||
|
||||
void op_shifted_reg(Instruction_aarch64 ¤t_insn, unsigned decode,
|
||||
void op_shifted_reg(unsigned decode,
|
||||
enum shift_kind kind, unsigned shift,
|
||||
unsigned size, unsigned op) {
|
||||
f(size, 31);
|
||||
@@ -1527,14 +1558,14 @@ public:
|
||||
}
|
||||
|
||||
// Logical (shifted register)
|
||||
#define INSN(NAME, size, op, N) \
|
||||
void NAME(Register Rd, Register Rn, Register Rm, \
|
||||
enum shift_kind kind = LSL, unsigned shift = 0) { \
|
||||
starti; \
|
||||
guarantee(size == 1 || shift < 32, "incorrect shift"); \
|
||||
f(N, 21); \
|
||||
zrf(Rm, 16), zrf(Rn, 5), zrf(Rd, 0); \
|
||||
op_shifted_reg(current_insn, 0b01010, kind, shift, size, op); \
|
||||
#define INSN(NAME, size, op, N) \
|
||||
void NAME(Register Rd, Register Rn, Register Rm, \
|
||||
enum shift_kind kind = LSL, unsigned shift = 0) { \
|
||||
starti; \
|
||||
guarantee(size == 1 || shift < 32, "incorrect shift"); \
|
||||
f(N, 21); \
|
||||
zrf(Rm, 16), zrf(Rn, 5), zrf(Rd, 0); \
|
||||
op_shifted_reg(0b01010, kind, shift, size, op); \
|
||||
}
|
||||
|
||||
INSN(andr, 1, 0b00, 0);
|
||||
@@ -1554,7 +1585,7 @@ public:
|
||||
starti; \
|
||||
f(N, 21); \
|
||||
zrf(Rm, 16), zrf(Rn, 5), zrf(Rd, 0); \
|
||||
op_shifted_reg(current_insn, 0b01010, kind, shift, size, op); \
|
||||
op_shifted_reg(0b01010, kind, shift, size, op); \
|
||||
} \
|
||||
\
|
||||
/* These instructions have no immediate form. Provide an overload so \
|
||||
@@ -1601,7 +1632,7 @@ void mvnw(Register Rd, Register Rm,
|
||||
assert_cond(kind != ROR); \
|
||||
guarantee(size == 1 || shift < 32, "incorrect shift");\
|
||||
zrf(Rd, 0), zrf(Rn, 5), zrf(Rm, 16); \
|
||||
op_shifted_reg(current_insn, 0b01011, kind, shift, size, op); \
|
||||
op_shifted_reg(0b01011, kind, shift, size, op); \
|
||||
}
|
||||
|
||||
INSN(add, 1, 0b000);
|
||||
@@ -1622,10 +1653,10 @@ void mvnw(Register Rd, Register Rm,
|
||||
ext::operation option, int amount = 0) { \
|
||||
starti; \
|
||||
zrf(Rm, 16), srf(Rn, 5), srf(Rd, 0); \
|
||||
add_sub_extended_reg(current_insn, op, 0b01011, Rd, Rn, Rm, 0b00, option, amount); \
|
||||
add_sub_extended_reg(op, 0b01011, Rd, Rn, Rm, 0b00, option, amount); \
|
||||
}
|
||||
|
||||
void add_sub_extended_reg(Instruction_aarch64 ¤t_insn, unsigned op, unsigned decode,
|
||||
void add_sub_extended_reg(unsigned op, unsigned decode,
|
||||
Register Rd, Register Rn, Register Rm,
|
||||
unsigned opt, ext::operation option, unsigned imm) {
|
||||
guarantee(imm <= 4, "shift amount must be <= 4");
|
||||
@@ -1645,7 +1676,7 @@ void mvnw(Register Rd, Register Rm,
|
||||
ext::operation option, int amount = 0) { \
|
||||
starti; \
|
||||
zrf(Rm, 16), srf(Rn, 5), zrf(Rd, 0); \
|
||||
add_sub_extended_reg(current_insn, op, 0b01011, Rd, Rn, Rm, 0b00, option, amount); \
|
||||
add_sub_extended_reg(op, 0b01011, Rd, Rn, Rm, 0b00, option, amount); \
|
||||
}
|
||||
|
||||
INSN(addsw, 0b001);
|
||||
@@ -1746,7 +1777,7 @@ void mvnw(Register Rd, Register Rm,
|
||||
}
|
||||
|
||||
#define INSN(NAME, op, op2) \
|
||||
void NAME(Register Rd, Register Rn, Register Rm, Condition cond) { \
|
||||
void NAME(Register Rd, Register Rn, Register Rm, Condition cond) { \
|
||||
conditional_select(op, op2, Rd, Rn, Rm, cond); \
|
||||
}
|
||||
|
||||
@@ -1762,7 +1793,7 @@ void mvnw(Register Rd, Register Rm,
|
||||
#undef INSN
|
||||
|
||||
// Data processing
|
||||
void data_processing(Instruction_aarch64 ¤t_insn, unsigned op29, unsigned opcode,
|
||||
void data_processing(unsigned op29, unsigned opcode,
|
||||
Register Rd, Register Rn) {
|
||||
f(op29, 31, 29), f(0b11010110, 28, 21);
|
||||
f(opcode, 15, 10);
|
||||
@@ -1770,11 +1801,11 @@ void mvnw(Register Rd, Register Rm,
|
||||
}
|
||||
|
||||
// (1 source)
|
||||
#define INSN(NAME, op29, opcode2, opcode) \
|
||||
void NAME(Register Rd, Register Rn) { \
|
||||
starti; \
|
||||
f(opcode2, 20, 16); \
|
||||
data_processing(current_insn, op29, opcode, Rd, Rn); \
|
||||
#define INSN(NAME, op29, opcode2, opcode) \
|
||||
void NAME(Register Rd, Register Rn) { \
|
||||
starti; \
|
||||
f(opcode2, 20, 16); \
|
||||
data_processing(op29, opcode, Rd, Rn); \
|
||||
}
|
||||
|
||||
INSN(rbitw, 0b010, 0b00000, 0b00000);
|
||||
@@ -1793,11 +1824,11 @@ void mvnw(Register Rd, Register Rm,
|
||||
#undef INSN
|
||||
|
||||
// (2 sources)
|
||||
#define INSN(NAME, op29, opcode) \
|
||||
void NAME(Register Rd, Register Rn, Register Rm) { \
|
||||
starti; \
|
||||
rf(Rm, 16); \
|
||||
data_processing(current_insn, op29, opcode, Rd, Rn); \
|
||||
#define INSN(NAME, op29, opcode) \
|
||||
void NAME(Register Rd, Register Rn, Register Rm) { \
|
||||
starti; \
|
||||
rf(Rm, 16); \
|
||||
data_processing(op29, opcode, Rd, Rn); \
|
||||
}
|
||||
|
||||
INSN(udivw, 0b000, 0b000010);
|
||||
@@ -1842,9 +1873,9 @@ void mvnw(Register Rd, Register Rm,
|
||||
|
||||
#undef INSN
|
||||
|
||||
#define INSN(NAME, op54, op31, o0) \
|
||||
void NAME(Register Rd, Register Rn, Register Rm) { \
|
||||
data_processing(op54, op31, o0, Rd, Rn, Rm, as_Register(31)); \
|
||||
#define INSN(NAME, op54, op31, o0) \
|
||||
void NAME(Register Rd, Register Rn, Register Rm) { \
|
||||
data_processing(op54, op31, o0, Rd, Rn, Rm, (Register)31); \
|
||||
}
|
||||
|
||||
INSN(smulh, 0b100, 0b010, 0);
|
||||
@@ -2023,7 +2054,7 @@ public:
|
||||
|
||||
#define INSN(NAME, op31, type, rmode, opcode) \
|
||||
void NAME(Register Rd, FloatRegister Vn) { \
|
||||
float_int_convert(op31, type, rmode, opcode, Rd, as_Register(Vn)); \
|
||||
float_int_convert(op31, type, rmode, opcode, Rd, (Register)Vn); \
|
||||
}
|
||||
|
||||
INSN(fcvtzsw, 0b000, 0b00, 0b11, 0b000);
|
||||
@@ -2034,13 +2065,13 @@ public:
|
||||
INSN(fmovs, 0b000, 0b00, 0b00, 0b110);
|
||||
INSN(fmovd, 0b100, 0b01, 0b00, 0b110);
|
||||
|
||||
INSN(fmovhid, 0b100, 0b10, 0b01, 0b110);
|
||||
// INSN(fmovhid, 0b100, 0b10, 0b01, 0b110);
|
||||
|
||||
#undef INSN
|
||||
|
||||
#define INSN(NAME, op31, type, rmode, opcode) \
|
||||
void NAME(FloatRegister Vd, Register Rn) { \
|
||||
float_int_convert(op31, type, rmode, opcode, as_Register(Vd), Rn); \
|
||||
float_int_convert(op31, type, rmode, opcode, (Register)Vd, Rn); \
|
||||
}
|
||||
|
||||
INSN(fmovs, 0b000, 0b00, 0b00, 0b111);
|
||||
@@ -2095,7 +2126,7 @@ public:
|
||||
// Floating-point compare
|
||||
void float_compare(unsigned op31, unsigned type,
|
||||
unsigned op, unsigned op2,
|
||||
FloatRegister Vn, FloatRegister Vm = as_FloatRegister(0)) {
|
||||
FloatRegister Vn, FloatRegister Vm = (FloatRegister)0) {
|
||||
starti;
|
||||
f(op31, 31, 29);
|
||||
f(0b11110, 28, 24);
|
||||
@@ -2225,10 +2256,10 @@ private:
|
||||
static short SIMD_Size_in_bytes[];
|
||||
|
||||
public:
|
||||
#define INSN(NAME, op) \
|
||||
void NAME(FloatRegister Rt, SIMD_RegVariant T, const Address &adr) { \
|
||||
ld_st2(as_Register(Rt), adr, (int)T & 3, op + ((T==Q) ? 0b10:0b00), 1); \
|
||||
}
|
||||
#define INSN(NAME, op) \
|
||||
void NAME(FloatRegister Rt, SIMD_RegVariant T, const Address &adr) { \
|
||||
ld_st2((Register)Rt, adr, (int)T & 3, op + ((T==Q) ? 0b10:0b00), 1); \
|
||||
} \
|
||||
|
||||
INSN(ldr, 1);
|
||||
INSN(str, 0);
|
||||
@@ -3214,70 +3245,6 @@ public:
|
||||
f(pattern, 9, 5), f(0b0, 4), prf(pd, 0);
|
||||
}
|
||||
|
||||
// Integer comparisons (SVE)
|
||||
#define INSN(NAME, cond) \
|
||||
void NAME(PRegister Pd, SIMD_RegVariant T, PRegister Pg, FloatRegister Zn, FloatRegister Zm) { \
|
||||
starti; \
|
||||
assert(T != Q, "invalid size"); \
|
||||
f(0b00100100, 31, 24), f(T, 23, 22), f(0, 21), rf(Zm, 16), f((cond >> 1) & 7, 15, 13); \
|
||||
pgrf(Pg, 10), rf(Zn, 5), f(cond & 1, 4), prf(Pd, 0); \
|
||||
}
|
||||
|
||||
INSN(sve_cmpeq, 0b1010); // Compare signed equal to vector
|
||||
INSN(sve_cmpne, 0b1011); // Compare not equal to vector
|
||||
INSN(sve_cmpge, 0b1000); // Compare signed greater than or equal to vector
|
||||
INSN(sve_cmpgt, 0b1001); // Compare signed greater than vector
|
||||
#undef INSN
|
||||
|
||||
// Predicate counted loop (SVE) (32-bit variants are not included)
|
||||
#define INSN(NAME, decode) \
|
||||
void NAME(PRegister Pd, SIMD_RegVariant T, Register Rn, Register Rm) { \
|
||||
starti; \
|
||||
assert(T != Q, "invalid register variant"); \
|
||||
f(0b00100101, 31, 24), f(T, 23, 22), f(1, 21), \
|
||||
zrf(Rm, 16), f(0, 15, 13), f(1, 12), f(decode >> 1, 11, 10), \
|
||||
zrf(Rn, 5), f(decode & 1, 4), prf(Pd, 0); \
|
||||
}
|
||||
|
||||
INSN(sve_whilelt, 0b010); // While incrementing signed scalar less than scalar
|
||||
INSN(sve_whilele, 0b011); // While incrementing signed scalar less than or equal to scalar
|
||||
INSN(sve_whilelo, 0b110); // While incrementing unsigned scalar lower than scalar
|
||||
INSN(sve_whilels, 0b111); // While incrementing unsigned scalar lower than or the same as scalar
|
||||
#undef INSN
|
||||
|
||||
// Predicate scan (SVE)
|
||||
|
||||
// Break after the first true condition
|
||||
void sve_brka(PRegister pd, PRegister pg, PRegister pn, bool isMerge) {
|
||||
starti;
|
||||
f(0b00100101, 31, 24), f(0b00, 23, 22), f(0b01000001, 21, 14),
|
||||
prf(pg, 10), f(0b0, 9), prf(pn, 5), f(isMerge ? 1 : 0, 4), prf(pd, 0);
|
||||
}
|
||||
|
||||
// Element count and increment scalar (SVE)
|
||||
#define INSN(NAME, TYPE) \
|
||||
void NAME(Register Xdn, unsigned imm4 = 1, int pattern = 0b11111) { \
|
||||
starti; \
|
||||
f(0b00000100, 31, 24), f(TYPE, 23, 22), f(0b10, 21, 20); \
|
||||
f(imm4 - 1, 19, 16), f(0b11100, 15, 11), f(0, 10), f(pattern, 9, 5), rf(Xdn, 0); \
|
||||
}
|
||||
|
||||
INSN(sve_cntb, B); // Set scalar to multiple of 8-bit predicate constraint element count
|
||||
INSN(sve_cnth, H); // Set scalar to multiple of 16-bit predicate constraint element count
|
||||
INSN(sve_cntw, S); // Set scalar to multiple of 32-bit predicate constraint element count
|
||||
INSN(sve_cntd, D); // Set scalar to multiple of 64-bit predicate constraint element count
|
||||
#undef INSN
|
||||
|
||||
// Predicate count and increment scalar (SVE)
|
||||
|
||||
// Set scalar to the number of Active predicate elements that are TRUE
|
||||
void sve_incp(const Register rd, SIMD_RegVariant T, PRegister pg) {
|
||||
starti;
|
||||
assert(T != Q, "invalid size");
|
||||
f(0b00100101, 31, 24), f(T, 23, 22), f(0b1011001000100, 21, 9),
|
||||
prf(pg, 5), rf(rd, 0);
|
||||
}
|
||||
|
||||
Assembler(CodeBuffer* code) : AbstractAssembler(code) {
|
||||
}
|
||||
|
||||
@@ -3298,19 +3265,9 @@ inline Assembler::Membar_mask_bits operator|(Assembler::Membar_mask_bits a,
|
||||
}
|
||||
|
||||
Instruction_aarch64::~Instruction_aarch64() {
|
||||
assem->emit_int32(insn);
|
||||
assert_cond(get_bits() == 0xffffffff);
|
||||
assem->emit();
|
||||
}
|
||||
|
||||
#undef f
|
||||
#undef sf
|
||||
#undef rf
|
||||
#undef srf
|
||||
#undef zrf
|
||||
#undef prf
|
||||
#undef pgrf
|
||||
#undef fixed
|
||||
|
||||
#undef starti
|
||||
|
||||
// Invert a condition
|
||||
@@ -3318,6 +3275,8 @@ inline const Assembler::Condition operator~(const Assembler::Condition cond) {
|
||||
return Assembler::Condition(int(cond) ^ 1);
|
||||
}
|
||||
|
||||
class BiasedLockingCounters;
|
||||
|
||||
extern "C" void das(uint64_t start, int len);
|
||||
|
||||
#endif // CPU_AARCH64_ASSEMBLER_AARCH64_HPP
|
||||
|
||||
@@ -45,9 +45,5 @@ extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_8_impl;
|
||||
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_1_relaxed_impl;
|
||||
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_4_relaxed_impl;
|
||||
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_8_relaxed_impl;
|
||||
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_4_release_impl;
|
||||
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_8_release_impl;
|
||||
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_4_seq_cst_impl;
|
||||
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_8_seq_cst_impl;
|
||||
|
||||
#endif // CPU_AARCH64_ATOMIC_AARCH64_HPP
|
||||
|
||||
@@ -784,7 +784,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) {
|
||||
void LIR_Assembler::reg2mem(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool pop_fpu_stack, bool wide, bool /* unaligned */) {
|
||||
LIR_Address* to_addr = dest->as_address_ptr();
|
||||
PatchingStub* patch = NULL;
|
||||
Register compressed_src = rscratch1;
|
||||
@@ -941,7 +941,7 @@ void LIR_Assembler::stack2stack(LIR_Opr src, LIR_Opr dest, BasicType type) {
|
||||
}
|
||||
|
||||
|
||||
void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool wide) {
|
||||
void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool wide, bool /* unaligned */) {
|
||||
LIR_Address* addr = src->as_address_ptr();
|
||||
LIR_Address* from_addr = src->as_address_ptr();
|
||||
|
||||
@@ -2577,9 +2577,13 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
|
||||
if (!UseFastLocking) {
|
||||
__ b(*op->stub()->entry());
|
||||
} else if (op->code() == lir_lock) {
|
||||
Register scratch = noreg;
|
||||
if (UseBiasedLocking) {
|
||||
scratch = op->scratch_opr()->as_register();
|
||||
}
|
||||
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());
|
||||
int null_check_offset = __ lock_object(hdr, obj, lock, scratch, *op->stub()->entry());
|
||||
if (op->info() != NULL) {
|
||||
add_debug_info_for_null_check(null_check_offset, op->info());
|
||||
}
|
||||
@@ -2833,7 +2837,7 @@ void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
|
||||
}
|
||||
#endif
|
||||
// first time here. Set profile type.
|
||||
__ str(tmp, mdo_addr);
|
||||
__ ldr(tmp, mdo_addr);
|
||||
} else {
|
||||
assert(ciTypeEntries::valid_ciklass(current_klass) != NULL &&
|
||||
ciTypeEntries::valid_ciklass(current_klass) != exact_klass, "inconsistent");
|
||||
@@ -2907,7 +2911,7 @@ void LIR_Assembler::rt_call(LIR_Opr result, address dest, const LIR_OprList* arg
|
||||
void LIR_Assembler::volatile_move_op(LIR_Opr src, LIR_Opr dest, BasicType type, CodeEmitInfo* info) {
|
||||
if (dest->is_address() || src->is_address()) {
|
||||
move_op(src, dest, type, lir_patch_none, info,
|
||||
/*pop_fpu_stack*/false, /*wide*/false);
|
||||
/*pop_fpu_stack*/false, /*unaligned*/false, /*wide*/false);
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
|
||||
@@ -331,6 +331,11 @@ 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);
|
||||
// Need a scratch register for biased locking
|
||||
LIR_Opr scratch = LIR_OprFact::illegalOpr;
|
||||
if (UseBiasedLocking) {
|
||||
scratch = new_register(T_INT);
|
||||
}
|
||||
|
||||
CodeEmitInfo* info_for_exception = NULL;
|
||||
if (x->needs_null_check()) {
|
||||
@@ -339,7 +344,7 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
|
||||
// this CodeEmitInfo must not have the xhandlers because here the
|
||||
// object is already locked (xhandlers expect object to be unlocked)
|
||||
CodeEmitInfo* info = state_for(x, x->state(), true);
|
||||
monitor_enter(obj.result(), lock, syncTempOpr(), LIR_OprFact::illegalOpr,
|
||||
monitor_enter(obj.result(), lock, syncTempOpr(), scratch,
|
||||
x->monitor_no(), info_for_exception, info);
|
||||
}
|
||||
|
||||
@@ -1127,8 +1132,8 @@ void LIRGenerator::do_NewInstance(NewInstance* x) {
|
||||
CodeEmitInfo* info = state_for(x, x->state());
|
||||
LIR_Opr reg = result_register_for(x->type());
|
||||
new_instance(reg, x->klass(), x->is_unresolved(),
|
||||
FrameMap::r10_oop_opr,
|
||||
FrameMap::r11_oop_opr,
|
||||
FrameMap::r2_oop_opr,
|
||||
FrameMap::r5_oop_opr,
|
||||
FrameMap::r4_oop_opr,
|
||||
LIR_OprFact::illegalOpr,
|
||||
FrameMap::r3_metadata_opr, info);
|
||||
@@ -1143,8 +1148,8 @@ void LIRGenerator::do_NewTypeArray(NewTypeArray* x) {
|
||||
length.load_item_force(FrameMap::r19_opr);
|
||||
|
||||
LIR_Opr reg = result_register_for(x->type());
|
||||
LIR_Opr tmp1 = FrameMap::r10_oop_opr;
|
||||
LIR_Opr tmp2 = FrameMap::r11_oop_opr;
|
||||
LIR_Opr tmp1 = FrameMap::r2_oop_opr;
|
||||
LIR_Opr tmp2 = FrameMap::r4_oop_opr;
|
||||
LIR_Opr tmp3 = FrameMap::r5_oop_opr;
|
||||
LIR_Opr tmp4 = reg;
|
||||
LIR_Opr klass_reg = FrameMap::r3_metadata_opr;
|
||||
@@ -1172,8 +1177,8 @@ void LIRGenerator::do_NewObjectArray(NewObjectArray* x) {
|
||||
CodeEmitInfo* info = state_for(x, x->state());
|
||||
|
||||
LIR_Opr reg = result_register_for(x->type());
|
||||
LIR_Opr tmp1 = FrameMap::r10_oop_opr;
|
||||
LIR_Opr tmp2 = FrameMap::r11_oop_opr;
|
||||
LIR_Opr tmp1 = FrameMap::r2_oop_opr;
|
||||
LIR_Opr tmp2 = FrameMap::r4_oop_opr;
|
||||
LIR_Opr tmp3 = FrameMap::r5_oop_opr;
|
||||
LIR_Opr tmp4 = reg;
|
||||
LIR_Opr klass_reg = FrameMap::r3_metadata_opr;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. 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
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "oops/arrayOop.hpp"
|
||||
#include "oops/markWord.hpp"
|
||||
#include "runtime/basicLock.hpp"
|
||||
#include "runtime/biasedLocking.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
@@ -60,7 +61,7 @@ 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) {
|
||||
int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr, Register scratch, Label& slow_case) {
|
||||
const int aligned_mask = BytesPerWord -1;
|
||||
const int hdr_offset = oopDesc::mark_offset_in_bytes();
|
||||
assert(hdr != obj && hdr != disp_hdr && obj != disp_hdr, "registers must be different");
|
||||
@@ -81,6 +82,11 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
|
||||
br(Assembler::NE, slow_case);
|
||||
}
|
||||
|
||||
if (UseBiasedLocking) {
|
||||
assert(scratch != noreg, "should have scratch register at this point");
|
||||
biased_locking_enter(disp_hdr, obj, hdr, scratch, false, done, &slow_case);
|
||||
}
|
||||
|
||||
// Load object header
|
||||
ldr(hdr, Address(obj, hdr_offset));
|
||||
// and mark it as unlocked
|
||||
@@ -116,6 +122,10 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
|
||||
cbnz(hdr, slow_case);
|
||||
// done
|
||||
bind(done);
|
||||
if (PrintBiasedLockingStatistics) {
|
||||
lea(rscratch2, ExternalAddress((address)BiasedLocking::fast_path_entry_count_addr()));
|
||||
addmw(Address(rscratch2, 0), 1, rscratch1);
|
||||
}
|
||||
return null_check_offset;
|
||||
}
|
||||
|
||||
@@ -126,13 +136,21 @@ 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 (UseBiasedLocking) {
|
||||
// load object
|
||||
ldr(obj, Address(disp_hdr, BasicObjectLock::obj_offset_in_bytes()));
|
||||
biased_locking_exit(obj, 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_in_bytes()));
|
||||
if (!UseBiasedLocking) {
|
||||
// load object
|
||||
ldr(obj, Address(disp_hdr, BasicObjectLock::obj_offset_in_bytes()));
|
||||
}
|
||||
verify_oop(obj);
|
||||
// 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
|
||||
@@ -161,8 +179,13 @@ void C1_MacroAssembler::try_allocate(Register obj, Register var_size_in_bytes, i
|
||||
|
||||
void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register len, Register t1, Register t2) {
|
||||
assert_different_registers(obj, klass, len);
|
||||
// This assumes that all prototype bits fit in an int32_t
|
||||
mov(t1, (int32_t)(intptr_t)markWord::prototype().value());
|
||||
if (UseBiasedLocking && !len->is_valid()) {
|
||||
assert_different_registers(obj, klass, len, t1, t2);
|
||||
ldr(t1, Address(klass, Klass::prototype_header_offset()));
|
||||
} else {
|
||||
// This assumes that all prototype bits fit in an int32_t
|
||||
mov(t1, (int32_t)(intptr_t)markWord::prototype().value());
|
||||
}
|
||||
str(t1, Address(obj, oopDesc::mark_offset_in_bytes()));
|
||||
|
||||
if (UseCompressedClassPointers) { // Take care not to kill klass
|
||||
@@ -180,24 +203,20 @@ void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register
|
||||
}
|
||||
|
||||
// preserves obj, destroys len_in_bytes
|
||||
//
|
||||
// Scratch registers: t1 = r10, t2 = r11
|
||||
//
|
||||
void C1_MacroAssembler::initialize_body(Register obj, Register len_in_bytes, int hdr_size_in_bytes, Register t1, Register t2) {
|
||||
void C1_MacroAssembler::initialize_body(Register obj, Register len_in_bytes, int hdr_size_in_bytes, Register t1) {
|
||||
assert(hdr_size_in_bytes >= 0, "header size must be positive or 0");
|
||||
assert(t1 == r10 && t2 == r11, "must be");
|
||||
|
||||
Label done;
|
||||
|
||||
// len_in_bytes is positive and ptr sized
|
||||
subs(len_in_bytes, len_in_bytes, hdr_size_in_bytes);
|
||||
br(Assembler::EQ, done);
|
||||
|
||||
// zero_words() takes ptr in r10 and count in words in r11
|
||||
mov(rscratch1, len_in_bytes);
|
||||
lea(t1, Address(obj, hdr_size_in_bytes));
|
||||
lsr(t2, rscratch1, LogBytesPerWord);
|
||||
zero_words(t1, t2);
|
||||
// Preserve obj
|
||||
if (hdr_size_in_bytes)
|
||||
add(obj, obj, hdr_size_in_bytes);
|
||||
zero_memory(obj, len_in_bytes, t1);
|
||||
if (hdr_size_in_bytes)
|
||||
sub(obj, obj, hdr_size_in_bytes);
|
||||
|
||||
bind(done);
|
||||
}
|
||||
@@ -212,7 +231,6 @@ void C1_MacroAssembler::allocate_object(Register obj, Register t1, Register t2,
|
||||
initialize_object(obj, klass, noreg, object_size * HeapWordSize, t1, t2, UseTLAB);
|
||||
}
|
||||
|
||||
// Scratch registers: t1 = r10, t2 = r11
|
||||
void C1_MacroAssembler::initialize_object(Register obj, Register klass, Register var_size_in_bytes, int con_size_in_bytes, Register t1, Register t2, bool is_tlab_allocated) {
|
||||
assert((con_size_in_bytes & MinObjAlignmentInBytesMask) == 0,
|
||||
"con_size_in_bytes is not multiple of alignment");
|
||||
@@ -223,13 +241,45 @@ void C1_MacroAssembler::initialize_object(Register obj, Register klass, Register
|
||||
if (!(UseTLAB && ZeroTLAB && is_tlab_allocated)) {
|
||||
// clear rest of allocated space
|
||||
const Register index = t2;
|
||||
const int threshold = 16 * BytesPerWord; // approximate break even point for code size (see comments below)
|
||||
if (var_size_in_bytes != noreg) {
|
||||
mov(index, var_size_in_bytes);
|
||||
initialize_body(obj, index, hdr_size_in_bytes, t1, t2);
|
||||
initialize_body(obj, index, hdr_size_in_bytes, t1);
|
||||
} else if (con_size_in_bytes <= threshold) {
|
||||
// use explicit null stores
|
||||
int i = hdr_size_in_bytes;
|
||||
if (i < con_size_in_bytes && (con_size_in_bytes % (2 * BytesPerWord))) {
|
||||
str(zr, Address(obj, i));
|
||||
i += BytesPerWord;
|
||||
}
|
||||
for (; i < con_size_in_bytes; i += 2 * BytesPerWord)
|
||||
stp(zr, zr, Address(obj, i));
|
||||
} else if (con_size_in_bytes > hdr_size_in_bytes) {
|
||||
con_size_in_bytes -= hdr_size_in_bytes;
|
||||
lea(t1, Address(obj, hdr_size_in_bytes));
|
||||
zero_words(t1, con_size_in_bytes / BytesPerWord);
|
||||
block_comment("zero memory");
|
||||
// use loop to null out the fields
|
||||
|
||||
int words = (con_size_in_bytes - hdr_size_in_bytes) / BytesPerWord;
|
||||
mov(index, words / 8);
|
||||
|
||||
const int unroll = 8; // Number of str(zr) instructions we'll unroll
|
||||
int remainder = words % unroll;
|
||||
lea(rscratch1, Address(obj, hdr_size_in_bytes + remainder * BytesPerWord));
|
||||
|
||||
Label entry_point, loop;
|
||||
b(entry_point);
|
||||
|
||||
bind(loop);
|
||||
sub(index, index, 1);
|
||||
for (int i = -unroll; i < 0; i++) {
|
||||
if (-i == remainder)
|
||||
bind(entry_point);
|
||||
str(zr, Address(rscratch1, i * wordSize));
|
||||
}
|
||||
if (remainder == 0)
|
||||
bind(entry_point);
|
||||
add(rscratch1, rscratch1, unroll * wordSize);
|
||||
cbnz(index, loop);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,7 +314,8 @@ void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1,
|
||||
initialize_header(obj, klass, len, t1, t2);
|
||||
|
||||
// clear rest of allocated space
|
||||
initialize_body(obj, arr_size, header_size * BytesPerWord, t1, t2);
|
||||
const Register len_zero = len;
|
||||
initialize_body(obj, arr_size, header_size * BytesPerWord, len_zero);
|
||||
|
||||
membar(StoreStore);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
|
||||
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2015, Red Hat Inc. 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
|
||||
@@ -48,7 +48,7 @@ using MacroAssembler::null_check;
|
||||
);
|
||||
|
||||
void initialize_header(Register obj, Register klass, Register len, Register t1, Register t2);
|
||||
void initialize_body(Register obj, Register len_in_bytes, int hdr_size_in_bytes, Register t1, Register t2);
|
||||
void initialize_body(Register obj, Register len_in_bytes, int hdr_size_in_bytes, Register t1);
|
||||
|
||||
void float_cmp(bool is_float, int unordered_result,
|
||||
FloatRegister f0, FloatRegister f1,
|
||||
@@ -58,8 +58,9 @@ using MacroAssembler::null_check;
|
||||
// hdr : must be r0, contents destroyed
|
||||
// obj : must point to the object to lock, contents preserved
|
||||
// disp_hdr: must point to the displaced header location, contents preserved
|
||||
// scratch : scratch register, contents destroyed
|
||||
// returns code offset at which to add null check debug information
|
||||
int lock_object (Register swap, Register obj, Register disp_hdr, Label& slow_case);
|
||||
int lock_object (Register swap, Register obj, Register disp_hdr, Register scratch, Label& slow_case);
|
||||
|
||||
// unlocking
|
||||
// hdr : contents destroyed
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. 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
|
||||
@@ -656,9 +656,9 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
if ((id == fast_new_instance_id || id == fast_new_instance_init_check_id) &&
|
||||
!UseTLAB && Universe::heap()->supports_inline_contig_alloc()) {
|
||||
Label slow_path;
|
||||
Register obj_size = r19;
|
||||
Register t1 = r10;
|
||||
Register t2 = r11;
|
||||
Register obj_size = r2;
|
||||
Register t1 = r19;
|
||||
Register t2 = r4;
|
||||
assert_different_registers(klass, obj, obj_size, t1, t2);
|
||||
|
||||
__ stp(r19, zr, Address(__ pre(sp, -2 * wordSize)));
|
||||
@@ -769,9 +769,9 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
// allocations.
|
||||
// Otherwise, just go to the slow path.
|
||||
if (!UseTLAB && Universe::heap()->supports_inline_contig_alloc()) {
|
||||
Register arr_size = r5;
|
||||
Register t1 = r10;
|
||||
Register t2 = r11;
|
||||
Register arr_size = r4;
|
||||
Register t1 = r2;
|
||||
Register t2 = r5;
|
||||
Label slow_path;
|
||||
assert_different_registers(length, klass, obj, arr_size, t1, t2);
|
||||
|
||||
@@ -801,7 +801,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
__ andr(t1, t1, Klass::_lh_header_size_mask);
|
||||
__ sub(arr_size, arr_size, t1); // body length
|
||||
__ add(t1, t1, obj); // body start
|
||||
__ initialize_body(t1, arr_size, 0, t1, t2);
|
||||
__ initialize_body(t1, arr_size, 0, t2);
|
||||
__ membar(Assembler::StoreStore);
|
||||
__ verify_oop(obj);
|
||||
|
||||
|
||||
@@ -540,75 +540,6 @@ void C2_MacroAssembler::string_indexof_char(Register str1, Register cnt1,
|
||||
BIND(DONE);
|
||||
}
|
||||
|
||||
void C2_MacroAssembler::string_indexof_char_sve(Register str1, Register cnt1,
|
||||
Register ch, Register result,
|
||||
FloatRegister ztmp1,
|
||||
FloatRegister ztmp2,
|
||||
PRegister tmp_pg,
|
||||
PRegister tmp_pdn, bool isL)
|
||||
{
|
||||
// Note that `tmp_pdn` should *NOT* be used as governing predicate register.
|
||||
assert(tmp_pg->is_governing(),
|
||||
"this register has to be a governing predicate register");
|
||||
|
||||
Label LOOP, MATCH, DONE, NOMATCH;
|
||||
Register vec_len = rscratch1;
|
||||
Register idx = rscratch2;
|
||||
|
||||
SIMD_RegVariant T = (isL == true) ? B : H;
|
||||
|
||||
cbz(cnt1, NOMATCH);
|
||||
|
||||
// Assign the particular char throughout the vector.
|
||||
sve_dup(ztmp2, T, ch);
|
||||
if (isL) {
|
||||
sve_cntb(vec_len);
|
||||
} else {
|
||||
sve_cnth(vec_len);
|
||||
}
|
||||
mov(idx, 0);
|
||||
|
||||
// Generate a predicate to control the reading of input string.
|
||||
sve_whilelt(tmp_pg, T, idx, cnt1);
|
||||
|
||||
BIND(LOOP);
|
||||
// Read a vector of 8- or 16-bit data depending on the string type. Note
|
||||
// that inactive elements indicated by the predicate register won't cause
|
||||
// a data read from memory to the destination vector.
|
||||
if (isL) {
|
||||
sve_ld1b(ztmp1, T, tmp_pg, Address(str1, idx));
|
||||
} else {
|
||||
sve_ld1h(ztmp1, T, tmp_pg, Address(str1, idx, Address::lsl(1)));
|
||||
}
|
||||
add(idx, idx, vec_len);
|
||||
|
||||
// Perform the comparison. An element of the destination predicate is set
|
||||
// to active if the particular char is matched.
|
||||
sve_cmpeq(tmp_pdn, T, tmp_pg, ztmp1, ztmp2);
|
||||
|
||||
// Branch if the particular char is found.
|
||||
br(NE, MATCH);
|
||||
|
||||
sve_whilelt(tmp_pg, T, idx, cnt1);
|
||||
|
||||
// Loop back if the particular char not found.
|
||||
br(MI, LOOP);
|
||||
|
||||
BIND(NOMATCH);
|
||||
mov(result, -1);
|
||||
b(DONE);
|
||||
|
||||
BIND(MATCH);
|
||||
// Undo the index increment.
|
||||
sub(idx, idx, vec_len);
|
||||
|
||||
// Crop the vector to find its location.
|
||||
sve_brka(tmp_pdn, tmp_pg, tmp_pdn, false /* isMerge */);
|
||||
add(result, idx, -1);
|
||||
sve_incp(result, T, tmp_pdn);
|
||||
BIND(DONE);
|
||||
}
|
||||
|
||||
void C2_MacroAssembler::stringL_indexof_char(Register str1, Register cnt1,
|
||||
Register ch, Register result,
|
||||
Register tmp1, Register tmp2, Register tmp3)
|
||||
|
||||
@@ -46,13 +46,8 @@
|
||||
Register tmp1, Register tmp2, Register tmp3);
|
||||
|
||||
void stringL_indexof_char(Register str1, Register cnt1,
|
||||
Register ch, Register result,
|
||||
Register tmp1, Register tmp2, Register tmp3);
|
||||
|
||||
void string_indexof_char_sve(Register str1, Register cnt1,
|
||||
Register ch, Register result,
|
||||
FloatRegister ztmp1, FloatRegister ztmp2,
|
||||
PRegister pgtmp, PRegister ptmp, bool isL);
|
||||
Register ch, Register result,
|
||||
Register tmp1, Register tmp2, Register tmp3);
|
||||
|
||||
// SIMD&FP comparison
|
||||
void neon_compare(FloatRegister dst, BasicType bt, FloatRegister src1,
|
||||
|
||||
@@ -45,18 +45,17 @@ bool ABIDescriptor::is_volatile_reg(FloatRegister reg) const {
|
||||
const ABIDescriptor ForeignGlobals::parse_abi_descriptor_impl(jobject jabi) const {
|
||||
oop abi_oop = JNIHandles::resolve_non_null(jabi);
|
||||
ABIDescriptor abi;
|
||||
const Register (*to_Register)(int) = as_Register;
|
||||
|
||||
objArrayOop inputStorage = cast<objArrayOop>(abi_oop->obj_field(ABI.inputStorage_offset));
|
||||
loadArray(inputStorage, INTEGER_TYPE, abi._integer_argument_registers, to_Register);
|
||||
loadArray(inputStorage, INTEGER_TYPE, abi._integer_argument_registers, as_Register);
|
||||
loadArray(inputStorage, VECTOR_TYPE, abi._vector_argument_registers, as_FloatRegister);
|
||||
|
||||
objArrayOop outputStorage = cast<objArrayOop>(abi_oop->obj_field(ABI.outputStorage_offset));
|
||||
loadArray(outputStorage, INTEGER_TYPE, abi._integer_return_registers, to_Register);
|
||||
loadArray(outputStorage, INTEGER_TYPE, abi._integer_return_registers, as_Register);
|
||||
loadArray(outputStorage, VECTOR_TYPE, abi._vector_return_registers, as_FloatRegister);
|
||||
|
||||
objArrayOop volatileStorage = cast<objArrayOop>(abi_oop->obj_field(ABI.volatileStorage_offset));
|
||||
loadArray(volatileStorage, INTEGER_TYPE, abi._integer_additional_volatile_registers, to_Register);
|
||||
loadArray(volatileStorage, INTEGER_TYPE, abi._integer_additional_volatile_registers, as_Register);
|
||||
loadArray(volatileStorage, VECTOR_TYPE, abi._vector_additional_volatile_registers, as_FloatRegister);
|
||||
|
||||
abi._stack_alignment_bytes = abi_oop->int_field(ABI.stackAlignment_offset);
|
||||
|
||||
@@ -362,7 +362,7 @@ frame frame::sender_for_entry_frame(RegisterMap* map) const {
|
||||
return fr;
|
||||
}
|
||||
|
||||
OptimizedEntryBlob::FrameData* OptimizedEntryBlob::frame_data_for_frame(const frame& frame) const {
|
||||
JavaFrameAnchor* OptimizedEntryBlob::jfa_for_frame(const frame& frame) const {
|
||||
ShouldNotCallThis();
|
||||
return nullptr;
|
||||
}
|
||||
@@ -814,6 +814,7 @@ frame::frame(void* sp, void* fp, void* pc) {
|
||||
init((intptr_t*)sp, (intptr_t*)fp, (address)pc);
|
||||
}
|
||||
|
||||
void frame::pd_ps() {}
|
||||
#endif
|
||||
|
||||
void JavaFrameAnchor::make_walkable(JavaThread* thread) {
|
||||
|
||||
@@ -236,20 +236,14 @@ inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
|
||||
// Compiled frames
|
||||
|
||||
inline oop frame::saved_oop_result(RegisterMap* map) const {
|
||||
PRAGMA_DIAG_PUSH
|
||||
PRAGMA_NONNULL_IGNORED
|
||||
oop* result_adr = (oop *)map->location(r0->as_VMReg());
|
||||
PRAGMA_DIAG_POP
|
||||
guarantee(result_adr != NULL, "bad register save location");
|
||||
|
||||
return (*result_adr);
|
||||
}
|
||||
|
||||
inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
|
||||
PRAGMA_DIAG_PUSH
|
||||
PRAGMA_NONNULL_IGNORED
|
||||
oop* result_adr = (oop *)map->location(r0->as_VMReg());
|
||||
PRAGMA_DIAG_POP
|
||||
guarantee(result_adr != NULL, "bad register save location");
|
||||
|
||||
*result_adr = obj;
|
||||
|
||||
@@ -343,7 +343,7 @@ void G1BarrierSetAssembler::gen_pre_barrier_stub(LIR_Assembler* ce, G1PreBarrier
|
||||
Register pre_val_reg = stub->pre_val()->as_register();
|
||||
|
||||
if (stub->do_load()) {
|
||||
ce->mem2reg(stub->addr(), stub->pre_val(), T_OBJECT, stub->patch_code(), stub->info(), false /*wide*/);
|
||||
ce->mem2reg(stub->addr(), stub->pre_val(), T_OBJECT, stub->patch_code(), stub->info(), false /*wide*/, false /*unaligned*/);
|
||||
}
|
||||
__ cbz(pre_val_reg, *stub->continuation());
|
||||
ce->store_parameter(stub->pre_val()->as_register(), 0);
|
||||
|
||||
@@ -116,7 +116,7 @@ void BarrierSetNMethod::deoptimize(nmethod* nm, address* return_address_ptr) {
|
||||
log_trace(nmethod, barrier)("deoptimize(nmethod: %s(%p), return_addr: %p, osr: %d, thread: %p(%s), making rsp: %p) -> %p",
|
||||
nm->method()->name_and_sig_as_C_string(),
|
||||
nm, *(address *) return_address_ptr, nm->is_osr_method(), thread,
|
||||
thread->name(), frame.sp(), nm->verified_entry_point());
|
||||
thread->get_thread_name(), frame.sp(), nm->verified_entry_point());
|
||||
}
|
||||
|
||||
new_frame->sp = frame.sp();
|
||||
|
||||
@@ -613,7 +613,7 @@ void ShenandoahBarrierSetAssembler::gen_pre_barrier_stub(LIR_Assembler* ce, Shen
|
||||
Register pre_val_reg = stub->pre_val()->as_register();
|
||||
|
||||
if (stub->do_load()) {
|
||||
ce->mem2reg(stub->addr(), stub->pre_val(), T_OBJECT, stub->patch_code(), stub->info(), false /*wide*/);
|
||||
ce->mem2reg(stub->addr(), stub->pre_val(), T_OBJECT, stub->patch_code(), stub->info(), false /*wide*/, false /*unaligned*/);
|
||||
}
|
||||
__ cbz(pre_val_reg, *stub->continuation());
|
||||
ce->store_parameter(stub->pre_val()->as_register(), 0);
|
||||
|
||||
@@ -39,6 +39,7 @@ define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap NULLs
|
||||
define_pd_global(uintx, CodeCacheSegmentSize, 64 COMPILER1_AND_COMPILER2_PRESENT(+64)); // Tiered compilation has large code-entry alignment.
|
||||
define_pd_global(intx, CodeEntryAlignment, 64);
|
||||
define_pd_global(intx, OptoLoopAlignment, 16);
|
||||
define_pd_global(intx, InlineFrequencyCount, 100);
|
||||
|
||||
#define DEFAULT_STACK_YELLOW_PAGES (2)
|
||||
#define DEFAULT_STACK_RED_PAGES (1)
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "prims/jvmtiExport.hpp"
|
||||
#include "prims/jvmtiThreadState.hpp"
|
||||
#include "runtime/basicLock.hpp"
|
||||
#include "runtime/biasedLocking.hpp"
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/safepointMechanism.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
@@ -753,6 +754,10 @@ void InterpreterMacroAssembler::lock_object(Register lock_reg)
|
||||
br(Assembler::NE, slow_case);
|
||||
}
|
||||
|
||||
if (UseBiasedLocking) {
|
||||
biased_locking_enter(lock_reg, obj_reg, swap_reg, tmp, false, done, &slow_case);
|
||||
}
|
||||
|
||||
// Load (object->mark() | 1) into swap_reg
|
||||
ldr(rscratch1, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
|
||||
orr(swap_reg, rscratch1, 1);
|
||||
@@ -764,7 +769,17 @@ void InterpreterMacroAssembler::lock_object(Register lock_reg)
|
||||
"displached header must be first word in BasicObjectLock");
|
||||
|
||||
Label fail;
|
||||
cmpxchg_obj_header(swap_reg, lock_reg, obj_reg, rscratch1, done, /*fallthrough*/NULL);
|
||||
if (PrintBiasedLockingStatistics) {
|
||||
Label fast;
|
||||
cmpxchg_obj_header(swap_reg, lock_reg, obj_reg, rscratch1, fast, &fail);
|
||||
bind(fast);
|
||||
atomic_incw(Address((address)BiasedLocking::fast_path_entry_count_addr()),
|
||||
rscratch2, rscratch1, tmp);
|
||||
b(done);
|
||||
bind(fail);
|
||||
} else {
|
||||
cmpxchg_obj_header(swap_reg, lock_reg, obj_reg, rscratch1, done, /*fallthrough*/NULL);
|
||||
}
|
||||
|
||||
// Fast check for recursive lock.
|
||||
//
|
||||
@@ -801,6 +816,12 @@ void InterpreterMacroAssembler::lock_object(Register lock_reg)
|
||||
|
||||
// Save the test result, for recursive case, the result is zero
|
||||
str(swap_reg, Address(lock_reg, mark_offset));
|
||||
|
||||
if (PrintBiasedLockingStatistics) {
|
||||
br(Assembler::NE, slow_case);
|
||||
atomic_incw(Address((address)BiasedLocking::fast_path_entry_count_addr()),
|
||||
rscratch2, rscratch1, tmp);
|
||||
}
|
||||
br(Assembler::EQ, done);
|
||||
|
||||
bind(slow_case);
|
||||
@@ -851,6 +872,10 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg)
|
||||
// Free entry
|
||||
str(zr, Address(lock_reg, BasicObjectLock::obj_offset_in_bytes()));
|
||||
|
||||
if (UseBiasedLocking) {
|
||||
biased_locking_exit(obj_reg, header_reg, done);
|
||||
}
|
||||
|
||||
// Load the old header from BasicLock structure
|
||||
ldr(header_reg, Address(swap_reg,
|
||||
BasicLock::displaced_header_offset_in_bytes()));
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include "gc/shared/tlab_globals.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "compiler/compileTask.hpp"
|
||||
#include "compiler/disassembler.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
@@ -45,6 +44,7 @@
|
||||
#include "oops/accessDecorators.hpp"
|
||||
#include "oops/compressedOops.inline.hpp"
|
||||
#include "oops/klass.inline.hpp"
|
||||
#include "runtime/biasedLocking.hpp"
|
||||
#include "runtime/icache.hpp"
|
||||
#include "runtime/interfaceSupport.inline.hpp"
|
||||
#include "runtime/jniHandles.inline.hpp"
|
||||
@@ -442,6 +442,178 @@ void MacroAssembler::reserved_stack_check() {
|
||||
bind(no_reserved_zone_enabling);
|
||||
}
|
||||
|
||||
void MacroAssembler::biased_locking_enter(Register lock_reg,
|
||||
Register obj_reg,
|
||||
Register swap_reg,
|
||||
Register tmp_reg,
|
||||
bool swap_reg_contains_mark,
|
||||
Label& done,
|
||||
Label* slow_case,
|
||||
BiasedLockingCounters* counters) {
|
||||
assert(UseBiasedLocking, "why call this otherwise?");
|
||||
assert_different_registers(lock_reg, obj_reg, swap_reg);
|
||||
|
||||
if (PrintBiasedLockingStatistics && counters == NULL)
|
||||
counters = BiasedLocking::counters();
|
||||
|
||||
assert_different_registers(lock_reg, obj_reg, swap_reg, tmp_reg, rscratch1, rscratch2, noreg);
|
||||
assert(markWord::age_shift == markWord::lock_bits + markWord::biased_lock_bits, "biased locking makes assumptions about bit layout");
|
||||
Address mark_addr (obj_reg, oopDesc::mark_offset_in_bytes());
|
||||
Address klass_addr (obj_reg, oopDesc::klass_offset_in_bytes());
|
||||
Address saved_mark_addr(lock_reg, 0);
|
||||
|
||||
// Biased locking
|
||||
// See whether the lock is currently biased toward our thread and
|
||||
// whether the epoch is still valid
|
||||
// Note that the runtime guarantees sufficient alignment of JavaThread
|
||||
// pointers to allow age to be placed into low bits
|
||||
// First check to see whether biasing is even enabled for this object
|
||||
Label cas_label;
|
||||
if (!swap_reg_contains_mark) {
|
||||
ldr(swap_reg, mark_addr);
|
||||
}
|
||||
andr(tmp_reg, swap_reg, markWord::biased_lock_mask_in_place);
|
||||
cmp(tmp_reg, (u1)markWord::biased_lock_pattern);
|
||||
br(Assembler::NE, cas_label);
|
||||
// The bias pattern is present in the object's header. Need to check
|
||||
// whether the bias owner and the epoch are both still current.
|
||||
load_prototype_header(tmp_reg, obj_reg);
|
||||
orr(tmp_reg, tmp_reg, rthread);
|
||||
eor(tmp_reg, swap_reg, tmp_reg);
|
||||
andr(tmp_reg, tmp_reg, ~((int) markWord::age_mask_in_place));
|
||||
if (counters != NULL) {
|
||||
Label around;
|
||||
cbnz(tmp_reg, around);
|
||||
atomic_incw(Address((address)counters->biased_lock_entry_count_addr()), tmp_reg, rscratch1, rscratch2);
|
||||
b(done);
|
||||
bind(around);
|
||||
} else {
|
||||
cbz(tmp_reg, done);
|
||||
}
|
||||
|
||||
Label try_revoke_bias;
|
||||
Label try_rebias;
|
||||
|
||||
// At this point we know that the header has the bias pattern and
|
||||
// that we are not the bias owner in the current epoch. We need to
|
||||
// figure out more details about the state of the header in order to
|
||||
// know what operations can be legally performed on the object's
|
||||
// header.
|
||||
|
||||
// If the low three bits in the xor result aren't clear, that means
|
||||
// the prototype header is no longer biased and we have to revoke
|
||||
// the bias on this object.
|
||||
andr(rscratch1, tmp_reg, markWord::biased_lock_mask_in_place);
|
||||
cbnz(rscratch1, try_revoke_bias);
|
||||
|
||||
// Biasing is still enabled for this data type. See whether the
|
||||
// epoch of the current bias is still valid, meaning that the epoch
|
||||
// bits of the mark word are equal to the epoch bits of the
|
||||
// prototype header. (Note that the prototype header's epoch bits
|
||||
// only change at a safepoint.) If not, attempt to rebias the object
|
||||
// toward the current thread. Note that we must be absolutely sure
|
||||
// that the current epoch is invalid in order to do this because
|
||||
// otherwise the manipulations it performs on the mark word are
|
||||
// illegal.
|
||||
andr(rscratch1, tmp_reg, markWord::epoch_mask_in_place);
|
||||
cbnz(rscratch1, try_rebias);
|
||||
|
||||
// The epoch of the current bias is still valid but we know nothing
|
||||
// about the owner; it might be set or it might be clear. Try to
|
||||
// acquire the bias of the object using an atomic operation. If this
|
||||
// fails we will go in to the runtime to revoke the object's bias.
|
||||
// Note that we first construct the presumed unbiased header so we
|
||||
// don't accidentally blow away another thread's valid bias.
|
||||
{
|
||||
Label here;
|
||||
mov(rscratch1, markWord::biased_lock_mask_in_place | markWord::age_mask_in_place | markWord::epoch_mask_in_place);
|
||||
andr(swap_reg, swap_reg, rscratch1);
|
||||
orr(tmp_reg, swap_reg, rthread);
|
||||
cmpxchg_obj_header(swap_reg, tmp_reg, obj_reg, rscratch1, here, slow_case);
|
||||
// If the biasing toward our thread failed, this means that
|
||||
// another thread succeeded in biasing it toward itself and we
|
||||
// need to revoke that bias. The revocation will occur in the
|
||||
// interpreter runtime in the slow case.
|
||||
bind(here);
|
||||
if (counters != NULL) {
|
||||
atomic_incw(Address((address)counters->anonymously_biased_lock_entry_count_addr()),
|
||||
tmp_reg, rscratch1, rscratch2);
|
||||
}
|
||||
}
|
||||
b(done);
|
||||
|
||||
bind(try_rebias);
|
||||
// At this point we know the epoch has expired, meaning that the
|
||||
// current "bias owner", if any, is actually invalid. Under these
|
||||
// circumstances _only_, we are allowed to use the current header's
|
||||
// value as the comparison value when doing the cas to acquire the
|
||||
// bias in the current epoch. In other words, we allow transfer of
|
||||
// the bias from one thread to another directly in this situation.
|
||||
//
|
||||
// FIXME: due to a lack of registers we currently blow away the age
|
||||
// bits in this situation. Should attempt to preserve them.
|
||||
{
|
||||
Label here;
|
||||
load_prototype_header(tmp_reg, obj_reg);
|
||||
orr(tmp_reg, rthread, tmp_reg);
|
||||
cmpxchg_obj_header(swap_reg, tmp_reg, obj_reg, rscratch1, here, slow_case);
|
||||
// If the biasing toward our thread failed, then another thread
|
||||
// succeeded in biasing it toward itself and we need to revoke that
|
||||
// bias. The revocation will occur in the runtime in the slow case.
|
||||
bind(here);
|
||||
if (counters != NULL) {
|
||||
atomic_incw(Address((address)counters->rebiased_lock_entry_count_addr()),
|
||||
tmp_reg, rscratch1, rscratch2);
|
||||
}
|
||||
}
|
||||
b(done);
|
||||
|
||||
bind(try_revoke_bias);
|
||||
// The prototype mark in the klass doesn't have the bias bit set any
|
||||
// more, indicating that objects of this data type are not supposed
|
||||
// to be biased any more. We are going to try to reset the mark of
|
||||
// this object to the prototype value and fall through to the
|
||||
// CAS-based locking scheme. Note that if our CAS fails, it means
|
||||
// that another thread raced us for the privilege of revoking the
|
||||
// bias of this particular object, so it's okay to continue in the
|
||||
// normal locking code.
|
||||
//
|
||||
// FIXME: due to a lack of registers we currently blow away the age
|
||||
// bits in this situation. Should attempt to preserve them.
|
||||
{
|
||||
Label here, nope;
|
||||
load_prototype_header(tmp_reg, obj_reg);
|
||||
cmpxchg_obj_header(swap_reg, tmp_reg, obj_reg, rscratch1, here, &nope);
|
||||
bind(here);
|
||||
|
||||
// Fall through to the normal CAS-based lock, because no matter what
|
||||
// the result of the above CAS, some thread must have succeeded in
|
||||
// removing the bias bit from the object's header.
|
||||
if (counters != NULL) {
|
||||
atomic_incw(Address((address)counters->revoked_lock_entry_count_addr()), tmp_reg,
|
||||
rscratch1, rscratch2);
|
||||
}
|
||||
bind(nope);
|
||||
}
|
||||
|
||||
bind(cas_label);
|
||||
}
|
||||
|
||||
void MacroAssembler::biased_locking_exit(Register obj_reg, Register temp_reg, Label& done) {
|
||||
assert(UseBiasedLocking, "why call this otherwise?");
|
||||
|
||||
// Check for biased locking unlock case, which is a no-op
|
||||
// Note: we do not have to check the thread ID for two reasons.
|
||||
// First, the interpreter checks for IllegalMonitorStateException at
|
||||
// a higher level. Second, if the bias was revoked while we held the
|
||||
// lock, the object could not be rebiased toward another thread, so
|
||||
// the bias bit would be clear.
|
||||
ldr(temp_reg, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
|
||||
andr(temp_reg, temp_reg, markWord::biased_lock_mask_in_place);
|
||||
cmp(temp_reg, (u1)markWord::biased_lock_pattern);
|
||||
br(Assembler::EQ, done);
|
||||
}
|
||||
|
||||
static void pass_arg0(MacroAssembler* masm, Register arg) {
|
||||
if (c_rarg0 != arg ) {
|
||||
masm->mov(c_rarg0, arg);
|
||||
@@ -3663,6 +3835,11 @@ void MacroAssembler::cmp_klass(Register oop, Register trial_klass, Register tmp)
|
||||
cmp(trial_klass, tmp);
|
||||
}
|
||||
|
||||
void MacroAssembler::load_prototype_header(Register dst, Register src) {
|
||||
load_klass(dst, src);
|
||||
ldr(dst, Address(dst, Klass::prototype_header_offset()));
|
||||
}
|
||||
|
||||
void MacroAssembler::store_klass(Register dst, Register src) {
|
||||
// FIXME: Should this be a store release? concurrent gcs assumes
|
||||
// klass length is valid if klass field is not null.
|
||||
@@ -4089,6 +4266,68 @@ void MacroAssembler::eden_allocate(Register obj,
|
||||
bs->eden_allocate(this, obj, var_size_in_bytes, con_size_in_bytes, t1, slow_case);
|
||||
}
|
||||
|
||||
// Zero words; len is in bytes
|
||||
// Destroys all registers except addr
|
||||
// len must be a nonzero multiple of wordSize
|
||||
void MacroAssembler::zero_memory(Register addr, Register len, Register t1) {
|
||||
assert_different_registers(addr, len, t1, rscratch1, rscratch2);
|
||||
|
||||
#ifdef ASSERT
|
||||
{ Label L;
|
||||
tst(len, BytesPerWord - 1);
|
||||
br(Assembler::EQ, L);
|
||||
stop("len is not a multiple of BytesPerWord");
|
||||
bind(L);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef PRODUCT
|
||||
block_comment("zero memory");
|
||||
#endif
|
||||
|
||||
Label loop;
|
||||
Label entry;
|
||||
|
||||
// Algorithm:
|
||||
//
|
||||
// scratch1 = cnt & 7;
|
||||
// cnt -= scratch1;
|
||||
// p += scratch1;
|
||||
// switch (scratch1) {
|
||||
// do {
|
||||
// cnt -= 8;
|
||||
// p[-8] = 0;
|
||||
// case 7:
|
||||
// p[-7] = 0;
|
||||
// case 6:
|
||||
// p[-6] = 0;
|
||||
// // ...
|
||||
// case 1:
|
||||
// p[-1] = 0;
|
||||
// case 0:
|
||||
// p += 8;
|
||||
// } while (cnt);
|
||||
// }
|
||||
|
||||
const int unroll = 8; // Number of str(zr) instructions we'll unroll
|
||||
|
||||
lsr(len, len, LogBytesPerWord);
|
||||
andr(rscratch1, len, unroll - 1); // tmp1 = cnt % unroll
|
||||
sub(len, len, rscratch1); // cnt -= unroll
|
||||
// t1 always points to the end of the region we're about to zero
|
||||
add(t1, addr, rscratch1, Assembler::LSL, LogBytesPerWord);
|
||||
adr(rscratch2, entry);
|
||||
sub(rscratch2, rscratch2, rscratch1, Assembler::LSL, 2);
|
||||
br(rscratch2);
|
||||
bind(loop);
|
||||
sub(len, len, unroll);
|
||||
for (int i = -unroll; i < 0; i++)
|
||||
Assembler::str(zr, Address(t1, i * wordSize));
|
||||
bind(entry);
|
||||
add(t1, t1, unroll * wordSize);
|
||||
cbnz(len, loop);
|
||||
}
|
||||
|
||||
void MacroAssembler::verify_tlab() {
|
||||
#ifdef ASSERT
|
||||
if (UseTLAB && VerifyOops) {
|
||||
@@ -4607,11 +4846,10 @@ void MacroAssembler::string_equals(Register a1, Register a2,
|
||||
// handle anything smaller than this ourselves in zero_words().
|
||||
const int MacroAssembler::zero_words_block_size = 8;
|
||||
|
||||
// zero_words() is used by C2 ClearArray patterns and by
|
||||
// C1_MacroAssembler. It is as small as possible, handling small word
|
||||
// counts locally and delegating anything larger to the zero_blocks
|
||||
// stub. It is expanded many times in compiled code, so it is
|
||||
// important to keep it short.
|
||||
// zero_words() is used by C2 ClearArray patterns. It is as small as
|
||||
// possible, handling small word counts locally and delegating
|
||||
// anything larger to the zero_blocks stub. It is expanded many times
|
||||
// in compiled code, so it is important to keep it short.
|
||||
|
||||
// ptr: Address of a buffer to be zeroed.
|
||||
// cnt: Count in HeapWords.
|
||||
@@ -4620,46 +4858,32 @@ const int MacroAssembler::zero_words_block_size = 8;
|
||||
address MacroAssembler::zero_words(Register ptr, Register cnt)
|
||||
{
|
||||
assert(is_power_of_2(zero_words_block_size), "adjust this");
|
||||
assert(ptr == r10 && cnt == r11, "mismatch in register usage");
|
||||
|
||||
BLOCK_COMMENT("zero_words {");
|
||||
assert(ptr == r10 && cnt == r11, "mismatch in register usage");
|
||||
RuntimeAddress zero_blocks = RuntimeAddress(StubRoutines::aarch64::zero_blocks());
|
||||
assert(zero_blocks.target() != NULL, "zero_blocks stub has not been generated");
|
||||
|
||||
subs(rscratch1, cnt, zero_words_block_size);
|
||||
cmp(cnt, (u1)zero_words_block_size);
|
||||
Label around;
|
||||
br(LO, around);
|
||||
{
|
||||
RuntimeAddress zero_blocks = RuntimeAddress(StubRoutines::aarch64::zero_blocks());
|
||||
assert(zero_blocks.target() != NULL, "zero_blocks stub has not been generated");
|
||||
// Make sure this is a C2 compilation. C1 allocates space only for
|
||||
// trampoline stubs generated by Call LIR ops, and in any case it
|
||||
// makes sense for a C1 compilation task to proceed as quickly as
|
||||
// possible.
|
||||
CompileTask* task;
|
||||
if (StubRoutines::aarch64::complete()
|
||||
&& Thread::current()->is_Compiler_thread()
|
||||
&& (task = ciEnv::current()->task())
|
||||
&& is_c2_compile(task->comp_level())) {
|
||||
if (StubRoutines::aarch64::complete()) {
|
||||
address tpc = trampoline_call(zero_blocks);
|
||||
if (tpc == NULL) {
|
||||
DEBUG_ONLY(reset_labels(around));
|
||||
assert(false, "failed to allocate space for trampoline");
|
||||
postcond(pc() == badAddress);
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
far_call(zero_blocks);
|
||||
bl(zero_blocks);
|
||||
}
|
||||
}
|
||||
bind(around);
|
||||
|
||||
// We have a few words left to do. zero_blocks has adjusted r10 and r11
|
||||
// for us.
|
||||
for (int i = zero_words_block_size >> 1; i > 1; i >>= 1) {
|
||||
Label l;
|
||||
tbz(cnt, exact_log2(i), l);
|
||||
for (int j = 0; j < i; j += 2) {
|
||||
stp(zr, zr, post(ptr, 2 * BytesPerWord));
|
||||
stp(zr, zr, post(ptr, 16));
|
||||
}
|
||||
bind(l);
|
||||
}
|
||||
@@ -4669,56 +4893,46 @@ address MacroAssembler::zero_words(Register ptr, Register cnt)
|
||||
str(zr, Address(ptr));
|
||||
bind(l);
|
||||
}
|
||||
|
||||
BLOCK_COMMENT("} zero_words");
|
||||
postcond(pc() != badAddress);
|
||||
return pc();
|
||||
}
|
||||
|
||||
// base: Address of a buffer to be zeroed, 8 bytes aligned.
|
||||
// cnt: Immediate count in HeapWords.
|
||||
//
|
||||
// r10, r11, rscratch1, and rscratch2 are clobbered.
|
||||
#define SmallArraySize (18 * BytesPerLong)
|
||||
void MacroAssembler::zero_words(Register base, uint64_t cnt)
|
||||
{
|
||||
guarantee(zero_words_block_size < BlockZeroingLowLimit,
|
||||
"increase BlockZeroingLowLimit");
|
||||
if (cnt <= (uint64_t)BlockZeroingLowLimit / BytesPerWord) {
|
||||
#ifndef PRODUCT
|
||||
{
|
||||
char buf[64];
|
||||
snprintf(buf, sizeof buf, "zero_words (count = %" PRIu64 ") {", cnt);
|
||||
BLOCK_COMMENT(buf);
|
||||
}
|
||||
#endif
|
||||
if (cnt >= 16) {
|
||||
uint64_t loops = cnt/16;
|
||||
if (loops > 1) {
|
||||
mov(rscratch2, loops - 1);
|
||||
}
|
||||
{
|
||||
Label loop;
|
||||
bind(loop);
|
||||
for (int i = 0; i < 16; i += 2) {
|
||||
stp(zr, zr, Address(base, i * BytesPerWord));
|
||||
}
|
||||
add(base, base, 16 * BytesPerWord);
|
||||
if (loops > 1) {
|
||||
subs(rscratch2, rscratch2, 1);
|
||||
br(GE, loop);
|
||||
}
|
||||
}
|
||||
}
|
||||
cnt %= 16;
|
||||
int i = cnt & 1; // store any odd word to start
|
||||
if (i) str(zr, Address(base));
|
||||
BLOCK_COMMENT("zero_words {");
|
||||
int i = cnt & 1; // store any odd word to start
|
||||
if (i) str(zr, Address(base));
|
||||
|
||||
if (cnt <= SmallArraySize / BytesPerLong) {
|
||||
for (; i < (int)cnt; i += 2) {
|
||||
stp(zr, zr, Address(base, i * wordSize));
|
||||
}
|
||||
BLOCK_COMMENT("} zero_words");
|
||||
} else {
|
||||
mov(r10, base); mov(r11, cnt);
|
||||
zero_words(r10, r11);
|
||||
const int unroll = 4; // Number of stp(zr, zr) instructions we'll unroll
|
||||
int remainder = cnt % (2 * unroll);
|
||||
for (; i < remainder; i += 2) {
|
||||
stp(zr, zr, Address(base, i * wordSize));
|
||||
}
|
||||
Label loop;
|
||||
Register cnt_reg = rscratch1;
|
||||
Register loop_base = rscratch2;
|
||||
cnt = cnt - remainder;
|
||||
mov(cnt_reg, cnt);
|
||||
// adjust base and prebias by -2 * wordSize so we can pre-increment
|
||||
add(loop_base, base, (remainder - 2) * wordSize);
|
||||
bind(loop);
|
||||
sub(cnt_reg, cnt_reg, 2 * unroll);
|
||||
for (i = 1; i < unroll; i++) {
|
||||
stp(zr, zr, Address(loop_base, 2 * i * wordSize));
|
||||
}
|
||||
stp(zr, zr, Address(pre(loop_base, 2 * unroll * wordSize)));
|
||||
cbnz(cnt_reg, loop);
|
||||
}
|
||||
BLOCK_COMMENT("} zero_words");
|
||||
}
|
||||
|
||||
// Zero blocks of memory by using DC ZVA.
|
||||
@@ -4773,37 +4987,23 @@ void MacroAssembler::fill_words(Register base, Register cnt, Register value)
|
||||
{
|
||||
// Algorithm:
|
||||
//
|
||||
// if (cnt == 0) {
|
||||
// return;
|
||||
// }
|
||||
// if ((p & 8) != 0) {
|
||||
// *p++ = v;
|
||||
// }
|
||||
//
|
||||
// scratch1 = cnt & 14;
|
||||
// scratch1 = cnt & 7;
|
||||
// cnt -= scratch1;
|
||||
// p += scratch1;
|
||||
// switch (scratch1 / 2) {
|
||||
// switch (scratch1) {
|
||||
// do {
|
||||
// cnt -= 16;
|
||||
// p[-16] = v;
|
||||
// p[-15] = v;
|
||||
// cnt -= 8;
|
||||
// p[-8] = v;
|
||||
// case 7:
|
||||
// p[-14] = v;
|
||||
// p[-13] = v;
|
||||
// p[-7] = v;
|
||||
// case 6:
|
||||
// p[-12] = v;
|
||||
// p[-11] = v;
|
||||
// p[-6] = v;
|
||||
// // ...
|
||||
// case 1:
|
||||
// p[-2] = v;
|
||||
// p[-1] = v;
|
||||
// case 0:
|
||||
// p += 16;
|
||||
// p += 8;
|
||||
// } while (cnt);
|
||||
// }
|
||||
// if ((cnt & 1) == 1) {
|
||||
// *p++ = v;
|
||||
// }
|
||||
|
||||
assert_different_registers(base, cnt, value, rscratch1, rscratch2);
|
||||
|
||||
@@ -105,6 +105,20 @@ class MacroAssembler: public Assembler {
|
||||
|
||||
void safepoint_poll(Label& slow_path, bool at_return, bool acquire, bool in_nmethod);
|
||||
|
||||
// Biased locking support
|
||||
// lock_reg and obj_reg must be loaded up with the appropriate values.
|
||||
// swap_reg is killed.
|
||||
// tmp_reg must be supplied and must not be rscratch1 or rscratch2
|
||||
// Optional slow case is for implementations (interpreter and C1) which branch to
|
||||
// slow case directly. Leaves condition codes set for C2's Fast_Lock node.
|
||||
void biased_locking_enter(Register lock_reg, Register obj_reg,
|
||||
Register swap_reg, Register tmp_reg,
|
||||
bool swap_reg_contains_mark,
|
||||
Label& done, Label* slow_case = NULL,
|
||||
BiasedLockingCounters* counters = NULL);
|
||||
void biased_locking_exit (Register obj_reg, Register temp_reg, Label& done);
|
||||
|
||||
|
||||
// Helper functions for statistics gathering.
|
||||
// Unconditional atomic increment.
|
||||
void atomic_incw(Register counter_addr, Register tmp, Register tmp2);
|
||||
@@ -833,6 +847,8 @@ public:
|
||||
// stored using routines that take a jobject.
|
||||
void store_heap_oop_null(Address dst);
|
||||
|
||||
void load_prototype_header(Register dst, Register src);
|
||||
|
||||
void store_klass_gap(Register dst, Register src);
|
||||
|
||||
// This dummy is to prevent a call to store_heap_oop from
|
||||
@@ -888,6 +904,7 @@ public:
|
||||
Register t2, // temp register
|
||||
Label& slow_case // continuation point if fast allocation fails
|
||||
);
|
||||
void zero_memory(Register addr, Register len, Register t1);
|
||||
void verify_tlab();
|
||||
|
||||
// interface method calling
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2018, Cavium. All rights reserved. (By BELLSOFT)
|
||||
* Copyright (c) 2016, 2021, Intel Corporation. All rights reserved.
|
||||
* Copyright (c) 2016, Intel Corporation.
|
||||
* Intel Math Library (LIBM) Source Code
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
@@ -138,11 +138,6 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
// Does the CPU supports vector constant rotate instructions?
|
||||
static constexpr bool supports_vector_constant_rotates(int shift) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Does the CPU supports vector unsigned comparison instructions?
|
||||
static const bool supports_vector_comparison_unsigned(int vlen, BasicType bt) {
|
||||
// Not supported on SVE yet.
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_AARCH64_PAUTH_AARCH64_HPP
|
||||
#define CPU_AARCH64_PAUTH_AARCH64_HPP
|
||||
#ifndef CPU_AARCH64_PAUTH_AARCH64_INLINE_HPP
|
||||
#define CPU_AARCH64_PAUTH_AARCH64_INLINE_HPP
|
||||
|
||||
#include OS_CPU_HEADER_INLINE(pauth)
|
||||
|
||||
@@ -32,4 +32,4 @@ inline bool pauth_ptr_is_raw(address ptr) {
|
||||
return ptr == pauth_strip_pointer(ptr);
|
||||
}
|
||||
|
||||
#endif // CPU_AARCH64_PAUTH_AARCH64_HPP
|
||||
#endif // CPU_AARCH64_PAUTH_AARCH64_INLINE_HPP
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -36,7 +36,7 @@ typedef VMRegImpl* VMReg;
|
||||
class RegisterImpl;
|
||||
typedef RegisterImpl* Register;
|
||||
|
||||
inline const Register as_Register(int encoding) {
|
||||
inline Register as_Register(int encoding) {
|
||||
return (Register)(intptr_t) encoding;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class RegisterImpl: public AbstractRegisterImpl {
|
||||
Register successor() const { return as_Register(encoding() + 1); }
|
||||
|
||||
// construction
|
||||
inline friend const Register as_Register(int encoding);
|
||||
inline friend Register as_Register(int encoding);
|
||||
|
||||
VMReg as_VMReg();
|
||||
|
||||
@@ -242,7 +242,6 @@ class PRegisterImpl: public AbstractRegisterImpl {
|
||||
public:
|
||||
enum {
|
||||
number_of_registers = 16,
|
||||
number_of_governing_registers = 8,
|
||||
max_slots_per_register = 1
|
||||
};
|
||||
|
||||
@@ -258,7 +257,6 @@ class PRegisterImpl: public AbstractRegisterImpl {
|
||||
int encoding() const { assert(is_valid(), "invalid register"); return (intptr_t)this; }
|
||||
int encoding_nocheck() const { return (intptr_t)this; }
|
||||
bool is_valid() const { return 0 <= (intptr_t)this && (intptr_t)this < number_of_registers; }
|
||||
bool is_governing() const { return 0 <= (intptr_t)this && (intptr_t)this < number_of_governing_registers; }
|
||||
const char* name() const;
|
||||
};
|
||||
|
||||
@@ -422,8 +420,4 @@ inline FloatRegister AbstractRegSet<FloatRegister>::first() {
|
||||
return first ? as_FloatRegister(exact_log2(first)) : fnoreg;
|
||||
}
|
||||
|
||||
inline Register as_Register(FloatRegister reg) {
|
||||
return as_Register(reg->encoding());
|
||||
}
|
||||
|
||||
#endif // CPU_AARCH64_REGISTER_AARCH64_HPP
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user