mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-10 19:39:39 +01:00
Compare commits
972 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
743c821289 | ||
|
|
b02c125676 | ||
|
|
06f9ff047f | ||
|
|
e6ac956a7a | ||
|
|
9f796da377 | ||
|
|
ceb0c0fc39 | ||
|
|
5160cfb496 | ||
|
|
0735dc27c7 | ||
|
|
79f9d8d832 | ||
|
|
4994bd5942 | ||
|
|
016694bf74 | ||
|
|
5540a7859b | ||
|
|
aae9902234 | ||
|
|
ea6674fec8 | ||
|
|
d714b5d3da | ||
|
|
ce02836232 | ||
|
|
ac141c2fa1 | ||
|
|
ed70910b0f | ||
|
|
f155661151 | ||
|
|
c68697e178 | ||
|
|
dccb1782ec | ||
|
|
699b8112f8 | ||
|
|
0385975f44 | ||
|
|
7d7d308d9a | ||
|
|
eceb3bbc80 | ||
|
|
3acdba38ce | ||
|
|
523993e9e8 | ||
|
|
b8da9695f0 | ||
|
|
48ba9d415f | ||
|
|
9dd93c6a2c | ||
|
|
f8c8bcf4fd | ||
|
|
15b5b54ac7 | ||
|
|
644e400cd1 | ||
|
|
fd7f78a535 | ||
|
|
1b94a3466e | ||
|
|
13bab09bff | ||
|
|
8f1bb59e1a | ||
|
|
1bd683b588 | ||
|
|
37b70707bd | ||
|
|
62a58062e5 | ||
|
|
9609f57cef | ||
|
|
441dbde2c3 | ||
|
|
ee0bcc5526 | ||
|
|
ceb51d4444 | ||
|
|
d83346dcff | ||
|
|
9334fe2eca | ||
|
|
03230f8565 | ||
|
|
a3843e8e6e | ||
|
|
60c29ff57b | ||
|
|
30d2003698 | ||
|
|
9dc62825b5 | ||
|
|
6949e34575 | ||
|
|
7da274ded4 | ||
|
|
4e0b03580d | ||
|
|
a23987fecb | ||
|
|
04c0b130f0 | ||
|
|
cab515962b | ||
|
|
bd55d7a495 | ||
|
|
2b11a28997 | ||
|
|
5ed72775a7 | ||
|
|
dc08cf016e | ||
|
|
ea774b74e8 | ||
|
|
365660e667 | ||
|
|
1d73f8842a | ||
|
|
cb9358b561 | ||
|
|
bc9ece9698 | ||
|
|
1cde536b98 | ||
|
|
1a6cbe421f | ||
|
|
3fd89be6d1 | ||
|
|
18190519e7 | ||
|
|
be0161a8e6 | ||
|
|
bc72f476d1 | ||
|
|
a65d9532ed | ||
|
|
20b5f09777 | ||
|
|
3b44d7bfa4 | ||
|
|
8193856af8 | ||
|
|
10ae602944 | ||
|
|
770d2b41d1 | ||
|
|
70c1ff7e15 | ||
|
|
6ed81641b1 | ||
|
|
5e4a2ead71 | ||
|
|
b787ad6f69 | ||
|
|
6b4a5ef105 | ||
|
|
9f7dc19ffd | ||
|
|
805f1deebc | ||
|
|
b85440d085 | ||
|
|
fd2ee0844a | ||
|
|
27c58c06cf | ||
|
|
cbb3d23e19 | ||
|
|
6e368e0c69 | ||
|
|
e1b2229b0b | ||
|
|
bdd37b0e5e | ||
|
|
5ddeb56759 | ||
|
|
a5c9bc7032 | ||
|
|
5fd2b7d61a | ||
|
|
9bef2d1610 | ||
|
|
6fc032de2c | ||
|
|
413c6bd040 | ||
|
|
2eaddd5b0a | ||
|
|
7db8bff9e1 | ||
|
|
5ad102ca3f | ||
|
|
a56cd371a2 | ||
|
|
d3429ada8f | ||
|
|
db3f6eabb5 | ||
|
|
017dc093ac | ||
|
|
1d8cca2b84 | ||
|
|
eefbfdce31 | ||
|
|
401af27b9d | ||
|
|
38af17d078 | ||
|
|
820263e48a | ||
|
|
b65fdf5af0 | ||
|
|
d2082c58ff | ||
|
|
563e876246 | ||
|
|
c70258ca1c | ||
|
|
9697e5bf74 | ||
|
|
c9ecc82666 | ||
|
|
bf225c201f | ||
|
|
e5ab210713 | ||
|
|
18c2e40de7 | ||
|
|
40d159d4a9 | ||
|
|
25e509b0db | ||
|
|
0acd065bf5 | ||
|
|
f36147b326 | ||
|
|
5cf672e778 | ||
|
|
a10ee46e6d | ||
|
|
6cff49c0fe | ||
|
|
ebb1095805 | ||
|
|
bcd86d575f | ||
|
|
5edd546585 | ||
|
|
a531c9aece | ||
|
|
99c299f098 | ||
|
|
272e66d017 | ||
|
|
14c79be161 | ||
|
|
7c34bdf73c | ||
|
|
0029554d20 | ||
|
|
77bd417c99 | ||
|
|
bc828c8fb6 | ||
|
|
917d0182cb | ||
|
|
3bacf7ea85 | ||
|
|
4a351e3e57 | ||
|
|
189017f750 | ||
|
|
3f59eae3d0 | ||
|
|
46988e1073 | ||
|
|
f7e8d255cc | ||
|
|
26b002805a | ||
|
|
8c00c374ec | ||
|
|
59bec29c35 | ||
|
|
a86dd56de3 | ||
|
|
76442f39b9 | ||
|
|
445e5ecd98 | ||
|
|
3ffc5b9ef7 | ||
|
|
529049be6b | ||
|
|
eddfc6449f | ||
|
|
2e7e272d7b | ||
|
|
ee0d309bbd | ||
|
|
2300a212dd | ||
|
|
3d74cbe0ac | ||
|
|
f5afbbd32a | ||
|
|
cbc7090b91 | ||
|
|
f735275021 | ||
|
|
3d37c4e37a | ||
|
|
73ab54e4c3 | ||
|
|
80662a485a | ||
|
|
c118543efe | ||
|
|
13e0f99626 | ||
|
|
bf3cfbeff4 | ||
|
|
2a53f5a5c2 | ||
|
|
f67e435431 | ||
|
|
c28bb8bf7a | ||
|
|
518536c607 | ||
|
|
0f7808f333 | ||
|
|
c9bea77342 | ||
|
|
6681fc72d3 | ||
|
|
7282f68cee | ||
|
|
6e203384f8 | ||
|
|
6249259c80 | ||
|
|
a41d35073e | ||
|
|
7daf9813c0 | ||
|
|
a201be8555 | ||
|
|
db4b4a5b35 | ||
|
|
d886ae12a2 | ||
|
|
eec04dd010 | ||
|
|
a9bd1ad40c | ||
|
|
b1fa1ecc98 | ||
|
|
83feb7a238 | ||
|
|
963b83fcf1 | ||
|
|
68b27b88b5 | ||
|
|
e0245682c8 | ||
|
|
4761479608 | ||
|
|
fe26467633 | ||
|
|
e2c5d03546 | ||
|
|
19bb6ebfaf | ||
|
|
54e37629f6 | ||
|
|
974ad4e8cd | ||
|
|
117f0b4051 | ||
|
|
dedcce0450 | ||
|
|
03526e250d | ||
|
|
1de2acea77 | ||
|
|
fa32bfe113 | ||
|
|
91df797879 | ||
|
|
92712ef45d | ||
|
|
5850bf4488 | ||
|
|
853319439e | ||
|
|
63e08d4af7 | ||
|
|
5c67e3d6e5 | ||
|
|
2349304bb1 | ||
|
|
0bd2f9cba2 | ||
|
|
27e6a4d2f7 | ||
|
|
1934bd8d2c | ||
|
|
7b255b8a62 | ||
|
|
310ef85667 | ||
|
|
5205eae6ff | ||
|
|
bbc5c98b14 | ||
|
|
563a3358f6 | ||
|
|
ec7c6be6a9 | ||
|
|
197fde5363 | ||
|
|
ec3bb93d79 | ||
|
|
39c9de2ace | ||
|
|
05c9eec8d0 | ||
|
|
fea73c1d40 | ||
|
|
afb4a1be9e | ||
|
|
7c13a2cd9a | ||
|
|
4df9c87345 | ||
|
|
9449fea2cd | ||
|
|
1fa772e814 | ||
|
|
8ad4836883 | ||
|
|
d75ea7e679 | ||
|
|
e9a434165a | ||
|
|
45300dd123 | ||
|
|
44cff9d6ab | ||
|
|
3bcbcc5747 | ||
|
|
f3e0588d0b | ||
|
|
f2d2eef988 | ||
|
|
1c560727b8 | ||
|
|
f153e415d7 | ||
|
|
fba74f796e | ||
|
|
56ebb8c1b9 | ||
|
|
5cf349c3b0 | ||
|
|
21f2e9a71c | ||
|
|
854de8c9c6 | ||
|
|
16af473397 | ||
|
|
da0a51ce97 | ||
|
|
566279af49 | ||
|
|
77e69e02eb | ||
|
|
dcc7254a38 | ||
|
|
003be0dee2 | ||
|
|
2d9f0324ba | ||
|
|
25ed36f3ef | ||
|
|
a2315ddd2a | ||
|
|
66836d40b8 | ||
|
|
3daa03c30f | ||
|
|
24117c6e9a | ||
|
|
5e40fb6bda | ||
|
|
2528c620a6 | ||
|
|
1be29bd725 | ||
|
|
2f683fdc4a | ||
|
|
c75df634be | ||
|
|
fd13e1ce98 | ||
|
|
6c9236c80c | ||
|
|
1926aeb1a3 | ||
|
|
74822ce12a | ||
|
|
ea86a20e6d | ||
|
|
5e30bf6835 | ||
|
|
c50370599e | ||
|
|
c460f842bf | ||
|
|
549b875866 | ||
|
|
832bfbc0dd | ||
|
|
3066a67e62 | ||
|
|
ce9986991d | ||
|
|
eac8f5d2c9 | ||
|
|
2304044ab2 | ||
|
|
0f1cd987b3 | ||
|
|
1ac7489874 | ||
|
|
055d2ffa69 | ||
|
|
2bff8e0a13 | ||
|
|
c6448dc3af | ||
|
|
1703915d3f | ||
|
|
a910b20b51 | ||
|
|
7d7e60c8ae | ||
|
|
534d2b33dc | ||
|
|
e9a62d79cd | ||
|
|
13a3927855 | ||
|
|
282ee40a56 | ||
|
|
e7a450038a | ||
|
|
38f59f84c9 | ||
|
|
e1681c4828 | ||
|
|
e138297323 | ||
|
|
7583a7b857 | ||
|
|
e85c7d09df | ||
|
|
eec1153993 | ||
|
|
fc739fee53 | ||
|
|
aeca49e43f | ||
|
|
54c95cf226 | ||
|
|
cd6caedd0a | ||
|
|
b32ccf2cb2 | ||
|
|
0572b6ece7 | ||
|
|
d1052c70cb | ||
|
|
61a590e9be | ||
|
|
9d518b3213 | ||
|
|
1dda79cfab | ||
|
|
aa1911191c | ||
|
|
00adbbe553 | ||
|
|
c2d76f9844 | ||
|
|
4dd1b3a610 | ||
|
|
240541e1c1 | ||
|
|
a23de2ec09 | ||
|
|
3525a40f39 | ||
|
|
712d866b72 | ||
|
|
da7080fffb | ||
|
|
4edf791aec | ||
|
|
12196baf67 | ||
|
|
a471fe992f | ||
|
|
839cede1a4 | ||
|
|
ecd2d83096 | ||
|
|
d8f9b188fa | ||
|
|
aa26cede63 | ||
|
|
20e983a97c | ||
|
|
97ec9d3e0a | ||
|
|
01b15bc1f9 | ||
|
|
6d05a1d3f4 | ||
|
|
8ea544c33f | ||
|
|
334683e634 | ||
|
|
20e0055e20 | ||
|
|
83fe688d80 | ||
|
|
a49ecb26c5 | ||
|
|
7f702cf483 | ||
|
|
bd666f90eb | ||
|
|
a0c3efa6a8 | ||
|
|
7576064a10 | ||
|
|
8df6b2c4a3 | ||
|
|
ff24088c86 | ||
|
|
5a1301df19 | ||
|
|
5039b42de1 | ||
|
|
1ca008fd02 | ||
|
|
cf75f1f9c6 | ||
|
|
52526080ba | ||
|
|
f799cf180a | ||
|
|
56c75453cd | ||
|
|
7447276475 | ||
|
|
c90c31b07e | ||
|
|
52c6044fe4 | ||
|
|
4e1bf31368 | ||
|
|
878497fb85 | ||
|
|
f2ef809719 | ||
|
|
1fa090524a | ||
|
|
f71d64fbeb | ||
|
|
850bc20306 | ||
|
|
75ce44aa84 | ||
|
|
5c4f92ba9a | ||
|
|
263e32bb85 | ||
|
|
7d6c902ce8 | ||
|
|
5091057614 | ||
|
|
ba0c12231b | ||
|
|
cbcf401170 | ||
|
|
f8de5bc582 | ||
|
|
9a726df373 | ||
|
|
2af869b193 | ||
|
|
5c1f77fab1 | ||
|
|
54acadbe66 | ||
|
|
0514cee6c8 | ||
|
|
28e96e333b | ||
|
|
f5201ac117 | ||
|
|
a3609ba5ac | ||
|
|
116b8543b0 | ||
|
|
fdfc557878 | ||
|
|
54fec2b98b | ||
|
|
03d66d9ee2 | ||
|
|
f6ff38ab42 | ||
|
|
dbbfa76b73 | ||
|
|
9af36b13c5 | ||
|
|
34412da52b | ||
|
|
a350a1115a | ||
|
|
bcad87eacb | ||
|
|
2a70a6dc58 | ||
|
|
6df0f5e390 | ||
|
|
9c3eaa49f7 | ||
|
|
dfcea0547e | ||
|
|
c748d358b2 | ||
|
|
72679c94ee | ||
|
|
10e6eec9e6 | ||
|
|
251f2ac785 | ||
|
|
fe7ec31259 | ||
|
|
516197f50b | ||
|
|
ad1033d68f | ||
|
|
c220b1358c | ||
|
|
9ae39b62b9 | ||
|
|
3d35b408e1 | ||
|
|
de34bb8e66 | ||
|
|
620df7ec34 | ||
|
|
6b4393917a | ||
|
|
81985d422d | ||
|
|
d627282f0c | ||
|
|
96f71a9a6b | ||
|
|
17cf49746d | ||
|
|
c6ab63d306 | ||
|
|
ff54a6493a | ||
|
|
c11f36e620 | ||
|
|
8f121a173c | ||
|
|
33970629ac | ||
|
|
c51bed739d | ||
|
|
a6464b74a8 | ||
|
|
0dd50dbb3e | ||
|
|
dec42bebb8 | ||
|
|
2fe1298447 | ||
|
|
2e3bdec985 | ||
|
|
c4fb00a7be | ||
|
|
01d4b772de | ||
|
|
c7125aa2af | ||
|
|
0dce98b716 | ||
|
|
08b1fa4cb3 | ||
|
|
23e1e2ff4a | ||
|
|
5a62e99523 | ||
|
|
982064e50c | ||
|
|
b52af182c4 | ||
|
|
7bc0d82450 | ||
|
|
b7fcd0b235 | ||
|
|
984d7f9cdf | ||
|
|
42d3604a31 | ||
|
|
cf78925859 | ||
|
|
ba32b78bfa | ||
|
|
547ce03016 | ||
|
|
f07f5ce984 | ||
|
|
cabd7c1f7a | ||
|
|
57266064a7 | ||
|
|
2b94b70ef5 | ||
|
|
1130c1bc33 | ||
|
|
2f63d3aee5 | ||
|
|
382f870cd5 | ||
|
|
8c760e78b9 | ||
|
|
afa52e4681 | ||
|
|
164cae469c | ||
|
|
49a82d8806 | ||
|
|
96070212ad | ||
|
|
53a83d15a1 | ||
|
|
21b72dea78 | ||
|
|
51877f568b | ||
|
|
c1deb9eebf | ||
|
|
f62f1178aa | ||
|
|
a08208283b | ||
|
|
f7cd3fad24 | ||
|
|
ff75f763c0 | ||
|
|
a16d23557b | ||
|
|
e55ddabffa | ||
|
|
9a1c1f2efb | ||
|
|
e57a214e2a | ||
|
|
2f2acb2e3f | ||
|
|
06d804a0f0 | ||
|
|
6e390ef17c | ||
|
|
9652ae9a8d | ||
|
|
59460ff700 | ||
|
|
9d060574e5 | ||
|
|
fedd0a0ee3 | ||
|
|
79497ef7f5 | ||
|
|
8416ca3104 | ||
|
|
d8c3533a91 | ||
|
|
eacfcd86d3 | ||
|
|
534a8605e5 | ||
|
|
6fe9143bbb | ||
|
|
1a01839f8c | ||
|
|
26848a7d6c | ||
|
|
0e725c6fb1 | ||
|
|
b3f56086c9 | ||
|
|
ee35f6384f | ||
|
|
12a0dd03b8 | ||
|
|
366650a438 | ||
|
|
78b1360e7d | ||
|
|
417f8ecf07 | ||
|
|
57cabc6d74 | ||
|
|
b4c4496ef8 | ||
|
|
b5334fe237 | ||
|
|
e8ef93ae9d | ||
|
|
25b22c9b55 | ||
|
|
ead4529c92 | ||
|
|
3a1887269b | ||
|
|
e7f63ba310 | ||
|
|
a0fb35c837 | ||
|
|
032ead1d90 | ||
|
|
a8b4284848 | ||
|
|
ed39e17e34 | ||
|
|
6749c62b9e | ||
|
|
9aeacf2de5 | ||
|
|
991097b7bf | ||
|
|
523a4efe1c | ||
|
|
0dd7c69b9e | ||
|
|
66535fe26d | ||
|
|
db7af2b3c3 | ||
|
|
99829950f6 | ||
|
|
0ef0986731 | ||
|
|
610a18e7b3 | ||
|
|
8d33ea7395 | ||
|
|
3c53057fa6 | ||
|
|
1fcede053c | ||
|
|
fae9c7a3f0 | ||
|
|
dd68829017 | ||
|
|
b85fe02be5 | ||
|
|
e18277b470 | ||
|
|
e5ce5c57c8 | ||
|
|
91fdd72c97 | ||
|
|
b6ec93b038 | ||
|
|
65e63b6ab4 | ||
|
|
3f0fef2c9c | ||
|
|
3e0ef832cc | ||
|
|
7b7136b4ec | ||
|
|
5886ef728f | ||
|
|
d7aa349820 | ||
|
|
3b32f6a8ec | ||
|
|
8f73357004 | ||
|
|
429158218b | ||
|
|
ef4cbec6fb | ||
|
|
e9216efefc | ||
|
|
e5196fc24d | ||
|
|
c98dffa186 | ||
|
|
7d7fc69355 | ||
|
|
42ab8fcfb9 | ||
|
|
bf7d40d048 | ||
|
|
5ae32c4c86 | ||
|
|
56ce70c5df | ||
|
|
abc76c6b5b | ||
|
|
9586817cea | ||
|
|
38b877e941 | ||
|
|
8f487d26c0 | ||
|
|
500a3a2d0a | ||
|
|
a2f99fd88b | ||
|
|
0582bd290d | ||
|
|
3ff83ec49e | ||
|
|
7c9c8ba363 | ||
|
|
ca7b885873 | ||
|
|
92be7821f5 | ||
|
|
bcf860703d | ||
|
|
d186dacdb7 | ||
|
|
ef45c8154c | ||
|
|
cd9b1bc820 | ||
|
|
fcb68ea22d | ||
|
|
eb256deb80 | ||
|
|
156187accc | ||
|
|
a377773fa7 | ||
|
|
cae1fd3385 | ||
|
|
eb8ee8bdc7 | ||
|
|
2103dc15cb | ||
|
|
1c72b350e4 | ||
|
|
52338c94f6 | ||
|
|
91f12600d2 | ||
|
|
6c616c71ec | ||
|
|
e94ad551c6 | ||
|
|
d735255919 | ||
|
|
d024f58e61 | ||
|
|
026975a1aa | ||
|
|
8adb052b46 | ||
|
|
9658cecde3 | ||
|
|
b2e7cda6a0 | ||
|
|
65fda5c02a | ||
|
|
d1b788005b | ||
|
|
bb2611ad43 | ||
|
|
e918a59b1d | ||
|
|
28acca609b | ||
|
|
029e3bf8f5 | ||
|
|
78158f30ae | ||
|
|
c793de989f | ||
|
|
15178aa298 | ||
|
|
fe3be498b8 | ||
|
|
62fde68708 | ||
|
|
af87035b71 | ||
|
|
c59e44a7aa | ||
|
|
23f1d4f9a9 | ||
|
|
33ed7c1842 | ||
|
|
782bbca439 | ||
|
|
6cdfd36ac8 | ||
|
|
eb770a060a | ||
|
|
c5daf89053 | ||
|
|
bd08932d5b | ||
|
|
d450e341c7 | ||
|
|
66feb490bd | ||
|
|
dc949003de | ||
|
|
ace70a6d6a | ||
|
|
48b97ac0e0 | ||
|
|
08023481ed | ||
|
|
849655a145 | ||
|
|
575806c0e5 | ||
|
|
8f8b367ae3 | ||
|
|
9186cc7310 | ||
|
|
b787ff6def | ||
|
|
5b27e9c2df | ||
|
|
3cf3e4bbec | ||
|
|
77c110c309 | ||
|
|
901144ee0d | ||
|
|
8f821175cc | ||
|
|
5ed246d17d | ||
|
|
8939acc8ab | ||
|
|
fd0ab04367 | ||
|
|
8a79ac8863 | ||
|
|
ef47635d5a | ||
|
|
c909216446 | ||
|
|
4e314cb9e0 | ||
|
|
a2723d91df | ||
|
|
ae1892fb0f | ||
|
|
0352477ff5 | ||
|
|
a653ff4893 | ||
|
|
248341d372 | ||
|
|
09ec4de74d | ||
|
|
dc961609f8 | ||
|
|
7838321b74 | ||
|
|
42f48a39e8 | ||
|
|
cd16b68962 | ||
|
|
ab23500034 | ||
|
|
f141674d16 | ||
|
|
b6d60280e7 | ||
|
|
955bfcd550 | ||
|
|
edf92721c2 | ||
|
|
b5cfd76c04 | ||
|
|
683319f25c | ||
|
|
b918dc84ec | ||
|
|
f17b2bc06a | ||
|
|
ebd85288ce | ||
|
|
939521b8e4 | ||
|
|
2345065166 | ||
|
|
9c74d54514 | ||
|
|
939753579b | ||
|
|
da49fa5e15 | ||
|
|
704b5990a7 | ||
|
|
e235b61a8b | ||
|
|
a44a470052 | ||
|
|
cc11b7d1f5 | ||
|
|
406f1bc5b9 | ||
|
|
e984fa7997 | ||
|
|
461cb84277 | ||
|
|
c382da5798 | ||
|
|
44d62c8e21 | ||
|
|
d7e58ac480 | ||
|
|
57862005f9 | ||
|
|
04c15466f6 | ||
|
|
16e120b008 | ||
|
|
d7def20afa | ||
|
|
4604c86d2f | ||
|
|
b6f827ef05 | ||
|
|
01f01b6f7b | ||
|
|
faf19abd31 | ||
|
|
e2f736658f | ||
|
|
d3f54dae30 | ||
|
|
4618374269 | ||
|
|
78a392aa3b | ||
|
|
c1a81cfb51 | ||
|
|
def7355cc9 | ||
|
|
457d9de81d | ||
|
|
4402527683 | ||
|
|
8674f49127 | ||
|
|
6f783e5fab | ||
|
|
cff75eb606 | ||
|
|
be923a8b72 | ||
|
|
dbf562c725 | ||
|
|
6cfd4057dc | ||
|
|
497a1822ca | ||
|
|
c5f235c000 | ||
|
|
832c5b06e8 | ||
|
|
24edd3b2c1 | ||
|
|
c96803dc8b | ||
|
|
e490b4f04d | ||
|
|
0418b3295a | ||
|
|
5243f3851b | ||
|
|
1373ceb7f3 | ||
|
|
ec02a87aee | ||
|
|
a7671e7360 | ||
|
|
bce2bd24ef | ||
|
|
8b6a11f7e0 | ||
|
|
ab5de45636 | ||
|
|
99a4b22ae7 | ||
|
|
1b6ae2059b | ||
|
|
daab7b5cee | ||
|
|
a4eb15195c | ||
|
|
b3594c9e55 | ||
|
|
83b15da2eb | ||
|
|
c22af0c29e | ||
|
|
83cb0c6de5 | ||
|
|
612f2c0c0b | ||
|
|
eb9badd8a4 | ||
|
|
a9e7a74d00 | ||
|
|
ba9f44c90f | ||
|
|
40ce05d408 | ||
|
|
6418306211 | ||
|
|
3f59bfd2e1 | ||
|
|
c5a1543ee3 | ||
|
|
90d6ad0157 | ||
|
|
3193a28c53 | ||
|
|
85e36d7924 | ||
|
|
c1b5f62a8c | ||
|
|
ac9af69eee | ||
|
|
e3eb089d47 | ||
|
|
470ffeedda | ||
|
|
59dc849909 | ||
|
|
fc3d3d9b30 | ||
|
|
a3f9e22263 | ||
|
|
84002d12ed | ||
|
|
3a3ea7e17f | ||
|
|
19360a904b | ||
|
|
061b24d4f9 | ||
|
|
c62223a5af | ||
|
|
c67fc73595 | ||
|
|
d9d00d33a6 | ||
|
|
5ad02c98f1 | ||
|
|
2926435d22 | ||
|
|
0df8c9684b | ||
|
|
db340e54f8 | ||
|
|
09301c1dc0 | ||
|
|
abbffc0103 | ||
|
|
14e41ab055 | ||
|
|
c9d6e01233 | ||
|
|
94039e22bb | ||
|
|
b7ca672d5c | ||
|
|
82807d43f8 | ||
|
|
3cc630985d | ||
|
|
4fa4f15122 | ||
|
|
eaf7815ea6 | ||
|
|
81464cd114 | ||
|
|
99048c3d4a | ||
|
|
26275a10b2 | ||
|
|
ae3d96a4ec | ||
|
|
12ee80cac7 | ||
|
|
acd64ba24a | ||
|
|
a0eb1900c9 | ||
|
|
566e3b21ed | ||
|
|
e33eeeea04 | ||
|
|
6f9e1175a9 | ||
|
|
20005511e3 | ||
|
|
fd51b03910 | ||
|
|
64503c784b | ||
|
|
a05f9dea18 | ||
|
|
648c337bea | ||
|
|
cb8eea4ecd | ||
|
|
727412d1b5 | ||
|
|
d922e318bc | ||
|
|
e509997fe8 | ||
|
|
e306367813 | ||
|
|
f318868268 | ||
|
|
79aff26c28 | ||
|
|
d8a783020d | ||
|
|
4cf729cfac | ||
|
|
a2743bab4f | ||
|
|
07f5b762a0 | ||
|
|
d43f588db1 | ||
|
|
04e0fe00ab | ||
|
|
83a2804858 | ||
|
|
2ec6ab347a | ||
|
|
dede3532f7 | ||
|
|
b7f0f480ce | ||
|
|
bb2c80c0e9 | ||
|
|
28f509317d | ||
|
|
cd052c72cd | ||
|
|
b2a61a9972 | ||
|
|
8949c07484 | ||
|
|
e579cca619 | ||
|
|
2e6838a20d | ||
|
|
4ced4e73fc | ||
|
|
e3f85c961b | ||
|
|
63d0e7ff11 | ||
|
|
a4f870df55 | ||
|
|
7bd8375fe4 | ||
|
|
18285fc136 | ||
|
|
1a65719ab3 | ||
|
|
016cc4f333 | ||
|
|
4b9290af0a | ||
|
|
c9e6c4d017 | ||
|
|
6ebae6cded | ||
|
|
f30e15411f | ||
|
|
0671309de5 | ||
|
|
627ef34498 | ||
|
|
39714b6030 | ||
|
|
4e1878ca45 | ||
|
|
f02190bc30 | ||
|
|
1e0caedb9a | ||
|
|
f74fbfe5de | ||
|
|
efeb050e00 | ||
|
|
1d57ff8ad4 | ||
|
|
db51556687 | ||
|
|
670ef8cc52 | ||
|
|
72b9aafd5a | ||
|
|
96fb31e2db | ||
|
|
4cad437956 | ||
|
|
c110623d38 | ||
|
|
f25f4a3eb2 | ||
|
|
2e8b195a96 | ||
|
|
11ad1733f8 | ||
|
|
4755276f36 | ||
|
|
da228e0693 | ||
|
|
d4b923d175 | ||
|
|
c1f066e17e | ||
|
|
c29537740e | ||
|
|
cdff7b963c | ||
|
|
72a3022dc6 | ||
|
|
b4b11d7771 | ||
|
|
67d4ed173a | ||
|
|
9c191cc0fa | ||
|
|
b9db99d7f7 | ||
|
|
aea32ec506 | ||
|
|
f62b9780c3 | ||
|
|
7cb6e5eb3e | ||
|
|
5924c2d6c7 | ||
|
|
7bc315fa6a | ||
|
|
85af573cb6 | ||
|
|
78d0dc7502 | ||
|
|
37d04a1e36 | ||
|
|
2c034f57d6 | ||
|
|
bbceab0725 | ||
|
|
e8eff4d25b | ||
|
|
a300c35655 | ||
|
|
bd095896dd | ||
|
|
daa8eda530 | ||
|
|
7002233ed9 | ||
|
|
f825a51198 | ||
|
|
ed4cd2acd2 | ||
|
|
9946c85e2f | ||
|
|
5cdeef81dd | ||
|
|
a37e8265b5 | ||
|
|
3dbd2d3d2d | ||
|
|
99f33b4d9b | ||
|
|
a50d3bee12 | ||
|
|
aac287ebac | ||
|
|
4a4209ffef | ||
|
|
b034710b2a | ||
|
|
b037353734 | ||
|
|
1f24a5414d | ||
|
|
e89330579d | ||
|
|
070c84cd22 | ||
|
|
66747710a4 | ||
|
|
236e1b6d52 | ||
|
|
85ca0813f1 | ||
|
|
2f530f89e0 | ||
|
|
917c1546f3 | ||
|
|
2b6b7661b9 | ||
|
|
a58bfb93ff | ||
|
|
90e076b2a1 | ||
|
|
6a07820483 | ||
|
|
b07da7bcdc | ||
|
|
d0402ddad7 | ||
|
|
48df41b699 | ||
|
|
f5e6d2c93c | ||
|
|
84a67e83e3 | ||
|
|
488e4ea5c6 | ||
|
|
68ee06f0c9 | ||
|
|
02995887b2 | ||
|
|
36f6d155e3 | ||
|
|
ae7ae847d4 | ||
|
|
d6e4c5f659 | ||
|
|
9d9e41f5b4 | ||
|
|
99e01301cd | ||
|
|
1fd65b7a7b | ||
|
|
4193d052c0 | ||
|
|
a94d1a0407 | ||
|
|
8402469565 | ||
|
|
796ec5e7cf | ||
|
|
fdda766190 | ||
|
|
139a05d059 | ||
|
|
b1b786a3be | ||
|
|
9ca1004e76 | ||
|
|
1258af42be | ||
|
|
16d4551134 | ||
|
|
72e440d06e | ||
|
|
12efc1fe33 | ||
|
|
428d33ef3c | ||
|
|
1e57648abd | ||
|
|
26053fe783 | ||
|
|
c0665efd4f | ||
|
|
85b24c3c4e | ||
|
|
d9b6e4b132 | ||
|
|
e348aa071d | ||
|
|
a919f6d04e | ||
|
|
8184ce39a8 | ||
|
|
061b5cc6b9 | ||
|
|
ec6706520b | ||
|
|
68c1d305e7 | ||
|
|
3bebb1fa76 | ||
|
|
ee6891456e | ||
|
|
b685ea5408 | ||
|
|
07871cd78a | ||
|
|
f687cac889 | ||
|
|
3ee14471e1 | ||
|
|
4d7068923c | ||
|
|
afcbf6b2f4 | ||
|
|
81536830ed | ||
|
|
400c935082 | ||
|
|
2dfbf41d2a | ||
|
|
f1eead6035 | ||
|
|
6546de1d3a | ||
|
|
275cfd323b | ||
|
|
254713ab59 | ||
|
|
21c1282207 | ||
|
|
b63ec0ab58 | ||
|
|
a07150af11 | ||
|
|
a175767ccf | ||
|
|
108e454a04 | ||
|
|
a4f66f5439 | ||
|
|
2c126f1954 | ||
|
|
b8057cf103 | ||
|
|
7c82e09b50 | ||
|
|
5f38d1bb94 | ||
|
|
735c7899d1 | ||
|
|
a0cdf36bdf | ||
|
|
91194517c7 | ||
|
|
50a7755fa4 | ||
|
|
50e873f0e8 | ||
|
|
74fc4e4ee7 | ||
|
|
cedd1a5343 | ||
|
|
972f2ebe97 | ||
|
|
e9d1d87b34 | ||
|
|
bcf5cd6941 | ||
|
|
6162e2c521 | ||
|
|
62d155e8c3 | ||
|
|
277bb208a2 | ||
|
|
e6750a5bb0 | ||
|
|
1a97eb429b | ||
|
|
ab985a7c5d | ||
|
|
0db5511ce6 | ||
|
|
f8fc7eeb24 | ||
|
|
e961b13cd6 | ||
|
|
f8d7f663c1 | ||
|
|
7077535c0b | ||
|
|
39d8d109dd | ||
|
|
890456f0f7 | ||
|
|
637e9d16dd | ||
|
|
fbeea1daef | ||
|
|
27a4243561 | ||
|
|
bd99525633 | ||
|
|
6818dcc08e | ||
|
|
6a58af310a | ||
|
|
84a98ab43f | ||
|
|
fbc12be732 | ||
|
|
265d630125 | ||
|
|
92fd44992b | ||
|
|
2e26b43158 | ||
|
|
3acfa9e4e7 | ||
|
|
26cb016b75 | ||
|
|
7f7add1e56 | ||
|
|
afcaf84022 | ||
|
|
36c9be70e2 | ||
|
|
133c6fb4f3 | ||
|
|
effe40a24c | ||
|
|
2fb3329d71 | ||
|
|
67fb1ee7f1 | ||
|
|
50a7c61d28 | ||
|
|
77a3e04ffc | ||
|
|
969708bd8f | ||
|
|
9927ec0b91 | ||
|
|
6c42856b8d | ||
|
|
76570c627d | ||
|
|
10258dc56e | ||
|
|
3dd3451700 | ||
|
|
63ef90be97 | ||
|
|
d524509224 | ||
|
|
413843cf8e | ||
|
|
46a12e781e | ||
|
|
bca293d012 | ||
|
|
079fccfa9a | ||
|
|
0d8675780f | ||
|
|
a0a3060709 | ||
|
|
a6ebcf61eb | ||
|
|
a8d8ffa8ad | ||
|
|
f6b0f016f6 | ||
|
|
efdbb6afce | ||
|
|
fe790cb319 | ||
|
|
9223ed788a | ||
|
|
c59debb384 | ||
|
|
850c789a82 | ||
|
|
1e61352b54 | ||
|
|
e056bbec92 | ||
|
|
b3e856f9b3 | ||
|
|
a1c7e494c8 | ||
|
|
8fcfddb2d2 | ||
|
|
3df8ca1eba | ||
|
|
073af3bbaa | ||
|
|
81e8e670ce | ||
|
|
5cb231714f | ||
|
|
1d36f173c4 | ||
|
|
883e52aa10 | ||
|
|
13b3541467 |
2
.github/actions/build-jtreg/action.yml
vendored
2
.github/actions/build-jtreg/action.yml
vendored
@@ -65,4 +65,4 @@ runs:
|
||||
with:
|
||||
name: bundles-jtreg-${{ steps.version.outputs.value }}
|
||||
path: jtreg/installed
|
||||
retention-days: 1
|
||||
retention-days: 5
|
||||
|
||||
37
.github/actions/get-bundles/action.yml
vendored
37
.github/actions/get-bundles/action.yml
vendored
@@ -32,10 +32,16 @@ inputs:
|
||||
debug-suffix:
|
||||
description: 'File name suffix denoting debug level, possibly empty'
|
||||
required: false
|
||||
static-suffix:
|
||||
description: 'Static bundle file name suffix'
|
||||
required: false
|
||||
outputs:
|
||||
jdk-path:
|
||||
description: 'Path to the installed JDK bundle'
|
||||
value: ${{ steps.path-name.outputs.jdk }}
|
||||
static-jdk-path:
|
||||
description: 'Path to the installed static JDK bundle'
|
||||
value: ${{ steps.path-name.outputs.static_jdk }}
|
||||
symbols-path:
|
||||
description: 'Path to the installed symbols bundle'
|
||||
value: ${{ steps.path-name.outputs.symbols }}
|
||||
@@ -61,6 +67,15 @@ runs:
|
||||
path: bundles
|
||||
if: steps.download-bundles.outcome == 'failure'
|
||||
|
||||
- name: 'Download static bundles artifact'
|
||||
id: download-static-bundles
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}
|
||||
path: bundles
|
||||
continue-on-error: true
|
||||
if: ${{ inputs.static-suffix == '-static' }}
|
||||
|
||||
- name: 'Unpack bundles'
|
||||
run: |
|
||||
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip ]]; then
|
||||
@@ -75,6 +90,20 @@ runs:
|
||||
tar -xf bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/jdk
|
||||
fi
|
||||
|
||||
if [[ '${{ inputs.static-suffix }}' == '-static' ]]; then
|
||||
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.zip ]]; then
|
||||
echo 'Unpacking static jdk bundle...'
|
||||
mkdir -p bundles/static-jdk
|
||||
unzip -q bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.zip -d bundles/static-jdk
|
||||
fi
|
||||
|
||||
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.tar.gz ]]; then
|
||||
echo 'Unpacking static jdk bundle...'
|
||||
mkdir -p bundles/static-jdk
|
||||
tar -xf bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.tar.gz -C bundles/static-jdk
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -e bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
|
||||
echo 'Unpacking symbols bundle...'
|
||||
mkdir -p bundles/symbols
|
||||
@@ -106,4 +135,12 @@ runs:
|
||||
echo "jdk=$jdk_dir" >> $GITHUB_OUTPUT
|
||||
echo "symbols=$symbols_dir" >> $GITHUB_OUTPUT
|
||||
echo "tests=$tests_dir" >> $GITHUB_OUTPUT
|
||||
|
||||
if [[ '${{ inputs.static-suffix }}' == '-static' ]]; then
|
||||
static_jdk_dir="$GITHUB_WORKSPACE/$(dirname $(find bundles/static-jdk -name bin -type d))"
|
||||
if [[ '${{ runner.os }}' == 'Windows' ]]; then
|
||||
static_jdk_dir="$(cygpath $static_jdk_dir)"
|
||||
fi
|
||||
echo "static_jdk=$static_jdk_dir" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
17
.github/actions/upload-bundles/action.yml
vendored
17
.github/actions/upload-bundles/action.yml
vendored
@@ -35,6 +35,9 @@ inputs:
|
||||
bundle-suffix:
|
||||
description: 'Bundle name suffix, possibly empty'
|
||||
required: false
|
||||
static-suffix:
|
||||
description: 'Static JDK bundle name suffix, possibly empty'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
@@ -46,6 +49,8 @@ runs:
|
||||
# Rename bundles to consistent names
|
||||
jdk_bundle_zip="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
|
||||
jdk_bundle_tar_gz="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
static_jdk_bundle_zip="$(ls build/*/bundles/static-jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
|
||||
static_jdk_bundle_tar_gz="$(ls build/*/bundles/static-jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
symbols_bundle="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)"
|
||||
tests_bundle="$(ls build/*/bundles/jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
static_libs_bundle="$(ls build/*/bundles/jdk-*_bin-static-libs${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
@@ -58,6 +63,12 @@ runs:
|
||||
if [[ "$jdk_bundle_tar_gz" != "" ]]; then
|
||||
mv "$jdk_bundle_tar_gz" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
if [[ "$static_jdk_bundle_zip" != "" ]]; then
|
||||
mv "$static_jdk_bundle_zip" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.zip"
|
||||
fi
|
||||
if [[ "$static_jdk_bundle_tar_gz" != "" ]]; then
|
||||
mv "$static_jdk_bundle_tar_gz" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.tar.gz"
|
||||
fi
|
||||
if [[ "$symbols_bundle" != "" ]]; then
|
||||
mv "$symbols_bundle" "bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
@@ -68,7 +79,7 @@ runs:
|
||||
mv "$static_libs_bundle" "bundles/static-libs-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
|
||||
if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$symbols_bundle$tests_bundle$static_libs_bundle" != "" ]]; then
|
||||
if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$static_jdk_bundle_zip$static_jdk_bundle_tar_gz$symbols_bundle$tests_bundle$static_libs_bundle" != "" ]]; then
|
||||
echo 'bundles-found=true' >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo 'bundles-found=false' >> $GITHUB_OUTPUT
|
||||
@@ -78,7 +89,7 @@ runs:
|
||||
- name: 'Upload bundles artifact'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.bundle-suffix }}
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}${{ inputs.bundle-suffix }}
|
||||
path: bundles
|
||||
retention-days: 1
|
||||
retention-days: 5
|
||||
if: steps.bundles.outputs.bundles-found == 'true'
|
||||
|
||||
6
.github/workflows/build-alpine-linux.yml
vendored
6
.github/workflows/build-alpine-linux.yml
vendored
@@ -51,6 +51,10 @@ on:
|
||||
make-arguments:
|
||||
required: false
|
||||
type: string
|
||||
dry-run:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
@@ -104,9 +108,11 @@ jobs:
|
||||
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
6
.github/workflows/build-cross-compile.yml
vendored
6
.github/workflows/build-cross-compile.yml
vendored
@@ -40,6 +40,10 @@ on:
|
||||
make-arguments:
|
||||
required: false
|
||||
type: string
|
||||
dry-run:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build-cross-compile:
|
||||
@@ -189,4 +193,4 @@ jobs:
|
||||
with:
|
||||
make-target: 'hotspot ${{ inputs.make-arguments }}'
|
||||
platform: linux-${{ matrix.target-cpu }}
|
||||
if: steps.create-sysroot.outcome == 'success' || steps.get-cached-sysroot.outputs.cache-hit == 'true'
|
||||
if: ((steps.create-sysroot.outcome == 'success' || steps.get-cached-sysroot.outputs.cache-hit == 'true') && inputs.dry-run == false)
|
||||
|
||||
10
.github/workflows/build-linux.yml
vendored
10
.github/workflows/build-linux.yml
vendored
@@ -61,9 +61,16 @@ on:
|
||||
make-arguments:
|
||||
required: false
|
||||
type: string
|
||||
dry-run:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
bundle-suffix:
|
||||
required: false
|
||||
type: string
|
||||
static-suffix:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
@@ -136,6 +143,7 @@ jobs:
|
||||
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
@@ -143,3 +151,5 @@ jobs:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
|
||||
bundle-suffix: ${{ inputs.bundle-suffix }}
|
||||
static-suffix: ${{ inputs.static-suffix }}
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
6
.github/workflows/build-macos.yml
vendored
6
.github/workflows/build-macos.yml
vendored
@@ -54,6 +54,10 @@ on:
|
||||
make-arguments:
|
||||
required: false
|
||||
type: string
|
||||
dry-run:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build-macos:
|
||||
@@ -118,9 +122,11 @@ jobs:
|
||||
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
13
.github/workflows/build-windows.yml
vendored
13
.github/workflows/build-windows.yml
vendored
@@ -54,6 +54,10 @@ on:
|
||||
make-arguments:
|
||||
required: false
|
||||
type: string
|
||||
dry-run:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
env:
|
||||
# These are needed to make the MSYS2 bash work properly
|
||||
@@ -63,7 +67,7 @@ env:
|
||||
jobs:
|
||||
build-windows:
|
||||
name: build
|
||||
runs-on: windows-2019
|
||||
runs-on: windows-2025
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
@@ -102,7 +106,7 @@ jobs:
|
||||
id: toolchain-check
|
||||
run: |
|
||||
set +e
|
||||
'/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/vc/auxiliary/build/vcvars64.bat' -vcvars_ver=${{ inputs.msvc-toolset-version }}
|
||||
'/c/Program Files/Microsoft Visual Studio/2022/Enterprise/vc/auxiliary/build/vcvars64.bat' -vcvars_ver=${{ inputs.msvc-toolset-version }}
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Toolchain is already installed"
|
||||
echo "toolchain-installed=true" >> $GITHUB_OUTPUT
|
||||
@@ -115,7 +119,7 @@ jobs:
|
||||
run: |
|
||||
# Run Visual Studio Installer
|
||||
'/c/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe' \
|
||||
modify --quiet --installPath 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise' \
|
||||
modify --quiet --installPath 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise' \
|
||||
--add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.${{ inputs.msvc-toolset-architecture }}
|
||||
if: steps.toolchain-check.outputs.toolchain-installed != 'true'
|
||||
|
||||
@@ -139,6 +143,7 @@ jobs:
|
||||
# Set PATH to "", so just GITHUB_PATH is included
|
||||
PATH: ''
|
||||
shell: env /usr/bin/bash --login -eo pipefail {0}
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
@@ -147,9 +152,11 @@ jobs:
|
||||
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
85
.github/workflows/main.yml
vendored
85
.github/workflows/main.yml
vendored
@@ -28,9 +28,7 @@ name: 'OpenJDK GHA Sanity Checks'
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- master
|
||||
- pr/*
|
||||
- jdk*
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
platforms:
|
||||
@@ -43,6 +41,9 @@ on:
|
||||
make-arguments:
|
||||
description: 'Additional make arguments'
|
||||
required: false
|
||||
dry-run:
|
||||
description: 'Dry run: skip actual builds and tests'
|
||||
required: false
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -70,6 +71,7 @@ jobs:
|
||||
windows-x64: ${{ steps.include.outputs.windows-x64 }}
|
||||
windows-aarch64: ${{ steps.include.outputs.windows-aarch64 }}
|
||||
docs: ${{ steps.include.outputs.docs }}
|
||||
dry-run: ${{ steps.include.outputs.dry-run }}
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the scripts'
|
||||
@@ -143,6 +145,35 @@ jobs:
|
||||
echo 'false'
|
||||
}
|
||||
|
||||
function check_dry_run() {
|
||||
if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
|
||||
# Take the user-specified one.
|
||||
echo '${{ github.event.inputs.dry-run }}'
|
||||
return
|
||||
elif [[ $GITHUB_EVENT_NAME == push ]]; then
|
||||
# Cut out the real branch name
|
||||
BRANCH=${GITHUB_REF##*/}
|
||||
|
||||
# Dry run rebuilds the caches in current branch, so they can be reused
|
||||
# for any child PR branches. Because of this, we want to trigger this
|
||||
# workflow in master branch, so that actual PR branches can use the cache.
|
||||
# This workflow would trigger every time contributors sync their master
|
||||
# branches in their personal forks.
|
||||
if [[ $BRANCH == "master" ]]; then
|
||||
echo 'true'
|
||||
return
|
||||
fi
|
||||
|
||||
# ...same for stabilization branches
|
||||
if [[ $BRANCH =~ "jdk(.*)" ]]; then
|
||||
echo 'true'
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
echo 'false'
|
||||
}
|
||||
|
||||
echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
|
||||
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
|
||||
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
|
||||
@@ -152,6 +183,7 @@ jobs:
|
||||
echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
|
||||
echo "windows-aarch64=$(check_platform windows-aarch64 windows aarch64)" >> $GITHUB_OUTPUT
|
||||
echo "docs=$(check_platform docs)" >> $GITHUB_OUTPUT
|
||||
echo "dry-run=$(check_dry_run)" >> $GITHUB_OUTPUT
|
||||
|
||||
###
|
||||
### Build jobs
|
||||
@@ -166,6 +198,7 @@ jobs:
|
||||
gcc-major-version: '10'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.linux-x64 == 'true'
|
||||
|
||||
build-linux-x64-hs-nopch:
|
||||
@@ -180,6 +213,7 @@ jobs:
|
||||
extra-conf-options: '--disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-hs-zero:
|
||||
@@ -194,6 +228,7 @@ jobs:
|
||||
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-hs-minimal:
|
||||
@@ -208,6 +243,7 @@ jobs:
|
||||
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-hs-optimized:
|
||||
@@ -223,6 +259,7 @@ jobs:
|
||||
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-static:
|
||||
@@ -231,16 +268,15 @@ jobs:
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
make-target: 'static-jdk-image'
|
||||
make-target: 'static-jdk-bundles'
|
||||
# There are issues with fastdebug static build in GHA due to space limit.
|
||||
# Only do release build for now.
|
||||
debug-levels: '[ "release" ]'
|
||||
gcc-major-version: '10'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
# It currently doesn't produce any bundles, but probably will do in
|
||||
# the future.
|
||||
bundle-suffix: "-static"
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
static-suffix: "-static"
|
||||
if: needs.prepare.outputs.linux-x64 == 'true'
|
||||
|
||||
build-linux-x64-static-libs:
|
||||
@@ -256,6 +292,7 @@ jobs:
|
||||
gcc-major-version: '10'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
# Upload static libs bundles separately to avoid interference with normal linux-x64 bundle.
|
||||
# This bundle is not used by testing jobs, but downstreams use it to check that
|
||||
# dependent projects, e.g. libgraal, builds fine.
|
||||
@@ -270,6 +307,7 @@ jobs:
|
||||
gcc-major-version: '10'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.linux-cross-compile == 'true'
|
||||
|
||||
build-alpine-linux-x64:
|
||||
@@ -280,6 +318,7 @@ jobs:
|
||||
platform: alpine-linux-x64
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.alpine-linux-x64 == 'true'
|
||||
|
||||
build-macos-x64:
|
||||
@@ -292,6 +331,7 @@ jobs:
|
||||
xcode-toolset-version: '14.3.1'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.macos-x64 == 'true'
|
||||
|
||||
build-macos-aarch64:
|
||||
@@ -304,6 +344,7 @@ jobs:
|
||||
xcode-toolset-version: '15.4'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.macos-aarch64 == 'true'
|
||||
|
||||
build-windows-x64:
|
||||
@@ -312,10 +353,11 @@ jobs:
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-x64
|
||||
msvc-toolset-version: '14.29'
|
||||
msvc-toolset-version: '14.44'
|
||||
msvc-toolset-architecture: 'x86.x64'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.windows-x64 == 'true'
|
||||
|
||||
build-windows-aarch64:
|
||||
@@ -324,12 +366,13 @@ jobs:
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-aarch64
|
||||
msvc-toolset-version: '14.29'
|
||||
msvc-toolset-version: '14.44'
|
||||
msvc-toolset-architecture: 'arm64'
|
||||
make-target: 'hotspot'
|
||||
extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.windows-aarch64 == 'true'
|
||||
|
||||
build-docs:
|
||||
@@ -346,6 +389,7 @@ jobs:
|
||||
gcc-major-version: '10'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.docs == 'true'
|
||||
|
||||
###
|
||||
@@ -355,30 +399,53 @@ jobs:
|
||||
test-linux-x64:
|
||||
name: linux-x64
|
||||
needs:
|
||||
- prepare
|
||||
- build-linux-x64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-22.04
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
debug-suffix: -debug
|
||||
|
||||
test-linux-x64-static:
|
||||
name: linux-x64-static
|
||||
needs:
|
||||
- prepare
|
||||
- build-linux-x64
|
||||
- build-linux-x64-static
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-22.04
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
static-suffix: "-static"
|
||||
|
||||
test-macos-aarch64:
|
||||
name: macos-aarch64
|
||||
needs:
|
||||
- prepare
|
||||
- build-macos-aarch64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: macos-aarch64
|
||||
bootjdk-platform: macos-aarch64
|
||||
runs-on: macos-14
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
xcode-toolset-version: '15.4'
|
||||
debug-suffix: -debug
|
||||
|
||||
test-windows-x64:
|
||||
name: windows-x64
|
||||
needs:
|
||||
- prepare
|
||||
- build-windows-x64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: windows-x64
|
||||
bootjdk-platform: windows-x64
|
||||
runs-on: windows-2019
|
||||
runs-on: windows-2025
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
debug-suffix: -debug
|
||||
|
||||
50
.github/workflows/test.yml
vendored
50
.github/workflows/test.yml
vendored
@@ -40,6 +40,16 @@ on:
|
||||
xcode-toolset-version:
|
||||
required: false
|
||||
type: string
|
||||
dry-run:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
debug-suffix:
|
||||
required: false
|
||||
type: string
|
||||
static-suffix:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
env:
|
||||
# These are needed to make the MSYS2 bash work properly
|
||||
@@ -86,35 +96,35 @@ jobs:
|
||||
|
||||
- test-name: 'hs/tier1 common'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_common'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 compiler part 1'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_1'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 compiler part 2'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_2'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 compiler part 3'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_3'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 gc'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_gc'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 runtime'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_runtime'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 serviceability'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_serviceability'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'lib-test/tier1'
|
||||
test-suite: 'test/lib-test/:tier1'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
@@ -140,6 +150,8 @@ jobs:
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: ${{ matrix.debug-suffix }}
|
||||
static-suffix: ${{ inputs.static-suffix }}
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
- name: 'Install dependencies'
|
||||
run: |
|
||||
@@ -160,6 +172,21 @@ jobs:
|
||||
else
|
||||
echo "value=$PATH" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ '${{ inputs.static-suffix }}' == '-static' ]]; then
|
||||
echo "static-hotspot-problemlist-path=`pwd`/test/hotspot/jtreg/ProblemList-StaticJdk.txt" >> $GITHUB_OUTPUT
|
||||
echo "static-jdk-problemlist-path=`pwd`/test/jdk/ProblemList-StaticJdk.txt" >> $GITHUB_OUTPUT
|
||||
echo "static-langtools-problemlist-path=`pwd`/test/langtools/ProblemList-StaticJdk.txt" >> $GITHUB_OUTPUT
|
||||
echo "static-lib-test-problemlist-path=`pwd`/test/lib-test/ProblemList-StaticJdk.txt" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: 'Set Extra Options'
|
||||
id: extra-options
|
||||
run: |
|
||||
if [[ '${{ inputs.static-suffix }}' == '-static' ]]; then
|
||||
echo "test-jdk=JDK_UNDER_TEST=${{ steps.bundles.outputs.static-jdk-path }}" >> $GITHUB_OUTPUT
|
||||
echo "compile-jdk=JDK_FOR_COMPILE=${{ steps.bundles.outputs.jdk-path }}" >> $GITHUB_OUTPUT
|
||||
echo "extra-problem-lists=EXTRA_PROBLEM_LISTS=${{ steps.path.outputs.static-hotspot-problemlist-path }}%20${{ steps.path.outputs.static-jdk-problemlist-path }}%20${{ steps.path.outputs.static-langtools-problemlist-path }}%20${{ steps.path.outputs.static-lib-test-problemlist-path }}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: 'Run tests'
|
||||
id: run-tests
|
||||
@@ -171,10 +198,13 @@ jobs:
|
||||
JDK_IMAGE_DIR=${{ steps.bundles.outputs.jdk-path }}
|
||||
SYMBOLS_IMAGE_DIR=${{ steps.bundles.outputs.symbols-path }}
|
||||
TEST_IMAGE_DIR=${{ steps.bundles.outputs.tests-path }}
|
||||
JTREG='JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash;VERBOSE=fail,error,time;KEYWORDS=!headful'
|
||||
${{ steps.extra-options.outputs.test-jdk }}
|
||||
${{ steps.extra-options.outputs.compile-jdk }}
|
||||
JTREG='JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash;VERBOSE=fail,error,time;KEYWORDS=!headful;${{ steps.extra-options.outputs.extra-problem-lists }}'
|
||||
&& bash ./.github/scripts/gen-test-summary.sh "$GITHUB_STEP_SUMMARY" "$GITHUB_OUTPUT"
|
||||
env:
|
||||
PATH: ${{ steps.path.outputs.value }}
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
# This is a separate step, since if the markdown from a step gets bigger than
|
||||
# 1024 kB it is skipped, but then the short summary above is still generated
|
||||
@@ -204,7 +234,7 @@ jobs:
|
||||
echo '::warning ::Missing test-support directory'
|
||||
fi
|
||||
|
||||
artifact_name="results-${{ inputs.platform }}-$(echo ${{ matrix.test-name }} | tr '/ ' '__')"
|
||||
artifact_name="results-${{ inputs.platform }}-$(echo ${{ matrix.test-name }}${{ inputs.static-suffix }} | tr '/ ' '__')"
|
||||
echo "artifact-name=$artifact_name" >> $GITHUB_OUTPUT
|
||||
if: always()
|
||||
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -23,3 +23,5 @@ NashornProfile.txt
|
||||
/.gdbinit
|
||||
/.lldbinit
|
||||
**/core.[0-9]*
|
||||
*.rej
|
||||
*.orig
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[general]
|
||||
project=jdk
|
||||
jbs=JDK
|
||||
version=25
|
||||
version=26
|
||||
|
||||
[checks]
|
||||
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists,copyright
|
||||
|
||||
@@ -77,6 +77,9 @@ SFINAE</a></li>
|
||||
<li><a href="#thread_local" id="toc-thread_local">thread_local</a></li>
|
||||
<li><a href="#nullptr" id="toc-nullptr">nullptr</a></li>
|
||||
<li><a href="#atomic" id="toc-atomic"><atomic></a></li>
|
||||
<li><a href="#initializing-variables-with-static-storage-duration"
|
||||
id="toc-initializing-variables-with-static-storage-duration">Initializing
|
||||
variables with static storage duration</a></li>
|
||||
<li><a href="#uniform-initialization"
|
||||
id="toc-uniform-initialization">Uniform Initialization</a></li>
|
||||
<li><a href="#local-function-objects"
|
||||
@@ -84,6 +87,7 @@ id="toc-local-function-objects">Local Function Objects</a></li>
|
||||
<li><a href="#inheriting-constructors"
|
||||
id="toc-inheriting-constructors">Inheriting constructors</a></li>
|
||||
<li><a href="#attributes" id="toc-attributes">Attributes</a></li>
|
||||
<li><a href="#noexcept" id="toc-noexcept">noexcept</a></li>
|
||||
<li><a href="#additional-permitted-features"
|
||||
id="toc-additional-permitted-features">Additional Permitted
|
||||
Features</a></li>
|
||||
@@ -791,6 +795,33 @@ differ from what the Java compilers implement.</p>
|
||||
"conservative" memory ordering, which may differ from (may be stronger
|
||||
than) sequentially consistent. There are algorithms in HotSpot that are
|
||||
believed to rely on that ordering.</p>
|
||||
<h3
|
||||
id="initializing-variables-with-static-storage-duration">Initializing
|
||||
variables with static storage duration</h3>
|
||||
<p>Variables with static storage duration and <em>dynamic
|
||||
initialization</em> <a
|
||||
href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf">C++14
|
||||
3.6.2</a>). should be avoided, unless an implementation is permitted to
|
||||
perform the initialization as a static initialization. The order in
|
||||
which dynamic initializations occur is incompletely specified.
|
||||
Initialization order problems can be difficult to deal with and lead to
|
||||
surprises.</p>
|
||||
<p>Variables with static storage duration and non-trivial destructors
|
||||
should be avoided. HotSpot doesn't generally try to cleanup on exit, and
|
||||
running destructors at exit can lead to problems.</p>
|
||||
<p>Some of the approaches used in HotSpot to avoid dynamic
|
||||
initialization include:</p>
|
||||
<ul>
|
||||
<li><p>Use the <code>Deferred<T></code> class template. Add a call
|
||||
to its initialization function at an appropriate place during VM
|
||||
initialization. The underlying object is never destroyed.</p></li>
|
||||
<li><p>For objects of class type, use a variable whose value is a
|
||||
pointer to the class, initialized to <code>nullptr</code>. Provide an
|
||||
initialization function that sets the variable to a dynamically
|
||||
allocated object. Add a call to that function at an appropriate place
|
||||
during VM initialization. Such objects are usually never
|
||||
destroyed.</p></li>
|
||||
</ul>
|
||||
<h3 id="uniform-initialization">Uniform Initialization</h3>
|
||||
<p>The use of <em>uniform initialization</em> (<a
|
||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm">n2672</a>),
|
||||
@@ -1110,6 +1141,58 @@ function name and the parameter list.</li>
|
||||
<code>memory_order_consume</code>.</li>
|
||||
<li><code>[[deprecated]]</code> - Not relevant in HotSpot code.</li>
|
||||
</ul>
|
||||
<h3 id="noexcept">noexcept</h3>
|
||||
<p>Use of <code>noexcept</code> exception specifications (<a
|
||||
href="http://wg21.link/n3050">n3050</a>) are permitted with restrictions
|
||||
described below.</p>
|
||||
<ul>
|
||||
<li>Only the argument-less form of <code>noexcept</code> exception
|
||||
specifications are permitted.</li>
|
||||
<li>Allocation functions that may return <code>nullptr</code> to
|
||||
indicate allocation failure must be declared <code>noexcept</code>.</li>
|
||||
<li>All other uses of <code>noexcept</code> exception specifications are
|
||||
forbidden.</li>
|
||||
<li><code>noexcept</code> expressions are forbidden.</li>
|
||||
<li>Dynamic exception specifications are forbidden.</li>
|
||||
</ul>
|
||||
<p>HotSpot is built with exceptions disabled, e.g. compile with
|
||||
<code>-fno-exceptions</code> (gcc, clang) or no <code>/EH</code> option
|
||||
(MSVC++). So why do we need to consider <code>noexcept</code> at all?
|
||||
It's because <code>noexcept</code> exception specifications serve two
|
||||
distinct purposes.</p>
|
||||
<p>The first is to allow the compiler to avoid generating code or data
|
||||
in support of exceptions being thrown by a function. But this is
|
||||
unnecessary, because exceptions are disabled.</p>
|
||||
<p>The second is to allow the compiler and library code to choose
|
||||
different algorithms, depending on whether some function may throw
|
||||
exceptions. This is only relevant to a certain set of functions.</p>
|
||||
<ul>
|
||||
<li><p>Some allocation functions (<code>operator new</code> and
|
||||
<code>operator new[]</code>) return <code>nullptr</code> to indicate
|
||||
allocation failure. If a <code>new</code> expression calls such an
|
||||
allocation function, it must check for and handle that possibility.
|
||||
Declaring such a function <code>noexcept</code> informs the compiler
|
||||
that <code>nullptr</code> is a possible result. If an allocation
|
||||
function is not declared <code>noexcept</code> then the compiler may
|
||||
elide that checking and handling for a <code>new</code> expression
|
||||
calling that function.</p></li>
|
||||
<li><p>Certain Standard Library facilities (notably containers) provide
|
||||
different guarantees for some operations (and may choose different
|
||||
algorithms to implement those operations), depending on whether certain
|
||||
functions (constructors, copy/move operations, swap) are nothrow or not.
|
||||
They detect this using type traits that test whether a function is
|
||||
declared <code>noexcept</code>. This can have a significant performance
|
||||
impact if, for example, copying is chosen over a potentially throwing
|
||||
move. But this isn't relevant, since HotSpot forbids the use of most
|
||||
Standard Library facilities.</p></li>
|
||||
</ul>
|
||||
<p>HotSpot code can assume no exceptions will ever be thrown, even from
|
||||
functions not declared <code>noexcept</code>. So HotSpot code doesn't
|
||||
ever need to check, either with conditional exception specifications or
|
||||
with <code>noexcept</code> expressions.</p>
|
||||
<p>Dynamic exception specifications were deprecated in C++11. C++17
|
||||
removed all but <code>throw()</code>, with that remaining a deprecated
|
||||
equivalent to <code>noexcept</code>.</p>
|
||||
<h3 id="additional-permitted-features">Additional Permitted
|
||||
Features</h3>
|
||||
<ul>
|
||||
@@ -1198,12 +1281,6 @@ Library names.</p></li>
|
||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html">n2179</a>)
|
||||
— HotSpot does not permit the use of exceptions, so this feature isn't
|
||||
useful.</p></li>
|
||||
<li><p>Avoid non-local variables with non-constexpr initialization. In
|
||||
particular, avoid variables with types requiring non-trivial
|
||||
initialization or destruction. Initialization order problems can be
|
||||
difficult to deal with and lead to surprises, as can destruction
|
||||
ordering. HotSpot doesn't generally try to cleanup on exit, and running
|
||||
destructors at exit can also lead to problems.</p></li>
|
||||
<li><p>Avoid most operator overloading, preferring named functions. When
|
||||
operator overloading is used, ensure the semantics conform to the normal
|
||||
expected behavior of the operation.</p></li>
|
||||
|
||||
@@ -770,6 +770,32 @@ ordering, which may differ from (may be stronger than) sequentially
|
||||
consistent. There are algorithms in HotSpot that are believed to rely
|
||||
on that ordering.
|
||||
|
||||
### Initializing variables with static storage duration
|
||||
|
||||
Variables with static storage duration and _dynamic initialization_
|
||||
[C++14 3.6.2](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf)).
|
||||
should be avoided, unless an implementation is permitted to perform the
|
||||
initialization as a static initialization. The order in which dynamic
|
||||
initializations occur is incompletely specified. Initialization order
|
||||
problems can be difficult to deal with and lead to surprises.
|
||||
|
||||
Variables with static storage duration and non-trivial destructors should be
|
||||
avoided. HotSpot doesn't generally try to cleanup on exit, and running
|
||||
destructors at exit can lead to problems.
|
||||
|
||||
Some of the approaches used in HotSpot to avoid dynamic initialization
|
||||
include:
|
||||
|
||||
* Use the `Deferred<T>` class template. Add a call to its initialization
|
||||
function at an appropriate place during VM initialization. The underlying
|
||||
object is never destroyed.
|
||||
|
||||
* For objects of class type, use a variable whose value is a pointer to the
|
||||
class, initialized to `nullptr`. Provide an initialization function that sets
|
||||
the variable to a dynamically allocated object. Add a call to that function at
|
||||
an appropriate place during VM initialization. Such objects are usually never
|
||||
destroyed.
|
||||
|
||||
### Uniform Initialization
|
||||
|
||||
The use of _uniform initialization_
|
||||
@@ -1104,6 +1130,57 @@ The following attributes are expressly forbidden:
|
||||
* `[[carries_dependency]]` - Related to `memory_order_consume`.
|
||||
* `[[deprecated]]` - Not relevant in HotSpot code.
|
||||
|
||||
### noexcept
|
||||
|
||||
Use of `noexcept` exception specifications
|
||||
([n3050](http://wg21.link/n3050))
|
||||
are permitted with restrictions described below.
|
||||
|
||||
* Only the argument-less form of `noexcept` exception specifications are
|
||||
permitted.
|
||||
* Allocation functions that may return `nullptr` to indicate allocation
|
||||
failure must be declared `noexcept`.
|
||||
* All other uses of `noexcept` exception specifications are forbidden.
|
||||
* `noexcept` expressions are forbidden.
|
||||
* Dynamic exception specifications are forbidden.
|
||||
|
||||
HotSpot is built with exceptions disabled, e.g. compile with `-fno-exceptions`
|
||||
(gcc, clang) or no `/EH` option (MSVC++). So why do we need to consider
|
||||
`noexcept` at all? It's because `noexcept` exception specifications serve two
|
||||
distinct purposes.
|
||||
|
||||
The first is to allow the compiler to avoid generating code or data in support
|
||||
of exceptions being thrown by a function. But this is unnecessary, because
|
||||
exceptions are disabled.
|
||||
|
||||
The second is to allow the compiler and library code to choose different
|
||||
algorithms, depending on whether some function may throw exceptions. This is
|
||||
only relevant to a certain set of functions.
|
||||
|
||||
* Some allocation functions (`operator new` and `operator new[]`) return
|
||||
`nullptr` to indicate allocation failure. If a `new` expression calls such an
|
||||
allocation function, it must check for and handle that possibility. Declaring
|
||||
such a function `noexcept` informs the compiler that `nullptr` is a possible
|
||||
result. If an allocation function is not declared `noexcept` then the compiler
|
||||
may elide that checking and handling for a `new` expression calling that
|
||||
function.
|
||||
|
||||
* Certain Standard Library facilities (notably containers) provide different
|
||||
guarantees for some operations (and may choose different algorithms to
|
||||
implement those operations), depending on whether certain functions
|
||||
(constructors, copy/move operations, swap) are nothrow or not. They detect
|
||||
this using type traits that test whether a function is declared `noexcept`.
|
||||
This can have a significant performance impact if, for example, copying is
|
||||
chosen over a potentially throwing move. But this isn't relevant, since
|
||||
HotSpot forbids the use of most Standard Library facilities.
|
||||
|
||||
HotSpot code can assume no exceptions will ever be thrown, even from functions
|
||||
not declared `noexcept`. So HotSpot code doesn't ever need to check, either
|
||||
with conditional exception specifications or with `noexcept` expressions.
|
||||
|
||||
Dynamic exception specifications were deprecated in C++11. C++17 removed all
|
||||
but `throw()`, with that remaining a deprecated equivalent to `noexcept`.
|
||||
|
||||
### Additional Permitted Features
|
||||
|
||||
* `alignof`
|
||||
@@ -1199,13 +1276,6 @@ namespace std;` to avoid needing to qualify Standard Library names.
|
||||
([n2179](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html)) —
|
||||
HotSpot does not permit the use of exceptions, so this feature isn't useful.
|
||||
|
||||
* Avoid non-local variables with non-constexpr initialization.
|
||||
In particular, avoid variables with types requiring non-trivial
|
||||
initialization or destruction. Initialization order problems can be
|
||||
difficult to deal with and lead to surprises, as can destruction
|
||||
ordering. HotSpot doesn't generally try to cleanup on exit, and
|
||||
running destructors at exit can also lead to problems.
|
||||
|
||||
* Avoid most operator overloading, preferring named functions. When
|
||||
operator overloading is used, ensure the semantics conform to the
|
||||
normal expected behavior of the operation.
|
||||
|
||||
127
doc/starting-next-release.html
Normal file
127
doc/starting-next-release.html
Normal file
@@ -0,0 +1,127 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<title>Explanation of start of release changes</title>
|
||||
<style>
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
div.columns{display: flex; gap: min(4vw, 1.5em);}
|
||||
div.column{flex: auto; overflow-x: auto;}
|
||||
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
||||
/* The extra [class] is a hack that increases specificity enough to
|
||||
override a similar rule in reveal.js */
|
||||
ul.task-list[class]{list-style: none;}
|
||||
ul.task-list li input[type="checkbox"] {
|
||||
font-size: inherit;
|
||||
width: 0.8em;
|
||||
margin: 0 0.8em 0.2em -1.6em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<header id="title-block-header">
|
||||
<h1 class="title">Explanation of start of release changes</h1>
|
||||
</header>
|
||||
<nav id="TOC" role="doc-toc">
|
||||
<ul>
|
||||
<li><a href="#overview" id="toc-overview">Overview</a></li>
|
||||
<li><a href="#details-and-file-updates"
|
||||
id="toc-details-and-file-updates">Details and file updates</a>
|
||||
<ul>
|
||||
<li><a href="#meta-data-files" id="toc-meta-data-files">Meta-data
|
||||
files</a></li>
|
||||
<li><a href="#src-files" id="toc-src-files"><code>src</code>
|
||||
files</a></li>
|
||||
<li><a href="#test-files" id="toc-test-files"><code>test</code>
|
||||
files</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<h2 id="overview">Overview</h2>
|
||||
<p>The start of release changes, the changes that turn JDK <em>N</em>
|
||||
into JDK (<em>N</em>+1), are primarily small updates to various files
|
||||
along with new files to store symbol information to allow
|
||||
<code>javac --release N ...</code> to run on JDK (<em>N</em>+1).</p>
|
||||
<p>The updates include changes to files holding meta-data about the
|
||||
release, files under the <code>src</code> directory for API and tooling
|
||||
updates, and incidental updates under the <code>test</code>
|
||||
directory.</p>
|
||||
<h2 id="details-and-file-updates">Details and file updates</h2>
|
||||
<p>As a matter of policy, there are a number of semantically distinct
|
||||
concepts which get incremented separately at the start of a new
|
||||
release:</p>
|
||||
<ul>
|
||||
<li>Feature value of <code>Runtime.version()</code></li>
|
||||
<li>Highest source version modeled by
|
||||
<code>javax.lang.model.SourceVersion</code></li>
|
||||
<li>Highest class file format major version recognized by the
|
||||
platform</li>
|
||||
<li>Highest
|
||||
<code>-source</code>/<code>-target</code>/<code>--release</code>
|
||||
argument recognized by <code>javac</code> and related tools</li>
|
||||
</ul>
|
||||
<p>The expected file updates are listed below. Additional files may need
|
||||
to be updated for a particular release.</p>
|
||||
<h3 id="meta-data-files">Meta-data files</h3>
|
||||
<ul>
|
||||
<li><code>jcheck/conf</code>: update meta-data used by
|
||||
<code>jcheck</code> and the Skara tooling</li>
|
||||
<li><code>make/conf/version-numbers.conf</code>: update to meta-data
|
||||
used in the build</li>
|
||||
</ul>
|
||||
<h3 id="src-files"><code>src</code> files</h3>
|
||||
<ul>
|
||||
<li><code>src/hotspot/share/classfile/classFileParser.cpp</code>: add a
|
||||
<code>#define</code> for the new version</li>
|
||||
<li><code>src/java.base/share/classes/java/lang/classfile/ClassFile.java</code>:
|
||||
add a constant for the new class file format version</li>
|
||||
<li><code>src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java</code>:
|
||||
add an <code>enum</code> constant for the new class file format
|
||||
version</li>
|
||||
<li><code>src/java.compiler/share/classes/javax/lang/model/SourceVersion.java</code>:
|
||||
add an <code>enum</code> constant for the new source version</li>
|
||||
<li><code>src/java.compiler/share/classes/javax/lang/model/util/*</code>
|
||||
visitors: Update <code>@SupportedSourceVersion</code> annotations to
|
||||
latest value. Note this update is done in lieu of introducing another
|
||||
set of visitors for each Java SE release.</li>
|
||||
<li><code>src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java</code>:
|
||||
add an <code>enum</code> constant for the new source version internal to
|
||||
<code>javac</code></li>
|
||||
<li><code>src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java</code>:
|
||||
add an <code>enum</code> constant for the new class file format version
|
||||
internal to <code>javac</code></li>
|
||||
<li><code>src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java</code>:
|
||||
add an <code>enum</code> constant for the new target version internal to
|
||||
<code>javac</code></li>
|
||||
<li><code>src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java</code>
|
||||
update printing processor to support the new source version</li>
|
||||
<li>The symbol information for <code>--release</code> is stored as new
|
||||
text files in the <code>src/jdk.compiler/share/data/symbols</code>
|
||||
directory, one file per module. The README file in that directory
|
||||
contains directions on how to create the files.</li>
|
||||
</ul>
|
||||
<h3 id="test-files"><code>test</code> files</h3>
|
||||
<ul>
|
||||
<li><code>test/langtools/tools/javac/api/TestGetSourceVersions.java</code>:
|
||||
add new <code>SourceVersion</code> constant to test matrix.</li>
|
||||
<li><code>test/langtools/tools/javac/classfiles/ClassVersionChecker.java</code>:
|
||||
add new enum constant for the new class file version</li>
|
||||
<li><code>test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java</code>
|
||||
update annotation processor extended by <code>javac</code> tests to
|
||||
cover the new source version</li>
|
||||
<li><code>test/langtools/tools/javac/preview/classReaderTest/Client.nopreview.out</code>
|
||||
and
|
||||
<code>test/langtools/tools/javac/preview/classReaderTest/Client.preview.out</code>:
|
||||
update expected messages for preview errors and warnings</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
68
doc/starting-next-release.md
Normal file
68
doc/starting-next-release.md
Normal file
@@ -0,0 +1,68 @@
|
||||
% Explanation of start of release changes
|
||||
|
||||
## Overview
|
||||
|
||||
The start of release changes, the changes that turn JDK _N_ into JDK
|
||||
(_N_+1), are primarily small updates to various files along with new files to
|
||||
store symbol information to allow `javac --release N ...` to run on
|
||||
JDK (_N_+1).
|
||||
|
||||
The updates include changes to files holding meta-data about the
|
||||
release, files under the `src` directory for API and tooling updates,
|
||||
and incidental updates under the `test` directory.
|
||||
|
||||
## Details and file updates
|
||||
|
||||
As a matter of policy, there are a number of semantically distinct
|
||||
concepts which get incremented separately at the start of a new
|
||||
release:
|
||||
|
||||
* Feature value of `Runtime.version()`
|
||||
* Highest source version modeled by `javax.lang.model.SourceVersion`
|
||||
* Highest class file format major version recognized by the platform
|
||||
* Highest `-source`/`-target`/`--release` argument recognized by
|
||||
`javac` and related tools
|
||||
|
||||
The expected file updates are listed below. Additional files may need
|
||||
to be updated for a particular release.
|
||||
|
||||
### Meta-data files
|
||||
|
||||
* `jcheck/conf`: update meta-data used by `jcheck` and the Skara tooling
|
||||
* `make/conf/version-numbers.conf`: update to meta-data used in the build
|
||||
|
||||
### `src` files
|
||||
|
||||
* `src/hotspot/share/classfile/classFileParser.cpp`: add a `#define`
|
||||
for the new version
|
||||
* `src/java.base/share/classes/java/lang/classfile/ClassFile.java`:
|
||||
add a constant for the new class file format version
|
||||
* `src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java`:
|
||||
add an `enum` constant for the new class file format version
|
||||
* `src/java.compiler/share/classes/javax/lang/model/SourceVersion.java`:
|
||||
add an `enum` constant for the new source version
|
||||
* `src/java.compiler/share/classes/javax/lang/model/util/*` visitors: Update
|
||||
`@SupportedSourceVersion` annotations to latest value. Note this update
|
||||
is done in lieu of introducing another set of visitors for each Java
|
||||
SE release.
|
||||
* `src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java`:
|
||||
add an `enum` constant for the new source version internal to `javac`
|
||||
* `src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java`:
|
||||
add an `enum` constant for the new class file format version internal to `javac`
|
||||
* `src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java`:
|
||||
add an `enum` constant for the new target version internal to `javac`
|
||||
* `src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java`
|
||||
update printing processor to support the new source version
|
||||
* The symbol information for `--release` is stored as new text files in the
|
||||
`src/jdk.compiler/share/data/symbols` directory, one file per
|
||||
module. The README file in that directory contains directions on how
|
||||
to create the files.
|
||||
|
||||
### `test` files
|
||||
|
||||
* `test/langtools/tools/javac/api/TestGetSourceVersions.java`: add new `SourceVersion` constant to test matrix.
|
||||
* `test/langtools/tools/javac/classfiles/ClassVersionChecker.java`: add new enum constant for the new class file version
|
||||
* `test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java`
|
||||
update annotation processor extended by `javac` tests to cover the new source version
|
||||
* `test/langtools/tools/javac/preview/classReaderTest/Client.nopreview.out` and `test/langtools/tools/javac/preview/classReaderTest/Client.preview.out`: update expected messages for preview errors and warnings
|
||||
|
||||
@@ -72,6 +72,11 @@ id="toc-notes-for-specific-tests">Notes for Specific Tests</a>
|
||||
<li><a href="#non-us-locale" id="toc-non-us-locale">Non-US
|
||||
locale</a></li>
|
||||
<li><a href="#pkcs11-tests" id="toc-pkcs11-tests">PKCS11 Tests</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#testing-ahead-of-time-optimizations"
|
||||
id="toc-testing-ahead-of-time-optimizations">### Testing Ahead-of-time
|
||||
Optimizations</a>
|
||||
<ul>
|
||||
<li><a href="#testing-with-alternative-security-providers"
|
||||
id="toc-testing-with-alternative-security-providers">Testing with
|
||||
alternative security providers</a></li>
|
||||
@@ -596,6 +601,37 @@ element of the appropriate <code>@Artifact</code> class. (See
|
||||
JTREG="JAVA_OPTIONS=-Djdk.test.lib.artifacts.nsslib-linux_aarch64=/path/to/NSS-libs"</code></pre>
|
||||
<p>For more notes about the PKCS11 tests, please refer to
|
||||
test/jdk/sun/security/pkcs11/README.</p>
|
||||
<h2 id="testing-ahead-of-time-optimizations">### Testing Ahead-of-time
|
||||
Optimizations</h2>
|
||||
<p>One way to improve test coverage of ahead-of-time (AOT) optimizations
|
||||
in the JDK is to run existing jtreg test cases in a special "AOT_JDK"
|
||||
mode. Example:</p>
|
||||
<pre><code>$ make test JTREG="AOT_JDK=onestep" \
|
||||
TEST=open/test/hotspot/jtreg/runtime/invokedynamic</code></pre>
|
||||
<p>In this testing mode, we first perform an AOT training run (see
|
||||
https://openjdk.org/jeps/483) of a special test program (<a
|
||||
href="../test/setup_aot/TestSetupAOT.java">test/setup_aot/TestSetupAOT.java</a>)
|
||||
that accesses about 5,0000 classes in the JDK core libraries.
|
||||
Optimization artifacts for these classes (such as pre-linked lambda
|
||||
expressions, execution profiles, and pre-generated native code) are
|
||||
stored into an AOT cache file, which will be used by all the JVMs
|
||||
launched by the selected jtreg test cases.</p>
|
||||
<p>When the jtreg tests call into the core libraries classes that are in
|
||||
the AOT cache, we will be able to test the AOT optimizations that were
|
||||
used on those classes.</p>
|
||||
<p>Please note that not all existing jtreg test cases can be executed
|
||||
with the AOT_JDK mode. See <a
|
||||
href="../test/hotspot/jtreg/ProblemList-AotJdk.txt">test/hotspot/jtreg/ProblemList-AotJdk.txt</a>
|
||||
and <a
|
||||
href="../test/jdk/ProblemList-AotJdk.txt">test/jdk/ProblemList-AotJdk.txt</a>.</p>
|
||||
<p>Also, test cases that were written specifically to test AOT, such as
|
||||
the tests under <a
|
||||
href="../test/hotspot/jtreg/runtime/cds/">test/hotspot/jtreg/runtime/cds</a>,
|
||||
cannot be executed with the AOT_JDK mode.</p>
|
||||
<p>Valid values for <code>AOT_JDK</code> are <code>onestep</code> and
|
||||
<code>twostep</code>. These control how the AOT cache is generated. See
|
||||
https://openjdk.org/jeps/514 for details. All other values are
|
||||
ignored.</p>
|
||||
<h3 id="testing-with-alternative-security-providers">Testing with
|
||||
alternative security providers</h3>
|
||||
<p>Some security tests use a hardcoded provider for
|
||||
|
||||
@@ -611,6 +611,43 @@ $ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" \
|
||||
For more notes about the PKCS11 tests, please refer to
|
||||
test/jdk/sun/security/pkcs11/README.
|
||||
|
||||
### Testing Ahead-of-time Optimizations
|
||||
-------------------------------------------------------------------------------
|
||||
One way to improve test coverage of ahead-of-time (AOT) optimizations in
|
||||
the JDK is to run existing jtreg test cases in a special "AOT_JDK" mode.
|
||||
Example:
|
||||
|
||||
```
|
||||
$ make test JTREG="AOT_JDK=onestep" \
|
||||
TEST=open/test/hotspot/jtreg/runtime/invokedynamic
|
||||
```
|
||||
|
||||
In this testing mode, we first perform an AOT training run
|
||||
(see https://openjdk.org/jeps/483) of a special test program
|
||||
([test/setup_aot/TestSetupAOT.java](../test/setup_aot/TestSetupAOT.java))
|
||||
that accesses about 5,0000 classes in the JDK core libraries.
|
||||
Optimization artifacts for these classes (such as pre-linked
|
||||
lambda expressions, execution profiles, and pre-generated native code)
|
||||
are stored into an AOT cache file, which will be used by all the JVMs
|
||||
launched by the selected jtreg test cases.
|
||||
|
||||
When the jtreg tests call into the core libraries classes that are in
|
||||
the AOT cache, we will be able to test the AOT optimizations that were
|
||||
used on those classes.
|
||||
|
||||
Please note that not all existing jtreg test cases can be executed with
|
||||
the AOT_JDK mode. See
|
||||
[test/hotspot/jtreg/ProblemList-AotJdk.txt](../test/hotspot/jtreg/ProblemList-AotJdk.txt)
|
||||
and [test/jdk/ProblemList-AotJdk.txt](../test/jdk/ProblemList-AotJdk.txt).
|
||||
|
||||
Also, test cases that were written specifically to test AOT, such as the tests
|
||||
under [test/hotspot/jtreg/runtime/cds](../test/hotspot/jtreg/runtime/cds/),
|
||||
cannot be executed with the AOT_JDK mode.
|
||||
|
||||
Valid values for `AOT_JDK` are `onestep` and `twostep`. These control how
|
||||
the AOT cache is generated. See https://openjdk.org/jeps/514 for details.
|
||||
All other values are ignored.
|
||||
|
||||
### Testing with alternative security providers
|
||||
|
||||
Some security tests use a hardcoded provider for `KeyFactory`, `Cipher`,
|
||||
|
||||
@@ -99,6 +99,7 @@ define SetupInterimModule
|
||||
EXCLUDE_FILES := $(TOPDIR)/src/$1/share/classes/module-info.java \
|
||||
$(TOPDIR)/src/$1/share/classes/javax/tools/ToolProvider.java \
|
||||
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/Main.java \
|
||||
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/MemoryClassLoader.java \
|
||||
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/MemoryContext.java \
|
||||
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/MemoryModuleFinder.java \
|
||||
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/SourceLauncher.java \
|
||||
|
||||
@@ -79,8 +79,6 @@ JAVADOC_TAGS := \
|
||||
-tag see \
|
||||
-taglet build.tools.taglet.ExtLink \
|
||||
-taglet build.tools.taglet.Incubating \
|
||||
-taglet build.tools.taglet.PreviewNote \
|
||||
--preview-note-tag previewNote \
|
||||
-tagletpath $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
$(CUSTOM_JAVADOC_TAGS) \
|
||||
#
|
||||
@@ -98,7 +96,7 @@ JAVADOC_DISABLED_DOCLINT_PACKAGES := org.w3c.* javax.smartcardio
|
||||
JAVADOC_OPTIONS := -use -keywords -notimestamp \
|
||||
-serialwarn -encoding utf-8 -docencoding utf-8 -breakiterator \
|
||||
-splitIndex --system none -javafx --expand-requires transitive \
|
||||
--override-methods=summary --syntax-highlight
|
||||
--override-methods=summary
|
||||
|
||||
# The reference options must stay stable to allow for comparisons across the
|
||||
# development cycle.
|
||||
@@ -542,7 +540,9 @@ $(eval $(call SetupApiDocsGeneration, REFERENCE_API, \
|
||||
# Format: space-delimited list of names, including at most one '%' as a
|
||||
# wildcard. Spec source files match if their filename or any enclosing folder
|
||||
# name matches one of the items in SPEC_FILTER.
|
||||
SPEC_FILTER := %
|
||||
ifeq ($(SPEC_FILTER), )
|
||||
SPEC_FILTER := %
|
||||
endif
|
||||
|
||||
ApplySpecFilter = \
|
||||
$(strip $(foreach file, $(1), \
|
||||
|
||||
@@ -76,11 +76,13 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
|
||||
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $(JLI_TRACE_FILE)))
|
||||
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw \
|
||||
$(CLASSLIST_FILE_VM_OPTS) \
|
||||
-Xlog:aot=off \
|
||||
-Xlog:cds=off \
|
||||
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
||||
build.tools.classlist.HelloClasslist $(LOG_DEBUG)
|
||||
$(GREP) -v HelloClasslist $@.raw > $@.interim
|
||||
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-Xlog:aot=off \
|
||||
-Xlog:cds=off \
|
||||
-XX:SharedClassListFile=$@.interim -XX:SharedArchiveFile=$@.jsa \
|
||||
-Xmx128M -Xms128M $(LOG_INFO)
|
||||
@@ -89,6 +91,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
|
||||
-Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
|
||||
$(CLASSLIST_FILE_VM_OPTS) \
|
||||
--module-path $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
||||
-Xlog:aot=off \
|
||||
-Xlog:cds=off \
|
||||
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
||||
build.tools.classlist.HelloClasslist \
|
||||
@@ -103,6 +106,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
|
||||
$(GREP) -v HelloClasslist $@.raw.2 > $@.raw.3
|
||||
$(GREP) -v @cp $@.raw.3 > $@.raw.4
|
||||
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java \
|
||||
-Xlog:aot=off \
|
||||
-Xlog:cds=off \
|
||||
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
||||
build.tools.classlist.SortClasslist $@.raw.4 > $@
|
||||
|
||||
@@ -162,7 +162,7 @@ define CreateCDSArchive
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG_CDS_ARCHIVE), true)
|
||||
$1_$2_CDS_DUMP_FLAGS += -Xlog:cds+map*=trace:file=$$(JDK_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE).cdsmap:none:filesize=0
|
||||
$1_$2_CDS_DUMP_FLAGS += -Xlog:aot+map*=trace:file=$$(JDK_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE).cdsmap:none:filesize=0
|
||||
endif
|
||||
|
||||
$$(eval $$(call SetupExecute, $1_$2_gen_cds_archive_jdk, \
|
||||
|
||||
@@ -37,10 +37,6 @@ include MakeFileStart.gmk
|
||||
include $(TOPDIR)/make/InitSupport.gmk
|
||||
include LogUtils.gmk
|
||||
|
||||
# Force early generation of module-deps.gmk
|
||||
GENERATE_MODULE_DEPS_FILE := true
|
||||
include Modules.gmk
|
||||
|
||||
# Inclusion of this pseudo-target will cause make to execute this file
|
||||
# serially, regardless of -j.
|
||||
.NOTPARALLEL:
|
||||
@@ -114,7 +110,18 @@ reconfigure:
|
||||
CUSTOM_CONFIG_DIR="$(CUSTOM_CONFIG_DIR)" \
|
||||
$(RECONFIGURE_COMMAND) )
|
||||
|
||||
.PHONY: print-modules print-targets print-tests print-configuration reconfigure
|
||||
# Create files that are needed to run most targets in Main.gmk
|
||||
create-make-helpers:
|
||||
( cd $(TOPDIR) && \
|
||||
$(MAKE) $(MAKE_ARGS) -j 1 -f make/GenerateFindTests.gmk \
|
||||
$(USER_MAKE_VARS) )
|
||||
( cd $(TOPDIR) && \
|
||||
$(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \
|
||||
UPDATE_MODULE_DEPS=true NO_RECIPES=true \
|
||||
create-main-targets-include )
|
||||
|
||||
.PHONY: print-modules print-targets print-tests print-configuration \
|
||||
reconfigure create-make-helpers
|
||||
|
||||
##############################################################################
|
||||
# The main target. This will delegate all other targets into Main.gmk.
|
||||
@@ -134,7 +141,7 @@ TARGET_DESCRIPTION := target$(if $(word 2, $(MAIN_TARGETS)),s) \
|
||||
# variables are explicitly propagated using $(USER_MAKE_VARS).
|
||||
main: MAKEOVERRIDES :=
|
||||
|
||||
main: $(INIT_TARGETS)
|
||||
main: $(INIT_TARGETS) create-make-helpers
|
||||
ifneq ($(SEQUENTIAL_TARGETS)$(PARALLEL_TARGETS), )
|
||||
$(call RotateLogFiles)
|
||||
$(ECHO) "Building $(TARGET_DESCRIPTION)" $(BUILD_LOG_PIPE_SIMPLE)
|
||||
@@ -144,6 +151,9 @@ main: $(INIT_TARGETS)
|
||||
( cd $(TOPDIR) && \
|
||||
$(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \
|
||||
$(SEQUENTIAL_TARGETS) )
|
||||
# We might have cleaned away essential files, recreate them.
|
||||
( cd $(TOPDIR) && \
|
||||
$(MAKE) $(MAKE_ARGS) -j 1 -f make/Init.gmk create-make-helpers )
|
||||
endif
|
||||
ifneq ($(PARALLEL_TARGETS), )
|
||||
$(call PrepareFailureLogs)
|
||||
|
||||
@@ -42,6 +42,12 @@ include MakeFileStart.gmk
|
||||
include $(TOPDIR)/make/MainSupport.gmk
|
||||
|
||||
include FindTests.gmk
|
||||
|
||||
ifeq ($(UPDATE_MODULE_DEPS), true)
|
||||
# Update module-deps.gmk if requested. This is read in Modules.gmk.
|
||||
GENERATE_MODULE_DEPS_FILE := true
|
||||
endif
|
||||
|
||||
include Modules.gmk
|
||||
|
||||
# Are we requested to ignore dependencies?
|
||||
@@ -411,12 +417,14 @@ $(eval $(call SetupTarget, create-source-revision-tracker, \
|
||||
))
|
||||
|
||||
BOOTCYCLE_TARGET := product-images
|
||||
BOOTCYCLE_SPEC := $(dir $(SPEC))bootcycle-spec.gmk
|
||||
|
||||
bootcycle-images:
|
||||
ifneq ($(COMPILE_TYPE), cross)
|
||||
$(call LogWarn, Boot cycle build step 2: Building a new JDK image using previously built image)
|
||||
$(call MakeDir, $(OUTPUTDIR)/bootcycle-build)
|
||||
+$(MAKE) $(MAKE_ARGS) -f $(TOPDIR)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \
|
||||
LOG_PREFIX="[bootcycle] " JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
|
||||
LOG_PREFIX="[bootcycle] " JOBS= SPEC=$(BOOTCYCLE_SPEC) main
|
||||
else
|
||||
$(call LogWarn, Boot cycle build disabled when cross compiling)
|
||||
endif
|
||||
@@ -1006,7 +1014,7 @@ else
|
||||
else ifeq ($(EXTERNAL_BUILDJDK), false)
|
||||
# When not cross compiling, the BUILD_JDK is the interim jdk image, and
|
||||
# the javac launcher is needed.
|
||||
jdk.compiler-gendata: jdk.compiler-launchers
|
||||
jdk.compiler-gendata: jdk.compiler-launchers java.base-launchers
|
||||
jdk.javadoc-gendata: jdk.compiler-launchers
|
||||
endif
|
||||
|
||||
|
||||
@@ -50,7 +50,8 @@ include $(TOPDIR)/make/Global.gmk
|
||||
|
||||
# Targets provided by Init.gmk.
|
||||
ALL_INIT_TARGETS := print-modules print-targets print-configuration \
|
||||
print-tests reconfigure pre-compare-build post-compare-build
|
||||
print-tests reconfigure pre-compare-build post-compare-build \
|
||||
create-make-helpers
|
||||
|
||||
# CALLED_TARGETS is the list of targets that the user provided,
|
||||
# or "default" if unspecified.
|
||||
|
||||
@@ -268,11 +268,12 @@ define DefineMainTargets
|
||||
|
||||
$$(main_targets_file):
|
||||
@( cd $$(TOPDIR) && \
|
||||
$$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(TOPDIR)/make/GenerateFindTests.gmk \
|
||||
$$(MAKE) $$(MAKE_LOG_FLAGS) -s -r -R -f $$(TOPDIR)/make/GenerateFindTests.gmk \
|
||||
-I $$(TOPDIR)/make/common SPEC=$$(SPEC_FILE) TOPDIR_ALT=$$(TOPDIR))
|
||||
@( cd $$(TOPDIR) && \
|
||||
$$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(TOPDIR)/make/Main.gmk \
|
||||
-I $$(TOPDIR)/make/common SPEC=$$(SPEC_FILE) TOPDIR_ALT=$$(TOPDIR) NO_RECIPES=true \
|
||||
$$(MAKE) $$(MAKE_LOG_FLAGS) -s -r -R -f $$(TOPDIR)/make/Main.gmk \
|
||||
-I $$(TOPDIR)/make/common SPEC=$$(SPEC_FILE) TOPDIR_ALT=$$(TOPDIR) \
|
||||
UPDATE_MODULE_DEPS=true NO_RECIPES=true \
|
||||
$$(MAKE_LOG_VARS) \
|
||||
create-main-targets-include )
|
||||
|
||||
|
||||
@@ -583,6 +583,8 @@ define SetMicroValue
|
||||
else
|
||||
ifneq ($3, )
|
||||
$1_$2 := $3
|
||||
else
|
||||
$1_$2 :=
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
@@ -709,6 +711,8 @@ define SetJtregValue
|
||||
else
|
||||
ifneq ($3, )
|
||||
$1_$2 := $3
|
||||
else
|
||||
$1_$2 :=
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -721,6 +725,7 @@ endef
|
||||
# Parameter 1 is the name of the rule.
|
||||
#
|
||||
# Remaining parameters are named arguments.
|
||||
# TRAINING The AOT training mode: onestep or twostep
|
||||
# VM_OPTIONS List of JVM arguments to use when creating AOT cache
|
||||
#
|
||||
# After calling this, the following variables are defined
|
||||
@@ -749,23 +754,39 @@ define SetupAOTBody
|
||||
$$($1_AOT_JDK_CACHE): $$(JDK_IMAGE_DIR)/release
|
||||
$$(call MakeDir, $$($1_AOT_JDK_OUTPUT_DIR))
|
||||
|
||||
$$(call LogWarn, AOT: Create cache configuration) \
|
||||
$$(call ExecuteWithLog, $$($1_AOT_JDK_OUTPUT_DIR), ( \
|
||||
cd $$($1_AOT_JDK_OUTPUT_DIR); \
|
||||
$(JAR) --extract --file $(TEST_IMAGE_DIR)/setup_aot/TestSetupAOT.jar; \
|
||||
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java $$($1_VM_OPTIONS) \
|
||||
-Xlog:class+load,cds,cds+class=debug:file=$$($1_AOT_JDK_CONF).log -Xlog:cds*=error \
|
||||
-XX:AOTMode=record -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) \
|
||||
TestSetupAOT $$($1_AOT_JDK_OUTPUT_DIR) > $$($1_AOT_JDK_LOG) \
|
||||
))
|
||||
ifeq ($$($1_TRAINING), onestep)
|
||||
|
||||
$$(call LogWarn, AOT: Generate AOT cache $$($1_AOT_JDK_CACHE) with flags: $$($1_VM_OPTIONS))
|
||||
$$(call ExecuteWithLog, $$($1_AOT_JDK_OUTPUT_DIR), ( \
|
||||
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java \
|
||||
$$($1_VM_OPTIONS) -Xlog:cds,cds+class=debug:file=$$($1_AOT_JDK_CACHE).log -Xlog:cds*=error \
|
||||
-XX:ExtraSharedClassListFile=$(JDK_UNDER_TEST)/lib/classlist \
|
||||
-XX:AOTMode=create -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) -XX:AOTCache=$$($1_AOT_JDK_CACHE) \
|
||||
))
|
||||
$$(call LogWarn, AOT: Create AOT cache $$($1_AOT_JDK_CACHE) in one step with flags: $$($1_VM_OPTIONS)) \
|
||||
$$(call ExecuteWithLog, $$($1_AOT_JDK_OUTPUT_DIR), ( \
|
||||
cd $$($1_AOT_JDK_OUTPUT_DIR); \
|
||||
$(JAR) --extract --file $(TEST_IMAGE_DIR)/setup_aot/TestSetupAOT.jar; \
|
||||
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java $$($1_VM_OPTIONS) \
|
||||
-Xlog:class+load,aot,aot+class=debug:file=$$($1_AOT_JDK_CACHE).log -Xlog:cds*=error -Xlog:aot*=error \
|
||||
-XX:AOTMode=record -XX:AOTCacheOutput=$$($1_AOT_JDK_CACHE) \
|
||||
TestSetupAOT $$($1_AOT_JDK_OUTPUT_DIR) > $$($1_AOT_JDK_LOG) \
|
||||
))
|
||||
|
||||
else
|
||||
|
||||
$$(call LogWarn, AOT: Create cache configuration) \
|
||||
$$(call ExecuteWithLog, $$($1_AOT_JDK_OUTPUT_DIR), ( \
|
||||
cd $$($1_AOT_JDK_OUTPUT_DIR); \
|
||||
$(JAR) --extract --file $(TEST_IMAGE_DIR)/setup_aot/TestSetupAOT.jar; \
|
||||
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java $$($1_VM_OPTIONS) \
|
||||
-Xlog:class+load,aot,aot+class=debug:file=$$($1_AOT_JDK_CONF).log -Xlog:cds*=error -Xlog:aot*=error \
|
||||
-XX:AOTMode=record -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) \
|
||||
TestSetupAOT $$($1_AOT_JDK_OUTPUT_DIR) > $$($1_AOT_JDK_LOG) \
|
||||
))
|
||||
|
||||
$$(call LogWarn, AOT: Generate AOT cache $$($1_AOT_JDK_CACHE) with flags: $$($1_VM_OPTIONS))
|
||||
$$(call ExecuteWithLog, $$($1_AOT_JDK_OUTPUT_DIR), ( \
|
||||
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java \
|
||||
$$($1_VM_OPTIONS) -Xlog:aot,aot+class=debug:file=$$($1_AOT_JDK_CACHE).log -Xlog:cds*=error -Xlog:aot*=error \
|
||||
-XX:ExtraSharedClassListFile=$(JDK_UNDER_TEST)/lib/classlist \
|
||||
-XX:AOTMode=create -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) -XX:AOTCache=$$($1_AOT_JDK_CACHE) \
|
||||
))
|
||||
|
||||
endif
|
||||
|
||||
$1_AOT_TARGETS += $$($1_AOT_JDK_CACHE)
|
||||
|
||||
@@ -831,7 +852,7 @@ define SetupRunJtregTestBody
|
||||
JTREG_RETRY_COUNT ?= 0
|
||||
JTREG_REPEAT_COUNT ?= 0
|
||||
JTREG_REPORT ?= files
|
||||
JTREG_AOT_JDK ?= false
|
||||
JTREG_AOT_JDK ?= none
|
||||
|
||||
ifneq ($$(JTREG_RETRY_COUNT), 0)
|
||||
ifneq ($$(JTREG_REPEAT_COUNT), 0)
|
||||
@@ -841,6 +862,12 @@ define SetupRunJtregTestBody
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($$(JTREG_RUN_PROBLEM_LISTS), true)
|
||||
JTREG_PROBLEM_LIST_PREFIX := -match:
|
||||
else
|
||||
JTREG_PROBLEM_LIST_PREFIX := -exclude:
|
||||
endif
|
||||
|
||||
ifneq ($$(JTREG_TEST_THREAD_FACTORY), )
|
||||
$1_JTREG_BASIC_OPTIONS += -testThreadFactoryPath:$$(JTREG_TEST_THREAD_FACTORY_JAR)
|
||||
$1_JTREG_BASIC_OPTIONS += -testThreadFactory:$$(JTREG_TEST_THREAD_FACTORY)
|
||||
@@ -869,7 +896,7 @@ define SetupRunJtregTestBody
|
||||
# version of the JDK.
|
||||
$1_JTREG_BASIC_OPTIONS += -$$($1_JTREG_TEST_MODE) \
|
||||
-verbose:$$(JTREG_VERBOSE) -retain:$$(JTREG_RETAIN) \
|
||||
-concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT_FACTOR) \
|
||||
-concurrency:$$($1_JTREG_JOBS) \
|
||||
-vmoption:-XX:MaxRAMPercentage=$$($1_JTREG_MAX_RAM_PERCENTAGE) \
|
||||
-vmoption:-Dtest.boot.jdk="$$(BOOT_JDK)" \
|
||||
-vmoption:-Djava.io.tmpdir="$$($1_TEST_TMP_DIR)"
|
||||
@@ -902,12 +929,6 @@ define SetupRunJtregTestBody
|
||||
$1_JTREG_BASIC_OPTIONS += -nativepath:$$($1_JTREG_NATIVEPATH)
|
||||
endif
|
||||
|
||||
ifeq ($$(JTREG_RUN_PROBLEM_LISTS), true)
|
||||
JTREG_PROBLEM_LIST_PREFIX := -match:
|
||||
else
|
||||
JTREG_PROBLEM_LIST_PREFIX := -exclude:
|
||||
endif
|
||||
|
||||
ifneq ($$($1_JTREG_PROBLEM_LIST), )
|
||||
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$($1_JTREG_PROBLEM_LIST))
|
||||
endif
|
||||
@@ -971,12 +992,12 @@ define SetupRunJtregTestBody
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($$(JTREG_AOT_JDK), true)
|
||||
ifneq ($$(filter $$(JTREG_AOT_JDK), onestep twostep), )
|
||||
$$(call LogWarn, Add AOT target for $1)
|
||||
$$(eval $$(call SetupAOT, $1, VM_OPTIONS := $$(JTREG_ALL_OPTIONS) ))
|
||||
|
||||
$$(eval $$(call SetupAOT, $1, \
|
||||
TRAINING := $$(JTREG_AOT_JDK), \
|
||||
VM_OPTIONS := $$(JTREG_ALL_OPTIONS) ))
|
||||
$$(call LogWarn, AOT_JDK_CACHE=$$($1_AOT_JDK_CACHE))
|
||||
|
||||
$1_JTREG_BASIC_OPTIONS += -vmoption:-XX:AOTCache="$$($1_AOT_JDK_CACHE)"
|
||||
endif
|
||||
|
||||
@@ -994,6 +1015,7 @@ define SetupRunJtregTestBody
|
||||
endif
|
||||
|
||||
JTREG_TIMEOUT_FACTOR ?= $$(JTREG_AUTO_TIMEOUT_FACTOR)
|
||||
$1_JTREG_BASIC_OPTIONS += -timeoutFactor:$$(JTREG_TIMEOUT_FACTOR)
|
||||
|
||||
clean-outputdirs-$1:
|
||||
$$(call LogWarn, Clean up dirs for $1)
|
||||
|
||||
@@ -78,6 +78,9 @@ TOOL_GENERATECACERTS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_class
|
||||
TOOL_GENERATEEXTRAPROPERTIES = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.generateextraproperties.GenerateExtraProperties
|
||||
|
||||
TOOL_GENERATECASEFOLDING = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.generatecharacter.CaseFolding
|
||||
|
||||
TOOL_MAKEZIPREPRODUCIBLE = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.makezipreproducible.MakeZipReproducible
|
||||
|
||||
|
||||
@@ -415,11 +415,21 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
[ CONF_NAME=${with_conf_name} ])
|
||||
|
||||
# Test from where we are running configure, in or outside of src root.
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows || test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
|
||||
# These systems have case insensitive paths, so convert them to lower case.
|
||||
[ cmp_configure_start_dir=`$ECHO $CONFIGURE_START_DIR | $TR '[:upper:]' '[:lower:]'` ]
|
||||
[ cmp_topdir=`$ECHO $TOPDIR | $TR '[:upper:]' '[:lower:]'` ]
|
||||
[ cmp_custom_root=`$ECHO $CUSTOM_ROOT | $TR '[:upper:]' '[:lower:]'` ]
|
||||
else
|
||||
cmp_configure_start_dir="$CONFIGURE_START_DIR"
|
||||
cmp_topdir="$TOPDIR"
|
||||
cmp_custom_root="$CUSTOM_ROOT"
|
||||
fi
|
||||
AC_MSG_CHECKING([where to store configuration])
|
||||
if test "x$CONFIGURE_START_DIR" = "x$TOPDIR" \
|
||||
|| test "x$CONFIGURE_START_DIR" = "x$CUSTOM_ROOT" \
|
||||
|| test "x$CONFIGURE_START_DIR" = "x$TOPDIR/make/autoconf" \
|
||||
|| test "x$CONFIGURE_START_DIR" = "x$TOPDIR/make" ; then
|
||||
if test "x$cmp_configure_start_dir" = "x$cmp_topdir" \
|
||||
|| test "x$cmp_configure_start_dir" = "x$cmp_custom_root" \
|
||||
|| test "x$cmp_configure_start_dir" = "x$cmp_topdir/make/autoconf" \
|
||||
|| test "x$cmp_configure_start_dir" = "x$cmp_topdir/make" ; then
|
||||
# We are running configure from the src root.
|
||||
# Create a default ./build/target-variant-debuglevel output root.
|
||||
if test "x${CONF_NAME}" = x; then
|
||||
@@ -440,7 +450,12 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
# If configuration is situated in normal build directory, just use the build
|
||||
# directory name as configuration name, otherwise use the complete path.
|
||||
if test "x${CONF_NAME}" = x; then
|
||||
CONF_NAME=`$ECHO $CONFIGURE_START_DIR | $SED -e "s!^${TOPDIR}/build/!!"`
|
||||
[ if [[ "$cmp_configure_start_dir" =~ ^${cmp_topdir}/build/[^/]+$ ||
|
||||
"$cmp_configure_start_dir" =~ ^${cmp_custom_root}/build/[^/]+$ ]]; then ]
|
||||
CONF_NAME="${CONFIGURE_START_DIR##*/}"
|
||||
else
|
||||
CONF_NAME="$CONFIGURE_START_DIR"
|
||||
fi
|
||||
fi
|
||||
OUTPUTDIR="$CONFIGURE_START_DIR"
|
||||
AC_MSG_RESULT([in current directory])
|
||||
|
||||
4
make/autoconf/configure
vendored
4
make/autoconf/configure
vendored
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2025, 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
|
||||
@@ -366,7 +366,7 @@ EOT
|
||||
|
||||
# Print additional help, e.g. a list of toolchains and JVM features.
|
||||
# This must be done by the autoconf script.
|
||||
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $generated_script PRINTF=printf )
|
||||
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $generated_script PRINTF=printf ECHO=echo )
|
||||
|
||||
cat <<EOT
|
||||
|
||||
|
||||
@@ -732,8 +732,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
$1_CFLAGS_CPU_JVM="-mno-multiple -mno-string"
|
||||
if test "x$FLAGS_CPU" = xppc64; then
|
||||
# -mminimal-toc fixes `relocation truncated to fit' error for gcc 4.1.
|
||||
# Use ppc64 instructions, but schedule for power5
|
||||
$1_CFLAGS_CPU="-mcpu=powerpc64 -mtune=power5"
|
||||
$1_CFLAGS_CPU="-mcpu=power8 -mtune=power8"
|
||||
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -mminimal-toc"
|
||||
elif test "x$FLAGS_CPU" = xppc64le; then
|
||||
# Little endian machine uses ELFv2 ABI.
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
################################################################################
|
||||
|
||||
# Minimum supported versions
|
||||
JTREG_MINIMUM_VERSION=7.5.1
|
||||
JTREG_MINIMUM_VERSION=7.5.2
|
||||
GTEST_MINIMUM_VERSION=1.14.0
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
# Versions and download locations for dependencies used by GitHub Actions (GHA)
|
||||
|
||||
GTEST_VERSION=1.14.0
|
||||
JTREG_VERSION=7.5.1+1
|
||||
JTREG_VERSION=7.5.2+1
|
||||
|
||||
LINUX_X64_BOOT_JDK_EXT=tar.gz
|
||||
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk24/1f9ff9062db4449d8ca828c504ffae90/36/GPL/openjdk-24_linux-x64_bin.tar.gz
|
||||
|
||||
@@ -254,7 +254,6 @@ var getJibProfilesCommon = function (input, data) {
|
||||
configure_args: concat(
|
||||
"--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",
|
||||
"--disable-jvm-feature-shenandoahgc",
|
||||
"--disable-cds-archive-coh",
|
||||
versionArgs(input, common))
|
||||
};
|
||||
|
||||
@@ -1175,9 +1174,9 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
jtreg: {
|
||||
server: "jpg",
|
||||
product: "jtreg",
|
||||
version: "7.5.1",
|
||||
version: "7.5.2",
|
||||
build_number: "1",
|
||||
file: "bundles/jtreg-7.5.1+1.zip",
|
||||
file: "bundles/jtreg-7.5.2+1.zip",
|
||||
environment_name: "JT_HOME",
|
||||
environment_path: input.get("jtreg", "home_path") + "/bin",
|
||||
configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"),
|
||||
@@ -1193,8 +1192,8 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
server: "jpg",
|
||||
product: "jcov",
|
||||
version: "3.0",
|
||||
build_number: "1",
|
||||
file: "bundles/jcov-3.0+1.zip",
|
||||
build_number: "3",
|
||||
file: "bundles/jcov-3.0+3.zip",
|
||||
environment_name: "JCOV_HOME",
|
||||
},
|
||||
|
||||
|
||||
@@ -26,17 +26,17 @@
|
||||
# Default version, product, and vendor information to use,
|
||||
# unless overridden by configure
|
||||
|
||||
DEFAULT_VERSION_FEATURE=25
|
||||
DEFAULT_VERSION_FEATURE=26
|
||||
DEFAULT_VERSION_INTERIM=0
|
||||
DEFAULT_VERSION_UPDATE=0
|
||||
DEFAULT_VERSION_PATCH=0
|
||||
DEFAULT_VERSION_EXTRA1=0
|
||||
DEFAULT_VERSION_EXTRA2=0
|
||||
DEFAULT_VERSION_EXTRA3=0
|
||||
DEFAULT_VERSION_DATE=2025-09-16
|
||||
DEFAULT_VERSION_CLASSFILE_MAJOR=69 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
|
||||
DEFAULT_VERSION_DATE=2026-03-17
|
||||
DEFAULT_VERSION_CLASSFILE_MAJOR=70 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
|
||||
DEFAULT_VERSION_CLASSFILE_MINOR=0
|
||||
DEFAULT_VERSION_DOCS_API_SINCE=11
|
||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="24 25"
|
||||
DEFAULT_JDK_SOURCE_TARGET_VERSION=25
|
||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="24 25 26"
|
||||
DEFAULT_JDK_SOURCE_TARGET_VERSION=26
|
||||
DEFAULT_PROMOTED_VERSION_PRE=ea
|
||||
|
||||
@@ -67,6 +67,8 @@ ATTRIBUTE_DEFAULT_VISIBILITY ATTRIBUTE_USED const char* CDECL __asan_default_opt
|
||||
#endif
|
||||
"print_suppressions=0,"
|
||||
"handle_segv=0,"
|
||||
// A lot of libjsig related tests fail because of the link order check; so better avoid it
|
||||
"verify_asan_link_order=0,"
|
||||
// See https://github.com/google/sanitizers/issues/1322. Hopefully this is resolved
|
||||
// at some point and we can remove this option.
|
||||
"intercept_tls_get_addr=0";
|
||||
|
||||
@@ -62,5 +62,8 @@
|
||||
// thread so it is easier to track down. You can override these options by setting the environment
|
||||
// variable UBSAN_OPTIONS.
|
||||
ATTRIBUTE_DEFAULT_VISIBILITY ATTRIBUTE_USED const char* __ubsan_default_options() {
|
||||
return "halt_on_error=1,print_stacktrace=1" _LLVM_SYMBOLIZER(LLVM_SYMBOLIZER);
|
||||
return "halt_on_error=1,"
|
||||
"handle_segv=0,"
|
||||
"handle_sigbus=0,"
|
||||
"print_stacktrace=1" _LLVM_SYMBOLIZER(LLVM_SYMBOLIZER);
|
||||
}
|
||||
|
||||
@@ -64,6 +64,30 @@ IS_WSL=`echo $UNAME_RELEASE | grep Microsoft`
|
||||
IS_MSYS=`echo $UNAME_OS | grep -i Msys`
|
||||
MSYS2_ARG_CONV_EXCL="*" # make "cmd.exe /c" work for msys2
|
||||
CMD_EXE="cmd.exe /c"
|
||||
|
||||
# Detect host architecture to determine devkit platform support
|
||||
# Note: The devkit always includes x86, x64, and aarch64 libraries and tools
|
||||
# The difference is in toolchain capabilities:
|
||||
# - On x64|AMD64 hosts: aarch64 tools are cross-compilation tools (Hostx64/arm64)
|
||||
# - On aarch64|ARMv8 hosts: aarch64 tools are native tools (Hostarm64/arm64)
|
||||
HOST_ARCH=`echo $PROCESSOR_IDENTIFIER`
|
||||
case $HOST_ARCH in
|
||||
AMD64)
|
||||
echo "Running on x64 host - generating devkit with native x86/x64 tools and cross-compiled aarch64 tools."
|
||||
echo "For native aarch64 compilation tools, run this script on a Windows/aarch64 machine."
|
||||
SUPPORTED_PLATFORMS="x86, x64 (native) and aarch64 (cross-compiled)"
|
||||
;;
|
||||
ARMv8)
|
||||
echo "Running on aarch64 host - generating devkit with native tools for all platforms (x86, x64, aarch64)."
|
||||
SUPPORTED_PLATFORMS="x86, x64, and aarch64 (all native)"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown host architecture: $HOST_ARCH"
|
||||
echo "Proceeding with devkit generation - toolchain capabilities may vary."
|
||||
SUPPORTED_PLATFORMS="x86, x64, and aarch64"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "x$IS_CYGWIN" != "x"; then
|
||||
BUILD_ENV="cygwin"
|
||||
elif test "x$IS_MSYS" != "x"; then
|
||||
@@ -139,6 +163,7 @@ DEVKIT_ROOT="${BUILD_DIR}/VS${VS_VERSION}-${VS_VERSION_SP}-devkit"
|
||||
DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
|
||||
|
||||
echo "Creating devkit in $DEVKIT_ROOT"
|
||||
echo "Platform support: $SUPPORTED_PLATFORMS"
|
||||
|
||||
MSVCR_DLL=${MSVC_CRT_DIR}/vcruntime${VS_DLL_VERSION}.dll
|
||||
VCRUNTIME_1_DLL=${MSVC_CRT_DIR}/vcruntime${VS_DLL_VERSION}_1.dll
|
||||
@@ -156,7 +181,11 @@ REDIST_SUBDIR="VC/Redist/MSVC/$REDIST_VERSION"
|
||||
echo "Copying VC..."
|
||||
rm -rf $DEVKIT_ROOT/VC
|
||||
mkdir -p $DEVKIT_ROOT/VC/bin
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/arm64" $DEVKIT_ROOT/VC/bin/
|
||||
if [ -d "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostarm64/arm64" ]; then
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostarm64/arm64" $DEVKIT_ROOT/VC/bin/
|
||||
else
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/arm64" $DEVKIT_ROOT/VC/bin/
|
||||
fi
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/x64" $DEVKIT_ROOT/VC/bin/
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx86/x86" $DEVKIT_ROOT/VC/bin/
|
||||
mkdir -p $DEVKIT_ROOT/VC/lib
|
||||
|
||||
@@ -128,7 +128,8 @@ ifneq ($(call check-jvm-feature, cds), true)
|
||||
aotCodeCache.cpp \
|
||||
classLoaderDataShared.cpp \
|
||||
classLoaderExt.cpp \
|
||||
systemDictionaryShared.cpp
|
||||
systemDictionaryShared.cpp \
|
||||
trainingData.cpp
|
||||
JVM_EXCLUDE_PATTERNS += cds/
|
||||
endif
|
||||
|
||||
|
||||
@@ -542,10 +542,10 @@ class Bundle {
|
||||
if (pattern != null) {
|
||||
// Perform date-time format pattern conversion which is
|
||||
// applicable to both SimpleDateFormat and j.t.f.DateTimeFormatter.
|
||||
String transPattern = translateDateFormatLetters(calendarType, pattern, this::convertDateTimePatternLetter);
|
||||
String transPattern = translateDateFormatLetters(calendarType, key, pattern, this::convertDateTimePatternLetter);
|
||||
dateTimePatterns.add(i, transPattern);
|
||||
// Additionally, perform SDF specific date-time format pattern conversion
|
||||
sdfPatterns.add(i, translateDateFormatLetters(calendarType, transPattern, this::convertSDFLetter));
|
||||
sdfPatterns.add(i, translateDateFormatLetters(calendarType, key, transPattern, this::convertSDFLetter));
|
||||
} else {
|
||||
dateTimePatterns.add(i, null);
|
||||
sdfPatterns.add(i, null);
|
||||
@@ -568,7 +568,7 @@ class Bundle {
|
||||
}
|
||||
}
|
||||
|
||||
private String translateDateFormatLetters(CalendarType calendarType, String cldrFormat, ConvertDateTimeLetters converter) {
|
||||
private String translateDateFormatLetters(CalendarType calendarType, String patternKey, String cldrFormat, ConvertDateTimeLetters converter) {
|
||||
String pattern = cldrFormat;
|
||||
int length = pattern.length();
|
||||
boolean inQuote = false;
|
||||
@@ -587,7 +587,7 @@ class Bundle {
|
||||
if (nextc == '\'') {
|
||||
i++;
|
||||
if (count != 0) {
|
||||
converter.convert(calendarType, lastLetter, count, jrePattern);
|
||||
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
|
||||
lastLetter = 0;
|
||||
count = 0;
|
||||
}
|
||||
@@ -597,7 +597,7 @@ class Bundle {
|
||||
}
|
||||
if (!inQuote) {
|
||||
if (count != 0) {
|
||||
converter.convert(calendarType, lastLetter, count, jrePattern);
|
||||
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
|
||||
lastLetter = 0;
|
||||
count = 0;
|
||||
}
|
||||
@@ -614,7 +614,7 @@ class Bundle {
|
||||
}
|
||||
if (!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z')) {
|
||||
if (count != 0) {
|
||||
converter.convert(calendarType, lastLetter, count, jrePattern);
|
||||
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
|
||||
lastLetter = 0;
|
||||
count = 0;
|
||||
}
|
||||
@@ -627,7 +627,7 @@ class Bundle {
|
||||
count++;
|
||||
continue;
|
||||
}
|
||||
converter.convert(calendarType, lastLetter, count, jrePattern);
|
||||
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
|
||||
lastLetter = c;
|
||||
count = 1;
|
||||
}
|
||||
@@ -637,7 +637,7 @@ class Bundle {
|
||||
}
|
||||
|
||||
if (count != 0) {
|
||||
converter.convert(calendarType, lastLetter, count, jrePattern);
|
||||
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
|
||||
}
|
||||
if (cldrFormat.contentEquals(jrePattern)) {
|
||||
return cldrFormat;
|
||||
@@ -661,7 +661,7 @@ class Bundle {
|
||||
* on the support given by the SimpleDateFormat and the j.t.f.DateTimeFormatter
|
||||
* for date-time formatting.
|
||||
*/
|
||||
private void convertDateTimePatternLetter(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb) {
|
||||
private void convertDateTimePatternLetter(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb) {
|
||||
switch (cldrLetter) {
|
||||
case 'u':
|
||||
case 'U':
|
||||
@@ -683,7 +683,7 @@ class Bundle {
|
||||
* Perform a conversion of CLDR date-time format pattern letter which is
|
||||
* specific to the SimpleDateFormat.
|
||||
*/
|
||||
private void convertSDFLetter(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb) {
|
||||
private void convertSDFLetter(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb) {
|
||||
switch (cldrLetter) {
|
||||
case 'G':
|
||||
if (calendarType != CalendarType.GREGORIAN) {
|
||||
@@ -722,6 +722,17 @@ class Bundle {
|
||||
appendN('z', count, sb);
|
||||
break;
|
||||
|
||||
case 'y':
|
||||
// If the style is FULL/LONG for a Japanese Calendar, make the
|
||||
// count == 4 for Gan-nen
|
||||
if (calendarType == CalendarType.JAPANESE &&
|
||||
(patternKey.contains("full-") ||
|
||||
patternKey.contains("long-"))) {
|
||||
count = 4;
|
||||
}
|
||||
appendN(cldrLetter, count, sb);
|
||||
break;
|
||||
|
||||
case 'Z':
|
||||
if (count == 4 || count == 5) {
|
||||
sb.append("XXX");
|
||||
@@ -767,6 +778,7 @@ class Bundle {
|
||||
.collect(Collectors.toMap(
|
||||
e -> calendarPrefix + e.getKey(),
|
||||
e -> translateDateFormatLetters(calendarType,
|
||||
e.getKey(),
|
||||
(String)e.getValue(),
|
||||
this::convertDateTimePatternLetter)
|
||||
))
|
||||
@@ -775,7 +787,7 @@ class Bundle {
|
||||
|
||||
@FunctionalInterface
|
||||
private interface ConvertDateTimeLetters {
|
||||
void convert(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb);
|
||||
void convert(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright (c) 2025, 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.
|
||||
*/
|
||||
|
||||
package build.tools.generatecharacter;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class CaseFolding {
|
||||
|
||||
public static void main(String[] args) throws Throwable {
|
||||
if (args.length != 3) {
|
||||
System.err.println("Usage: java CaseFolding TemplateFile CaseFolding.txt CaseFolding.java");
|
||||
System.exit(1);
|
||||
}
|
||||
var templateFile = Paths.get(args[0]);
|
||||
var caseFoldingTxt = Paths.get(args[1]);
|
||||
var genSrcFile = Paths.get(args[2]);
|
||||
var supportedTypes = "^.*; [CTS]; .*$";
|
||||
var caseFoldingEntries = Files.lines(caseFoldingTxt)
|
||||
.filter(line -> !line.startsWith("#") && line.matches(supportedTypes))
|
||||
.map(line -> {
|
||||
String[] cols = line.split("; ");
|
||||
return new String[] {cols[0], cols[1], cols[2]};
|
||||
})
|
||||
.filter(cols -> {
|
||||
// the folding case doesn't map back to the original char.
|
||||
var cp1 = Integer.parseInt(cols[0], 16);
|
||||
var cp2 = Integer.parseInt(cols[2], 16);
|
||||
return Character.toUpperCase(cp2) != cp1 && Character.toLowerCase(cp2) != cp1;
|
||||
})
|
||||
.map(cols -> String.format(" entry(0x%s, 0x%s)", cols[0], cols[2]))
|
||||
.collect(Collectors.joining(",\n", "", ""));
|
||||
|
||||
// hack, hack, hack! the logic does not pick 0131. just add manually to support 'I's.
|
||||
// 0049; T; 0131; # LATIN CAPITAL LETTER I
|
||||
final String T_0x0131_0x49 = String.format(" entry(0x%04x, 0x%04x),\n", 0x0131, 0x49);
|
||||
|
||||
// Generate .java file
|
||||
Files.write(
|
||||
genSrcFile,
|
||||
Files.lines(templateFile)
|
||||
.map(line -> line.contains("%%%Entries") ? T_0x0131_0x49 + caseFoldingEntries : line)
|
||||
.collect(Collectors.toList()),
|
||||
StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2025, 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
|
||||
@@ -1190,7 +1190,7 @@ OUTER: for (int i = 0; i < n; i += m) {
|
||||
if (Csyntax)
|
||||
result.append(" static ");
|
||||
else
|
||||
result.append(" static final ");
|
||||
result.append(" @Stable static final ");
|
||||
result.append(atype);
|
||||
result.append(" ").append(name).append("[");
|
||||
if (Csyntax)
|
||||
@@ -1347,7 +1347,7 @@ OUTER: for (int i = 0; i < n; i += m) {
|
||||
}
|
||||
|
||||
static void genCaseMapTableDeclaration(StringBuffer result) {
|
||||
result.append(" static final char[][][] charMap;\n");
|
||||
result.append(" @Stable static final char[][][] charMap;\n");
|
||||
}
|
||||
|
||||
static void genCaseMapTable(StringBuffer result, SpecialCaseMap[] specialCaseMaps){
|
||||
|
||||
@@ -1,3 +1,26 @@
|
||||
/*
|
||||
* 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
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package build.tools.pandocfilter;
|
||||
|
||||
import build.tools.pandocfilter.json.JSON;
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2025, 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.
|
||||
*/
|
||||
|
||||
package build.tools.taglet;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
import javax.lang.model.element.Element;
|
||||
import javax.tools.Diagnostic;
|
||||
|
||||
|
||||
import com.sun.source.doctree.DocTree;
|
||||
import com.sun.source.doctree.UnknownInlineTagTree;
|
||||
import jdk.javadoc.doclet.Doclet;
|
||||
import jdk.javadoc.doclet.DocletEnvironment;
|
||||
import jdk.javadoc.doclet.Reporter;
|
||||
import jdk.javadoc.doclet.StandardDoclet;
|
||||
import jdk.javadoc.doclet.Taglet;
|
||||
|
||||
import static com.sun.source.doctree.DocTree.Kind.UNKNOWN_INLINE_TAG;
|
||||
|
||||
/**
|
||||
* An inline tag to insert a note formatted as preview note.
|
||||
* The tag can be used as follows:
|
||||
*
|
||||
* <pre>
|
||||
* {@previewNote jep-number [Preview note heading]}
|
||||
* Preview note content
|
||||
* {@previewNote}
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
public class PreviewNote implements Taglet {
|
||||
|
||||
static final String TAG_NAME = "previewNote";
|
||||
Reporter reporter = null;
|
||||
|
||||
@Override
|
||||
public void init(DocletEnvironment env, Doclet doclet) {
|
||||
if (doclet instanceof StandardDoclet stdoclet) {
|
||||
reporter = stdoclet.getReporter();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the set of locations in which the tag may be used.
|
||||
*/
|
||||
@Override
|
||||
public Set<Location> getAllowedLocations() {
|
||||
return EnumSet.allOf(Taglet.Location.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInlineTag() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return TAG_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(List<? extends DocTree> tags, Element elem) {
|
||||
|
||||
for (DocTree tag : tags) {
|
||||
if (tag.getKind() == UNKNOWN_INLINE_TAG) {
|
||||
UnknownInlineTagTree inlineTag = (UnknownInlineTagTree) tag;
|
||||
String[] content = inlineTag.getContent().toString().trim().split("\\s+", 2);
|
||||
if (!content[0].isBlank()) {
|
||||
StringBuilder sb = new StringBuilder("""
|
||||
<div class="preview-block" style="margin-top:10px; display:block; max-width:max-content;">
|
||||
""");
|
||||
if (content.length == 2) {
|
||||
sb.append("""
|
||||
<div class="preview-label">
|
||||
""")
|
||||
.append(content[1])
|
||||
.append("""
|
||||
</div>
|
||||
""");
|
||||
}
|
||||
sb.append("""
|
||||
<div class="preview-comment">
|
||||
""");
|
||||
return sb.toString();
|
||||
} else {
|
||||
return """
|
||||
</div>
|
||||
</div>
|
||||
""";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (reporter == null) {
|
||||
throw new IllegalArgumentException("@" + TAG_NAME + " taglet content must be begin or end");
|
||||
}
|
||||
reporter.print(Diagnostic.Kind.ERROR, "@" + TAG_NAME + " taglet content must be begin or end");
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,8 @@ import java.io.OutputStream;
|
||||
import java.io.StringWriter;
|
||||
import java.io.Writer;
|
||||
import java.lang.classfile.*;
|
||||
import java.lang.classfile.TypeAnnotation.TargetInfo;
|
||||
import java.lang.classfile.TypeAnnotation.TypePathComponent;
|
||||
import java.lang.classfile.attribute.*;
|
||||
import java.lang.classfile.constantpool.ClassEntry;
|
||||
import java.lang.classfile.constantpool.ConstantPoolBuilder;
|
||||
@@ -304,13 +306,18 @@ public class CreateSymbols {
|
||||
"Ljdk/internal/ValueBased;";
|
||||
private static final String VALUE_BASED_ANNOTATION_INTERNAL =
|
||||
"Ljdk/internal/ValueBased+Annotation;";
|
||||
private static final String REQUIRES_IDENTITY_ANNOTATION =
|
||||
"Ljdk/internal/RequiresIdentity;";
|
||||
private static final String REQUIRES_IDENTITY_ANNOTATION_INTERNAL =
|
||||
"Ljdk/internal/RequiresIdentity+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,
|
||||
RESTRICTED_ANNOTATION));
|
||||
RESTRICTED_ANNOTATION,
|
||||
REQUIRES_IDENTITY_ANNOTATION));
|
||||
|
||||
private void stripNonExistentAnnotations(LoadDescriptions data) {
|
||||
Set<String> allClasses = data.classes.name2Class.keySet();
|
||||
@@ -986,6 +993,12 @@ public class CreateSymbols {
|
||||
if (desc.runtimeAnnotations != null && !desc.runtimeAnnotations.isEmpty()) {
|
||||
builder.accept(RuntimeVisibleAnnotationsAttribute.of(createAnnotations(desc.runtimeAnnotations)));
|
||||
}
|
||||
if (desc.classTypeAnnotations != null && !desc.classTypeAnnotations.isEmpty()) {
|
||||
builder.accept(RuntimeInvisibleTypeAnnotationsAttribute.of(createTypeAnnotations(desc.classTypeAnnotations)));
|
||||
}
|
||||
if (desc.runtimeTypeAnnotations != null && !desc.runtimeTypeAnnotations.isEmpty()) {
|
||||
builder.accept(RuntimeVisibleTypeAnnotationsAttribute.of(createTypeAnnotations(desc.runtimeTypeAnnotations)));
|
||||
}
|
||||
}
|
||||
|
||||
private List<Annotation> createAnnotations(List<AnnotationDescription> desc) {
|
||||
@@ -1021,6 +1034,12 @@ public class CreateSymbols {
|
||||
annotationType = VALUE_BASED_ANNOTATION_INTERNAL;
|
||||
}
|
||||
|
||||
if (REQUIRES_IDENTITY_ANNOTATION.equals(annotationType)) {
|
||||
//the non-public RequiresIdentity annotation will not be available in ct.sym,
|
||||
//replace with purely synthetic javac-internal annotation:
|
||||
annotationType = REQUIRES_IDENTITY_ANNOTATION_INTERNAL;
|
||||
}
|
||||
|
||||
if (RESTRICTED_ANNOTATION.equals(annotationType)) {
|
||||
//the non-public Restricted annotation will not be available in ct.sym,
|
||||
//replace with purely synthetic javac-internal annotation:
|
||||
@@ -1055,6 +1074,44 @@ public class CreateSymbols {
|
||||
default -> throw new IllegalArgumentException(value.getClass().getName());
|
||||
};
|
||||
}
|
||||
|
||||
private List<TypeAnnotation> createTypeAnnotations(List<TypeAnnotationDescription> desc) {
|
||||
return desc.stream().map(this::createTypeAnnotation).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private TypeAnnotation createTypeAnnotation(TypeAnnotationDescription desc) {
|
||||
Annotation baseAnn = createAnnotation(desc.annotation);
|
||||
TargetInfo targetInfo = switch ((String) desc.targetInfo.get("targetType")) {
|
||||
case "CLASS_TYPE_PARAMETER" -> //TODO: test!
|
||||
TargetInfo.ofClassTypeParameter((int) desc.targetInfo.get("typeParameterIndex"));
|
||||
case "METHOD_TYPE_PARAMETER" ->
|
||||
TargetInfo.ofMethodTypeParameter((int) desc.targetInfo.get("typeParameterIndex"));
|
||||
case "CLASS_EXTENDS" ->
|
||||
TargetInfo.ofClassExtends((int) desc.targetInfo.get("supertypeIndex"));
|
||||
case "CLASS_TYPE_PARAMETER_BOUND" ->
|
||||
TargetInfo.ofClassTypeParameterBound((int) desc.targetInfo.get("typeParameterIndex"),
|
||||
(int) desc.targetInfo.get("boundIndex"));
|
||||
case "METHOD_TYPE_PARAMETER_BOUND" ->
|
||||
TargetInfo.ofMethodTypeParameterBound((int) desc.targetInfo.get("typeParameterIndex"),
|
||||
(int) desc.targetInfo.get("boundIndex"));
|
||||
case "METHOD_RETURN" ->
|
||||
TargetInfo.ofMethodReturn();
|
||||
case "METHOD_RECEIVER" ->
|
||||
TargetInfo.ofMethodReceiver();
|
||||
case "METHOD_FORMAL_PARAMETER" ->
|
||||
TargetInfo.ofMethodFormalParameter((int) desc.targetInfo.get("formalParameterIndex"));
|
||||
case "THROWS" ->
|
||||
TargetInfo.ofThrows((int) desc.targetInfo.get("throwsTargetIndex"));
|
||||
case "FIELD" ->
|
||||
TargetInfo.ofField();
|
||||
case String targetType ->
|
||||
throw new IllegalStateException("Unsupported targetType: " + targetType);
|
||||
};
|
||||
|
||||
List<TypePathComponent> typePath = desc.typePath.stream().map(d -> TypePathComponent.of(TypePathComponent.Kind.valueOf(d.tag()), d.index())).toList();
|
||||
|
||||
return TypeAnnotation.of(targetInfo, typePath, baseAnn);
|
||||
}
|
||||
//</editor-fold>
|
||||
//</editor-fold>
|
||||
|
||||
@@ -2202,6 +2259,10 @@ public class CreateSymbols {
|
||||
chd.permittedSubclasses = a.permittedSubclasses().stream().map(ClassEntry::asInternalName).collect(Collectors.toList());
|
||||
}
|
||||
case ModuleMainClassAttribute a -> ((ModuleHeaderDescription) feature).moduleMainClass = a.mainClass().asInternalName();
|
||||
case RuntimeInvisibleTypeAnnotationsAttribute a ->
|
||||
feature.classTypeAnnotations = typeAnnotations2Descriptions(a.annotations());
|
||||
case RuntimeVisibleTypeAnnotationsAttribute a ->
|
||||
feature.runtimeTypeAnnotations = typeAnnotations2Descriptions(a.annotations());
|
||||
default -> throw new IllegalArgumentException("Unhandled attribute: " + attr.attributeName()); // Do nothing
|
||||
}
|
||||
|
||||
@@ -2258,6 +2319,31 @@ public class CreateSymbols {
|
||||
|
||||
return new AnnotationDescription(annotationType, values);
|
||||
}
|
||||
|
||||
private List<TypeAnnotationDescription> typeAnnotations2Descriptions(List<TypeAnnotation> annos) {
|
||||
return annos.stream().map(ta -> {
|
||||
TypeAnnotationDescription desc = new TypeAnnotationDescription();
|
||||
desc.annotation = annotation2Description(ta.annotation());
|
||||
desc.targetInfo = new HashMap<>();
|
||||
desc.targetInfo.put("targetType", ta.targetInfo().targetType().name());
|
||||
switch (ta.targetInfo()) {
|
||||
case TypeAnnotation.TypeParameterTarget tpt -> desc.targetInfo.put("typeParameterIndex", tpt.typeParameterIndex());
|
||||
case TypeAnnotation.SupertypeTarget st -> desc.targetInfo.put("supertypeIndex", st.supertypeIndex());
|
||||
case TypeAnnotation.TypeParameterBoundTarget tpbt -> {
|
||||
desc.targetInfo.put("typeParameterIndex", tpbt.typeParameterIndex());
|
||||
desc.targetInfo.put("boundIndex", tpbt.boundIndex());
|
||||
}
|
||||
case TypeAnnotation.EmptyTarget _ -> {
|
||||
// nothing to write
|
||||
}
|
||||
case TypeAnnotation.FormalParameterTarget fpt -> desc.targetInfo.put("formalParameterIndex", fpt.formalParameterIndex());
|
||||
case TypeAnnotation.ThrowsTarget tt -> desc.targetInfo.put("throwsTargetIndex", tt.throwsTargetIndex());
|
||||
default -> throw new IllegalStateException(ta.targetInfo().targetType().name());
|
||||
}
|
||||
desc.typePath = ta.targetPath().stream().map(tpc -> new TypeAnnotationDescription.TypePathComponentDesc(tpc.typePathKind().name(), tpc.typeArgumentIndex())).toList();
|
||||
return desc;
|
||||
}).toList();
|
||||
}
|
||||
//</editor-fold>
|
||||
|
||||
protected boolean includeEffectiveAccess(ClassList classes, ClassDescription clazz) {
|
||||
@@ -2379,6 +2465,8 @@ public class CreateSymbols {
|
||||
String versions = "";
|
||||
List<AnnotationDescription> classAnnotations;
|
||||
List<AnnotationDescription> runtimeAnnotations;
|
||||
List<TypeAnnotationDescription> classTypeAnnotations;
|
||||
List<TypeAnnotationDescription> runtimeTypeAnnotations;
|
||||
|
||||
protected void writeAttributes(Appendable output) throws IOException {
|
||||
if (flags != 0)
|
||||
@@ -2401,6 +2489,18 @@ public class CreateSymbols {
|
||||
output.append(quote(a.toString(), false));
|
||||
}
|
||||
}
|
||||
if (classTypeAnnotations != null && !classTypeAnnotations.isEmpty()) {
|
||||
output.append(" classTypeAnnotations ");
|
||||
for (TypeAnnotationDescription a : classTypeAnnotations) {
|
||||
output.append(quote(a.toString(), false));
|
||||
}
|
||||
}
|
||||
if (runtimeTypeAnnotations != null && !runtimeTypeAnnotations.isEmpty()) {
|
||||
output.append(" runtimeTypeAnnotations ");
|
||||
for (TypeAnnotationDescription a : runtimeTypeAnnotations) {
|
||||
output.append(quote(a.toString(), false));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean shouldIgnore(String baselineVersion, String version) {
|
||||
@@ -2430,6 +2530,14 @@ public class CreateSymbols {
|
||||
if (inRuntimeAnnotations != null) {
|
||||
runtimeAnnotations = parseAnnotations(inRuntimeAnnotations, new int[1]);
|
||||
}
|
||||
String inClassTypeAnnotations = reader.attributes.get("classTypeAnnotations");
|
||||
if (inClassTypeAnnotations != null) {
|
||||
classTypeAnnotations = parseTypeAnnotations(inClassTypeAnnotations, new int[1]);
|
||||
}
|
||||
String inRuntimeTypeAnnotations = reader.attributes.get("runtimeTypeAnnotations");
|
||||
if (inRuntimeTypeAnnotations != null) {
|
||||
runtimeTypeAnnotations = parseTypeAnnotations(inRuntimeTypeAnnotations, new int[1]);
|
||||
}
|
||||
}
|
||||
|
||||
public abstract boolean read(LineBasedReader reader) throws IOException;
|
||||
@@ -2442,6 +2550,8 @@ public class CreateSymbols {
|
||||
hash = 89 * hash + Objects.hashCode(this.signature);
|
||||
hash = 89 * hash + listHashCode(this.classAnnotations);
|
||||
hash = 89 * hash + listHashCode(this.runtimeAnnotations);
|
||||
hash = 89 * hash + listHashCode(this.classTypeAnnotations);
|
||||
hash = 89 * hash + listHashCode(this.runtimeTypeAnnotations);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@@ -2469,6 +2579,12 @@ public class CreateSymbols {
|
||||
if (!listEquals(this.runtimeAnnotations, other.runtimeAnnotations)) {
|
||||
return false;
|
||||
}
|
||||
if (!listEquals(this.classTypeAnnotations, other.classTypeAnnotations)) {
|
||||
return false;
|
||||
}
|
||||
if (!listEquals(this.runtimeTypeAnnotations, other.runtimeTypeAnnotations)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3273,6 +3389,8 @@ public class CreateSymbols {
|
||||
hash = 59 * hash + Objects.hashCode(this.descriptor);
|
||||
hash = 59 * hash + Objects.hashCode(this.thrownTypes);
|
||||
hash = 59 * hash + Objects.hashCode(this.annotationDefaultValue);
|
||||
hash = 59 * hash + Objects.hashCode(this.classParameterAnnotations);
|
||||
hash = 59 * hash + Objects.hashCode(this.runtimeParameterAnnotations);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@@ -3297,6 +3415,12 @@ public class CreateSymbols {
|
||||
if (!Objects.equals(this.annotationDefaultValue, other.annotationDefaultValue)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(this.classParameterAnnotations, other.classParameterAnnotations)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(this.runtimeParameterAnnotations, other.runtimeParameterAnnotations)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3624,6 +3748,40 @@ public class CreateSymbols {
|
||||
}
|
||||
}
|
||||
|
||||
static final class TypeAnnotationDescription {
|
||||
AnnotationDescription annotation;
|
||||
Map<String, Object> targetInfo;
|
||||
List<TypePathComponentDesc> typePath;
|
||||
|
||||
public TypeAnnotationDescription() {
|
||||
}
|
||||
|
||||
public TypeAnnotationDescription(AnnotationDescription annotation, Map<String, Object> targetInfo, List<TypePathComponentDesc> typePath) {
|
||||
this.annotation = annotation;
|
||||
this.targetInfo = targetInfo;
|
||||
this.typePath = typePath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return annotation.toString() + "{" + targetInfo.entrySet().stream().map(e -> e.getKey() + "=" + quote(printValue(e.getValue()), false)).collect(Collectors.joining(",")) + "}" +
|
||||
(!typePath.isEmpty() ? "[" + typePath.stream().map(desc -> desc.tag + ":" + desc.index).collect(Collectors.joining(",")) + "]" : "");
|
||||
}
|
||||
|
||||
private String printValue(Object obj) {
|
||||
if (obj instanceof String s) {
|
||||
return "\"" + s + "\"";
|
||||
} else if (obj instanceof Integer i) {
|
||||
return "I" + String.valueOf(i);
|
||||
} else {
|
||||
throw new IllegalStateException("Unsupported value: " + obj.getClass());
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: path
|
||||
record TypePathComponentDesc(String tag, int index) {}
|
||||
}
|
||||
|
||||
static final class EnumConstant {
|
||||
String type;
|
||||
String constant;
|
||||
@@ -3963,23 +4121,69 @@ public class CreateSymbols {
|
||||
|
||||
private static AnnotationDescription parseAnnotation(String value, int[] valuePointer) {
|
||||
String className = className(value, valuePointer);
|
||||
Map<String, Object> attribute2Value = new HashMap<>();
|
||||
Map<String, Object> attribute2Value = Map.of();
|
||||
|
||||
if (valuePointer[0] < value.length() && value.charAt(valuePointer[0]) == '(') {
|
||||
while (value.charAt(valuePointer[0]) != ')') {
|
||||
attribute2Value = parseMap(value, valuePointer, ')');
|
||||
}
|
||||
|
||||
return new AnnotationDescription(className, attribute2Value);
|
||||
}
|
||||
|
||||
private static Map<String, Object> parseMap(String value, int[] valuePointer, char endBracket) {
|
||||
Map<String, Object> attribute2Value = new HashMap<>();
|
||||
|
||||
while (value.charAt(valuePointer[0]) != endBracket) {
|
||||
int nameStart = ++valuePointer[0];
|
||||
|
||||
while (value.charAt(valuePointer[0]++) != '=');
|
||||
|
||||
String name = value.substring(nameStart, valuePointer[0] - 1);
|
||||
|
||||
attribute2Value.put(name, parseAnnotationValue(value, valuePointer));
|
||||
}
|
||||
|
||||
valuePointer[0]++;
|
||||
|
||||
return attribute2Value;
|
||||
}
|
||||
|
||||
public static List<TypeAnnotationDescription> parseTypeAnnotations(String encoded, int[] pointer) {
|
||||
List<TypeAnnotationDescription> result = new ArrayList<>();
|
||||
|
||||
while (pointer[0] < encoded.length() && encoded.charAt(pointer[0]) == '@') {
|
||||
pointer[0]++;
|
||||
result.add(parseTypeAnnotation(encoded, pointer));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private static TypeAnnotationDescription parseTypeAnnotation(String value, int[] valuePointer) {
|
||||
AnnotationDescription ann = parseAnnotation(value, valuePointer);
|
||||
Map<String, Object> targetInfo = Map.of();
|
||||
|
||||
if (valuePointer[0] < value.length() && value.charAt(valuePointer[0]) == '{') {
|
||||
targetInfo = parseMap(value, valuePointer, '}');
|
||||
}
|
||||
|
||||
List<TypeAnnotationDescription.TypePathComponentDesc> typePath = new ArrayList<>();
|
||||
|
||||
if (valuePointer[0] < value.length() && value.charAt(valuePointer[0]) == '[') {
|
||||
while (value.charAt(valuePointer[0]) != ']') {
|
||||
int nameStart = ++valuePointer[0];
|
||||
|
||||
while (value.charAt(valuePointer[0]++) != '=');
|
||||
while (value.charAt(valuePointer[0]++) != ':');
|
||||
|
||||
String name = value.substring(nameStart, valuePointer[0] - 1);
|
||||
|
||||
attribute2Value.put(name, parseAnnotationValue(value, valuePointer));
|
||||
typePath.add(new TypeAnnotationDescription.TypePathComponentDesc(name, Integer.parseInt(readDigits(value, valuePointer))));
|
||||
}
|
||||
|
||||
valuePointer[0]++;
|
||||
}
|
||||
|
||||
return new AnnotationDescription(className, attribute2Value);
|
||||
return new TypeAnnotationDescription(ann, targetInfo, typePath);
|
||||
}
|
||||
//</editor-fold>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2025, 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
|
||||
@@ -47,6 +47,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Properties;
|
||||
@@ -93,7 +94,9 @@ public class ClassGenerator {
|
||||
FACTORY_FIELD_LINT("factory.decl.field.lint"),
|
||||
WILDCARDS_EXTENDS("wildcards.extends"),
|
||||
SUPPRESS_WARNINGS("suppress.warnings"),
|
||||
LINT_CATEGORY("lint.category");
|
||||
LINT_CATEGORY("lint.category"),
|
||||
DIAGNOSTIC_FLAGS_EMPTY("diagnostic.flags.empty"),
|
||||
DIAGNOSTIC_FLAGS_NON_EMPTY("diagnostic.flags.non-empty");
|
||||
|
||||
/** stub key (as it appears in the property file) */
|
||||
String key;
|
||||
@@ -259,17 +262,30 @@ public class ClassGenerator {
|
||||
.map(MessageLine::lintCategory)
|
||||
.findFirst().orElse(null);
|
||||
//System.out.println("category for " + key + " = " + lintCategory);
|
||||
String diagnosticFlags = lines.stream()
|
||||
.filter(MessageLine::isDiagnosticFlags)
|
||||
.map(MessageLine::diagnosticFlags)
|
||||
.flatMap(Stream::of)
|
||||
.map(s -> s.replace('-', '_'))
|
||||
.map(s -> s.toUpperCase(Locale.ROOT))
|
||||
.collect(Collectors.joining(", "));
|
||||
String factoryName = factoryName(key);
|
||||
if (msgInfo.getTypes().isEmpty()) {
|
||||
//generate field
|
||||
String factoryField;
|
||||
if (lintCategory == null) {
|
||||
factoryField = StubKind.FACTORY_FIELD.format(k.keyClazz, factoryName,
|
||||
diagnosticFlags.isEmpty() ?
|
||||
StubKind.DIAGNOSTIC_FLAGS_EMPTY.format() :
|
||||
StubKind.DIAGNOSTIC_FLAGS_NON_EMPTY.format(diagnosticFlags),
|
||||
"\"" + keyParts[0] + "\"",
|
||||
"\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"",
|
||||
javadoc);
|
||||
} else {
|
||||
factoryField = StubKind.FACTORY_FIELD_LINT.format(k.keyClazz, factoryName,
|
||||
diagnosticFlags.isEmpty() ?
|
||||
StubKind.DIAGNOSTIC_FLAGS_EMPTY.format() :
|
||||
StubKind.DIAGNOSTIC_FLAGS_NON_EMPTY.format(diagnosticFlags),
|
||||
StubKind.LINT_CATEGORY.format("\"" + lintCategory + "\""),
|
||||
"\"" + keyParts[0] + "\"",
|
||||
"\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"",
|
||||
@@ -287,11 +303,17 @@ public class ClassGenerator {
|
||||
String methodBody;
|
||||
if (lintCategory == null) {
|
||||
methodBody = StubKind.FACTORY_METHOD_BODY.format(k.keyClazz,
|
||||
diagnosticFlags.isEmpty() ?
|
||||
StubKind.DIAGNOSTIC_FLAGS_EMPTY.format() :
|
||||
StubKind.DIAGNOSTIC_FLAGS_NON_EMPTY.format(diagnosticFlags),
|
||||
"\"" + keyParts[0] + "\"",
|
||||
"\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"",
|
||||
argNames.stream().collect(Collectors.joining(", ")));
|
||||
} else {
|
||||
methodBody = StubKind.FACTORY_METHOD_BODY_LINT.format(k.keyClazz,
|
||||
diagnosticFlags.isEmpty() ?
|
||||
StubKind.DIAGNOSTIC_FLAGS_EMPTY.format() :
|
||||
StubKind.DIAGNOSTIC_FLAGS_NON_EMPTY.format(diagnosticFlags),
|
||||
StubKind.LINT_CATEGORY.format("\"" + lintCategory + "\""),
|
||||
"\"" + keyParts[0] + "\"",
|
||||
"\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"",
|
||||
|
||||
@@ -32,7 +32,8 @@ import java.util.List;
|
||||
* A message within the message file.
|
||||
* A message is a series of lines containing a "name=value" property,
|
||||
* optionally preceded by a comment describing the use of placeholders
|
||||
* such as {0}, {1}, etc within the property value.
|
||||
* such as {0}, {1}, etc within the property value, a lint category,
|
||||
* and/or a list of diagnostic flags.
|
||||
*/
|
||||
public final class Message {
|
||||
final MessageLine firstLine;
|
||||
@@ -49,7 +50,7 @@ public final class Message {
|
||||
public MessageInfo getMessageInfo() {
|
||||
if (messageInfo == null) {
|
||||
MessageLine l = firstLine.prev;
|
||||
if (l != null && l.isLint()) {
|
||||
while (l != null && (l.isLint() || l.isDiagnosticFlags())) {
|
||||
l = l.prev;
|
||||
}
|
||||
if (l != null && l.isInfo())
|
||||
@@ -74,7 +75,7 @@ public final class Message {
|
||||
while (l.text.isEmpty())
|
||||
l = l.next;
|
||||
} else {
|
||||
if (l.prev != null && (l.prev.isInfo() || l.prev.isLint()))
|
||||
while (l.prev != null && (l.prev.isInfo() || l.prev.isLint() || l.prev.isDiagnosticFlags()))
|
||||
l = l.prev;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
package propertiesparser.parser;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@@ -39,6 +40,7 @@ public class MessageLine {
|
||||
static final Pattern infoPattern = Pattern.compile(String.format("# ([0-9]+: %s, )*[0-9]+: %s",
|
||||
typePattern.pattern(), typePattern.pattern()));
|
||||
static final Pattern lintPattern = Pattern.compile("# lint: ([a-z\\-]+)");
|
||||
static final Pattern diagnosticFlagsPattern = Pattern.compile("# flags: ([a-z\\-]+(, ([a-z\\-]+))*)");
|
||||
|
||||
public String text;
|
||||
MessageLine prev;
|
||||
@@ -69,6 +71,19 @@ public class MessageLine {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isDiagnosticFlags() {
|
||||
return diagnosticFlagsPattern.matcher(text).matches();
|
||||
}
|
||||
|
||||
public String[] diagnosticFlags() {
|
||||
Matcher matcher = diagnosticFlagsPattern.matcher(text);
|
||||
if (matcher.matches()) {
|
||||
return matcher.group(1).split(", ", -1);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
boolean hasContinuation() {
|
||||
return (next != null) && text.endsWith("\\");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2025, 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 @@ toplevel.decl=\
|
||||
package {0};\n\
|
||||
\n\
|
||||
{1}\n\
|
||||
import com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag;\n\
|
||||
import com.sun.tools.javac.util.JCDiagnostic.Error;\n\
|
||||
import com.sun.tools.javac.util.JCDiagnostic.Warning;\n\
|
||||
import com.sun.tools.javac.util.JCDiagnostic.LintWarning;\n\
|
||||
@@ -34,6 +35,10 @@ toplevel.decl=\
|
||||
import com.sun.tools.javac.util.JCDiagnostic.Fragment;\n\
|
||||
import com.sun.tools.javac.code.Lint.LintCategory;\n\
|
||||
\n\
|
||||
import java.util.EnumSet;\n\
|
||||
\n\
|
||||
import static com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag.*;\n\
|
||||
\n\
|
||||
public class {2} '{'\n\
|
||||
{3}\n\
|
||||
'}'\n
|
||||
@@ -58,22 +63,22 @@ factory.decl.method.arg=\
|
||||
arg{0}
|
||||
|
||||
factory.decl.method.body=\
|
||||
return new {0}({1}, {2}, {3});
|
||||
return new {0}({1}, {2}, {3}, {4});
|
||||
|
||||
factory.decl.method.body.lint=\
|
||||
return new {0}({1}, {2}, {3}, {4});
|
||||
return new {0}({1}, {2}, {3}, {4}, {5});
|
||||
|
||||
factory.decl.field=\
|
||||
/**\n\
|
||||
' '* {4}\n\
|
||||
' '*/\n\
|
||||
public static final {0} {1} = new {0}({2}, {3});
|
||||
public static final {0} {1} = new {0}({2}, {3}, {4});
|
||||
|
||||
factory.decl.field.lint=\
|
||||
/**\n\
|
||||
' '* {5}\n\
|
||||
' '*/\n\
|
||||
public static final {0} {1} = new {0}({2}, {3}, {4});
|
||||
public static final {0} {1} = new {0}({2}, {3}, {4}, {5});
|
||||
|
||||
wildcards.extends=\
|
||||
{0}<? extends {1}>
|
||||
@@ -84,3 +89,9 @@ suppress.warnings=\
|
||||
lint.category=\
|
||||
LintCategory.get({0}).get()
|
||||
|
||||
diagnostic.flags.empty=\
|
||||
EnumSet.noneOf(DiagnosticFlag.class)
|
||||
|
||||
diagnostic.flags.non-empty=\
|
||||
EnumSet.of({0})
|
||||
|
||||
|
||||
@@ -46,6 +46,8 @@ CLDR_GEN_DONE := $(GENSRC_DIR)/_cldr-gensrc.marker
|
||||
TZ_DATA_DIR := $(MODULE_SRC)/share/data/tzdata
|
||||
ZONENAME_TEMPLATE := $(MODULE_SRC)/share/classes/java/time/format/ZoneName.java.template
|
||||
|
||||
# The `-utf8` option is used even for US English, as some names
|
||||
# may contain non-ASCII characters, such as “Türkiye”.
|
||||
$(CLDR_GEN_DONE): $(wildcard $(CLDR_DATA_DIR)/dtd/*.dtd) \
|
||||
$(wildcard $(CLDR_DATA_DIR)/main/en*.xml) \
|
||||
$(wildcard $(CLDR_DATA_DIR)/supplemental/*.xml) \
|
||||
@@ -61,7 +63,8 @@ $(CLDR_GEN_DONE): $(wildcard $(CLDR_DATA_DIR)/dtd/*.dtd) \
|
||||
-basemodule \
|
||||
-year $(COPYRIGHT_YEAR) \
|
||||
-zntempfile $(ZONENAME_TEMPLATE) \
|
||||
-tzdatadir $(TZ_DATA_DIR))
|
||||
-tzdatadir $(TZ_DATA_DIR) \
|
||||
-utf8)
|
||||
$(TOUCH) $@
|
||||
|
||||
TARGETS += $(CLDR_GEN_DONE)
|
||||
|
||||
@@ -50,5 +50,22 @@ TARGETS += $(GENSRC_INDICCONJUNCTBREAK)
|
||||
|
||||
################################################################################
|
||||
|
||||
GENSRC_CASEFOLDING := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/util/regex/CaseFolding.java
|
||||
|
||||
CASEFOLDINGTEMP := $(MODULE_SRC)/share/classes/jdk/internal/util/regex/CaseFolding.java.template
|
||||
CASEFOLDINGTXT := $(MODULE_SRC)/share/data/unicodedata/CaseFolding.txt
|
||||
|
||||
$(GENSRC_CASEFOLDING): $(BUILD_TOOLS_JDK) $(CASEFOLDINGTEMP) $(CASEFOLDINGTXT)
|
||||
$(call LogInfo, Generating $@)
|
||||
$(call MakeTargetDir)
|
||||
$(TOOL_GENERATECASEFOLDING) \
|
||||
$(CASEFOLDINGTEMP) \
|
||||
$(CASEFOLDINGTXT) \
|
||||
$(GENSRC_CASEFOLDING)
|
||||
|
||||
TARGETS += $(GENSRC_CASEFOLDING)
|
||||
|
||||
################################################################################
|
||||
|
||||
endif # include guard
|
||||
include MakeIncludeEnd.gmk
|
||||
|
||||
@@ -278,7 +278,6 @@ ifeq ($(call isTargetOs, windows macosx)+$(ENABLE_HEADLESS_ONLY), false+false)
|
||||
DISABLED_WARNINGS_gcc_X11TextRenderer_md.c := unused-but-set-variable, \
|
||||
DISABLED_WARNINGS_gcc_XlibWrapper.c := type-limits pointer-to-int-cast, \
|
||||
DISABLED_WARNINGS_gcc_XRBackendNative.c := maybe-uninitialized, \
|
||||
DISABLED_WARNINGS_gcc_XToolkit.c := unused-result, \
|
||||
DISABLED_WARNINGS_gcc_XWindow.c := unused-function, \
|
||||
DISABLED_WARNINGS_clang_awt_Taskbar.c := parentheses, \
|
||||
DISABLED_WARNINGS_clang_gtk3_interface.c := unused-function parentheses, \
|
||||
|
||||
@@ -68,6 +68,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJDWP, \
|
||||
DISABLED_WARNINGS_clang_threadControl.c := unused-but-set-variable \
|
||||
unused-variable, \
|
||||
DISABLED_WARNINGS_clang_utf_util.c := unused-but-set-variable, \
|
||||
DISABLED_WARNINGS_microsoft_debugInit.c := 5287, \
|
||||
LDFLAGS := $(ICONV_LDFLAGS), \
|
||||
EXTRA_HEADER_DIRS := \
|
||||
include \
|
||||
|
||||
@@ -45,7 +45,8 @@ $(CLDR_GEN_DONE): $(wildcard $(CLDR_DATA_DIR)/dtd/*.dtd) \
|
||||
-baselocales "en-US" \
|
||||
-year $(COPYRIGHT_YEAR) \
|
||||
-o $(GENSRC_DIR) \
|
||||
-tzdatadir $(TZ_DATA_DIR))
|
||||
-tzdatadir $(TZ_DATA_DIR) \
|
||||
-utf8)
|
||||
$(TOUCH) $@
|
||||
|
||||
TARGETS += $(CLDR_GEN_DONE)
|
||||
|
||||
@@ -92,6 +92,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
|
||||
--add-exports java.base/jdk.internal.classfile.impl=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.event=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.foreign=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.jimage=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.util=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.vm=ALL-UNNAMED \
|
||||
|
||||
@@ -62,7 +62,7 @@ BUILD_JDK_JTREG_LIBRARIES_JDK_LIBS_libGetXSpace := java.base:libjava
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
BUILD_JDK_JTREG_EXCLUDE += libDirectIO.c libInheritedChannel.c \
|
||||
libExplicitAttach.c libImplicitAttach.c \
|
||||
exelauncher.c
|
||||
exelauncher.c libFDLeaker.c exeFDLeakTester.c
|
||||
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerTest := $(LIBCXX)
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exerevokeall := advapi32.lib
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
|
||||
|
||||
ifndef SOURCE
|
||||
export SOURCE := 7
|
||||
export SOURCE := 8
|
||||
endif
|
||||
ifndef TARGET
|
||||
export TARGET := 7
|
||||
export TARGET := 8
|
||||
endif
|
||||
ifndef JAVAC
|
||||
export JAVAC := javac
|
||||
|
||||
@@ -39,12 +39,12 @@
|
||||
<property name="dist" location="dist"/>
|
||||
<property name="resources" location="resources"/>
|
||||
|
||||
<condition property="source" value="7">
|
||||
<condition property="source" value="8">
|
||||
<not>
|
||||
<isset property="source"/>
|
||||
</not>
|
||||
</condition>
|
||||
<condition property="target" value="7">
|
||||
<condition property="target" value="8">
|
||||
<not>
|
||||
<isset property="target"/>
|
||||
</not>
|
||||
@@ -54,11 +54,6 @@
|
||||
<isset property="java"/>
|
||||
</not>
|
||||
</condition>
|
||||
<condition property="javac" value="javac">
|
||||
<not>
|
||||
<isset property="javac"/>
|
||||
</not>
|
||||
</condition>
|
||||
|
||||
<target name="init">
|
||||
<!-- Create the time stamp -->
|
||||
@@ -70,7 +65,7 @@
|
||||
<target name="compile" depends="init"
|
||||
description="compile the source " >
|
||||
<!-- Compile the java code from ${src} into ${build} -->
|
||||
<javac debug="off" source="${source}" target="${target}" srcdir="${src}" destdir="${build}" fork="true" executable="${javac}"/>
|
||||
<javac debug="off" source="${source}" target="${target}" srcdir="${src}" destdir="${build}"/>
|
||||
</target>
|
||||
|
||||
<target name="run" depends="dist"
|
||||
|
||||
@@ -270,7 +270,7 @@ public class J2DAnalyzer {
|
||||
} else {
|
||||
double overallscore = totalscore[i]/numtests[i];
|
||||
System.out.println(" Number of tests: "+numtests[i]);
|
||||
System.out.println(" Overall average: "+overallscore);
|
||||
System.out.printf( " Overall average: %-10.4f%n", overallscore);
|
||||
System.out.println(" Best spread: "+bestspread[i]+
|
||||
"% variance");
|
||||
System.out.println(" Worst spread: "+worstspread[i]+
|
||||
|
||||
@@ -362,7 +362,7 @@ public class RunWindow extends JPanel implements Runnable, ActionListener {
|
||||
/**
|
||||
* This class contains initial values for instance variables of 'RunWindow' class,
|
||||
* and its instance is used in creation of 'RunWindow' object. Values parsed from
|
||||
* certain command line options of the demo or from the demo applet parameters are
|
||||
* certain command line options of the demo
|
||||
* set to the fields of this class instance. It is a part of the fix which changed
|
||||
* static variables for instance variables in certain demo classes.
|
||||
*
|
||||
|
||||
@@ -406,13 +406,6 @@ public final class Tools extends JPanel implements ActionListener,
|
||||
if (pDialogState) {
|
||||
printJob.print(aset);
|
||||
}
|
||||
} catch (@SuppressWarnings("removal") java.security.AccessControlException ace) {
|
||||
String errmsg = "Applet access control exception; to allow "
|
||||
+ "access to printer, set\n"
|
||||
+ "permission for \"queuePrintJob\" in "
|
||||
+ "RuntimePermission.";
|
||||
JOptionPane.showMessageDialog(this, errmsg, "Printer Access Error",
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(Tools.class.getName()).log(Level.SEVERE,
|
||||
null, ex);
|
||||
|
||||
@@ -187,22 +187,18 @@ public class HelloWorld {
|
||||
new Run("none", "Hello from Cupertino")
|
||||
}),
|
||||
new Paragraph("title", new Run[] {
|
||||
new Run("none", "\u53F0\u5317\u554F\u5019\u60A8\u0021")
|
||||
new Run("none", "台北問候您!")
|
||||
}),
|
||||
new Paragraph("title", new Run[] {
|
||||
new Run("none", "\u0391\u03B8\u03B7\u03BD\u03B1\u03B9\u0020" // Greek
|
||||
+ "\u03B1\u03C3\u03C0\u03B1\u03B6\u03BF\u03BD"
|
||||
+ "\u03C4\u03B1\u03B9\u0020\u03C5\u03BC\u03B1"
|
||||
+ "\u03C2\u0021")
|
||||
new Run("none", "Αθηναι ασπαζονται υμας!") // Greek
|
||||
}),
|
||||
new Paragraph("title", new Run[] {
|
||||
new Run("none", "\u6771\u4eac\u304b\u3089\u4eca\u65e5\u306f")
|
||||
new Run("none", "東京から今日は")
|
||||
}),
|
||||
new Paragraph("title", new Run[] {
|
||||
new Run("none", "\u05e9\u05dc\u05d5\u05dd \u05de\u05d9\u05e8\u05d5"
|
||||
+ "\u05e9\u05dc\u05d9\u05dd")
|
||||
new Run("none", "שלום מירושלים")
|
||||
}),
|
||||
new Paragraph("title", new Run[] {
|
||||
new Run("none", "\u0633\u0644\u0627\u0645")
|
||||
new Run("none", "سلام")
|
||||
}), };
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ public class SwingSet2 extends JPanel {
|
||||
private JEditorPane demoSrcPane = null;
|
||||
|
||||
|
||||
// contentPane cache, saved from the applet or application frame
|
||||
// contentPane cache, saved from the application frame
|
||||
Container contentPane = null;
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ public class SwingSet2 extends JPanel {
|
||||
|
||||
|
||||
/**
|
||||
* SwingSet2 Main. Called only if we're an application, not an applet.
|
||||
* SwingSet2 Main.
|
||||
*/
|
||||
public static void main(final String[] args) {
|
||||
// must run in EDT when constructing the GUI components
|
||||
@@ -716,8 +716,7 @@ public class SwingSet2 extends JPanel {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the content pane whether we're in an applet
|
||||
* or application
|
||||
* Returns the content pane
|
||||
*/
|
||||
public Container getContentPane() {
|
||||
if(contentPane == null) {
|
||||
|
||||
@@ -456,13 +456,13 @@ SliderDemo.horizontal=Horizontal
|
||||
SliderDemo.vertical=Vertikal
|
||||
SliderDemo.plain=Einfach
|
||||
SliderDemo.a_plain_slider=Ein einfacher Schieberegler
|
||||
SliderDemo.majorticks=Grobteilungen
|
||||
SliderDemo.majorticksdescription=Ein Schieberegler mit Grobteilungsmarkierungen
|
||||
SliderDemo.ticks=Feinteilungen, Teilungen zum Einrasten und Labels
|
||||
SliderDemo.minorticks=Feinteilungen
|
||||
SliderDemo.minorticksdescription=Ein Schieberegler mit Grob- und Feinteilungen, mit Teilungen, in die der Schieberegler einrastet, wobei einige Teilungen mit einem sichtbaren Label versehen sind
|
||||
SliderDemo.majorticks=Hauptteilstriche
|
||||
SliderDemo.majorticksdescription=Ein Schieberegler mit Hauptteilstrichen
|
||||
SliderDemo.ticks=Hilfsteilstriche, zum Einrasten und Beschriften
|
||||
SliderDemo.minorticks=Hilfsteilstriche
|
||||
SliderDemo.minorticksdescription=Ein Schieberegler mit Haupt- und Hilfsteilstrichen, in die der Schieberegler einrastet, wobei einige Teilstriche mit einer sichtbaren Beschriftung versehen sind
|
||||
SliderDemo.disabled=Deaktiviert
|
||||
SliderDemo.disableddescription=Ein Schieberegler mit Grob- und Feinteilungen, der nicht aktiviert ist (kann nicht bearbeitet werden)
|
||||
SliderDemo.disableddescription=Ein Schieberegler mit Haupt- und Hilfsteilstrichen, der nicht aktiviert ist (kann nicht bearbeitet werden)
|
||||
|
||||
### SplitPane Demo ###
|
||||
|
||||
|
||||
@@ -1765,10 +1765,6 @@ void MachPrologNode::emit(C2_MacroAssembler *masm, PhaseRegAlloc *ra_) const {
|
||||
// n.b. frame size includes space for return pc and rfp
|
||||
const int framesize = C->output()->frame_size_in_bytes();
|
||||
|
||||
// insert a nop at the start of the prolog so we can patch in a
|
||||
// branch if we need to invalidate the method later
|
||||
__ nop();
|
||||
|
||||
if (C->clinit_barrier_on_entry()) {
|
||||
assert(!C->method()->holder()->is_not_initialized(), "initialization should have been started");
|
||||
|
||||
@@ -1888,7 +1884,7 @@ void MachEpilogNode::emit(C2_MacroAssembler *masm, PhaseRegAlloc *ra_) const {
|
||||
code_stub = &stub->entry();
|
||||
}
|
||||
__ relocate(relocInfo::poll_return_type);
|
||||
__ safepoint_poll(*code_stub, true /* at_return */, false /* acquire */, true /* in_nmethod */);
|
||||
__ safepoint_poll(*code_stub, true /* at_return */, true /* in_nmethod */);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2366,17 +2362,34 @@ int Matcher::max_vector_size(const BasicType bt) {
|
||||
}
|
||||
|
||||
int Matcher::min_vector_size(const BasicType bt) {
|
||||
int max_size = max_vector_size(bt);
|
||||
// Limit the min vector size to 8 bytes.
|
||||
int size = 8 / type2aelembytes(bt);
|
||||
if (bt == T_BYTE) {
|
||||
// To support vector api shuffle/rearrange.
|
||||
size = 4;
|
||||
} else if (bt == T_BOOLEAN) {
|
||||
// To support vector api load/store mask.
|
||||
size = 2;
|
||||
// Usually, the shortest vector length supported by AArch64 ISA and
|
||||
// Vector API species is 64 bits. However, we allow 32-bit or 16-bit
|
||||
// vectors in a few special cases.
|
||||
int size;
|
||||
switch(bt) {
|
||||
case T_BOOLEAN:
|
||||
// Load/store a vector mask with only 2 elements for vector types
|
||||
// such as "2I/2F/2L/2D".
|
||||
size = 2;
|
||||
break;
|
||||
case T_BYTE:
|
||||
// Generate a "4B" vector, to support vector cast between "8B/16B"
|
||||
// and "4S/4I/4L/4F/4D".
|
||||
size = 4;
|
||||
break;
|
||||
case T_SHORT:
|
||||
// Generate a "2S" vector, to support vector cast between "4S/8S"
|
||||
// and "2I/2L/2F/2D".
|
||||
size = 2;
|
||||
break;
|
||||
default:
|
||||
// Limit the min vector length to 64-bit.
|
||||
size = 8 / type2aelembytes(bt);
|
||||
// The number of elements in a vector should be at least 2.
|
||||
size = MAX2(size, 2);
|
||||
}
|
||||
if (size < 2) size = 2;
|
||||
|
||||
int max_size = max_vector_size(bt);
|
||||
return MIN2(size, max_size);
|
||||
}
|
||||
|
||||
@@ -3454,10 +3467,6 @@ encode %{
|
||||
__ mov(dst_reg, (uint64_t)1);
|
||||
%}
|
||||
|
||||
enc_class aarch64_enc_mov_byte_map_base(iRegP dst, immByteMapBase src) %{
|
||||
__ load_byte_map_base($dst$$Register);
|
||||
%}
|
||||
|
||||
enc_class aarch64_enc_mov_n(iRegN dst, immN src) %{
|
||||
Register dst_reg = as_Register($dst$$reg);
|
||||
address con = (address)$src$$constant;
|
||||
@@ -3921,6 +3930,10 @@ ins_attrib ins_alignment(4); // Required alignment attribute (must
|
||||
// compute_padding() function must be
|
||||
// provided for the instruction
|
||||
|
||||
// Whether this node is expanded during code emission into a sequence of
|
||||
// instructions and the first instruction can perform an implicit null check.
|
||||
ins_attrib ins_is_late_expanded_null_check_candidate(false);
|
||||
|
||||
//----------OPERANDS-----------------------------------------------------------
|
||||
// Operand definitions must precede instruction definitions for correct parsing
|
||||
// in the ADLC because operands constitute user defined types which are used in
|
||||
@@ -4554,20 +4567,6 @@ operand immP_1()
|
||||
interface(CONST_INTER);
|
||||
%}
|
||||
|
||||
// Card Table Byte Map Base
|
||||
operand immByteMapBase()
|
||||
%{
|
||||
// Get base of card map
|
||||
predicate(BarrierSet::barrier_set()->is_a(BarrierSet::CardTableBarrierSet) &&
|
||||
SHENANDOAHGC_ONLY(!BarrierSet::barrier_set()->is_a(BarrierSet::ShenandoahBarrierSet) &&)
|
||||
(CardTable::CardValue*)n->get_ptr() == ((CardTableBarrierSet*)(BarrierSet::barrier_set()))->card_table()->byte_map_base());
|
||||
match(ConP);
|
||||
|
||||
op_cost(0);
|
||||
format %{ %}
|
||||
interface(CONST_INTER);
|
||||
%}
|
||||
|
||||
// Float and Double operands
|
||||
// Double Immediate
|
||||
operand immD()
|
||||
@@ -6854,20 +6853,6 @@ instruct loadConP1(iRegPNoSp dst, immP_1 con)
|
||||
ins_pipe(ialu_imm);
|
||||
%}
|
||||
|
||||
// Load Byte Map Base Constant
|
||||
|
||||
instruct loadByteMapBase(iRegPNoSp dst, immByteMapBase con)
|
||||
%{
|
||||
match(Set dst con);
|
||||
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "adr $dst, $con\t# Byte Map Base" %}
|
||||
|
||||
ins_encode(aarch64_enc_mov_byte_map_base(dst, con));
|
||||
|
||||
ins_pipe(ialu_imm);
|
||||
%}
|
||||
|
||||
// Load Narrow Pointer Constant
|
||||
|
||||
instruct loadConN(iRegNNoSp dst, immN con)
|
||||
@@ -7761,14 +7746,12 @@ instruct popCountI(iRegINoSp dst, iRegIorL2I src, vRegF tmp) %{
|
||||
effect(TEMP tmp);
|
||||
ins_cost(INSN_COST * 13);
|
||||
|
||||
format %{ "movw $src, $src\n\t"
|
||||
"mov $tmp, $src\t# vector (1D)\n\t"
|
||||
format %{ "fmovs $tmp, $src\t# vector (1S)\n\t"
|
||||
"cnt $tmp, $tmp\t# vector (8B)\n\t"
|
||||
"addv $tmp, $tmp\t# vector (8B)\n\t"
|
||||
"mov $dst, $tmp\t# vector (1D)" %}
|
||||
ins_encode %{
|
||||
__ movw($src$$Register, $src$$Register); // ensure top 32 bits 0
|
||||
__ mov($tmp$$FloatRegister, __ D, 0, $src$$Register);
|
||||
__ fmovs($tmp$$FloatRegister, $src$$Register);
|
||||
__ cnt($tmp$$FloatRegister, __ T8B, $tmp$$FloatRegister);
|
||||
__ addv($tmp$$FloatRegister, __ T8B, $tmp$$FloatRegister);
|
||||
__ mov($dst$$Register, $tmp$$FloatRegister, __ D, 0);
|
||||
@@ -8236,6 +8219,16 @@ instruct castLL_checked(iRegL dst, rFlagsReg cr)
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct castHH(vRegF dst)
|
||||
%{
|
||||
match(Set dst (CastHH dst));
|
||||
size(0);
|
||||
format %{ "# castHH of $dst" %}
|
||||
ins_encode(/* empty encoding */);
|
||||
ins_cost(0);
|
||||
ins_pipe(pipe_class_empty);
|
||||
%}
|
||||
|
||||
instruct castFF(vRegF dst)
|
||||
%{
|
||||
match(Set dst (CastFF dst));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2020, 2024, Arm Limited. All rights reserved.
|
||||
// Copyright (c) 2020, 2025, Arm Limited. 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
|
||||
@@ -131,7 +131,7 @@ source %{
|
||||
// These operations are not profitable to be vectorized on NEON, because no direct
|
||||
// NEON instructions support them. But the match rule support for them is profitable for
|
||||
// Vector API intrinsics.
|
||||
if ((opcode == Op_VectorCastD2X && bt == T_INT) ||
|
||||
if ((opcode == Op_VectorCastD2X && (bt == T_INT || bt == T_SHORT)) ||
|
||||
(opcode == Op_VectorCastL2X && bt == T_FLOAT) ||
|
||||
(opcode == Op_CountLeadingZerosV && bt == T_LONG) ||
|
||||
(opcode == Op_CountTrailingZerosV && bt == T_LONG) ||
|
||||
@@ -189,6 +189,18 @@ source %{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case Op_AddReductionVI:
|
||||
case Op_AndReductionV:
|
||||
case Op_OrReductionV:
|
||||
case Op_XorReductionV:
|
||||
case Op_MinReductionV:
|
||||
case Op_MaxReductionV:
|
||||
// Reductions with less than 8 bytes vector length are
|
||||
// not supported.
|
||||
if (length_in_bytes < 8) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case Op_MulReductionVD:
|
||||
case Op_MulReductionVF:
|
||||
case Op_MulReductionVI:
|
||||
@@ -225,6 +237,26 @@ source %{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case Op_AddVHF:
|
||||
case Op_SubVHF:
|
||||
case Op_MulVHF:
|
||||
case Op_DivVHF:
|
||||
case Op_MinVHF:
|
||||
case Op_MaxVHF:
|
||||
case Op_SqrtVHF:
|
||||
// FEAT_FP16 is enabled if both "fphp" and "asimdhp" features are supported.
|
||||
// Only the Neon instructions need this check. SVE supports half-precision floats
|
||||
// by default.
|
||||
if (UseSVE == 0 && !is_feat_fp16_supported()) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case Op_FmaVHF:
|
||||
// UseFMA flag needs to be checked along with FEAT_FP16
|
||||
if (!UseFMA || (UseSVE == 0 && !is_feat_fp16_supported())) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -270,6 +302,19 @@ source %{
|
||||
case Op_StoreVectorScatter:
|
||||
opcode = Op_StoreVectorScatterMasked;
|
||||
break;
|
||||
// Currently, the masked versions of the following 8 Float16 operations are disabled.
|
||||
// When the support for Float16 vector classes is added in VectorAPI and the masked
|
||||
// Float16 IR can be generated, these masked operations will be enabled and relevant
|
||||
// backend support added.
|
||||
case Op_AddVHF:
|
||||
case Op_SubVHF:
|
||||
case Op_MulVHF:
|
||||
case Op_DivVHF:
|
||||
case Op_MaxVHF:
|
||||
case Op_MinVHF:
|
||||
case Op_SqrtVHF:
|
||||
case Op_FmaVHF:
|
||||
return false;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -583,6 +628,22 @@ instruct vaddL(vReg dst, vReg src1, vReg src2) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vaddHF(vReg dst, vReg src1, vReg src2) %{
|
||||
match(Set dst (AddVHF src1 src2));
|
||||
format %{ "vaddHF $dst, $src1, $src2" %}
|
||||
ins_encode %{
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
__ fadd($dst$$FloatRegister, get_arrangement(this),
|
||||
$src1$$FloatRegister, $src2$$FloatRegister);
|
||||
} else {
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ sve_fadd($dst$$FloatRegister, __ H, $src1$$FloatRegister, $src2$$FloatRegister);
|
||||
}
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vaddF(vReg dst, vReg src1, vReg src2) %{
|
||||
match(Set dst (AddVF src1 src2));
|
||||
format %{ "vaddF $dst, $src1, $src2" %}
|
||||
@@ -807,6 +868,22 @@ instruct vsubL(vReg dst, vReg src1, vReg src2) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vsubHF(vReg dst, vReg src1, vReg src2) %{
|
||||
match(Set dst (SubVHF src1 src2));
|
||||
format %{ "vsubHF $dst, $src1, $src2" %}
|
||||
ins_encode %{
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
__ fsub($dst$$FloatRegister, get_arrangement(this),
|
||||
$src1$$FloatRegister, $src2$$FloatRegister);
|
||||
} else {
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ sve_fsub($dst$$FloatRegister, __ H, $src1$$FloatRegister, $src2$$FloatRegister);
|
||||
}
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vsubF(vReg dst, vReg src1, vReg src2) %{
|
||||
match(Set dst (SubVF src1 src2));
|
||||
format %{ "vsubF $dst, $src1, $src2" %}
|
||||
@@ -1004,6 +1081,22 @@ instruct vmulL_sve(vReg dst_src1, vReg src2) %{
|
||||
|
||||
// vector mul - floating-point
|
||||
|
||||
instruct vmulHF(vReg dst, vReg src1, vReg src2) %{
|
||||
match(Set dst (MulVHF src1 src2));
|
||||
format %{ "vmulHF $dst, $src1, $src2" %}
|
||||
ins_encode %{
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
__ fmul($dst$$FloatRegister, get_arrangement(this),
|
||||
$src1$$FloatRegister, $src2$$FloatRegister);
|
||||
} else {
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ sve_fmul($dst$$FloatRegister, __ H, $src1$$FloatRegister, $src2$$FloatRegister);
|
||||
}
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmulF(vReg dst, vReg src1, vReg src2) %{
|
||||
match(Set dst (MulVF src1 src2));
|
||||
format %{ "vmulF $dst, $src1, $src2" %}
|
||||
@@ -1102,6 +1195,28 @@ instruct vmulD_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
|
||||
|
||||
// vector float div
|
||||
|
||||
instruct vdivHF_neon(vReg dst, vReg src1, vReg src2) %{
|
||||
predicate(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
|
||||
match(Set dst (DivVHF src1 src2));
|
||||
format %{ "vdivHF_neon $dst, $src1, $src2" %}
|
||||
ins_encode %{
|
||||
__ fdiv($dst$$FloatRegister, get_arrangement(this),
|
||||
$src1$$FloatRegister, $src2$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vdivHF_sve(vReg dst_src1, vReg src2) %{
|
||||
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
|
||||
match(Set dst_src1 (DivVHF dst_src1 src2));
|
||||
format %{ "vdivHF_sve $dst_src1, $dst_src1, $src2" %}
|
||||
ins_encode %{
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ sve_fdiv($dst_src1$$FloatRegister, __ H, ptrue, $src2$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vdivF_neon(vReg dst, vReg src1, vReg src2) %{
|
||||
predicate(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
|
||||
match(Set dst (DivVF src1 src2));
|
||||
@@ -1991,6 +2106,21 @@ instruct vnegD_masked(vReg dst_src, pRegGov pg) %{
|
||||
|
||||
// vector sqrt
|
||||
|
||||
instruct vsqrtHF(vReg dst, vReg src) %{
|
||||
match(Set dst (SqrtVHF src));
|
||||
format %{ "vsqrtHF $dst, $src" %}
|
||||
ins_encode %{
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
__ fsqrt($dst$$FloatRegister, get_arrangement(this), $src$$FloatRegister);
|
||||
} else {
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ sve_fsqrt($dst$$FloatRegister, __ H, ptrue, $src$$FloatRegister);
|
||||
}
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vsqrtF(vReg dst, vReg src) %{
|
||||
match(Set dst (SqrtVF src));
|
||||
format %{ "vsqrtF $dst, $src" %}
|
||||
@@ -2069,7 +2199,7 @@ instruct vminL_sve(vReg dst_src1, vReg src2) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// vector min - B/S/I/F/D
|
||||
// vector min - B/S/I/HF/F/D
|
||||
|
||||
instruct vmin_neon(vReg dst, vReg src1, vReg src2) %{
|
||||
predicate(Matcher::vector_element_basic_type(n) != T_LONG &&
|
||||
@@ -2110,6 +2240,29 @@ instruct vmin_sve(vReg dst_src1, vReg src2) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmin_HF_neon(vReg dst, vReg src1, vReg src2) %{
|
||||
predicate(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
|
||||
match(Set dst (MinVHF src1 src2));
|
||||
format %{ "vmin_HF_neon $dst, $src1, $src2\t# Half float" %}
|
||||
ins_encode %{
|
||||
__ fmin($dst$$FloatRegister, get_arrangement(this),
|
||||
$src1$$FloatRegister, $src2$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmin_HF_sve(vReg dst_src1, vReg src2) %{
|
||||
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
|
||||
match(Set dst_src1 (MinVHF dst_src1 src2));
|
||||
format %{ "vmin_HF_sve $dst_src1, $dst_src1, $src2\t# Half float" %}
|
||||
ins_encode %{
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ sve_fmin($dst_src1$$FloatRegister, __ H,
|
||||
ptrue, $src2$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// vector min - predicated
|
||||
|
||||
instruct vmin_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
|
||||
@@ -2226,7 +2379,7 @@ instruct vmaxL_sve(vReg dst_src1, vReg src2) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// vector max - B/S/I/F/D
|
||||
// vector max - B/S/I/HF/F/D
|
||||
|
||||
instruct vmax_neon(vReg dst, vReg src1, vReg src2) %{
|
||||
predicate(Matcher::vector_element_basic_type(n) != T_LONG &&
|
||||
@@ -2267,6 +2420,29 @@ instruct vmax_sve(vReg dst_src1, vReg src2) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmax_HF_neon(vReg dst, vReg src1, vReg src2) %{
|
||||
predicate(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
|
||||
match(Set dst (MaxVHF src1 src2));
|
||||
format %{ "vmax_HF_neon $dst, $src1, $src2\t# Half float" %}
|
||||
ins_encode %{
|
||||
__ fmax($dst$$FloatRegister, get_arrangement(this),
|
||||
$src1$$FloatRegister, $src2$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmax_HF_sve(vReg dst_src1, vReg src2) %{
|
||||
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
|
||||
match(Set dst_src1 (MaxVHF dst_src1 src2));
|
||||
format %{ "vmax_HF_sve $dst_src1, $dst_src1, $src2\t# Half float" %}
|
||||
ins_encode %{
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ sve_fmax($dst_src1$$FloatRegister, __ H,
|
||||
ptrue, $src2$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// vector max - predicated
|
||||
|
||||
instruct vmax_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
|
||||
@@ -2413,8 +2589,9 @@ instruct vmla_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
// dst_src1 = src2 * src3 + dst_src1
|
||||
|
||||
instruct vfmla(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
match(Set dst_src1 (FmaVF dst_src1 (Binary src2 src3)));
|
||||
match(Set dst_src1 (FmaVD dst_src1 (Binary src2 src3)));
|
||||
match(Set dst_src1 (FmaVHF dst_src1 (Binary src2 src3)));
|
||||
match(Set dst_src1 (FmaVF dst_src1 (Binary src2 src3)));
|
||||
match(Set dst_src1 (FmaVD dst_src1 (Binary src2 src3)));
|
||||
format %{ "vfmla $dst_src1, $src2, $src3" %}
|
||||
ins_encode %{
|
||||
assert(UseFMA, "Needs FMA instructions support.");
|
||||
@@ -4079,8 +4256,8 @@ instruct vzeroExtStoX(vReg dst, vReg src) %{
|
||||
assert(bt == T_INT || bt == T_LONG, "must be");
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
// 4S to 4I
|
||||
__ neon_vector_extend($dst$$FloatRegister, T_INT, length_in_bytes,
|
||||
// 2S to 2I/2L, 4S to 4I
|
||||
__ neon_vector_extend($dst$$FloatRegister, bt, length_in_bytes,
|
||||
$src$$FloatRegister, T_SHORT, /* is_unsigned */ true);
|
||||
} else {
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
@@ -4100,11 +4277,11 @@ instruct vzeroExtItoX(vReg dst, vReg src) %{
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
// 2I to 2L
|
||||
__ neon_vector_extend($dst$$FloatRegister, T_LONG, length_in_bytes,
|
||||
__ neon_vector_extend($dst$$FloatRegister, bt, length_in_bytes,
|
||||
$src$$FloatRegister, T_INT, /* is_unsigned */ true);
|
||||
} else {
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ sve_vector_extend($dst$$FloatRegister, __ D,
|
||||
__ sve_vector_extend($dst$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
$src$$FloatRegister, __ S, /* is_unsigned */ true);
|
||||
}
|
||||
%}
|
||||
@@ -4178,11 +4355,15 @@ instruct vcvtStoX_extend(vReg dst, vReg src) %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
// 4S to 4I/4F
|
||||
__ neon_vector_extend($dst$$FloatRegister, T_INT, length_in_bytes,
|
||||
$src$$FloatRegister, T_SHORT);
|
||||
if (bt == T_FLOAT) {
|
||||
__ scvtfv(__ T4S, $dst$$FloatRegister, $dst$$FloatRegister);
|
||||
if (is_floating_point_type(bt)) {
|
||||
// 2S to 2F/2D, 4S to 4F
|
||||
__ neon_vector_extend($dst$$FloatRegister, bt == T_FLOAT ? T_INT : T_LONG,
|
||||
length_in_bytes, $src$$FloatRegister, T_SHORT);
|
||||
__ scvtfv(get_arrangement(this), $dst$$FloatRegister, $dst$$FloatRegister);
|
||||
} else {
|
||||
// 2S to 2I/2L, 4S to 4I
|
||||
__ neon_vector_extend($dst$$FloatRegister, bt, length_in_bytes,
|
||||
$src$$FloatRegister, T_SHORT);
|
||||
}
|
||||
} else {
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
@@ -4206,7 +4387,7 @@ instruct vcvtItoX_narrow_neon(vReg dst, vReg src) %{
|
||||
effect(TEMP_DEF dst);
|
||||
format %{ "vcvtItoX_narrow_neon $dst, $src" %}
|
||||
ins_encode %{
|
||||
// 4I to 4B/4S
|
||||
// 2I to 2S, 4I to 4B/4S
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this, $src);
|
||||
__ neon_vector_narrow($dst$$FloatRegister, bt,
|
||||
@@ -4269,28 +4450,29 @@ instruct vcvtItoX(vReg dst, vReg src) %{
|
||||
|
||||
// VectorCastL2X
|
||||
|
||||
instruct vcvtLtoI_neon(vReg dst, vReg src) %{
|
||||
predicate(Matcher::vector_element_basic_type(n) == T_INT &&
|
||||
instruct vcvtLtoX_narrow_neon(vReg dst, vReg src) %{
|
||||
predicate((Matcher::vector_element_basic_type(n) == T_INT ||
|
||||
Matcher::vector_element_basic_type(n) == T_SHORT) &&
|
||||
VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n->in(1))));
|
||||
match(Set dst (VectorCastL2X src));
|
||||
format %{ "vcvtLtoI_neon $dst, $src" %}
|
||||
format %{ "vcvtLtoX_narrow_neon $dst, $src" %}
|
||||
ins_encode %{
|
||||
// 2L to 2I
|
||||
// 2L to 2S/2I
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this, $src);
|
||||
__ neon_vector_narrow($dst$$FloatRegister, T_INT,
|
||||
__ neon_vector_narrow($dst$$FloatRegister, bt,
|
||||
$src$$FloatRegister, T_LONG, length_in_bytes);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vcvtLtoI_sve(vReg dst, vReg src, vReg tmp) %{
|
||||
predicate((Matcher::vector_element_basic_type(n) == T_INT &&
|
||||
!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n->in(1)))) ||
|
||||
Matcher::vector_element_basic_type(n) == T_BYTE ||
|
||||
Matcher::vector_element_basic_type(n) == T_SHORT);
|
||||
instruct vcvtLtoX_narrow_sve(vReg dst, vReg src, vReg tmp) %{
|
||||
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n->in(1))) &&
|
||||
!is_floating_point_type(Matcher::vector_element_basic_type(n)) &&
|
||||
type2aelembytes(Matcher::vector_element_basic_type(n)) <= 4);
|
||||
match(Set dst (VectorCastL2X src));
|
||||
effect(TEMP_DEF dst, TEMP tmp);
|
||||
format %{ "vcvtLtoI_sve $dst, $src\t# KILL $tmp" %}
|
||||
format %{ "vcvtLtoX_narrow_sve $dst, $src\t# KILL $tmp" %}
|
||||
ins_encode %{
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
@@ -4356,10 +4538,11 @@ instruct vcvtFtoX_narrow_neon(vReg dst, vReg src) %{
|
||||
effect(TEMP_DEF dst);
|
||||
format %{ "vcvtFtoX_narrow_neon $dst, $src" %}
|
||||
ins_encode %{
|
||||
// 4F to 4B/4S
|
||||
// 2F to 2S, 4F to 4B/4S
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this, $src);
|
||||
__ fcvtzs($dst$$FloatRegister, __ T4S, $src$$FloatRegister);
|
||||
__ fcvtzs($dst$$FloatRegister, length_in_bytes == 16 ? __ T4S : __ T2S,
|
||||
$src$$FloatRegister);
|
||||
__ neon_vector_narrow($dst$$FloatRegister, bt,
|
||||
$dst$$FloatRegister, T_INT, length_in_bytes);
|
||||
%}
|
||||
@@ -4425,12 +4608,14 @@ instruct vcvtFtoX(vReg dst, vReg src) %{
|
||||
// VectorCastD2X
|
||||
|
||||
instruct vcvtDtoI_neon(vReg dst, vReg src) %{
|
||||
predicate(UseSVE == 0 && Matcher::vector_element_basic_type(n) == T_INT);
|
||||
predicate(UseSVE == 0 &&
|
||||
(Matcher::vector_element_basic_type(n) == T_INT ||
|
||||
Matcher::vector_element_basic_type(n) == T_SHORT));
|
||||
match(Set dst (VectorCastD2X src));
|
||||
effect(TEMP_DEF dst);
|
||||
format %{ "vcvtDtoI_neon $dst, $src\t# 2D to 2I" %}
|
||||
format %{ "vcvtDtoI_neon $dst, $src\t# 2D to 2S/2I" %}
|
||||
ins_encode %{
|
||||
// 2D to 2I
|
||||
// 2D to 2S/2I
|
||||
__ ins($dst$$FloatRegister, __ D, $src$$FloatRegister, 0, 1);
|
||||
// We can't use fcvtzs(vector, integer) instruction here because we need
|
||||
// saturation arithmetic. See JDK-8276151.
|
||||
@@ -4438,6 +4623,10 @@ instruct vcvtDtoI_neon(vReg dst, vReg src) %{
|
||||
__ fcvtzdw(rscratch2, $dst$$FloatRegister);
|
||||
__ fmovs($dst$$FloatRegister, rscratch1);
|
||||
__ mov($dst$$FloatRegister, __ S, 1, rscratch2);
|
||||
if (Matcher::vector_element_basic_type(this) == T_SHORT) {
|
||||
__ neon_vector_narrow($dst$$FloatRegister, T_SHORT,
|
||||
$dst$$FloatRegister, T_INT, 8);
|
||||
}
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
@@ -4511,7 +4700,7 @@ instruct vcvtHFtoF(vReg dst, vReg src) %{
|
||||
ins_encode %{
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
// 4HF to 4F
|
||||
// 2HF to 2F, 4HF to 4F
|
||||
__ fcvtl($dst$$FloatRegister, __ T4S, $src$$FloatRegister, __ T4H);
|
||||
} else {
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
@@ -4527,9 +4716,9 @@ instruct vcvtHFtoF(vReg dst, vReg src) %{
|
||||
instruct vcvtFtoHF_neon(vReg dst, vReg src) %{
|
||||
predicate(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n->in(1))));
|
||||
match(Set dst (VectorCastF2HF src));
|
||||
format %{ "vcvtFtoHF_neon $dst, $src\t# 4F to 4HF" %}
|
||||
format %{ "vcvtFtoHF_neon $dst, $src\t# 2F/4F to 2HF/4HF" %}
|
||||
ins_encode %{
|
||||
// 4F to 4HF
|
||||
// 2F to 2HF, 4F to 4HF
|
||||
__ fcvtn($dst$$FloatRegister, __ T4H, $src$$FloatRegister, __ T4S);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
@@ -4613,6 +4802,23 @@ instruct replicateD(vReg dst, vRegD src) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// Replicate a half-precision float value held in a floating point register
|
||||
instruct replicateHF(vReg dst, vRegF src) %{
|
||||
predicate(Matcher::vector_element_basic_type(n) == T_SHORT);
|
||||
match(Set dst (Replicate src));
|
||||
format %{ "replicateHF $dst, $src\t# replicate half-precision float" %}
|
||||
ins_encode %{
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
__ dup($dst$$FloatRegister, get_arrangement(this), $src$$FloatRegister);
|
||||
} else { // length_in_bytes must be > 16 and SVE should be enabled
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ sve_cpy($dst$$FloatRegister, __ H, ptrue, $src$$FloatRegister);
|
||||
}
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// replicate from imm
|
||||
|
||||
instruct replicateI_imm_le128b(vReg dst, immI con) %{
|
||||
@@ -4681,6 +4887,23 @@ instruct replicateL_imm8_gt128b(vReg dst, immL8_shift8 con) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// Replicate a 16-bit half precision float value
|
||||
instruct replicateHF_imm(vReg dst, immH con) %{
|
||||
match(Set dst (Replicate con));
|
||||
format %{ "replicateHF_imm $dst, $con\t# replicate immediate half-precision float" %}
|
||||
ins_encode %{
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
int imm = (int)($con$$constant) & 0xffff;
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
__ mov($dst$$FloatRegister, get_arrangement(this), imm);
|
||||
} else { // length_in_bytes must be > 16 and SVE should be enabled
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ sve_dup($dst$$FloatRegister, __ H, imm);
|
||||
}
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// ------------------------------ Vector insert --------------------------------
|
||||
|
||||
// BYTE, SHORT, INT
|
||||
@@ -6197,14 +6420,12 @@ instruct vpopcountI(vReg dst, vReg src) %{
|
||||
} else {
|
||||
assert(bt == T_SHORT || bt == T_INT, "unsupported");
|
||||
if (UseSVE == 0) {
|
||||
assert(length_in_bytes == 8 || length_in_bytes == 16, "unsupported");
|
||||
__ cnt($dst$$FloatRegister, length_in_bytes == 16 ? __ T16B : __ T8B,
|
||||
$src$$FloatRegister);
|
||||
__ uaddlp($dst$$FloatRegister, length_in_bytes == 16 ? __ T16B : __ T8B,
|
||||
$dst$$FloatRegister);
|
||||
assert(length_in_bytes <= 16, "unsupported");
|
||||
bool isQ = length_in_bytes == 16;
|
||||
__ cnt($dst$$FloatRegister, isQ ? __ T16B : __ T8B, $src$$FloatRegister);
|
||||
__ uaddlp($dst$$FloatRegister, isQ ? __ T16B : __ T8B, $dst$$FloatRegister);
|
||||
if (bt == T_INT) {
|
||||
__ uaddlp($dst$$FloatRegister, length_in_bytes == 16 ? __ T8H : __ T4H,
|
||||
$dst$$FloatRegister);
|
||||
__ uaddlp($dst$$FloatRegister, isQ ? __ T8H : __ T4H, $dst$$FloatRegister);
|
||||
}
|
||||
} else {
|
||||
__ sve_cnt($dst$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
@@ -6266,7 +6487,7 @@ instruct vblend_neon(vReg dst, vReg src1, vReg src2) %{
|
||||
format %{ "vblend_neon $dst, $src1, $src2" %}
|
||||
ins_encode %{
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
assert(length_in_bytes == 8 || length_in_bytes == 16, "must be");
|
||||
assert(length_in_bytes <= 16, "must be");
|
||||
__ bsl($dst$$FloatRegister, length_in_bytes == 16 ? __ T16B : __ T8B,
|
||||
$src2$$FloatRegister, $src1$$FloatRegister);
|
||||
%}
|
||||
@@ -6653,7 +6874,7 @@ instruct vcountTrailingZeros(vReg dst, vReg src) %{
|
||||
} else {
|
||||
assert(bt == T_SHORT || bt == T_INT || bt == T_LONG, "unsupported type");
|
||||
if (UseSVE == 0) {
|
||||
assert(length_in_bytes == 8 || length_in_bytes == 16, "unsupported");
|
||||
assert(length_in_bytes <= 16, "unsupported");
|
||||
__ neon_reverse_bits($dst$$FloatRegister, $src$$FloatRegister,
|
||||
bt, /* isQ */ length_in_bytes == 16);
|
||||
if (bt != T_LONG) {
|
||||
@@ -6712,7 +6933,7 @@ instruct vreverse(vReg dst, vReg src) %{
|
||||
} else {
|
||||
assert(bt == T_SHORT || bt == T_INT || bt == T_LONG, "unsupported type");
|
||||
if (UseSVE == 0) {
|
||||
assert(length_in_bytes == 8 || length_in_bytes == 16, "unsupported");
|
||||
assert(length_in_bytes <= 16, "unsupported");
|
||||
__ neon_reverse_bits($dst$$FloatRegister, $src$$FloatRegister,
|
||||
bt, /* isQ */ length_in_bytes == 16);
|
||||
} else {
|
||||
@@ -6748,7 +6969,7 @@ instruct vreverseBytes(vReg dst, vReg src) %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
assert(length_in_bytes == 8 || length_in_bytes == 16, "unsupported");
|
||||
assert(length_in_bytes <= 16, "unsupported");
|
||||
if (bt == T_BYTE) {
|
||||
if ($dst$$FloatRegister != $src$$FloatRegister) {
|
||||
__ orr($dst$$FloatRegister, length_in_bytes == 16 ? __ T16B : __ T8B,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2020, 2024, Arm Limited. All rights reserved.
|
||||
// Copyright (c) 2020, 2025, Arm Limited. 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
|
||||
@@ -121,7 +121,7 @@ source %{
|
||||
// These operations are not profitable to be vectorized on NEON, because no direct
|
||||
// NEON instructions support them. But the match rule support for them is profitable for
|
||||
// Vector API intrinsics.
|
||||
if ((opcode == Op_VectorCastD2X && bt == T_INT) ||
|
||||
if ((opcode == Op_VectorCastD2X && (bt == T_INT || bt == T_SHORT)) ||
|
||||
(opcode == Op_VectorCastL2X && bt == T_FLOAT) ||
|
||||
(opcode == Op_CountLeadingZerosV && bt == T_LONG) ||
|
||||
(opcode == Op_CountTrailingZerosV && bt == T_LONG) ||
|
||||
@@ -179,6 +179,18 @@ source %{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case Op_AddReductionVI:
|
||||
case Op_AndReductionV:
|
||||
case Op_OrReductionV:
|
||||
case Op_XorReductionV:
|
||||
case Op_MinReductionV:
|
||||
case Op_MaxReductionV:
|
||||
// Reductions with less than 8 bytes vector length are
|
||||
// not supported.
|
||||
if (length_in_bytes < 8) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case Op_MulReductionVD:
|
||||
case Op_MulReductionVF:
|
||||
case Op_MulReductionVI:
|
||||
@@ -215,6 +227,26 @@ source %{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case Op_AddVHF:
|
||||
case Op_SubVHF:
|
||||
case Op_MulVHF:
|
||||
case Op_DivVHF:
|
||||
case Op_MinVHF:
|
||||
case Op_MaxVHF:
|
||||
case Op_SqrtVHF:
|
||||
// FEAT_FP16 is enabled if both "fphp" and "asimdhp" features are supported.
|
||||
// Only the Neon instructions need this check. SVE supports half-precision floats
|
||||
// by default.
|
||||
if (UseSVE == 0 && !is_feat_fp16_supported()) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case Op_FmaVHF:
|
||||
// UseFMA flag needs to be checked along with FEAT_FP16
|
||||
if (!UseFMA || (UseSVE == 0 && !is_feat_fp16_supported())) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -260,6 +292,19 @@ source %{
|
||||
case Op_StoreVectorScatter:
|
||||
opcode = Op_StoreVectorScatterMasked;
|
||||
break;
|
||||
// Currently, the masked versions of the following 8 Float16 operations are disabled.
|
||||
// When the support for Float16 vector classes is added in VectorAPI and the masked
|
||||
// Float16 IR can be generated, these masked operations will be enabled and relevant
|
||||
// backend support added.
|
||||
case Op_AddVHF:
|
||||
case Op_SubVHF:
|
||||
case Op_MulVHF:
|
||||
case Op_DivVHF:
|
||||
case Op_MaxVHF:
|
||||
case Op_MinVHF:
|
||||
case Op_SqrtVHF:
|
||||
case Op_FmaVHF:
|
||||
return false;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -508,12 +553,13 @@ dnl
|
||||
// ------------------------------ Vector add -----------------------------------
|
||||
|
||||
// vector add
|
||||
BINARY_OP(vaddB, AddVB, addv, sve_add, B)
|
||||
BINARY_OP(vaddS, AddVS, addv, sve_add, H)
|
||||
BINARY_OP(vaddI, AddVI, addv, sve_add, S)
|
||||
BINARY_OP(vaddL, AddVL, addv, sve_add, D)
|
||||
BINARY_OP(vaddF, AddVF, fadd, sve_fadd, S)
|
||||
BINARY_OP(vaddD, AddVD, fadd, sve_fadd, D)
|
||||
BINARY_OP(vaddB, AddVB, addv, sve_add, B)
|
||||
BINARY_OP(vaddS, AddVS, addv, sve_add, H)
|
||||
BINARY_OP(vaddI, AddVI, addv, sve_add, S)
|
||||
BINARY_OP(vaddL, AddVL, addv, sve_add, D)
|
||||
BINARY_OP(vaddHF, AddVHF, fadd, sve_fadd, H)
|
||||
BINARY_OP(vaddF, AddVF, fadd, sve_fadd, S)
|
||||
BINARY_OP(vaddD, AddVD, fadd, sve_fadd, D)
|
||||
|
||||
// vector add - predicated
|
||||
BINARY_OP_PREDICATE(vaddB, AddVB, sve_add, B)
|
||||
@@ -532,12 +578,13 @@ VADD_IMM(L, immLAddSubV, D)
|
||||
// ------------------------------ Vector sub -----------------------------------
|
||||
|
||||
// vector sub
|
||||
BINARY_OP(vsubB, SubVB, subv, sve_sub, B)
|
||||
BINARY_OP(vsubS, SubVS, subv, sve_sub, H)
|
||||
BINARY_OP(vsubI, SubVI, subv, sve_sub, S)
|
||||
BINARY_OP(vsubL, SubVL, subv, sve_sub, D)
|
||||
BINARY_OP(vsubF, SubVF, fsub, sve_fsub, S)
|
||||
BINARY_OP(vsubD, SubVD, fsub, sve_fsub, D)
|
||||
BINARY_OP(vsubB, SubVB, subv, sve_sub, B)
|
||||
BINARY_OP(vsubS, SubVS, subv, sve_sub, H)
|
||||
BINARY_OP(vsubI, SubVI, subv, sve_sub, S)
|
||||
BINARY_OP(vsubL, SubVL, subv, sve_sub, D)
|
||||
BINARY_OP(vsubHF, SubVHF, fsub, sve_fsub, H)
|
||||
BINARY_OP(vsubF, SubVF, fsub, sve_fsub, S)
|
||||
BINARY_OP(vsubD, SubVD, fsub, sve_fsub, D)
|
||||
|
||||
// vector sub - predicated
|
||||
BINARY_OP_PREDICATE(vsubB, SubVB, sve_sub, B)
|
||||
@@ -612,8 +659,9 @@ instruct vmulL_sve(vReg dst_src1, vReg src2) %{
|
||||
%}
|
||||
|
||||
// vector mul - floating-point
|
||||
BINARY_OP(vmulF, MulVF, fmul, sve_fmul, S)
|
||||
BINARY_OP(vmulD, MulVD, fmul, sve_fmul, D)
|
||||
BINARY_OP(vmulHF, MulVHF, fmul, sve_fmul, H)
|
||||
BINARY_OP(vmulF, MulVF, fmul, sve_fmul, S)
|
||||
BINARY_OP(vmulD, MulVD, fmul, sve_fmul, D)
|
||||
|
||||
// vector mul - predicated
|
||||
BINARY_OP_PREDICATE(vmulB, MulVB, sve_mul, B)
|
||||
@@ -626,8 +674,9 @@ BINARY_OP_PREDICATE(vmulD, MulVD, sve_fmul, D)
|
||||
// ------------------------------ Vector float div -----------------------------
|
||||
|
||||
// vector float div
|
||||
BINARY_OP_NEON_SVE_PAIRWISE(vdivF, DivVF, fdiv, sve_fdiv, S)
|
||||
BINARY_OP_NEON_SVE_PAIRWISE(vdivD, DivVD, fdiv, sve_fdiv, D)
|
||||
BINARY_OP_NEON_SVE_PAIRWISE(vdivHF, DivVHF, fdiv, sve_fdiv, H)
|
||||
BINARY_OP_NEON_SVE_PAIRWISE(vdivF, DivVF, fdiv, sve_fdiv, S)
|
||||
BINARY_OP_NEON_SVE_PAIRWISE(vdivD, DivVD, fdiv, sve_fdiv, D)
|
||||
|
||||
// vector float div - predicated
|
||||
BINARY_OP_PREDICATE(vdivF, DivVF, sve_fdiv, S)
|
||||
@@ -1016,8 +1065,9 @@ UNARY_OP_PREDICATE_WITH_SIZE(vnegD, NegVD, sve_fneg, D)
|
||||
// ------------------------------ Vector sqrt ----------------------------------
|
||||
|
||||
// vector sqrt
|
||||
UNARY_OP(vsqrtF, SqrtVF, fsqrt, sve_fsqrt, S)
|
||||
UNARY_OP(vsqrtD, SqrtVD, fsqrt, sve_fsqrt, D)
|
||||
UNARY_OP(vsqrtHF, SqrtVHF, fsqrt, sve_fsqrt, H)
|
||||
UNARY_OP(vsqrtF, SqrtVF, fsqrt, sve_fsqrt, S)
|
||||
UNARY_OP(vsqrtD, SqrtVD, fsqrt, sve_fsqrt, D)
|
||||
|
||||
// vector sqrt - predicated
|
||||
UNARY_OP_PREDICATE_WITH_SIZE(vsqrtF, SqrtVF, sve_fsqrt, S)
|
||||
@@ -1074,6 +1124,20 @@ instruct v$1_neon(vReg dst, vReg src1, vReg src2) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}')dnl
|
||||
dnl
|
||||
dnl VMINMAX_HF_NEON($1, $2, $3 )
|
||||
dnl VMINMAX_HF_NEON(type, op_name, insn_fp)
|
||||
define(`VMINMAX_HF_NEON', `
|
||||
instruct v$1_HF_neon(vReg dst, vReg src1, vReg src2) %{
|
||||
predicate(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
|
||||
match(Set dst ($2 src1 src2));
|
||||
format %{ "v$1_HF_neon $dst, $src1, $src2\t# Half float" %}
|
||||
ins_encode %{
|
||||
__ $3($dst$$FloatRegister, get_arrangement(this),
|
||||
$src1$$FloatRegister, $src2$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}')dnl
|
||||
dnl
|
||||
dnl VMINMAX_SVE($1, $2, $3, $4 )
|
||||
dnl VMINMAX_SVE(type, op_name, insn_fp, insn_integral)
|
||||
define(`VMINMAX_SVE', `
|
||||
@@ -1097,6 +1161,21 @@ instruct v$1_sve(vReg dst_src1, vReg src2) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}')dnl
|
||||
dnl
|
||||
dnl VMINMAX_HF_SVE($1, $2, $3 )
|
||||
dnl VMINMAX_HF_SVE(type, op_name, insn_fp)
|
||||
define(`VMINMAX_HF_SVE', `
|
||||
instruct v$1_HF_sve(vReg dst_src1, vReg src2) %{
|
||||
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
|
||||
match(Set dst_src1 ($2 dst_src1 src2));
|
||||
format %{ "v$1_HF_sve $dst_src1, $dst_src1, $src2\t# Half float" %}
|
||||
ins_encode %{
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ $3($dst_src1$$FloatRegister, __ H,
|
||||
ptrue, $src2$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}')dnl
|
||||
dnl
|
||||
dnl VMINMAX_PREDICATE($1, $2, $3, $4 )
|
||||
dnl VMINMAX_PREDICATE(type, op_name, insn_fp, insn_integral)
|
||||
define(`VMINMAX_PREDICATE', `
|
||||
@@ -1175,9 +1254,11 @@ dnl
|
||||
VMINMAX_L_NEON(min, MinV)
|
||||
VMINMAX_L_SVE(min, MinV, sve_smin)
|
||||
|
||||
// vector min - B/S/I/F/D
|
||||
// vector min - B/S/I/HF/F/D
|
||||
VMINMAX_NEON(min, MinV, fmin, minv)
|
||||
VMINMAX_SVE(min, MinV, sve_fmin, sve_smin)
|
||||
VMINMAX_HF_NEON(min, MinVHF, fmin)
|
||||
VMINMAX_HF_SVE(min, MinVHF, sve_fmin)
|
||||
|
||||
// vector min - predicated
|
||||
VMINMAX_PREDICATE(min, MinV, sve_fmin, sve_smin)
|
||||
@@ -1199,9 +1280,11 @@ VUMINMAX_PREDICATE(umin, UMinV, sve_umin)
|
||||
VMINMAX_L_NEON(max, MaxV)
|
||||
VMINMAX_L_SVE(max, MaxV, sve_smax)
|
||||
|
||||
// vector max - B/S/I/F/D
|
||||
// vector max - B/S/I/HF/F/D
|
||||
VMINMAX_NEON(max, MaxV, fmax, maxv)
|
||||
VMINMAX_SVE(max, MaxV, sve_fmax, sve_smax)
|
||||
VMINMAX_HF_NEON(max, MaxVHF, fmax)
|
||||
VMINMAX_HF_SVE(max, MaxVHF, sve_fmax)
|
||||
|
||||
// vector max - predicated
|
||||
VMINMAX_PREDICATE(max, MaxV, sve_fmax, sve_smax)
|
||||
@@ -1273,8 +1356,9 @@ instruct vmla_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
// dst_src1 = src2 * src3 + dst_src1
|
||||
|
||||
instruct vfmla(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
match(Set dst_src1 (FmaVF dst_src1 (Binary src2 src3)));
|
||||
match(Set dst_src1 (FmaVD dst_src1 (Binary src2 src3)));
|
||||
match(Set dst_src1 (FmaVHF dst_src1 (Binary src2 src3)));
|
||||
match(Set dst_src1 (FmaVF dst_src1 (Binary src2 src3)));
|
||||
match(Set dst_src1 (FmaVD dst_src1 (Binary src2 src3)));
|
||||
format %{ "vfmla $dst_src1, $src2, $src3" %}
|
||||
ins_encode %{
|
||||
assert(UseFMA, "Needs FMA instructions support.");
|
||||
@@ -2430,31 +2514,31 @@ instruct reinterpret_resize_gt128b(vReg dst, vReg src, pReg ptmp, rFlagsReg cr)
|
||||
%}
|
||||
|
||||
// ---------------------------- Vector zero extend --------------------------------
|
||||
dnl VECTOR_ZERO_EXTEND($1, $2, $3, $4, $5 $6, $7, )
|
||||
dnl VECTOR_ZERO_EXTEND(op_name, dst_bt, src_bt, dst_size, src_size, assertion, neon_comment)
|
||||
dnl VECTOR_ZERO_EXTEND($1, $2, $3, $4, $5, )
|
||||
dnl VECTOR_ZERO_EXTEND(op_name, src_bt, src_size, assertion, neon_comment)
|
||||
define(`VECTOR_ZERO_EXTEND', `
|
||||
instruct vzeroExt$1toX(vReg dst, vReg src) %{
|
||||
match(Set dst (VectorUCast`$1'2X src));
|
||||
format %{ "vzeroExt$1toX $dst, $src" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
assert($6, "must be");
|
||||
assert($4, "must be");
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
// $7
|
||||
__ neon_vector_extend($dst$$FloatRegister, $2, length_in_bytes,
|
||||
$src$$FloatRegister, $3, /* is_unsigned */ true);
|
||||
// $5
|
||||
__ neon_vector_extend($dst$$FloatRegister, bt, length_in_bytes,
|
||||
$src$$FloatRegister, $2, /* is_unsigned */ true);
|
||||
} else {
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ sve_vector_extend($dst$$FloatRegister, __ $4,
|
||||
$src$$FloatRegister, __ $5, /* is_unsigned */ true);
|
||||
__ sve_vector_extend($dst$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
$src$$FloatRegister, __ $3, /* is_unsigned */ true);
|
||||
}
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}')dnl
|
||||
VECTOR_ZERO_EXTEND(B, bt, T_BYTE, elemType_to_regVariant(bt), B, bt == T_SHORT || bt == T_INT || bt == T_LONG, `4B to 4S/4I, 8B to 8S')
|
||||
VECTOR_ZERO_EXTEND(S, T_INT, T_SHORT, elemType_to_regVariant(bt), H, bt == T_INT || bt == T_LONG, `4S to 4I')
|
||||
VECTOR_ZERO_EXTEND(I, T_LONG, T_INT, D, S, bt == T_LONG, `2I to 2L')
|
||||
VECTOR_ZERO_EXTEND(B, T_BYTE, B, bt == T_SHORT || bt == T_INT || bt == T_LONG, `4B to 4S/4I, 8B to 8S')
|
||||
VECTOR_ZERO_EXTEND(S, T_SHORT, H, bt == T_INT || bt == T_LONG, `2S to 2I/2L, 4S to 4I')
|
||||
VECTOR_ZERO_EXTEND(I, T_INT, S, bt == T_LONG, `2I to 2L')
|
||||
|
||||
// ------------------------------ Vector cast ----------------------------------
|
||||
|
||||
@@ -2523,11 +2607,15 @@ instruct vcvtStoX_extend(vReg dst, vReg src) %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
// 4S to 4I/4F
|
||||
__ neon_vector_extend($dst$$FloatRegister, T_INT, length_in_bytes,
|
||||
$src$$FloatRegister, T_SHORT);
|
||||
if (bt == T_FLOAT) {
|
||||
__ scvtfv(__ T4S, $dst$$FloatRegister, $dst$$FloatRegister);
|
||||
if (is_floating_point_type(bt)) {
|
||||
// 2S to 2F/2D, 4S to 4F
|
||||
__ neon_vector_extend($dst$$FloatRegister, bt == T_FLOAT ? T_INT : T_LONG,
|
||||
length_in_bytes, $src$$FloatRegister, T_SHORT);
|
||||
__ scvtfv(get_arrangement(this), $dst$$FloatRegister, $dst$$FloatRegister);
|
||||
} else {
|
||||
// 2S to 2I/2L, 4S to 4I
|
||||
__ neon_vector_extend($dst$$FloatRegister, bt, length_in_bytes,
|
||||
$src$$FloatRegister, T_SHORT);
|
||||
}
|
||||
} else {
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
@@ -2551,7 +2639,7 @@ instruct vcvtItoX_narrow_neon(vReg dst, vReg src) %{
|
||||
effect(TEMP_DEF dst);
|
||||
format %{ "vcvtItoX_narrow_neon $dst, $src" %}
|
||||
ins_encode %{
|
||||
// 4I to 4B/4S
|
||||
// 2I to 2S, 4I to 4B/4S
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this, $src);
|
||||
__ neon_vector_narrow($dst$$FloatRegister, bt,
|
||||
@@ -2614,28 +2702,29 @@ instruct vcvtItoX(vReg dst, vReg src) %{
|
||||
|
||||
// VectorCastL2X
|
||||
|
||||
instruct vcvtLtoI_neon(vReg dst, vReg src) %{
|
||||
predicate(Matcher::vector_element_basic_type(n) == T_INT &&
|
||||
instruct vcvtLtoX_narrow_neon(vReg dst, vReg src) %{
|
||||
predicate((Matcher::vector_element_basic_type(n) == T_INT ||
|
||||
Matcher::vector_element_basic_type(n) == T_SHORT) &&
|
||||
VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n->in(1))));
|
||||
match(Set dst (VectorCastL2X src));
|
||||
format %{ "vcvtLtoI_neon $dst, $src" %}
|
||||
format %{ "vcvtLtoX_narrow_neon $dst, $src" %}
|
||||
ins_encode %{
|
||||
// 2L to 2I
|
||||
// 2L to 2S/2I
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this, $src);
|
||||
__ neon_vector_narrow($dst$$FloatRegister, T_INT,
|
||||
__ neon_vector_narrow($dst$$FloatRegister, bt,
|
||||
$src$$FloatRegister, T_LONG, length_in_bytes);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vcvtLtoI_sve(vReg dst, vReg src, vReg tmp) %{
|
||||
predicate((Matcher::vector_element_basic_type(n) == T_INT &&
|
||||
!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n->in(1)))) ||
|
||||
Matcher::vector_element_basic_type(n) == T_BYTE ||
|
||||
Matcher::vector_element_basic_type(n) == T_SHORT);
|
||||
instruct vcvtLtoX_narrow_sve(vReg dst, vReg src, vReg tmp) %{
|
||||
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n->in(1))) &&
|
||||
!is_floating_point_type(Matcher::vector_element_basic_type(n)) &&
|
||||
type2aelembytes(Matcher::vector_element_basic_type(n)) <= 4);
|
||||
match(Set dst (VectorCastL2X src));
|
||||
effect(TEMP_DEF dst, TEMP tmp);
|
||||
format %{ "vcvtLtoI_sve $dst, $src\t# KILL $tmp" %}
|
||||
format %{ "vcvtLtoX_narrow_sve $dst, $src\t# KILL $tmp" %}
|
||||
ins_encode %{
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
@@ -2701,10 +2790,11 @@ instruct vcvtFtoX_narrow_neon(vReg dst, vReg src) %{
|
||||
effect(TEMP_DEF dst);
|
||||
format %{ "vcvtFtoX_narrow_neon $dst, $src" %}
|
||||
ins_encode %{
|
||||
// 4F to 4B/4S
|
||||
// 2F to 2S, 4F to 4B/4S
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this, $src);
|
||||
__ fcvtzs($dst$$FloatRegister, __ T4S, $src$$FloatRegister);
|
||||
__ fcvtzs($dst$$FloatRegister, length_in_bytes == 16 ? __ T4S : __ T2S,
|
||||
$src$$FloatRegister);
|
||||
__ neon_vector_narrow($dst$$FloatRegister, bt,
|
||||
$dst$$FloatRegister, T_INT, length_in_bytes);
|
||||
%}
|
||||
@@ -2770,12 +2860,14 @@ instruct vcvtFtoX(vReg dst, vReg src) %{
|
||||
// VectorCastD2X
|
||||
|
||||
instruct vcvtDtoI_neon(vReg dst, vReg src) %{
|
||||
predicate(UseSVE == 0 && Matcher::vector_element_basic_type(n) == T_INT);
|
||||
predicate(UseSVE == 0 &&
|
||||
(Matcher::vector_element_basic_type(n) == T_INT ||
|
||||
Matcher::vector_element_basic_type(n) == T_SHORT));
|
||||
match(Set dst (VectorCastD2X src));
|
||||
effect(TEMP_DEF dst);
|
||||
format %{ "vcvtDtoI_neon $dst, $src\t# 2D to 2I" %}
|
||||
format %{ "vcvtDtoI_neon $dst, $src\t# 2D to 2S/2I" %}
|
||||
ins_encode %{
|
||||
// 2D to 2I
|
||||
// 2D to 2S/2I
|
||||
__ ins($dst$$FloatRegister, __ D, $src$$FloatRegister, 0, 1);
|
||||
// We can't use fcvtzs(vector, integer) instruction here because we need
|
||||
// saturation arithmetic. See JDK-8276151.
|
||||
@@ -2783,6 +2875,10 @@ instruct vcvtDtoI_neon(vReg dst, vReg src) %{
|
||||
__ fcvtzdw(rscratch2, $dst$$FloatRegister);
|
||||
__ fmovs($dst$$FloatRegister, rscratch1);
|
||||
__ mov($dst$$FloatRegister, __ S, 1, rscratch2);
|
||||
if (Matcher::vector_element_basic_type(this) == T_SHORT) {
|
||||
__ neon_vector_narrow($dst$$FloatRegister, T_SHORT,
|
||||
$dst$$FloatRegister, T_INT, 8);
|
||||
}
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
@@ -2856,7 +2952,7 @@ instruct vcvtHFtoF(vReg dst, vReg src) %{
|
||||
ins_encode %{
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
// 4HF to 4F
|
||||
// 2HF to 2F, 4HF to 4F
|
||||
__ fcvtl($dst$$FloatRegister, __ T4S, $src$$FloatRegister, __ T4H);
|
||||
} else {
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
@@ -2872,9 +2968,9 @@ instruct vcvtHFtoF(vReg dst, vReg src) %{
|
||||
instruct vcvtFtoHF_neon(vReg dst, vReg src) %{
|
||||
predicate(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n->in(1))));
|
||||
match(Set dst (VectorCastF2HF src));
|
||||
format %{ "vcvtFtoHF_neon $dst, $src\t# 4F to 4HF" %}
|
||||
format %{ "vcvtFtoHF_neon $dst, $src\t# 2F/4F to 2HF/4HF" %}
|
||||
ins_encode %{
|
||||
// 4F to 4HF
|
||||
// 2F to 2HF, 4F to 4HF
|
||||
__ fcvtn($dst$$FloatRegister, __ T4H, $src$$FloatRegister, __ T4S);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
@@ -2938,6 +3034,23 @@ REPLICATE_INT(L, iRegL)
|
||||
REPLICATE_FP(F, S, T_FLOAT )
|
||||
REPLICATE_FP(D, D, T_DOUBLE)
|
||||
|
||||
// Replicate a half-precision float value held in a floating point register
|
||||
instruct replicateHF(vReg dst, vRegF src) %{
|
||||
predicate(Matcher::vector_element_basic_type(n) == T_SHORT);
|
||||
match(Set dst (Replicate src));
|
||||
format %{ "replicateHF $dst, $src\t# replicate half-precision float" %}
|
||||
ins_encode %{
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
__ dup($dst$$FloatRegister, get_arrangement(this), $src$$FloatRegister);
|
||||
} else { // length_in_bytes must be > 16 and SVE should be enabled
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ sve_cpy($dst$$FloatRegister, __ H, ptrue, $src$$FloatRegister);
|
||||
}
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// replicate from imm
|
||||
|
||||
instruct replicateI_imm_le128b(vReg dst, immI con) %{
|
||||
@@ -3006,6 +3119,23 @@ instruct replicateL_imm8_gt128b(vReg dst, immL8_shift8 con) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// Replicate a 16-bit half precision float value
|
||||
instruct replicateHF_imm(vReg dst, immH con) %{
|
||||
match(Set dst (Replicate con));
|
||||
format %{ "replicateHF_imm $dst, $con\t# replicate immediate half-precision float" %}
|
||||
ins_encode %{
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
int imm = (int)($con$$constant) & 0xffff;
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
__ mov($dst$$FloatRegister, get_arrangement(this), imm);
|
||||
} else { // length_in_bytes must be > 16 and SVE should be enabled
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
__ sve_dup($dst$$FloatRegister, __ H, imm);
|
||||
}
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// ------------------------------ Vector insert --------------------------------
|
||||
|
||||
// BYTE, SHORT, INT
|
||||
@@ -4311,14 +4441,12 @@ instruct vpopcountI(vReg dst, vReg src) %{
|
||||
} else {
|
||||
assert(bt == T_SHORT || bt == T_INT, "unsupported");
|
||||
if (UseSVE == 0) {
|
||||
assert(length_in_bytes == 8 || length_in_bytes == 16, "unsupported");
|
||||
__ cnt($dst$$FloatRegister, length_in_bytes == 16 ? __ T16B : __ T8B,
|
||||
$src$$FloatRegister);
|
||||
__ uaddlp($dst$$FloatRegister, length_in_bytes == 16 ? __ T16B : __ T8B,
|
||||
$dst$$FloatRegister);
|
||||
assert(length_in_bytes <= 16, "unsupported");
|
||||
bool isQ = length_in_bytes == 16;
|
||||
__ cnt($dst$$FloatRegister, isQ ? __ T16B : __ T8B, $src$$FloatRegister);
|
||||
__ uaddlp($dst$$FloatRegister, isQ ? __ T16B : __ T8B, $dst$$FloatRegister);
|
||||
if (bt == T_INT) {
|
||||
__ uaddlp($dst$$FloatRegister, length_in_bytes == 16 ? __ T8H : __ T4H,
|
||||
$dst$$FloatRegister);
|
||||
__ uaddlp($dst$$FloatRegister, isQ ? __ T8H : __ T4H, $dst$$FloatRegister);
|
||||
}
|
||||
} else {
|
||||
__ sve_cnt($dst$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
@@ -4369,7 +4497,7 @@ instruct vblend_neon(vReg dst, vReg src1, vReg src2) %{
|
||||
format %{ "vblend_neon $dst, $src1, $src2" %}
|
||||
ins_encode %{
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
assert(length_in_bytes == 8 || length_in_bytes == 16, "must be");
|
||||
assert(length_in_bytes <= 16, "must be");
|
||||
__ bsl($dst$$FloatRegister, length_in_bytes == 16 ? __ T16B : __ T8B,
|
||||
$src2$$FloatRegister, $src1$$FloatRegister);
|
||||
%}
|
||||
@@ -4745,7 +4873,7 @@ instruct vcountTrailingZeros(vReg dst, vReg src) %{
|
||||
} else {
|
||||
assert(bt == T_SHORT || bt == T_INT || bt == T_LONG, "unsupported type");
|
||||
if (UseSVE == 0) {
|
||||
assert(length_in_bytes == 8 || length_in_bytes == 16, "unsupported");
|
||||
assert(length_in_bytes <= 16, "unsupported");
|
||||
__ neon_reverse_bits($dst$$FloatRegister, $src$$FloatRegister,
|
||||
bt, /* isQ */ length_in_bytes == 16);
|
||||
if (bt != T_LONG) {
|
||||
@@ -4804,7 +4932,7 @@ instruct vreverse(vReg dst, vReg src) %{
|
||||
} else {
|
||||
assert(bt == T_SHORT || bt == T_INT || bt == T_LONG, "unsupported type");
|
||||
if (UseSVE == 0) {
|
||||
assert(length_in_bytes == 8 || length_in_bytes == 16, "unsupported");
|
||||
assert(length_in_bytes <= 16, "unsupported");
|
||||
__ neon_reverse_bits($dst$$FloatRegister, $src$$FloatRegister,
|
||||
bt, /* isQ */ length_in_bytes == 16);
|
||||
} else {
|
||||
@@ -4829,7 +4957,7 @@ instruct vreverseBytes(vReg dst, vReg src) %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
assert(length_in_bytes == 8 || length_in_bytes == 16, "unsupported");
|
||||
assert(length_in_bytes <= 16, "unsupported");
|
||||
if (bt == T_BYTE) {
|
||||
if ($dst$$FloatRegister != $src$$FloatRegister) {
|
||||
__ orr($dst$$FloatRegister, length_in_bytes == 16 ? __ T16B : __ T8B,
|
||||
|
||||
@@ -240,6 +240,19 @@ void Assembler::add_sub_immediate(Instruction_aarch64 ¤t_insn,
|
||||
srf(Rn, 5);
|
||||
}
|
||||
|
||||
// This method is used to generate Advanced SIMD data processing instructions
|
||||
void Assembler::adv_simd_three_same(Instruction_aarch64 ¤t_insn, FloatRegister Vd,
|
||||
SIMD_Arrangement T, FloatRegister Vn, FloatRegister Vm,
|
||||
int op1, int op2, int op3) {
|
||||
assert(T == T4H || T == T8H || T == T2S || T == T4S || T == T2D, "invalid arrangement");
|
||||
int op22 = (T == T2S || T == T4S) ? 0b0 : 0b1;
|
||||
int op21 = (T == T4H || T == T8H) ? 0b0 : 0b1;
|
||||
int op14 = (T == T4H || T == T8H) ? 0b00 : 0b11;
|
||||
f(0, 31), f((int)T & 1, 30), f(op1, 29), f(0b01110, 28, 24), f(op2, 23);
|
||||
f(op22, 22); f(op21, 21), rf(Vm, 16), f(op14, 15, 14), f(op3, 13, 10),
|
||||
rf(Vn, 5), rf(Vd, 0);
|
||||
}
|
||||
|
||||
#undef f
|
||||
#undef sf
|
||||
#undef rf
|
||||
|
||||
@@ -1136,6 +1136,10 @@ public:
|
||||
system(0b00, 0b011, 0b00011, SY, 0b110);
|
||||
}
|
||||
|
||||
void sb() {
|
||||
system(0b00, 0b011, 0b00011, 0b0000, 0b111);
|
||||
}
|
||||
|
||||
void sys(int op1, int CRn, int CRm, int op2,
|
||||
Register rt = as_Register(0b11111)) {
|
||||
system(0b01, op1, CRn, CRm, op2, rt);
|
||||
@@ -2743,26 +2747,26 @@ template<typename R, typename... Rx>
|
||||
|
||||
#undef INSN
|
||||
|
||||
// Advanced SIMD three same
|
||||
#define INSN(NAME, op1, op2, op3) \
|
||||
void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn, FloatRegister Vm) { \
|
||||
starti; \
|
||||
assert(T == T2S || T == T4S || T == T2D, "invalid arrangement"); \
|
||||
f(0, 31), f((int)T & 1, 30), f(op1, 29), f(0b01110, 28, 24), f(op2, 23); \
|
||||
f(T==T2D ? 1:0, 22); f(1, 21), rf(Vm, 16), f(op3, 15, 10), rf(Vn, 5), rf(Vd, 0); \
|
||||
// Advanced SIMD three same
|
||||
void adv_simd_three_same(Instruction_aarch64 ¤t_insn, FloatRegister Vd,
|
||||
SIMD_Arrangement T, FloatRegister Vn, FloatRegister Vm,
|
||||
int op1, int op2, int op3);
|
||||
#define INSN(NAME, op1, op2, op3) \
|
||||
void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn, FloatRegister Vm) { \
|
||||
starti; \
|
||||
adv_simd_three_same(current_insn, Vd, T, Vn, Vm, op1, op2, op3); \
|
||||
}
|
||||
|
||||
INSN(fabd, 1, 1, 0b110101);
|
||||
INSN(fadd, 0, 0, 0b110101);
|
||||
INSN(fdiv, 1, 0, 0b111111);
|
||||
INSN(faddp, 1, 0, 0b110101);
|
||||
INSN(fmul, 1, 0, 0b110111);
|
||||
INSN(fsub, 0, 1, 0b110101);
|
||||
INSN(fmla, 0, 0, 0b110011);
|
||||
INSN(fmls, 0, 1, 0b110011);
|
||||
INSN(fmax, 0, 0, 0b111101);
|
||||
INSN(fmin, 0, 1, 0b111101);
|
||||
INSN(facgt, 1, 1, 0b111011);
|
||||
INSN(fabd, 1, 1, 0b0101);
|
||||
INSN(fadd, 0, 0, 0b0101);
|
||||
INSN(fdiv, 1, 0, 0b1111);
|
||||
INSN(faddp, 1, 0, 0b0101);
|
||||
INSN(fmul, 1, 0, 0b0111);
|
||||
INSN(fsub, 0, 1, 0b0101);
|
||||
INSN(fmla, 0, 0, 0b0011);
|
||||
INSN(fmls, 0, 1, 0b0011);
|
||||
INSN(fmax, 0, 0, 0b1101);
|
||||
INSN(fmin, 0, 1, 0b1101);
|
||||
INSN(facgt, 1, 1, 0b1011);
|
||||
|
||||
#undef INSN
|
||||
|
||||
@@ -3262,18 +3266,24 @@ public:
|
||||
// parameter "tmask" is a 2-bit mask used to indicate which bits in the size
|
||||
// field are determined by the SIMD_Arrangement. The bit of "tmask" should be
|
||||
// set to 1 if corresponding bit marked as "x" in the ArmARM.
|
||||
#define INSN(NAME, U, size, tmask, opcode) \
|
||||
void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn) { \
|
||||
starti; \
|
||||
assert((ASSERTION), MSG); \
|
||||
f(0, 31), f((int)T & 1, 30), f(U, 29), f(0b01110, 28, 24); \
|
||||
f(size | ((int)(T >> 1) & tmask), 23, 22), f(0b10000, 21, 17); \
|
||||
f(opcode, 16, 12), f(0b10, 11, 10), rf(Vn, 5), rf(Vd, 0); \
|
||||
#define INSN(NAME, U, size, tmask, opcode) \
|
||||
void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn) { \
|
||||
starti; \
|
||||
assert((ASSERTION), MSG); \
|
||||
int op22 = (int)(T >> 1) & tmask; \
|
||||
int op19 = 0b00; \
|
||||
if (tmask == 0b01 && (T == T4H || T == T8H)) { \
|
||||
op22 = 0b1; \
|
||||
op19 = 0b11; \
|
||||
} \
|
||||
f(0, 31), f((int)T & 1, 30), f(U, 29), f(0b01110, 28, 24); \
|
||||
f(size | op22, 23, 22), f(1, 21), f(op19, 20, 19), f(0b00, 18, 17); \
|
||||
f(opcode, 16, 12), f(0b10, 11, 10), rf(Vn, 5), rf(Vd, 0); \
|
||||
}
|
||||
|
||||
#define MSG "invalid arrangement"
|
||||
|
||||
#define ASSERTION (T == T2S || T == T4S || T == T2D)
|
||||
#define ASSERTION (T == T4H || T == T8H || T == T2S || T == T4S || T == T2D)
|
||||
INSN(fsqrt, 1, 0b10, 0b01, 0b11111);
|
||||
INSN(fabs, 0, 0b10, 0b01, 0b01111);
|
||||
INSN(fneg, 1, 0b10, 0b01, 0b01111);
|
||||
@@ -3400,7 +3410,7 @@ public:
|
||||
#define INSN(NAME, opcode) \
|
||||
void NAME(FloatRegister Zd, SIMD_RegVariant T, FloatRegister Zn, FloatRegister Zm) { \
|
||||
starti; \
|
||||
assert(T == S || T == D, "invalid register variant"); \
|
||||
assert(T == H || T == S || T == D, "invalid register variant"); \
|
||||
f(0b01100101, 31, 24), f(T, 23, 22), f(0, 21), \
|
||||
rf(Zm, 16), f(0, 15, 13), f(opcode, 12, 10), rf(Zn, 5), rf(Zd, 0); \
|
||||
}
|
||||
@@ -3485,7 +3495,7 @@ public:
|
||||
// SVE floating-point arithmetic - predicate
|
||||
#define INSN(NAME, op1, op2) \
|
||||
void NAME(FloatRegister Zd_or_Zdn_or_Vd, SIMD_RegVariant T, PRegister Pg, FloatRegister Zn_or_Zm) { \
|
||||
assert(T == S || T == D, "invalid register variant"); \
|
||||
assert(T == H || T == S || T == D, "invalid register variant"); \
|
||||
sve_predicate_reg_insn(op1, op2, Zd_or_Zdn_or_Vd, T, Pg, Zn_or_Zm); \
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ void CounterOverflowStub::emit_code(LIR_Assembler* ce) {
|
||||
__ mov_metadata(rscratch1, m);
|
||||
ce->store_parameter(rscratch1, 1);
|
||||
ce->store_parameter(_bci, 0);
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(C1StubId::counter_overflow_id)));
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(StubId::c1_counter_overflow_id)));
|
||||
ce->add_call_info_here(_info);
|
||||
ce->verify_oop_map(_info);
|
||||
__ b(_continuation);
|
||||
@@ -65,7 +65,7 @@ void CounterOverflowStub::emit_code(LIR_Assembler* ce) {
|
||||
void RangeCheckStub::emit_code(LIR_Assembler* ce) {
|
||||
__ bind(_entry);
|
||||
if (_info->deoptimize_on_exception()) {
|
||||
address a = Runtime1::entry_for(C1StubId::predicate_failed_trap_id);
|
||||
address a = Runtime1::entry_for(StubId::c1_predicate_failed_trap_id);
|
||||
__ far_call(RuntimeAddress(a));
|
||||
ce->add_call_info_here(_info);
|
||||
ce->verify_oop_map(_info);
|
||||
@@ -78,13 +78,13 @@ void RangeCheckStub::emit_code(LIR_Assembler* ce) {
|
||||
} else {
|
||||
__ mov(rscratch1, _index->as_jint());
|
||||
}
|
||||
C1StubId stub_id;
|
||||
StubId stub_id;
|
||||
if (_throw_index_out_of_bounds_exception) {
|
||||
stub_id = C1StubId::throw_index_exception_id;
|
||||
stub_id = StubId::c1_throw_index_exception_id;
|
||||
} else {
|
||||
assert(_array != LIR_Opr::nullOpr(), "sanity");
|
||||
__ mov(rscratch2, _array->as_pointer_register());
|
||||
stub_id = C1StubId::throw_range_check_failed_id;
|
||||
stub_id = StubId::c1_throw_range_check_failed_id;
|
||||
}
|
||||
__ lea(lr, RuntimeAddress(Runtime1::entry_for(stub_id)));
|
||||
__ blr(lr);
|
||||
@@ -99,7 +99,7 @@ PredicateFailedStub::PredicateFailedStub(CodeEmitInfo* info) {
|
||||
|
||||
void PredicateFailedStub::emit_code(LIR_Assembler* ce) {
|
||||
__ bind(_entry);
|
||||
address a = Runtime1::entry_for(C1StubId::predicate_failed_trap_id);
|
||||
address a = Runtime1::entry_for(StubId::c1_predicate_failed_trap_id);
|
||||
__ far_call(RuntimeAddress(a));
|
||||
ce->add_call_info_here(_info);
|
||||
ce->verify_oop_map(_info);
|
||||
@@ -111,7 +111,7 @@ void DivByZeroStub::emit_code(LIR_Assembler* ce) {
|
||||
ce->compilation()->implicit_exception_table()->append(_offset, __ offset());
|
||||
}
|
||||
__ bind(_entry);
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(C1StubId::throw_div0_exception_id)));
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(StubId::c1_throw_div0_exception_id)));
|
||||
ce->add_call_info_here(_info);
|
||||
ce->verify_oop_map(_info);
|
||||
#ifdef ASSERT
|
||||
@@ -123,14 +123,14 @@ void DivByZeroStub::emit_code(LIR_Assembler* ce) {
|
||||
|
||||
// Implementation of NewInstanceStub
|
||||
|
||||
NewInstanceStub::NewInstanceStub(LIR_Opr klass_reg, LIR_Opr result, ciInstanceKlass* klass, CodeEmitInfo* info, C1StubId stub_id) {
|
||||
NewInstanceStub::NewInstanceStub(LIR_Opr klass_reg, LIR_Opr result, ciInstanceKlass* klass, CodeEmitInfo* info, StubId stub_id) {
|
||||
_result = result;
|
||||
_klass = klass;
|
||||
_klass_reg = klass_reg;
|
||||
_info = new CodeEmitInfo(info);
|
||||
assert(stub_id == C1StubId::new_instance_id ||
|
||||
stub_id == C1StubId::fast_new_instance_id ||
|
||||
stub_id == C1StubId::fast_new_instance_init_check_id,
|
||||
assert(stub_id == StubId::c1_new_instance_id ||
|
||||
stub_id == StubId::c1_fast_new_instance_id ||
|
||||
stub_id == StubId::c1_fast_new_instance_init_check_id,
|
||||
"need new_instance id");
|
||||
_stub_id = stub_id;
|
||||
}
|
||||
@@ -166,7 +166,7 @@ void NewTypeArrayStub::emit_code(LIR_Assembler* ce) {
|
||||
__ bind(_entry);
|
||||
assert(_length->as_register() == r19, "length must in r19,");
|
||||
assert(_klass_reg->as_register() == r3, "klass_reg must in r3");
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(C1StubId::new_type_array_id)));
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(StubId::c1_new_type_array_id)));
|
||||
ce->add_call_info_here(_info);
|
||||
ce->verify_oop_map(_info);
|
||||
assert(_result->as_register() == r0, "result must in r0");
|
||||
@@ -189,7 +189,7 @@ void NewObjectArrayStub::emit_code(LIR_Assembler* ce) {
|
||||
__ bind(_entry);
|
||||
assert(_length->as_register() == r19, "length must in r19,");
|
||||
assert(_klass_reg->as_register() == r3, "klass_reg must in r3");
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(C1StubId::new_object_array_id)));
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(StubId::c1_new_object_array_id)));
|
||||
ce->add_call_info_here(_info);
|
||||
ce->verify_oop_map(_info);
|
||||
assert(_result->as_register() == r0, "result must in r0");
|
||||
@@ -201,11 +201,11 @@ void MonitorEnterStub::emit_code(LIR_Assembler* ce) {
|
||||
__ bind(_entry);
|
||||
ce->store_parameter(_obj_reg->as_register(), 1);
|
||||
ce->store_parameter(_lock_reg->as_register(), 0);
|
||||
C1StubId enter_id;
|
||||
StubId enter_id;
|
||||
if (ce->compilation()->has_fpu_code()) {
|
||||
enter_id = C1StubId::monitorenter_id;
|
||||
enter_id = StubId::c1_monitorenter_id;
|
||||
} else {
|
||||
enter_id = C1StubId::monitorenter_nofpu_id;
|
||||
enter_id = StubId::c1_monitorenter_nofpu_id;
|
||||
}
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(enter_id)));
|
||||
ce->add_call_info_here(_info);
|
||||
@@ -222,11 +222,11 @@ void MonitorExitStub::emit_code(LIR_Assembler* ce) {
|
||||
}
|
||||
ce->store_parameter(_lock_reg->as_register(), 0);
|
||||
// note: non-blocking leaf routine => no call info needed
|
||||
C1StubId exit_id;
|
||||
StubId exit_id;
|
||||
if (ce->compilation()->has_fpu_code()) {
|
||||
exit_id = C1StubId::monitorexit_id;
|
||||
exit_id = StubId::c1_monitorexit_id;
|
||||
} else {
|
||||
exit_id = C1StubId::monitorexit_nofpu_id;
|
||||
exit_id = StubId::c1_monitorexit_nofpu_id;
|
||||
}
|
||||
__ adr(lr, _continuation);
|
||||
__ far_jump(RuntimeAddress(Runtime1::entry_for(exit_id)));
|
||||
@@ -254,7 +254,7 @@ void PatchingStub::emit_code(LIR_Assembler* ce) {
|
||||
void DeoptimizeStub::emit_code(LIR_Assembler* ce) {
|
||||
__ bind(_entry);
|
||||
ce->store_parameter(_trap_request, 0);
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(C1StubId::deoptimize_id)));
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(StubId::c1_deoptimize_id)));
|
||||
ce->add_call_info_here(_info);
|
||||
DEBUG_ONLY(__ should_not_reach_here());
|
||||
}
|
||||
@@ -264,9 +264,9 @@ void ImplicitNullCheckStub::emit_code(LIR_Assembler* ce) {
|
||||
address a;
|
||||
if (_info->deoptimize_on_exception()) {
|
||||
// Deoptimize, do not throw the exception, because it is probably wrong to do it here.
|
||||
a = Runtime1::entry_for(C1StubId::predicate_failed_trap_id);
|
||||
a = Runtime1::entry_for(StubId::c1_predicate_failed_trap_id);
|
||||
} else {
|
||||
a = Runtime1::entry_for(C1StubId::throw_null_pointer_exception_id);
|
||||
a = Runtime1::entry_for(StubId::c1_throw_null_pointer_exception_id);
|
||||
}
|
||||
|
||||
ce->compilation()->implicit_exception_table()->append(_offset, __ offset());
|
||||
|
||||
@@ -320,19 +320,19 @@ void LIR_Assembler::deoptimize_trap(CodeEmitInfo *info) {
|
||||
|
||||
switch (patching_id(info)) {
|
||||
case PatchingStub::access_field_id:
|
||||
target = Runtime1::entry_for(C1StubId::access_field_patching_id);
|
||||
target = Runtime1::entry_for(StubId::c1_access_field_patching_id);
|
||||
reloc_type = relocInfo::section_word_type;
|
||||
break;
|
||||
case PatchingStub::load_klass_id:
|
||||
target = Runtime1::entry_for(C1StubId::load_klass_patching_id);
|
||||
target = Runtime1::entry_for(StubId::c1_load_klass_patching_id);
|
||||
reloc_type = relocInfo::metadata_type;
|
||||
break;
|
||||
case PatchingStub::load_mirror_id:
|
||||
target = Runtime1::entry_for(C1StubId::load_mirror_patching_id);
|
||||
target = Runtime1::entry_for(StubId::c1_load_mirror_patching_id);
|
||||
reloc_type = relocInfo::oop_type;
|
||||
break;
|
||||
case PatchingStub::load_appendix_id:
|
||||
target = Runtime1::entry_for(C1StubId::load_appendix_patching_id);
|
||||
target = Runtime1::entry_for(StubId::c1_load_appendix_patching_id);
|
||||
reloc_type = relocInfo::oop_type;
|
||||
break;
|
||||
default: ShouldNotReachHere();
|
||||
@@ -374,7 +374,7 @@ int LIR_Assembler::emit_exception_handler() {
|
||||
__ verify_not_null_oop(r0);
|
||||
|
||||
// search an exception handler (r0: exception oop, r3: throwing pc)
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(C1StubId::handle_exception_from_callee_id)));
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(StubId::c1_handle_exception_from_callee_id)));
|
||||
__ should_not_reach_here();
|
||||
guarantee(code_offset() - offset <= exception_handler_size(), "overflow");
|
||||
__ end_a_stub();
|
||||
@@ -431,7 +431,7 @@ int LIR_Assembler::emit_unwind_handler() {
|
||||
// remove the activation and dispatch to the unwind handler
|
||||
__ block_comment("remove_frame and dispatch to the unwind handler");
|
||||
__ remove_frame(initial_frame_size_in_bytes());
|
||||
__ far_jump(RuntimeAddress(Runtime1::entry_for(C1StubId::unwind_exception_id)));
|
||||
__ far_jump(RuntimeAddress(Runtime1::entry_for(StubId::c1_unwind_exception_id)));
|
||||
|
||||
// Emit the slow path assembly
|
||||
if (stub != nullptr) {
|
||||
@@ -483,7 +483,7 @@ void LIR_Assembler::return_op(LIR_Opr result, C1SafepointPollStub* code_stub) {
|
||||
|
||||
code_stub->set_safepoint_offset(__ offset());
|
||||
__ relocate(relocInfo::poll_return_type);
|
||||
__ safepoint_poll(*code_stub->entry(), true /* at_return */, false /* acquire */, true /* in_nmethod */);
|
||||
__ safepoint_poll(*code_stub->entry(), true /* at_return */, true /* in_nmethod */);
|
||||
__ ret(lr);
|
||||
}
|
||||
|
||||
@@ -874,19 +874,19 @@ void LIR_Assembler::klass2reg_with_patching(Register reg, CodeEmitInfo* info) {
|
||||
|
||||
switch (patching_id(info)) {
|
||||
case PatchingStub::access_field_id:
|
||||
target = Runtime1::entry_for(C1StubId::access_field_patching_id);
|
||||
target = Runtime1::entry_for(StubId::c1_access_field_patching_id);
|
||||
reloc_type = relocInfo::section_word_type;
|
||||
break;
|
||||
case PatchingStub::load_klass_id:
|
||||
target = Runtime1::entry_for(C1StubId::load_klass_patching_id);
|
||||
target = Runtime1::entry_for(StubId::c1_load_klass_patching_id);
|
||||
reloc_type = relocInfo::metadata_type;
|
||||
break;
|
||||
case PatchingStub::load_mirror_id:
|
||||
target = Runtime1::entry_for(C1StubId::load_mirror_patching_id);
|
||||
target = Runtime1::entry_for(StubId::c1_load_mirror_patching_id);
|
||||
reloc_type = relocInfo::oop_type;
|
||||
break;
|
||||
case PatchingStub::load_appendix_id:
|
||||
target = Runtime1::entry_for(C1StubId::load_appendix_patching_id);
|
||||
target = Runtime1::entry_for(StubId::c1_load_appendix_patching_id);
|
||||
reloc_type = relocInfo::oop_type;
|
||||
break;
|
||||
default: ShouldNotReachHere();
|
||||
@@ -1358,7 +1358,7 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
|
||||
__ br(Assembler::EQ, *success_target);
|
||||
|
||||
__ stp(klass_RInfo, k_RInfo, Address(__ pre(sp, -2 * wordSize)));
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(C1StubId::slow_subtype_check_id)));
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(StubId::c1_slow_subtype_check_id)));
|
||||
__ ldr(klass_RInfo, Address(__ post(sp, 2 * wordSize)));
|
||||
// result is a boolean
|
||||
__ cbzw(klass_RInfo, *failure_target);
|
||||
@@ -1369,7 +1369,7 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, success_target, failure_target, nullptr);
|
||||
// call out-of-line instance of __ check_klass_subtype_slow_path(...):
|
||||
__ stp(klass_RInfo, k_RInfo, Address(__ pre(sp, -2 * wordSize)));
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(C1StubId::slow_subtype_check_id)));
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(StubId::c1_slow_subtype_check_id)));
|
||||
__ ldp(k_RInfo, klass_RInfo, Address(__ post(sp, 2 * wordSize)));
|
||||
// result is a boolean
|
||||
__ cbz(k_RInfo, *failure_target);
|
||||
@@ -1447,7 +1447,7 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
|
||||
__ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, success_target, failure_target, nullptr);
|
||||
// call out-of-line instance of __ check_klass_subtype_slow_path(...):
|
||||
__ stp(klass_RInfo, k_RInfo, Address(__ pre(sp, -2 * wordSize)));
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(C1StubId::slow_subtype_check_id)));
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(StubId::c1_slow_subtype_check_id)));
|
||||
__ ldp(k_RInfo, klass_RInfo, Address(__ post(sp, 2 * wordSize)));
|
||||
// result is a boolean
|
||||
__ cbzw(k_RInfo, *failure_target);
|
||||
@@ -2033,7 +2033,7 @@ void LIR_Assembler::throw_op(LIR_Opr exceptionPC, LIR_Opr exceptionOop, CodeEmit
|
||||
// exception object is not added to oop map by LinearScan
|
||||
// (LinearScan assumes that no oops are in fixed registers)
|
||||
info->add_register_oop(exceptionOop);
|
||||
C1StubId unwind_id;
|
||||
StubId unwind_id;
|
||||
|
||||
// get current pc information
|
||||
// pc is only needed if the method has an exception handler, the unwind code does not need it.
|
||||
@@ -2052,9 +2052,9 @@ void LIR_Assembler::throw_op(LIR_Opr exceptionPC, LIR_Opr exceptionOop, CodeEmit
|
||||
__ verify_not_null_oop(r0);
|
||||
// search an exception handler (r0: exception oop, r3: throwing pc)
|
||||
if (compilation()->has_fpu_code()) {
|
||||
unwind_id = C1StubId::handle_exception_id;
|
||||
unwind_id = StubId::c1_handle_exception_id;
|
||||
} else {
|
||||
unwind_id = C1StubId::handle_exception_nofpu_id;
|
||||
unwind_id = StubId::c1_handle_exception_nofpu_id;
|
||||
}
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(unwind_id)));
|
||||
|
||||
@@ -2325,7 +2325,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
|
||||
__ check_klass_subtype_fast_path(src, dst, tmp, &cont, &slow, nullptr);
|
||||
|
||||
__ PUSH(src, dst);
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(C1StubId::slow_subtype_check_id)));
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(StubId::c1_slow_subtype_check_id)));
|
||||
__ POP(src, dst);
|
||||
|
||||
__ cbnz(src, cont);
|
||||
|
||||
@@ -1245,7 +1245,7 @@ void LIRGenerator::do_NewMultiArray(NewMultiArray* x) {
|
||||
args->append(rank);
|
||||
args->append(varargs);
|
||||
LIR_Opr reg = result_register_for(x->type());
|
||||
__ call_runtime(Runtime1::entry_for(C1StubId::new_multi_array_id),
|
||||
__ call_runtime(Runtime1::entry_for(StubId::c1_new_multi_array_id),
|
||||
LIR_OprFact::illegalOpr,
|
||||
reg, args, info);
|
||||
|
||||
@@ -1276,14 +1276,14 @@ void LIRGenerator::do_CheckCast(CheckCast* x) {
|
||||
CodeStub* stub;
|
||||
if (x->is_incompatible_class_change_check()) {
|
||||
assert(patching_info == nullptr, "can't patch this");
|
||||
stub = new SimpleExceptionStub(C1StubId::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception);
|
||||
stub = new SimpleExceptionStub(StubId::c1_throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception);
|
||||
} else if (x->is_invokespecial_receiver_check()) {
|
||||
assert(patching_info == nullptr, "can't patch this");
|
||||
stub = new DeoptimizeStub(info_for_exception,
|
||||
Deoptimization::Reason_class_check,
|
||||
Deoptimization::Action_none);
|
||||
} else {
|
||||
stub = new SimpleExceptionStub(C1StubId::throw_class_cast_exception_id, obj.result(), info_for_exception);
|
||||
stub = new SimpleExceptionStub(StubId::c1_throw_class_cast_exception_id, obj.result(), info_for_exception);
|
||||
}
|
||||
LIR_Opr reg = rlock_result(x);
|
||||
LIR_Opr tmp3 = LIR_OprFact::illegalOpr;
|
||||
@@ -1318,7 +1318,7 @@ void LIRGenerator::do_InstanceOf(InstanceOf* x) {
|
||||
|
||||
// Intrinsic for Class::isInstance
|
||||
address LIRGenerator::isInstance_entry() {
|
||||
return Runtime1::entry_for(C1StubId::is_instance_of_id);
|
||||
return Runtime1::entry_for(StubId::c1_is_instance_of_id);
|
||||
}
|
||||
|
||||
void LIRGenerator::do_If(If* x) {
|
||||
|
||||
@@ -271,7 +271,7 @@ void C1_MacroAssembler::initialize_object(Register obj, Register klass, Register
|
||||
|
||||
if (CURRENT_ENV->dtrace_alloc_probes()) {
|
||||
assert(obj == r0, "must be");
|
||||
far_call(RuntimeAddress(Runtime1::entry_for(C1StubId::dtrace_object_alloc_id)));
|
||||
far_call(RuntimeAddress(Runtime1::entry_for(StubId::c1_dtrace_object_alloc_id)));
|
||||
}
|
||||
|
||||
verify_oop(obj);
|
||||
@@ -312,7 +312,7 @@ void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1,
|
||||
|
||||
if (CURRENT_ENV->dtrace_alloc_probes()) {
|
||||
assert(obj == r0, "must be");
|
||||
far_call(RuntimeAddress(Runtime1::entry_for(C1StubId::dtrace_object_alloc_id)));
|
||||
far_call(RuntimeAddress(Runtime1::entry_for(StubId::c1_dtrace_object_alloc_id)));
|
||||
}
|
||||
|
||||
verify_oop(obj);
|
||||
|
||||
@@ -99,10 +99,10 @@ int StubAssembler::call_RT(Register oop_result1, Register metadata_result, addre
|
||||
if (frame_size() == no_frame_size) {
|
||||
leave();
|
||||
far_jump(RuntimeAddress(StubRoutines::forward_exception_entry()));
|
||||
} else if (_stub_id == (int)C1StubId::forward_exception_id) {
|
||||
} else if (_stub_id == (int)StubId::c1_forward_exception_id) {
|
||||
should_not_reach_here();
|
||||
} else {
|
||||
far_jump(RuntimeAddress(Runtime1::entry_for(C1StubId::forward_exception_id)));
|
||||
far_jump(RuntimeAddress(Runtime1::entry_for(StubId::c1_forward_exception_id)));
|
||||
}
|
||||
bind(L);
|
||||
}
|
||||
@@ -350,8 +350,8 @@ void Runtime1::initialize_pd() {
|
||||
// return: offset in 64-bit words.
|
||||
uint Runtime1::runtime_blob_current_thread_offset(frame f) {
|
||||
CodeBlob* cb = f.cb();
|
||||
assert(cb == Runtime1::blob_for(C1StubId::monitorenter_id) ||
|
||||
cb == Runtime1::blob_for(C1StubId::monitorenter_nofpu_id), "must be");
|
||||
assert(cb == Runtime1::blob_for(StubId::c1_monitorenter_id) ||
|
||||
cb == Runtime1::blob_for(StubId::c1_monitorenter_nofpu_id), "must be");
|
||||
assert(cb != nullptr && cb->is_runtime_stub(), "invalid frame");
|
||||
int offset = cpu_reg_save_offsets[rthread->encoding()];
|
||||
return offset / 2; // SP offsets are in halfwords
|
||||
@@ -377,7 +377,7 @@ OopMapSet* Runtime1::generate_exception_throw(StubAssembler* sasm, address targe
|
||||
}
|
||||
|
||||
|
||||
OopMapSet* Runtime1::generate_handle_exception(C1StubId id, StubAssembler *sasm) {
|
||||
OopMapSet* Runtime1::generate_handle_exception(StubId id, StubAssembler *sasm) {
|
||||
__ block_comment("generate_handle_exception");
|
||||
|
||||
// incoming parameters
|
||||
@@ -389,7 +389,7 @@ OopMapSet* Runtime1::generate_handle_exception(C1StubId id, StubAssembler *sasm)
|
||||
OopMapSet* oop_maps = new OopMapSet();
|
||||
OopMap* oop_map = nullptr;
|
||||
switch (id) {
|
||||
case C1StubId::forward_exception_id:
|
||||
case StubId::c1_forward_exception_id:
|
||||
// We're handling an exception in the context of a compiled frame.
|
||||
// The registers have been saved in the standard places. Perform
|
||||
// an exception lookup in the caller and dispatch to the handler
|
||||
@@ -409,12 +409,12 @@ OopMapSet* Runtime1::generate_handle_exception(C1StubId id, StubAssembler *sasm)
|
||||
__ str(zr, Address(rthread, JavaThread::vm_result_oop_offset()));
|
||||
__ str(zr, Address(rthread, JavaThread::vm_result_metadata_offset()));
|
||||
break;
|
||||
case C1StubId::handle_exception_nofpu_id:
|
||||
case C1StubId::handle_exception_id:
|
||||
case StubId::c1_handle_exception_nofpu_id:
|
||||
case StubId::c1_handle_exception_id:
|
||||
// At this point all registers MAY be live.
|
||||
oop_map = save_live_registers(sasm, id != C1StubId::handle_exception_nofpu_id);
|
||||
oop_map = save_live_registers(sasm, id != StubId::c1_handle_exception_nofpu_id);
|
||||
break;
|
||||
case C1StubId::handle_exception_from_callee_id: {
|
||||
case StubId::c1_handle_exception_from_callee_id: {
|
||||
// At this point all registers except exception oop (r0) and
|
||||
// exception pc (lr) are dead.
|
||||
const int frame_size = 2 /*fp, return address*/;
|
||||
@@ -472,13 +472,13 @@ OopMapSet* Runtime1::generate_handle_exception(C1StubId id, StubAssembler *sasm)
|
||||
__ str(r0, Address(rfp, 1*BytesPerWord));
|
||||
|
||||
switch (id) {
|
||||
case C1StubId::forward_exception_id:
|
||||
case C1StubId::handle_exception_nofpu_id:
|
||||
case C1StubId::handle_exception_id:
|
||||
case StubId::c1_forward_exception_id:
|
||||
case StubId::c1_handle_exception_nofpu_id:
|
||||
case StubId::c1_handle_exception_id:
|
||||
// Restore the registers that were saved at the beginning.
|
||||
restore_live_registers(sasm, id != C1StubId::handle_exception_nofpu_id);
|
||||
restore_live_registers(sasm, id != StubId::c1_handle_exception_nofpu_id);
|
||||
break;
|
||||
case C1StubId::handle_exception_from_callee_id:
|
||||
case StubId::c1_handle_exception_from_callee_id:
|
||||
break;
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
@@ -630,7 +630,7 @@ OopMapSet* Runtime1::generate_patching(StubAssembler* sasm, address target) {
|
||||
}
|
||||
|
||||
|
||||
OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
OopMapSet* Runtime1::generate_code_for(StubId id, StubAssembler* sasm) {
|
||||
|
||||
const Register exception_oop = r0;
|
||||
const Register exception_pc = r3;
|
||||
@@ -647,7 +647,7 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
OopMap* oop_map = nullptr;
|
||||
switch (id) {
|
||||
{
|
||||
case C1StubId::forward_exception_id:
|
||||
case StubId::c1_forward_exception_id:
|
||||
{
|
||||
oop_maps = generate_handle_exception(id, sasm);
|
||||
__ leave();
|
||||
@@ -655,31 +655,31 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::throw_div0_exception_id:
|
||||
case StubId::c1_throw_div0_exception_id:
|
||||
{ StubFrame f(sasm, "throw_div0_exception", dont_gc_arguments, does_not_return);
|
||||
oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_div0_exception), false);
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::throw_null_pointer_exception_id:
|
||||
case StubId::c1_throw_null_pointer_exception_id:
|
||||
{ StubFrame f(sasm, "throw_null_pointer_exception", dont_gc_arguments, does_not_return);
|
||||
oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_null_pointer_exception), false);
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::new_instance_id:
|
||||
case C1StubId::fast_new_instance_id:
|
||||
case C1StubId::fast_new_instance_init_check_id:
|
||||
case StubId::c1_new_instance_id:
|
||||
case StubId::c1_fast_new_instance_id:
|
||||
case StubId::c1_fast_new_instance_init_check_id:
|
||||
{
|
||||
Register klass = r3; // Incoming
|
||||
Register obj = r0; // Result
|
||||
|
||||
if (id == C1StubId::new_instance_id) {
|
||||
if (id == StubId::c1_new_instance_id) {
|
||||
__ set_info("new_instance", dont_gc_arguments);
|
||||
} else if (id == C1StubId::fast_new_instance_id) {
|
||||
} else if (id == StubId::c1_fast_new_instance_id) {
|
||||
__ set_info("fast new_instance", dont_gc_arguments);
|
||||
} else {
|
||||
assert(id == C1StubId::fast_new_instance_init_check_id, "bad C1StubId");
|
||||
assert(id == StubId::c1_fast_new_instance_init_check_id, "bad StubId");
|
||||
__ set_info("fast new_instance init check", dont_gc_arguments);
|
||||
}
|
||||
|
||||
@@ -698,7 +698,7 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
|
||||
break;
|
||||
|
||||
case C1StubId::counter_overflow_id:
|
||||
case StubId::c1_counter_overflow_id:
|
||||
{
|
||||
Register bci = r0, method = r1;
|
||||
__ enter();
|
||||
@@ -716,14 +716,14 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::new_type_array_id:
|
||||
case C1StubId::new_object_array_id:
|
||||
case StubId::c1_new_type_array_id:
|
||||
case StubId::c1_new_object_array_id:
|
||||
{
|
||||
Register length = r19; // Incoming
|
||||
Register klass = r3; // Incoming
|
||||
Register obj = r0; // Result
|
||||
|
||||
if (id == C1StubId::new_type_array_id) {
|
||||
if (id == StubId::c1_new_type_array_id) {
|
||||
__ set_info("new_type_array", dont_gc_arguments);
|
||||
} else {
|
||||
__ set_info("new_object_array", dont_gc_arguments);
|
||||
@@ -736,7 +736,7 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
Register t0 = obj;
|
||||
__ ldrw(t0, Address(klass, Klass::layout_helper_offset()));
|
||||
__ asrw(t0, t0, Klass::_lh_array_tag_shift);
|
||||
int tag = ((id == C1StubId::new_type_array_id)
|
||||
int tag = ((id == StubId::c1_new_type_array_id)
|
||||
? Klass::_lh_array_tag_type_value
|
||||
: Klass::_lh_array_tag_obj_value);
|
||||
__ mov(rscratch1, tag);
|
||||
@@ -751,7 +751,7 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
__ enter();
|
||||
OopMap* map = save_live_registers(sasm);
|
||||
int call_offset;
|
||||
if (id == C1StubId::new_type_array_id) {
|
||||
if (id == StubId::c1_new_type_array_id) {
|
||||
call_offset = __ call_RT(obj, noreg, CAST_FROM_FN_PTR(address, new_type_array), klass, length);
|
||||
} else {
|
||||
call_offset = __ call_RT(obj, noreg, CAST_FROM_FN_PTR(address, new_object_array), klass, length);
|
||||
@@ -769,7 +769,7 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::new_multi_array_id:
|
||||
case StubId::c1_new_multi_array_id:
|
||||
{ StubFrame f(sasm, "new_multi_array", dont_gc_arguments);
|
||||
// r0,: klass
|
||||
// r19,: rank
|
||||
@@ -789,7 +789,7 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::register_finalizer_id:
|
||||
case StubId::c1_register_finalizer_id:
|
||||
{
|
||||
__ set_info("register_finalizer", dont_gc_arguments);
|
||||
|
||||
@@ -821,19 +821,19 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::throw_class_cast_exception_id:
|
||||
case StubId::c1_throw_class_cast_exception_id:
|
||||
{ StubFrame f(sasm, "throw_class_cast_exception", dont_gc_arguments, does_not_return);
|
||||
oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_class_cast_exception), true);
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::throw_incompatible_class_change_error_id:
|
||||
case StubId::c1_throw_incompatible_class_change_error_id:
|
||||
{ StubFrame f(sasm, "throw_incompatible_class_cast_exception", dont_gc_arguments, does_not_return);
|
||||
oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_incompatible_class_change_error), false);
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::slow_subtype_check_id:
|
||||
case StubId::c1_slow_subtype_check_id:
|
||||
{
|
||||
// Typical calling sequence:
|
||||
// __ push(klass_RInfo); // object klass or other subclass
|
||||
@@ -882,10 +882,10 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::monitorenter_nofpu_id:
|
||||
case StubId::c1_monitorenter_nofpu_id:
|
||||
save_fpu_registers = false;
|
||||
// fall through
|
||||
case C1StubId::monitorenter_id:
|
||||
case StubId::c1_monitorenter_id:
|
||||
{
|
||||
StubFrame f(sasm, "monitorenter", dont_gc_arguments, requires_pop_epilogue_return);
|
||||
OopMap* map = save_live_registers(sasm, save_fpu_registers);
|
||||
@@ -903,7 +903,7 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::is_instance_of_id:
|
||||
case StubId::c1_is_instance_of_id:
|
||||
{
|
||||
// Mirror: c_rarg0
|
||||
// Object: c_rarg1
|
||||
@@ -952,10 +952,10 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::monitorexit_nofpu_id:
|
||||
case StubId::c1_monitorexit_nofpu_id:
|
||||
save_fpu_registers = false;
|
||||
// fall through
|
||||
case C1StubId::monitorexit_id:
|
||||
case StubId::c1_monitorexit_id:
|
||||
{
|
||||
StubFrame f(sasm, "monitorexit", dont_gc_arguments);
|
||||
OopMap* map = save_live_registers(sasm, save_fpu_registers);
|
||||
@@ -975,7 +975,7 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::deoptimize_id:
|
||||
case StubId::c1_deoptimize_id:
|
||||
{
|
||||
StubFrame f(sasm, "deoptimize", dont_gc_arguments, does_not_return);
|
||||
OopMap* oop_map = save_live_registers(sasm);
|
||||
@@ -992,13 +992,13 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::throw_range_check_failed_id:
|
||||
case StubId::c1_throw_range_check_failed_id:
|
||||
{ StubFrame f(sasm, "range_check_failed", dont_gc_arguments, does_not_return);
|
||||
oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_range_check_exception), true);
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::unwind_exception_id:
|
||||
case StubId::c1_unwind_exception_id:
|
||||
{ __ set_info("unwind_exception", dont_gc_arguments);
|
||||
// note: no stubframe since we are about to leave the current
|
||||
// activation and we are calling a leaf VM function only.
|
||||
@@ -1006,54 +1006,54 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::access_field_patching_id:
|
||||
case StubId::c1_access_field_patching_id:
|
||||
{ StubFrame f(sasm, "access_field_patching", dont_gc_arguments, does_not_return);
|
||||
// we should set up register map
|
||||
oop_maps = generate_patching(sasm, CAST_FROM_FN_PTR(address, access_field_patching));
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::load_klass_patching_id:
|
||||
case StubId::c1_load_klass_patching_id:
|
||||
{ StubFrame f(sasm, "load_klass_patching", dont_gc_arguments, does_not_return);
|
||||
// we should set up register map
|
||||
oop_maps = generate_patching(sasm, CAST_FROM_FN_PTR(address, move_klass_patching));
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::load_mirror_patching_id:
|
||||
case StubId::c1_load_mirror_patching_id:
|
||||
{ StubFrame f(sasm, "load_mirror_patching", dont_gc_arguments, does_not_return);
|
||||
// we should set up register map
|
||||
oop_maps = generate_patching(sasm, CAST_FROM_FN_PTR(address, move_mirror_patching));
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::load_appendix_patching_id:
|
||||
case StubId::c1_load_appendix_patching_id:
|
||||
{ StubFrame f(sasm, "load_appendix_patching", dont_gc_arguments, does_not_return);
|
||||
// we should set up register map
|
||||
oop_maps = generate_patching(sasm, CAST_FROM_FN_PTR(address, move_appendix_patching));
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::handle_exception_nofpu_id:
|
||||
case C1StubId::handle_exception_id:
|
||||
case StubId::c1_handle_exception_nofpu_id:
|
||||
case StubId::c1_handle_exception_id:
|
||||
{ StubFrame f(sasm, "handle_exception", dont_gc_arguments);
|
||||
oop_maps = generate_handle_exception(id, sasm);
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::handle_exception_from_callee_id:
|
||||
case StubId::c1_handle_exception_from_callee_id:
|
||||
{ StubFrame f(sasm, "handle_exception_from_callee", dont_gc_arguments);
|
||||
oop_maps = generate_handle_exception(id, sasm);
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::throw_index_exception_id:
|
||||
case StubId::c1_throw_index_exception_id:
|
||||
{ StubFrame f(sasm, "index_range_check_failed", dont_gc_arguments, does_not_return);
|
||||
oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_index_exception), true);
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::throw_array_store_exception_id:
|
||||
case StubId::c1_throw_array_store_exception_id:
|
||||
{ StubFrame f(sasm, "throw_array_store_exception", dont_gc_arguments, does_not_return);
|
||||
// tos + 0: link
|
||||
// + 1: return address
|
||||
@@ -1061,7 +1061,7 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::predicate_failed_trap_id:
|
||||
case StubId::c1_predicate_failed_trap_id:
|
||||
{
|
||||
StubFrame f(sasm, "predicate_failed_trap", dont_gc_arguments, does_not_return);
|
||||
|
||||
@@ -1079,7 +1079,7 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
|
||||
}
|
||||
break;
|
||||
|
||||
case C1StubId::dtrace_object_alloc_id:
|
||||
case StubId::c1_dtrace_object_alloc_id:
|
||||
{ // c_rarg0: object
|
||||
StubFrame f(sasm, "dtrace_object_alloc", dont_gc_arguments);
|
||||
save_live_registers(sasm);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -43,15 +43,15 @@ define_pd_global(intx, CompileThreshold, 1500 );
|
||||
|
||||
define_pd_global(intx, OnStackReplacePercentage, 933 );
|
||||
define_pd_global(intx, NewSizeThreadIncrease, 4*K );
|
||||
define_pd_global(intx, InitialCodeCacheSize, 160*K);
|
||||
define_pd_global(intx, ReservedCodeCacheSize, 32*M );
|
||||
define_pd_global(intx, NonProfiledCodeHeapSize, 13*M );
|
||||
define_pd_global(intx, ProfiledCodeHeapSize, 14*M );
|
||||
define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
|
||||
define_pd_global(size_t, InitialCodeCacheSize, 160*K);
|
||||
define_pd_global(size_t, ReservedCodeCacheSize, 32*M );
|
||||
define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M );
|
||||
define_pd_global(size_t, ProfiledCodeHeapSize, 14*M );
|
||||
define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M );
|
||||
define_pd_global(bool, ProfileInterpreter, false);
|
||||
define_pd_global(intx, CodeCacheExpansionSize, 32*K );
|
||||
define_pd_global(uintx, CodeCacheMinBlockLength, 1);
|
||||
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
|
||||
define_pd_global(size_t, CodeCacheExpansionSize, 32*K );
|
||||
define_pd_global(size_t, CodeCacheMinBlockLength, 1);
|
||||
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);
|
||||
define_pd_global(bool, NeverActAsServerClassMachine, true );
|
||||
define_pd_global(uint64_t,MaxRAM, 1ULL*G);
|
||||
define_pd_global(bool, CICompileOSR, true );
|
||||
|
||||
@@ -107,7 +107,8 @@ address C2_MacroAssembler::arrays_hashcode(Register ary, Register cnt, Register
|
||||
assert(is_power_of_2(unroll_factor), "can't use this value to calculate the jump target PC");
|
||||
andr(tmp2, cnt, unroll_factor - 1);
|
||||
adr(tmp1, BR_BASE);
|
||||
sub(tmp1, tmp1, tmp2, ext::sxtw, 3);
|
||||
// For Cortex-A53 offset is 4 because 2 nops are generated.
|
||||
sub(tmp1, tmp1, tmp2, ext::sxtw, VM_Version::supports_a53mac() ? 4 : 3);
|
||||
movw(tmp2, 0x1f);
|
||||
br(tmp1);
|
||||
|
||||
@@ -115,6 +116,11 @@ address C2_MacroAssembler::arrays_hashcode(Register ary, Register cnt, Register
|
||||
for (size_t i = 0; i < unroll_factor; ++i) {
|
||||
load(tmp1, Address(post(ary, type2aelembytes(eltype))), eltype);
|
||||
maddw(result, result, tmp2, tmp1);
|
||||
// maddw generates an extra nop for Cortex-A53 (see maddw definition in macroAssembler).
|
||||
// Generate 2nd nop to have 4 instructions per iteration.
|
||||
if (VM_Version::supports_a53mac()) {
|
||||
nop();
|
||||
}
|
||||
}
|
||||
bind(BR_BASE);
|
||||
subsw(cnt, cnt, unroll_factor);
|
||||
@@ -1772,19 +1778,21 @@ void C2_MacroAssembler::sve_vmask_lasttrue(Register dst, BasicType bt, PRegister
|
||||
void C2_MacroAssembler::neon_vector_extend(FloatRegister dst, BasicType dst_bt, unsigned dst_vlen_in_bytes,
|
||||
FloatRegister src, BasicType src_bt, bool is_unsigned) {
|
||||
if (src_bt == T_BYTE) {
|
||||
if (dst_bt == T_SHORT) {
|
||||
// 4B/8B to 4S/8S
|
||||
_xshll(is_unsigned, dst, T8H, src, T8B, 0);
|
||||
} else {
|
||||
// 4B to 4I
|
||||
assert(dst_vlen_in_bytes == 16 && dst_bt == T_INT, "unsupported");
|
||||
_xshll(is_unsigned, dst, T8H, src, T8B, 0);
|
||||
// 4B to 4S/4I, 8B to 8S
|
||||
assert(dst_vlen_in_bytes == 8 || dst_vlen_in_bytes == 16, "unsupported");
|
||||
assert(dst_bt == T_SHORT || dst_bt == T_INT, "unsupported");
|
||||
_xshll(is_unsigned, dst, T8H, src, T8B, 0);
|
||||
if (dst_bt == T_INT) {
|
||||
_xshll(is_unsigned, dst, T4S, dst, T4H, 0);
|
||||
}
|
||||
} else if (src_bt == T_SHORT) {
|
||||
// 4S to 4I
|
||||
assert(dst_vlen_in_bytes == 16 && dst_bt == T_INT, "unsupported");
|
||||
// 2S to 2I/2L, 4S to 4I
|
||||
assert(dst_vlen_in_bytes == 8 || dst_vlen_in_bytes == 16, "unsupported");
|
||||
assert(dst_bt == T_INT || dst_bt == T_LONG, "unsupported");
|
||||
_xshll(is_unsigned, dst, T4S, src, T4H, 0);
|
||||
if (dst_bt == T_LONG) {
|
||||
_xshll(is_unsigned, dst, T2D, dst, T2S, 0);
|
||||
}
|
||||
} else if (src_bt == T_INT) {
|
||||
// 2I to 2L
|
||||
assert(dst_vlen_in_bytes == 16 && dst_bt == T_LONG, "unsupported");
|
||||
@@ -1804,18 +1812,21 @@ void C2_MacroAssembler::neon_vector_narrow(FloatRegister dst, BasicType dst_bt,
|
||||
assert(dst_bt == T_BYTE, "unsupported");
|
||||
xtn(dst, T8B, src, T8H);
|
||||
} else if (src_bt == T_INT) {
|
||||
// 4I to 4B/4S
|
||||
assert(src_vlen_in_bytes == 16, "unsupported");
|
||||
// 2I to 2S, 4I to 4B/4S
|
||||
assert(src_vlen_in_bytes == 8 || src_vlen_in_bytes == 16, "unsupported");
|
||||
assert(dst_bt == T_BYTE || dst_bt == T_SHORT, "unsupported");
|
||||
xtn(dst, T4H, src, T4S);
|
||||
if (dst_bt == T_BYTE) {
|
||||
xtn(dst, T8B, dst, T8H);
|
||||
}
|
||||
} else if (src_bt == T_LONG) {
|
||||
// 2L to 2I
|
||||
// 2L to 2S/2I
|
||||
assert(src_vlen_in_bytes == 16, "unsupported");
|
||||
assert(dst_bt == T_INT, "unsupported");
|
||||
assert(dst_bt == T_INT || dst_bt == T_SHORT, "unsupported");
|
||||
xtn(dst, T2S, src, T2D);
|
||||
if (dst_bt == T_SHORT) {
|
||||
xtn(dst, T4H, dst, T4S);
|
||||
}
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -51,8 +51,8 @@ define_pd_global(intx, NewSizeThreadIncrease, ScaleForWordSize(4*K));
|
||||
define_pd_global(intx, LoopUnrollLimit, 60);
|
||||
define_pd_global(intx, LoopPercentProfileLimit, 10);
|
||||
// InitialCodeCacheSize derived from specjbb2000 run.
|
||||
define_pd_global(intx, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize
|
||||
define_pd_global(intx, CodeCacheExpansionSize, 64*K);
|
||||
define_pd_global(size_t, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize
|
||||
define_pd_global(size_t, CodeCacheExpansionSize, 64*K);
|
||||
|
||||
// Ergonomics related flags
|
||||
define_pd_global(uint64_t,MaxRAM, 128ULL*G);
|
||||
@@ -69,12 +69,12 @@ define_pd_global(bool, SuperWordLoopUnrollAnalysis, true);
|
||||
define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 8);
|
||||
define_pd_global(bool, IdealizeClearArrayNode, true);
|
||||
|
||||
define_pd_global(intx, ReservedCodeCacheSize, 48*M);
|
||||
define_pd_global(intx, NonProfiledCodeHeapSize, 21*M);
|
||||
define_pd_global(intx, ProfiledCodeHeapSize, 22*M);
|
||||
define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
|
||||
define_pd_global(uintx, CodeCacheMinBlockLength, 6);
|
||||
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
|
||||
define_pd_global(size_t, ReservedCodeCacheSize, 48*M);
|
||||
define_pd_global(size_t, NonProfiledCodeHeapSize, 21*M);
|
||||
define_pd_global(size_t, ProfiledCodeHeapSize, 22*M);
|
||||
define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M );
|
||||
define_pd_global(size_t, CodeCacheMinBlockLength, 6);
|
||||
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);
|
||||
|
||||
// Ergonomics related flags
|
||||
define_pd_global(bool, NeverActAsServerClassMachine, false);
|
||||
|
||||
@@ -90,13 +90,15 @@ void CompiledDirectCall::set_to_interpreted(const methodHandle& callee, address
|
||||
= nativeMovConstReg_at(stub + NativeInstruction::instruction_size);
|
||||
|
||||
#ifdef ASSERT
|
||||
NativeGeneralJump* jump = nativeGeneralJump_at(method_holder->next_instruction_address());
|
||||
NativeJump* jump = MacroAssembler::codestub_branch_needs_far_jump()
|
||||
? nativeGeneralJump_at(method_holder->next_instruction_address())
|
||||
: nativeJump_at(method_holder->next_instruction_address());
|
||||
verify_mt_safe(callee, entry, method_holder, jump);
|
||||
#endif
|
||||
|
||||
// Update stub.
|
||||
method_holder->set_data((intptr_t)callee());
|
||||
NativeGeneralJump::insert_unconditional(method_holder->next_instruction_address(), entry);
|
||||
MacroAssembler::pd_patch_instruction(method_holder->next_instruction_address(), entry);
|
||||
ICache::invalidate_range(stub, to_interp_stub_size());
|
||||
// Update jump to call.
|
||||
set_destination_mt_safe(stub);
|
||||
|
||||
@@ -289,7 +289,7 @@ void DowncallLinker::StubGenerator::generate() {
|
||||
|
||||
__ verify_sve_vector_length(tmp1);
|
||||
|
||||
__ safepoint_poll(L_safepoint_poll_slow_path, true /* at_return */, true /* acquire */, false /* in_nmethod */, tmp1);
|
||||
__ safepoint_poll(L_safepoint_poll_slow_path, true /* at_return */, false /* in_nmethod */, tmp1);
|
||||
|
||||
__ ldrw(tmp1, Address(rthread, JavaThread::suspend_flags_offset()));
|
||||
__ cbnzw(tmp1, L_safepoint_poll_slow_path);
|
||||
|
||||
@@ -441,8 +441,8 @@ JavaThread** frame::saved_thread_address(const frame& f) {
|
||||
|
||||
JavaThread** thread_addr;
|
||||
#ifdef COMPILER1
|
||||
if (cb == Runtime1::blob_for(C1StubId::monitorenter_id) ||
|
||||
cb == Runtime1::blob_for(C1StubId::monitorenter_nofpu_id)) {
|
||||
if (cb == Runtime1::blob_for(StubId::c1_monitorenter_id) ||
|
||||
cb == Runtime1::blob_for(StubId::c1_monitorenter_nofpu_id)) {
|
||||
thread_addr = (JavaThread**)(f.sp() + Runtime1::runtime_blob_current_thread_offset(f));
|
||||
} else
|
||||
#endif
|
||||
@@ -828,7 +828,6 @@ void JavaFrameAnchor::make_walkable() {
|
||||
// already walkable?
|
||||
if (walkable()) return;
|
||||
vmassert(last_Java_sp() != nullptr, "not called from Java code?");
|
||||
vmassert(last_Java_pc() == nullptr, "already walkable");
|
||||
_last_Java_pc = (address)_last_Java_sp[-1];
|
||||
vmassert(walkable(), "something went wrong");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -35,6 +35,53 @@
|
||||
|
||||
// Inline functions for AArch64 frames:
|
||||
|
||||
#if INCLUDE_JFR
|
||||
|
||||
// Static helper routines
|
||||
|
||||
inline address frame::interpreter_bcp(const intptr_t* fp) {
|
||||
assert(fp != nullptr, "invariant");
|
||||
return reinterpret_cast<address>(fp[frame::interpreter_frame_bcp_offset]);
|
||||
}
|
||||
|
||||
inline address frame::interpreter_return_address(const intptr_t* fp) {
|
||||
assert(fp != nullptr, "invariant");
|
||||
return reinterpret_cast<address>(fp[frame::return_addr_offset]);
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_sender_sp(const intptr_t* fp) {
|
||||
assert(fp != nullptr, "invariant");
|
||||
return reinterpret_cast<intptr_t*>(fp[frame::interpreter_frame_sender_sp_offset]);
|
||||
}
|
||||
|
||||
inline bool frame::is_interpreter_frame_setup_at(const intptr_t* fp, const void* sp) {
|
||||
assert(fp != nullptr, "invariant");
|
||||
assert(sp != nullptr, "invariant");
|
||||
return sp <= fp + frame::interpreter_frame_initial_sp_offset;
|
||||
}
|
||||
|
||||
inline intptr_t* frame::sender_sp(intptr_t* fp) {
|
||||
assert(fp != nullptr, "invariant");
|
||||
return fp + frame::sender_sp_offset;
|
||||
}
|
||||
|
||||
inline intptr_t* frame::link(const intptr_t* fp) {
|
||||
assert(fp != nullptr, "invariant");
|
||||
return reinterpret_cast<intptr_t*>(fp[frame::link_offset]);
|
||||
}
|
||||
|
||||
inline address frame::return_address(const intptr_t* sp) {
|
||||
assert(sp != nullptr, "invariant");
|
||||
return reinterpret_cast<address>(sp[-1]);
|
||||
}
|
||||
|
||||
inline intptr_t* frame::fp(const intptr_t* sp) {
|
||||
assert(sp != nullptr, "invariant");
|
||||
return reinterpret_cast<intptr_t*>(sp[-2]);
|
||||
}
|
||||
|
||||
#endif // INCLUDE_JFR
|
||||
|
||||
// Constructors:
|
||||
|
||||
inline frame::frame() {
|
||||
|
||||
@@ -106,6 +106,13 @@ instruct zLoadP(iRegPNoSp dst, memory8 mem, rFlagsReg cr)
|
||||
match(Set dst (LoadP mem));
|
||||
predicate(UseZGC && !needs_acquiring_load(n) && n->as_Load()->barrier_data() != 0);
|
||||
effect(TEMP dst, KILL cr);
|
||||
// The main load is a candidate to implement implicit null checks, as long as
|
||||
// legitimize_address() does not require a preceding lea instruction to
|
||||
// materialize the memory operand. The absence of a preceding lea instruction
|
||||
// is guaranteed for immLoffset8 memory operands, because these do not lead to
|
||||
// out-of-range offsets (see definition of immLoffset8). Fortunately,
|
||||
// immLoffset8 memory operands are the most common ones in practice.
|
||||
ins_is_late_expanded_null_check_candidate(opnd_array(1)->opcode() == INDOFFL8);
|
||||
|
||||
ins_cost(4 * INSN_COST);
|
||||
|
||||
@@ -117,7 +124,11 @@ instruct zLoadP(iRegPNoSp dst, memory8 mem, rFlagsReg cr)
|
||||
// Fix up any out-of-range offsets.
|
||||
assert_different_registers(rscratch2, as_Register($mem$$base));
|
||||
assert_different_registers(rscratch2, $dst$$Register);
|
||||
ref_addr = __ legitimize_address(ref_addr, 8, rscratch2);
|
||||
int size = 8;
|
||||
assert(!this->is_late_expanded_null_check_candidate() ||
|
||||
!MacroAssembler::legitimize_address_requires_lea(ref_addr, size),
|
||||
"an instruction that can be used for implicit null checking should emit the candidate memory access first");
|
||||
ref_addr = __ legitimize_address(ref_addr, size, rscratch2);
|
||||
}
|
||||
__ ldr($dst$$Register, ref_addr);
|
||||
z_load_barrier(masm, this, ref_addr, $dst$$Register, rscratch1);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2019, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -38,7 +38,7 @@ define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap nulls
|
||||
|
||||
define_pd_global(bool, DelayCompilerStubsGeneration, COMPILER2_OR_JVMCI);
|
||||
|
||||
define_pd_global(uintx, CodeCacheSegmentSize, 64);
|
||||
define_pd_global(size_t, CodeCacheSegmentSize, 64);
|
||||
define_pd_global(intx, CodeEntryAlignment, 64);
|
||||
define_pd_global(intx, OptoLoopAlignment, 16);
|
||||
|
||||
@@ -83,8 +83,6 @@ define_pd_global(intx, InlineSmallCode, 1000);
|
||||
range, \
|
||||
constraint) \
|
||||
\
|
||||
product(bool, NearCpool, true, \
|
||||
"constant pool is close to instructions") \
|
||||
product(bool, UseCRC32, false, \
|
||||
"Use CRC32 instructions for CRC32 computation") \
|
||||
product(bool, UseCryptoPmullForCRC32, false, \
|
||||
@@ -97,6 +95,8 @@ define_pd_global(intx, InlineSmallCode, 1000);
|
||||
"Use simplest and shortest implementation for array equals") \
|
||||
product(bool, UseSIMDForBigIntegerShiftIntrinsics, true, \
|
||||
"Use SIMD instructions for left/right shift of BigInteger") \
|
||||
product(bool, UseSIMDForSHA3Intrinsic, true, \
|
||||
"Use SIMD SHA3 instructions for SHA3 intrinsic") \
|
||||
product(bool, AvoidUnalignedAccesses, false, \
|
||||
"Avoid generating unaligned memory accesses") \
|
||||
product(bool, UseLSE, false, \
|
||||
@@ -117,7 +117,8 @@ define_pd_global(intx, InlineSmallCode, 1000);
|
||||
product(ccstr, OnSpinWaitInst, "yield", DIAGNOSTIC, \
|
||||
"The instruction to use to implement " \
|
||||
"java.lang.Thread.onSpinWait()." \
|
||||
"Options: none, nop, isb, yield.") \
|
||||
"Valid values are: none, nop, isb, yield, sb.") \
|
||||
constraint(OnSpinWaitInstNameConstraintFunc, AtParse) \
|
||||
product(uint, OnSpinWaitInstCount, 1, DIAGNOSTIC, \
|
||||
"The number of OnSpinWaitInst instructions to generate." \
|
||||
"It cannot be used with OnSpinWaitInst=none.") \
|
||||
|
||||
@@ -458,9 +458,10 @@ void InterpreterMacroAssembler::dispatch_via(TosState state, address* table) {
|
||||
|
||||
// remove activation
|
||||
//
|
||||
// Apply stack watermark barrier.
|
||||
// Unlock the receiver if this is a synchronized method.
|
||||
// Unlock any Java monitors from synchronized blocks.
|
||||
// Apply stack watermark barrier.
|
||||
// Notify JVMTI.
|
||||
// Remove the activation from the stack.
|
||||
//
|
||||
// If there are locked Java monitors
|
||||
@@ -470,30 +471,14 @@ void InterpreterMacroAssembler::dispatch_via(TosState state, address* table) {
|
||||
// installs IllegalMonitorStateException
|
||||
// Else
|
||||
// no error processing
|
||||
void InterpreterMacroAssembler::remove_activation(
|
||||
TosState state,
|
||||
bool throw_monitor_exception,
|
||||
bool install_monitor_exception,
|
||||
bool notify_jvmdi) {
|
||||
void InterpreterMacroAssembler::remove_activation(TosState state,
|
||||
bool throw_monitor_exception,
|
||||
bool install_monitor_exception,
|
||||
bool notify_jvmdi) {
|
||||
// Note: Registers r3 xmm0 may be in use for the
|
||||
// result check if synchronized method
|
||||
Label unlocked, unlock, no_unlock;
|
||||
|
||||
// The below poll is for the stack watermark barrier. It allows fixing up frames lazily,
|
||||
// that would normally not be safe to use. Such bad returns into unsafe territory of
|
||||
// the stack, will call InterpreterRuntime::at_unwind.
|
||||
Label slow_path;
|
||||
Label fast_path;
|
||||
safepoint_poll(slow_path, true /* at_return */, false /* acquire */, false /* in_nmethod */);
|
||||
br(Assembler::AL, fast_path);
|
||||
bind(slow_path);
|
||||
push(state);
|
||||
set_last_Java_frame(esp, rfp, (address)pc(), rscratch1);
|
||||
super_call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::at_unwind), rthread);
|
||||
reset_last_Java_frame(true);
|
||||
pop(state);
|
||||
bind(fast_path);
|
||||
|
||||
// get the value of _do_not_unlock_if_synchronized into r3
|
||||
const Address do_not_unlock_if_synchronized(rthread,
|
||||
in_bytes(JavaThread::do_not_unlock_if_synchronized_offset()));
|
||||
@@ -611,7 +596,24 @@ void InterpreterMacroAssembler::remove_activation(
|
||||
|
||||
bind(no_unlock);
|
||||
|
||||
// jvmti support
|
||||
JFR_ONLY(enter_jfr_critical_section();)
|
||||
|
||||
// The below poll is for the stack watermark barrier. It allows fixing up frames lazily,
|
||||
// that would normally not be safe to use. Such bad returns into unsafe territory of
|
||||
// the stack, will call InterpreterRuntime::at_unwind.
|
||||
Label slow_path;
|
||||
Label fast_path;
|
||||
safepoint_poll(slow_path, true /* at_return */, false /* in_nmethod */);
|
||||
br(Assembler::AL, fast_path);
|
||||
bind(slow_path);
|
||||
push(state);
|
||||
set_last_Java_frame(esp, rfp, pc(), rscratch1);
|
||||
super_call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::at_unwind), rthread);
|
||||
reset_last_Java_frame(true);
|
||||
pop(state);
|
||||
bind(fast_path);
|
||||
|
||||
// JVMTI support. Make sure the safepoint poll test is issued prior.
|
||||
if (notify_jvmdi) {
|
||||
notify_method_exit(state, NotifyJVMTI); // preserve TOSCA
|
||||
} else {
|
||||
@@ -638,6 +640,8 @@ void InterpreterMacroAssembler::remove_activation(
|
||||
cmp(rscratch2, rscratch1);
|
||||
br(Assembler::LS, no_reserved_zone_enabling);
|
||||
|
||||
JFR_ONLY(leave_jfr_critical_section();)
|
||||
|
||||
call_VM_leaf(
|
||||
CAST_FROM_FN_PTR(address, SharedRuntime::enable_stack_reserved_zone), rthread);
|
||||
call_VM(noreg, CAST_FROM_FN_PTR(address,
|
||||
@@ -647,10 +651,14 @@ void InterpreterMacroAssembler::remove_activation(
|
||||
bind(no_reserved_zone_enabling);
|
||||
}
|
||||
|
||||
// restore sender esp
|
||||
mov(esp, rscratch2);
|
||||
// remove frame anchor
|
||||
leave();
|
||||
|
||||
JFR_ONLY(leave_jfr_critical_section();)
|
||||
|
||||
// restore sender esp
|
||||
mov(esp, rscratch2);
|
||||
|
||||
// If we're returning to interpreted code we will shortly be
|
||||
// adjusting SP to allow some space for ESP. If we're returning to
|
||||
// compiled code the saved sender SP was saved in sender_sp, so this
|
||||
@@ -658,6 +666,19 @@ void InterpreterMacroAssembler::remove_activation(
|
||||
andr(sp, esp, -16);
|
||||
}
|
||||
|
||||
#if INCLUDE_JFR
|
||||
void InterpreterMacroAssembler::enter_jfr_critical_section() {
|
||||
const Address sampling_critical_section(rthread, in_bytes(SAMPLING_CRITICAL_SECTION_OFFSET_JFR));
|
||||
mov(rscratch1, true);
|
||||
strb(rscratch1, sampling_critical_section);
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::leave_jfr_critical_section() {
|
||||
const Address sampling_critical_section(rthread, in_bytes(SAMPLING_CRITICAL_SECTION_OFFSET_JFR));
|
||||
strb(zr, sampling_critical_section);
|
||||
}
|
||||
#endif // INCLUDE_JFR
|
||||
|
||||
// Lock object
|
||||
//
|
||||
// Args:
|
||||
@@ -905,60 +926,26 @@ void InterpreterMacroAssembler::set_mdp_data_at(Register mdp_in,
|
||||
|
||||
|
||||
void InterpreterMacroAssembler::increment_mdp_data_at(Register mdp_in,
|
||||
int constant,
|
||||
bool decrement) {
|
||||
increment_mdp_data_at(mdp_in, noreg, constant, decrement);
|
||||
int constant) {
|
||||
increment_mdp_data_at(mdp_in, noreg, constant);
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::increment_mdp_data_at(Register mdp_in,
|
||||
Register reg,
|
||||
int constant,
|
||||
bool decrement) {
|
||||
Register index,
|
||||
int constant) {
|
||||
assert(ProfileInterpreter, "must be profiling interpreter");
|
||||
// %%% this does 64bit counters at best it is wasting space
|
||||
// at worst it is a rare bug when counters overflow
|
||||
|
||||
assert_different_registers(rscratch2, rscratch1, mdp_in, reg);
|
||||
assert_different_registers(rscratch2, rscratch1, mdp_in, index);
|
||||
|
||||
Address addr1(mdp_in, constant);
|
||||
Address addr2(rscratch2, reg, Address::lsl(0));
|
||||
Address addr2(rscratch2, index, Address::lsl(0));
|
||||
Address &addr = addr1;
|
||||
if (reg != noreg) {
|
||||
if (index != noreg) {
|
||||
lea(rscratch2, addr1);
|
||||
addr = addr2;
|
||||
}
|
||||
|
||||
if (decrement) {
|
||||
// Decrement the register. Set condition codes.
|
||||
// Intel does this
|
||||
// addptr(data, (int32_t) -DataLayout::counter_increment);
|
||||
// If the decrement causes the counter to overflow, stay negative
|
||||
// Label L;
|
||||
// jcc(Assembler::negative, L);
|
||||
// addptr(data, (int32_t) DataLayout::counter_increment);
|
||||
// so we do this
|
||||
ldr(rscratch1, addr);
|
||||
subs(rscratch1, rscratch1, (unsigned)DataLayout::counter_increment);
|
||||
Label L;
|
||||
br(Assembler::LO, L); // skip store if counter underflow
|
||||
str(rscratch1, addr);
|
||||
bind(L);
|
||||
} else {
|
||||
assert(DataLayout::counter_increment == 1,
|
||||
"flow-free idiom only works with 1");
|
||||
// Intel does this
|
||||
// Increment the register. Set carry flag.
|
||||
// addptr(data, DataLayout::counter_increment);
|
||||
// If the increment causes the counter to overflow, pull back by 1.
|
||||
// sbbptr(data, (int32_t)0);
|
||||
// so we do this
|
||||
ldr(rscratch1, addr);
|
||||
adds(rscratch1, rscratch1, DataLayout::counter_increment);
|
||||
Label L;
|
||||
br(Assembler::CS, L); // skip store if counter overflow
|
||||
str(rscratch1, addr);
|
||||
bind(L);
|
||||
}
|
||||
increment(addr, DataLayout::counter_increment);
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::set_mdp_flag_at(Register mdp_in,
|
||||
@@ -1029,31 +1016,16 @@ void InterpreterMacroAssembler::update_mdp_for_ret(Register return_bci) {
|
||||
}
|
||||
|
||||
|
||||
void InterpreterMacroAssembler::profile_taken_branch(Register mdp,
|
||||
Register bumped_count) {
|
||||
void InterpreterMacroAssembler::profile_taken_branch(Register mdp) {
|
||||
if (ProfileInterpreter) {
|
||||
Label profile_continue;
|
||||
|
||||
// If no method data exists, go to profile_continue.
|
||||
// Otherwise, assign to mdp
|
||||
test_method_data_pointer(mdp, profile_continue);
|
||||
|
||||
// We are taking a branch. Increment the taken count.
|
||||
// We inline increment_mdp_data_at to return bumped_count in a register
|
||||
//increment_mdp_data_at(mdp, in_bytes(JumpData::taken_offset()));
|
||||
Address data(mdp, in_bytes(JumpData::taken_offset()));
|
||||
ldr(bumped_count, data);
|
||||
assert(DataLayout::counter_increment == 1,
|
||||
"flow-free idiom only works with 1");
|
||||
// Intel does this to catch overflow
|
||||
// addptr(bumped_count, DataLayout::counter_increment);
|
||||
// sbbptr(bumped_count, 0);
|
||||
// so we do this
|
||||
adds(bumped_count, bumped_count, DataLayout::counter_increment);
|
||||
Label L;
|
||||
br(Assembler::CS, L); // skip store if counter overflow
|
||||
str(bumped_count, data);
|
||||
bind(L);
|
||||
increment_mdp_data_at(mdp, in_bytes(JumpData::taken_offset()));
|
||||
|
||||
// The method data pointer needs to be updated to reflect the new target.
|
||||
update_mdp_by_offset(mdp, in_bytes(JumpData::displacement_offset()));
|
||||
bind(profile_continue);
|
||||
@@ -1068,7 +1040,7 @@ void InterpreterMacroAssembler::profile_not_taken_branch(Register mdp) {
|
||||
// If no method data exists, go to profile_continue.
|
||||
test_method_data_pointer(mdp, profile_continue);
|
||||
|
||||
// We are taking a branch. Increment the not taken count.
|
||||
// We are not taking a branch. Increment the not taken count.
|
||||
increment_mdp_data_at(mdp, in_bytes(BranchData::not_taken_offset()));
|
||||
|
||||
// The method data pointer needs to be updated to correspond to
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2025, 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.
|
||||
*
|
||||
@@ -247,11 +247,8 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
void verify_method_data_pointer();
|
||||
|
||||
void set_mdp_data_at(Register mdp_in, int constant, Register value);
|
||||
void increment_mdp_data_at(Address data, bool decrement = false);
|
||||
void increment_mdp_data_at(Register mdp_in, int constant,
|
||||
bool decrement = false);
|
||||
void increment_mdp_data_at(Register mdp_in, Register reg, int constant,
|
||||
bool decrement = false);
|
||||
void increment_mdp_data_at(Register mdp_in, int constant);
|
||||
void increment_mdp_data_at(Register mdp_in, Register index, int constant);
|
||||
void increment_mask_and_jump(Address counter_addr,
|
||||
int increment, Address mask,
|
||||
Register scratch, Register scratch2,
|
||||
@@ -279,7 +276,7 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
// narrow int return value
|
||||
void narrow(Register result);
|
||||
|
||||
void profile_taken_branch(Register mdp, Register bumped_count);
|
||||
void profile_taken_branch(Register mdp);
|
||||
void profile_not_taken_branch(Register mdp);
|
||||
void profile_call(Register mdp);
|
||||
void profile_final_call(Register mdp);
|
||||
@@ -310,6 +307,9 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
void notify_method_entry();
|
||||
void notify_method_exit(TosState state, NotifyMethodExitMode mode);
|
||||
|
||||
JFR_ONLY(void enter_jfr_critical_section();)
|
||||
JFR_ONLY(void leave_jfr_critical_section();)
|
||||
|
||||
virtual void _call_Unimplemented(address call_site) {
|
||||
save_bcp();
|
||||
set_last_Java_frame(esp, rfp, (address) pc(), rscratch1);
|
||||
|
||||
@@ -553,13 +553,8 @@ address MacroAssembler::target_addr_for_insn_or_null(address insn_addr, unsigned
|
||||
return MacroAssembler::target_addr_for_insn(insn_addr, insn);
|
||||
}
|
||||
|
||||
void MacroAssembler::safepoint_poll(Label& slow_path, bool at_return, bool acquire, bool in_nmethod, Register tmp) {
|
||||
if (acquire) {
|
||||
lea(tmp, Address(rthread, JavaThread::polling_word_offset()));
|
||||
ldar(tmp, tmp);
|
||||
} else {
|
||||
ldr(tmp, Address(rthread, JavaThread::polling_word_offset()));
|
||||
}
|
||||
void MacroAssembler::safepoint_poll(Label& slow_path, bool at_return, bool in_nmethod, Register tmp) {
|
||||
ldr(tmp, Address(rthread, JavaThread::polling_word_offset()));
|
||||
if (at_return) {
|
||||
// Note that when in_nmethod is set, the stack pointer is incremented before the poll. Therefore,
|
||||
// we may safely use the sp instead to perform the stack watermark check.
|
||||
@@ -989,11 +984,19 @@ void MacroAssembler::emit_static_call_stub() {
|
||||
mov_metadata(rmethod, nullptr);
|
||||
|
||||
// Jump to the entry point of the c2i stub.
|
||||
movptr(rscratch1, 0);
|
||||
br(rscratch1);
|
||||
if (codestub_branch_needs_far_jump()) {
|
||||
movptr(rscratch1, 0);
|
||||
br(rscratch1);
|
||||
} else {
|
||||
b(pc());
|
||||
}
|
||||
}
|
||||
|
||||
int MacroAssembler::static_call_stub_size() {
|
||||
if (!codestub_branch_needs_far_jump()) {
|
||||
// isb; movk; movz; movz; b
|
||||
return 5 * NativeInstruction::instruction_size;
|
||||
}
|
||||
// isb; movk; movz; movz; movk; movz; movz; br
|
||||
return 8 * NativeInstruction::instruction_size;
|
||||
}
|
||||
@@ -5340,7 +5343,41 @@ bool MacroAssembler::set_klass_decode_mode(address base, int shift, const size_t
|
||||
return _klass_decode_mode != KlassDecodeNone;
|
||||
}
|
||||
|
||||
static Register pick_different_tmp(Register dst, Register src) {
|
||||
auto tmps = RegSet::of(r0, r1, r2) - RegSet::of(src, dst);
|
||||
return *tmps.begin();
|
||||
}
|
||||
|
||||
void MacroAssembler::encode_klass_not_null_for_aot(Register dst, Register src) {
|
||||
// we have to load the klass base from the AOT constants area but
|
||||
// not the shift because it is not allowed to change
|
||||
int shift = CompressedKlassPointers::shift();
|
||||
assert(shift >= 0 && shift <= CompressedKlassPointers::max_shift(), "unexpected compressed klass shift!");
|
||||
if (dst != src) {
|
||||
// we can load the base into dst, subtract it formthe src and shift down
|
||||
lea(dst, ExternalAddress(CompressedKlassPointers::base_addr()));
|
||||
ldr(dst, dst);
|
||||
sub(dst, src, dst);
|
||||
lsr(dst, dst, shift);
|
||||
} else {
|
||||
// we need an extra register in order to load the coop base
|
||||
Register tmp = pick_different_tmp(dst, src);
|
||||
RegSet regs = RegSet::of(tmp);
|
||||
push(regs, sp);
|
||||
lea(tmp, ExternalAddress(CompressedKlassPointers::base_addr()));
|
||||
ldr(tmp, tmp);
|
||||
sub(dst, src, tmp);
|
||||
lsr(dst, dst, shift);
|
||||
pop(regs, sp);
|
||||
}
|
||||
}
|
||||
|
||||
void MacroAssembler::encode_klass_not_null(Register dst, Register src) {
|
||||
if (AOTCodeCache::is_on_for_dump()) {
|
||||
encode_klass_not_null_for_aot(dst, src);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (klass_decode_mode()) {
|
||||
case KlassDecodeZero:
|
||||
if (CompressedKlassPointers::shift() != 0) {
|
||||
@@ -5377,9 +5414,36 @@ void MacroAssembler::encode_klass_not_null(Register r) {
|
||||
encode_klass_not_null(r, r);
|
||||
}
|
||||
|
||||
void MacroAssembler::decode_klass_not_null_for_aot(Register dst, Register src) {
|
||||
// we have to load the klass base from the AOT constants area but
|
||||
// not the shift because it is not allowed to change
|
||||
int shift = CompressedKlassPointers::shift();
|
||||
assert(shift >= 0 && shift <= CompressedKlassPointers::max_shift(), "unexpected compressed klass shift!");
|
||||
if (dst != src) {
|
||||
// we can load the base into dst then add the offset with a suitable shift
|
||||
lea(dst, ExternalAddress(CompressedKlassPointers::base_addr()));
|
||||
ldr(dst, dst);
|
||||
add(dst, dst, src, LSL, shift);
|
||||
} else {
|
||||
// we need an extra register in order to load the coop base
|
||||
Register tmp = pick_different_tmp(dst, src);
|
||||
RegSet regs = RegSet::of(tmp);
|
||||
push(regs, sp);
|
||||
lea(tmp, ExternalAddress(CompressedKlassPointers::base_addr()));
|
||||
ldr(tmp, tmp);
|
||||
add(dst, tmp, src, LSL, shift);
|
||||
pop(regs, sp);
|
||||
}
|
||||
}
|
||||
|
||||
void MacroAssembler::decode_klass_not_null(Register dst, Register src) {
|
||||
assert (UseCompressedClassPointers, "should only be used for compressed headers");
|
||||
|
||||
if (AOTCodeCache::is_on_for_dump()) {
|
||||
decode_klass_not_null_for_aot(dst, src);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (klass_decode_mode()) {
|
||||
case KlassDecodeZero:
|
||||
if (CompressedKlassPointers::shift() != 0) {
|
||||
@@ -6654,7 +6718,7 @@ void MacroAssembler::get_thread(Register dst) {
|
||||
protect_return_address();
|
||||
push(saved_regs, sp);
|
||||
|
||||
mov(lr, CAST_FROM_FN_PTR(address, JavaThread::aarch64_get_thread_helper));
|
||||
mov(lr, ExternalAddress(CAST_FROM_FN_PTR(address, JavaThread::aarch64_get_thread_helper)));
|
||||
blr(lr);
|
||||
if (dst != c_rarg0) {
|
||||
mov(dst, c_rarg0);
|
||||
@@ -6739,6 +6803,7 @@ void MacroAssembler::verify_cross_modify_fence_not_required() {
|
||||
#endif
|
||||
|
||||
void MacroAssembler::spin_wait() {
|
||||
block_comment("spin_wait {");
|
||||
for (int i = 0; i < VM_Version::spin_wait_desc().inst_count(); ++i) {
|
||||
switch (VM_Version::spin_wait_desc().inst()) {
|
||||
case SpinWait::NOP:
|
||||
@@ -6750,10 +6815,15 @@ void MacroAssembler::spin_wait() {
|
||||
case SpinWait::YIELD:
|
||||
yield();
|
||||
break;
|
||||
case SpinWait::SB:
|
||||
assert(VM_Version::supports_sb(), "current CPU does not support SB instruction");
|
||||
sb();
|
||||
break;
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
}
|
||||
block_comment("}");
|
||||
}
|
||||
|
||||
// Stack frame creation/removal
|
||||
|
||||
@@ -120,7 +120,7 @@ class MacroAssembler: public Assembler {
|
||||
virtual void check_and_handle_popframe(Register java_thread);
|
||||
virtual void check_and_handle_earlyret(Register java_thread);
|
||||
|
||||
void safepoint_poll(Label& slow_path, bool at_return, bool acquire, bool in_nmethod, Register tmp = rscratch1);
|
||||
void safepoint_poll(Label& slow_path, bool at_return, bool in_nmethod, Register tmp = rscratch1);
|
||||
void rt_call(address dest, Register tmp = rscratch1);
|
||||
|
||||
// Load Effective Address
|
||||
@@ -129,16 +129,21 @@ class MacroAssembler: public Assembler {
|
||||
a.lea(this, r);
|
||||
}
|
||||
|
||||
// Whether materializing the given address for a LDR/STR requires an
|
||||
// additional lea instruction.
|
||||
static bool legitimize_address_requires_lea(const Address &a, int size) {
|
||||
return a.getMode() == Address::base_plus_offset &&
|
||||
!Address::offset_ok_for_immed(a.offset(), exact_log2(size));
|
||||
}
|
||||
|
||||
/* Sometimes we get misaligned loads and stores, usually from Unsafe
|
||||
accesses, and these can exceed the offset range. */
|
||||
Address legitimize_address(const Address &a, int size, Register scratch) {
|
||||
if (a.getMode() == Address::base_plus_offset) {
|
||||
if (! Address::offset_ok_for_immed(a.offset(), exact_log2(size))) {
|
||||
block_comment("legitimize_address {");
|
||||
lea(scratch, a);
|
||||
block_comment("} legitimize_address");
|
||||
return Address(scratch);
|
||||
}
|
||||
if (legitimize_address_requires_lea(a, size)) {
|
||||
block_comment("legitimize_address {");
|
||||
lea(scratch, a);
|
||||
block_comment("} legitimize_address");
|
||||
return Address(scratch);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
@@ -323,6 +328,27 @@ class MacroAssembler: public Assembler {
|
||||
extr(Rd, Rn, Rn, imm);
|
||||
}
|
||||
|
||||
inline void rolw(Register Rd, Register Rn, unsigned imm) {
|
||||
extrw(Rd, Rn, Rn, (32 - imm));
|
||||
}
|
||||
|
||||
inline void rol(Register Rd, Register Rn, unsigned imm) {
|
||||
extr(Rd, Rn, Rn, (64 - imm));
|
||||
}
|
||||
|
||||
using Assembler::rax1;
|
||||
using Assembler::eor3;
|
||||
|
||||
inline void rax1(Register Rd, Register Rn, Register Rm) {
|
||||
eor(Rd, Rn, Rm, ROR, 63); // Rd = Rn ^ rol(Rm, 1)
|
||||
}
|
||||
|
||||
inline void eor3(Register Rd, Register Rn, Register Rm, Register Rk) {
|
||||
assert(Rd != Rn, "Use tmp register");
|
||||
eor(Rd, Rm, Rk);
|
||||
eor(Rd, Rd, Rn);
|
||||
}
|
||||
|
||||
inline void sxtbw(Register Rd, Register Rn) {
|
||||
sbfmw(Rd, Rn, 0, 7);
|
||||
}
|
||||
@@ -935,6 +961,8 @@ public:
|
||||
|
||||
void set_narrow_oop(Register dst, jobject obj);
|
||||
|
||||
void decode_klass_not_null_for_aot(Register dst, Register src);
|
||||
void encode_klass_not_null_for_aot(Register dst, Register src);
|
||||
void encode_klass_not_null(Register r);
|
||||
void decode_klass_not_null(Register r);
|
||||
void encode_klass_not_null(Register dst, Register src);
|
||||
|
||||
@@ -543,7 +543,7 @@ void MacroAssembler::generate__ieee754_rem_pio2(address npio2_hw,
|
||||
// }
|
||||
//
|
||||
// /* compute n */
|
||||
// z = scalbnA(z,q0); /* actual value of z */
|
||||
// z = scalbn(z,q0); /* actual value of z */
|
||||
// z -= 8.0*floor(z*0.125); /* trim off integer >= 8 */
|
||||
// n = (int) z;
|
||||
// z -= (double)n;
|
||||
@@ -576,7 +576,7 @@ void MacroAssembler::generate__ieee754_rem_pio2(address npio2_hw,
|
||||
// }
|
||||
// if(ih==2) {
|
||||
// z = one - z;
|
||||
// if(carry!=0) z -= scalbnA(one,q0);
|
||||
// if(carry!=0) z -= scalbn(one,q0);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
@@ -602,7 +602,7 @@ void MacroAssembler::generate__ieee754_rem_pio2(address npio2_hw,
|
||||
// jz -= 1; q0 -= 24;
|
||||
// while(iq[jz]==0) { jz--; q0-=24;}
|
||||
// } else { /* break z into 24-bit if necessary */
|
||||
// z = scalbnA(z,-q0);
|
||||
// z = scalbn(z,-q0);
|
||||
// if(z>=two24B) {
|
||||
// fw = (double)((int)(twon24*z));
|
||||
// iq[jz] = (int)(z-two24B*fw);
|
||||
@@ -612,7 +612,7 @@ void MacroAssembler::generate__ieee754_rem_pio2(address npio2_hw,
|
||||
// }
|
||||
//
|
||||
// /* convert integer "bit" chunk to floating-point value */
|
||||
// fw = scalbnA(one,q0);
|
||||
// fw = scalbn(one,q0);
|
||||
// for(i=jz;i>=0;i--) {
|
||||
// q[i] = fw*(double)iq[i]; fw*=twon24;
|
||||
// }
|
||||
@@ -925,7 +925,7 @@ void MacroAssembler::generate__kernel_rem_pio2(address two_over_pi, address pio2
|
||||
fmovd(v25, 1.0);
|
||||
fsubd(v18, v25, v18); // z = one - z;
|
||||
cbzw(rscratch2, IH_HANDLED);
|
||||
fsubd(v18, v18, v30); // z -= scalbnA(one,q0);
|
||||
fsubd(v18, v18, v30); // z -= scalbn(one,q0);
|
||||
}
|
||||
}
|
||||
bind(IH_HANDLED);
|
||||
@@ -1026,7 +1026,7 @@ void MacroAssembler::generate__kernel_rem_pio2(address two_over_pi, address pio2
|
||||
bind(Z_ZERO_CHECK_DONE);
|
||||
// convert integer "bit" chunk to floating-point value
|
||||
// v17 = twon24
|
||||
// update v30, which was scalbnA(1.0, <old q0>);
|
||||
// update v30, which was scalbn(1.0, <old q0>);
|
||||
addw(tmp2, rscratch1, 1023); // biased exponent
|
||||
lsl(tmp2, tmp2, 52); // put at correct position
|
||||
mov(i, jz);
|
||||
|
||||
@@ -212,11 +212,6 @@ void NativeMovRegMem::verify() {
|
||||
|
||||
void NativeJump::verify() { ; }
|
||||
|
||||
|
||||
void NativeJump::check_verified_entry_alignment(address entry, address verified_entry) {
|
||||
}
|
||||
|
||||
|
||||
address NativeJump::jump_destination() const {
|
||||
address dest = MacroAssembler::target_addr_for_insn_or_null(instruction_address());
|
||||
|
||||
@@ -345,10 +340,6 @@ bool NativeInstruction::is_movk() {
|
||||
return Instruction_aarch64::extract(int_at(0), 30, 23) == 0b11100101;
|
||||
}
|
||||
|
||||
bool NativeInstruction::is_sigill_not_entrant() {
|
||||
return uint_at(0) == 0xd4bbd5a1; // dcps1 #0xdead
|
||||
}
|
||||
|
||||
void NativeIllegalInstruction::insert(address code_pos) {
|
||||
*(juint*)code_pos = 0xd4bbd5a1; // dcps1 #0xdead
|
||||
}
|
||||
@@ -359,45 +350,8 @@ bool NativeInstruction::is_stop() {
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
// MT-safe inserting of a jump over a jump or a nop (used by
|
||||
// nmethod::make_not_entrant)
|
||||
|
||||
void NativeJump::patch_verified_entry(address entry, address verified_entry, address dest) {
|
||||
|
||||
assert(dest == SharedRuntime::get_handle_wrong_method_stub(), "expected fixed destination of patch");
|
||||
assert(nativeInstruction_at(verified_entry)->is_jump_or_nop()
|
||||
|| nativeInstruction_at(verified_entry)->is_sigill_not_entrant(),
|
||||
"Aarch64 cannot replace non-jump with jump");
|
||||
|
||||
// Patch this nmethod atomically.
|
||||
if (Assembler::reachable_from_branch_at(verified_entry, dest)) {
|
||||
ptrdiff_t disp = dest - verified_entry;
|
||||
guarantee(disp < 1 << 27 && disp > - (1 << 27), "branch overflow");
|
||||
|
||||
unsigned int insn = (0b000101 << 26) | ((disp >> 2) & 0x3ffffff);
|
||||
*(unsigned int*)verified_entry = insn;
|
||||
} else {
|
||||
// We use an illegal instruction for marking a method as not_entrant.
|
||||
NativeIllegalInstruction::insert(verified_entry);
|
||||
}
|
||||
|
||||
ICache::invalidate_range(verified_entry, instruction_size);
|
||||
}
|
||||
|
||||
void NativeGeneralJump::verify() { }
|
||||
|
||||
void NativeGeneralJump::insert_unconditional(address code_pos, address entry) {
|
||||
NativeGeneralJump* n_jump = (NativeGeneralJump*)code_pos;
|
||||
|
||||
CodeBuffer cb(code_pos, instruction_size);
|
||||
MacroAssembler a(&cb);
|
||||
|
||||
a.movptr(rscratch1, (uintptr_t)entry);
|
||||
a.br(rscratch1);
|
||||
|
||||
ICache::invalidate_range(code_pos, instruction_size);
|
||||
}
|
||||
|
||||
// MT-safe patching of a long jump instruction.
|
||||
void NativeGeneralJump::replace_mt_safe(address instr_addr, address code_buffer) {
|
||||
ShouldNotCallThis();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2108, Red Hat Inc. All rights reserved.
|
||||
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2025, 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
|
||||
@@ -83,7 +83,6 @@ public:
|
||||
bool is_safepoint_poll();
|
||||
bool is_movz();
|
||||
bool is_movk();
|
||||
bool is_sigill_not_entrant();
|
||||
bool is_stop();
|
||||
|
||||
protected:
|
||||
@@ -360,9 +359,6 @@ public:
|
||||
|
||||
// Insertion of native jump instruction
|
||||
static void insert(address code_pos, address entry);
|
||||
// MT-safe insertion of native jump at verified method entry
|
||||
static void check_verified_entry_alignment(address entry, address verified_entry);
|
||||
static void patch_verified_entry(address entry, address verified_entry, address dest);
|
||||
};
|
||||
|
||||
inline NativeJump* nativeJump_at(address address) {
|
||||
@@ -383,7 +379,6 @@ public:
|
||||
address jump_destination() const;
|
||||
void set_jump_destination(address dest);
|
||||
|
||||
static void insert_unconditional(address code_pos, address entry);
|
||||
static void replace_mt_safe(address instr_addr, address code_buffer);
|
||||
static void verify();
|
||||
};
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#ifdef COMPILER2
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "code/aotCodeCache.hpp"
|
||||
#include "code/vmreg.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "opto/runtime.hpp"
|
||||
@@ -60,10 +61,15 @@ class SimpleRuntimeFrame {
|
||||
|
||||
//------------------------------generate_uncommon_trap_blob--------------------
|
||||
UncommonTrapBlob* OptoRuntime::generate_uncommon_trap_blob() {
|
||||
const char* name = OptoRuntime::stub_name(StubId::c2_uncommon_trap_id);
|
||||
CodeBlob* blob = AOTCodeCache::load_code_blob(AOTCodeEntry::C2Blob, BlobId::c2_uncommon_trap_id);
|
||||
if (blob != nullptr) {
|
||||
return blob->as_uncommon_trap_blob();
|
||||
}
|
||||
|
||||
// Allocate space for the code
|
||||
ResourceMark rm;
|
||||
// Setup code generation tools
|
||||
const char* name = OptoRuntime::stub_name(OptoStubId::uncommon_trap_id);
|
||||
CodeBuffer buffer(name, 2048, 1024);
|
||||
if (buffer.blob() == nullptr) {
|
||||
return nullptr;
|
||||
@@ -246,8 +252,10 @@ UncommonTrapBlob* OptoRuntime::generate_uncommon_trap_blob() {
|
||||
// Make sure all code is generated
|
||||
masm->flush();
|
||||
|
||||
return UncommonTrapBlob::create(&buffer, oop_maps,
|
||||
SimpleRuntimeFrame::framesize >> 1);
|
||||
UncommonTrapBlob *ut_blob = UncommonTrapBlob::create(&buffer, oop_maps,
|
||||
SimpleRuntimeFrame::framesize >> 1);
|
||||
AOTCodeCache::store_code_blob(*ut_blob, AOTCodeEntry::C2Blob, BlobId::c2_uncommon_trap_id);
|
||||
return ut_blob;
|
||||
}
|
||||
|
||||
//------------------------------generate_exception_blob---------------------------
|
||||
@@ -283,10 +291,15 @@ ExceptionBlob* OptoRuntime::generate_exception_blob() {
|
||||
|
||||
assert(SimpleRuntimeFrame::framesize % 4 == 0, "sp not 16-byte aligned");
|
||||
|
||||
const char* name = OptoRuntime::stub_name(StubId::c2_exception_id);
|
||||
CodeBlob* blob = AOTCodeCache::load_code_blob(AOTCodeEntry::C2Blob, (uint)BlobId::c2_exception_id, name);
|
||||
if (blob != nullptr) {
|
||||
return blob->as_exception_blob();
|
||||
}
|
||||
|
||||
// Allocate space for the code
|
||||
ResourceMark rm;
|
||||
// Setup code generation tools
|
||||
const char* name = OptoRuntime::stub_name(OptoStubId::exception_id);
|
||||
CodeBuffer buffer(name, 2048, 1024);
|
||||
if (buffer.blob() == nullptr) {
|
||||
return nullptr;
|
||||
@@ -384,7 +397,9 @@ ExceptionBlob* OptoRuntime::generate_exception_blob() {
|
||||
masm->flush();
|
||||
|
||||
// Set exception blob
|
||||
return ExceptionBlob::create(&buffer, oop_maps, SimpleRuntimeFrame::framesize >> 1);
|
||||
ExceptionBlob* ex_blob = ExceptionBlob::create(&buffer, oop_maps, SimpleRuntimeFrame::framesize >> 1);
|
||||
AOTCodeCache::store_code_blob(*ex_blob, AOTCodeEntry::C2Blob, BlobId::c2_exception_id);
|
||||
return ex_blob;
|
||||
}
|
||||
#endif // COMPILER2
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "code/aotCodeCache.hpp"
|
||||
#include "code/codeCache.hpp"
|
||||
#include "code/compiledIC.hpp"
|
||||
#include "code/debugInfoRec.hpp"
|
||||
@@ -1876,7 +1877,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
|
||||
// Check for safepoint operation in progress and/or pending suspend requests.
|
||||
{
|
||||
// No need for acquire as Java threads always disarm themselves.
|
||||
__ safepoint_poll(safepoint_in_progress, true /* at_return */, false /* acquire */, false /* in_nmethod */);
|
||||
__ safepoint_poll(safepoint_in_progress, true /* at_return */, false /* in_nmethod */);
|
||||
__ ldrw(rscratch1, Address(rthread, JavaThread::suspend_flags_offset()));
|
||||
__ cbnzw(rscratch1, safepoint_in_progress);
|
||||
__ bind(safepoint_in_progress_done);
|
||||
@@ -1984,6 +1985,23 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
|
||||
|
||||
__ leave();
|
||||
|
||||
#if INCLUDE_JFR
|
||||
// We need to do a poll test after unwind in case the sampler
|
||||
// managed to sample the native frame after returning to Java.
|
||||
Label L_return;
|
||||
__ ldr(rscratch1, Address(rthread, JavaThread::polling_word_offset()));
|
||||
address poll_test_pc = __ pc();
|
||||
__ relocate(relocInfo::poll_return_type);
|
||||
__ tbz(rscratch1, log2i_exact(SafepointMechanism::poll_bit()), L_return);
|
||||
assert(SharedRuntime::polling_page_return_handler_blob() != nullptr,
|
||||
"polling page return stub not created yet");
|
||||
address stub = SharedRuntime::polling_page_return_handler_blob()->entry_point();
|
||||
__ adr(rscratch1, InternalAddress(poll_test_pc));
|
||||
__ str(rscratch1, Address(rthread, JavaThread::saved_exception_pc_offset()));
|
||||
__ far_jump(RuntimeAddress(stub));
|
||||
__ bind(L_return);
|
||||
#endif // INCLUDE_JFR
|
||||
|
||||
// Any exception pending?
|
||||
__ ldr(rscratch1, Address(rthread, in_bytes(Thread::pending_exception_offset())));
|
||||
__ cbnz(rscratch1, exception_pending);
|
||||
@@ -2183,7 +2201,13 @@ void SharedRuntime::generate_deopt_blob() {
|
||||
pad += 512; // Increase the buffer size when compiling for JVMCI
|
||||
}
|
||||
#endif
|
||||
const char* name = SharedRuntime::stub_name(SharedStubId::deopt_id);
|
||||
const char* name = SharedRuntime::stub_name(StubId::shared_deopt_id);
|
||||
CodeBlob* blob = AOTCodeCache::load_code_blob(AOTCodeEntry::SharedBlob, BlobId::shared_deopt_id);
|
||||
if (blob != nullptr) {
|
||||
_deopt_blob = blob->as_deoptimization_blob();
|
||||
return;
|
||||
}
|
||||
|
||||
CodeBuffer buffer(name, 2048+pad, 1024);
|
||||
MacroAssembler* masm = new MacroAssembler(&buffer);
|
||||
int frame_size_in_words;
|
||||
@@ -2547,6 +2571,8 @@ void SharedRuntime::generate_deopt_blob() {
|
||||
_deopt_blob->set_implicit_exception_uncommon_trap_offset(implicit_exception_uncommon_trap_offset);
|
||||
}
|
||||
#endif
|
||||
|
||||
AOTCodeCache::store_code_blob(*_deopt_blob, AOTCodeEntry::SharedBlob, BlobId::shared_deopt_id);
|
||||
}
|
||||
|
||||
// Number of stack slots between incoming argument block and the start of
|
||||
@@ -2572,23 +2598,27 @@ VMReg SharedRuntime::thread_register() {
|
||||
// Generate a special Compile2Runtime blob that saves all registers,
|
||||
// and setup oopmap.
|
||||
//
|
||||
SafepointBlob* SharedRuntime::generate_handler_blob(SharedStubId id, address call_ptr) {
|
||||
SafepointBlob* SharedRuntime::generate_handler_blob(StubId id, address call_ptr) {
|
||||
assert(is_polling_page_id(id), "expected a polling page stub id");
|
||||
|
||||
// Allocate space for the code. Setup code generation tools.
|
||||
const char* name = SharedRuntime::stub_name(id);
|
||||
CodeBlob* blob = AOTCodeCache::load_code_blob(AOTCodeEntry::SharedBlob, StubInfo::blob(id));
|
||||
if (blob != nullptr) {
|
||||
return blob->as_safepoint_blob();
|
||||
}
|
||||
|
||||
ResourceMark rm;
|
||||
OopMapSet *oop_maps = new OopMapSet();
|
||||
OopMap* map;
|
||||
|
||||
// Allocate space for the code. Setup code generation tools.
|
||||
const char* name = SharedRuntime::stub_name(id);
|
||||
CodeBuffer buffer(name, 2048, 1024);
|
||||
MacroAssembler* masm = new MacroAssembler(&buffer);
|
||||
|
||||
address start = __ pc();
|
||||
address call_pc = nullptr;
|
||||
int frame_size_in_words;
|
||||
bool cause_return = (id == SharedStubId::polling_page_return_handler_id);
|
||||
RegisterSaver reg_save(id == SharedStubId::polling_page_vectors_safepoint_handler_id /* save_vectors */);
|
||||
bool cause_return = (id == StubId::shared_polling_page_return_handler_id);
|
||||
RegisterSaver reg_save(id == StubId::shared_polling_page_vectors_safepoint_handler_id /* save_vectors */);
|
||||
|
||||
// When the signal occurred, the LR was either signed and stored on the stack (in which
|
||||
// case it will be restored from the stack before being used) or unsigned and not stored
|
||||
@@ -2689,7 +2719,10 @@ SafepointBlob* SharedRuntime::generate_handler_blob(SharedStubId id, address cal
|
||||
masm->flush();
|
||||
|
||||
// Fill-out other meta info
|
||||
return SafepointBlob::create(&buffer, oop_maps, frame_size_in_words);
|
||||
SafepointBlob* sp_blob = SafepointBlob::create(&buffer, oop_maps, frame_size_in_words);
|
||||
|
||||
AOTCodeCache::store_code_blob(*sp_blob, AOTCodeEntry::SharedBlob, StubInfo::blob(id));
|
||||
return sp_blob;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2700,14 +2733,18 @@ SafepointBlob* SharedRuntime::generate_handler_blob(SharedStubId id, address cal
|
||||
// but since this is generic code we don't know what they are and the caller
|
||||
// must do any gc of the args.
|
||||
//
|
||||
RuntimeStub* SharedRuntime::generate_resolve_blob(SharedStubId id, address destination) {
|
||||
RuntimeStub* SharedRuntime::generate_resolve_blob(StubId id, address destination) {
|
||||
assert (StubRoutines::forward_exception_entry() != nullptr, "must be generated before");
|
||||
assert(is_resolve_id(id), "expected a resolve stub id");
|
||||
|
||||
const char* name = SharedRuntime::stub_name(id);
|
||||
CodeBlob* blob = AOTCodeCache::load_code_blob(AOTCodeEntry::SharedBlob, StubInfo::blob(id));
|
||||
if (blob != nullptr) {
|
||||
return blob->as_runtime_stub();
|
||||
}
|
||||
|
||||
// allocate space for the code
|
||||
ResourceMark rm;
|
||||
|
||||
const char* name = SharedRuntime::stub_name(id);
|
||||
CodeBuffer buffer(name, 1000, 512);
|
||||
MacroAssembler* masm = new MacroAssembler(&buffer);
|
||||
|
||||
@@ -2780,7 +2817,10 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(SharedStubId id, address desti
|
||||
|
||||
// return the blob
|
||||
// frame_size_words or bytes??
|
||||
return RuntimeStub::new_runtime_stub(name, &buffer, frame_complete, frame_size_in_words, oop_maps, true);
|
||||
RuntimeStub* rs_blob = RuntimeStub::new_runtime_stub(name, &buffer, frame_complete, frame_size_in_words, oop_maps, true);
|
||||
|
||||
AOTCodeCache::store_code_blob(*rs_blob, AOTCodeEntry::SharedBlob, StubInfo::blob(id));
|
||||
return rs_blob;
|
||||
}
|
||||
|
||||
// Continuation point for throwing of implicit exceptions that are
|
||||
@@ -2799,7 +2839,7 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(SharedStubId id, address desti
|
||||
// otherwise assume that stack unwinding will be initiated, so
|
||||
// caller saved registers were assumed volatile in the compiler.
|
||||
|
||||
RuntimeStub* SharedRuntime::generate_throw_exception(SharedStubId id, address runtime_entry) {
|
||||
RuntimeStub* SharedRuntime::generate_throw_exception(StubId id, address runtime_entry) {
|
||||
assert(is_throw_id(id), "expected a throw stub id");
|
||||
|
||||
const char* name = SharedRuntime::stub_name(id);
|
||||
@@ -2820,10 +2860,15 @@ RuntimeStub* SharedRuntime::generate_throw_exception(SharedStubId id, address ru
|
||||
int insts_size = 512;
|
||||
int locs_size = 64;
|
||||
|
||||
ResourceMark rm;
|
||||
const char* timer_msg = "SharedRuntime generate_throw_exception";
|
||||
TraceTime timer(timer_msg, TRACETIME_LOG(Info, startuptime));
|
||||
|
||||
CodeBlob* blob = AOTCodeCache::load_code_blob(AOTCodeEntry::SharedBlob, StubInfo::blob(id));
|
||||
if (blob != nullptr) {
|
||||
return blob->as_runtime_stub();
|
||||
}
|
||||
|
||||
ResourceMark rm;
|
||||
CodeBuffer code(name, insts_size, locs_size);
|
||||
OopMapSet* oop_maps = new OopMapSet();
|
||||
MacroAssembler* masm = new MacroAssembler(&code);
|
||||
@@ -2850,7 +2895,7 @@ RuntimeStub* SharedRuntime::generate_throw_exception(SharedStubId id, address ru
|
||||
|
||||
__ mov(c_rarg0, rthread);
|
||||
BLOCK_COMMENT("call runtime_entry");
|
||||
__ mov(rscratch1, runtime_entry);
|
||||
__ lea(rscratch1, RuntimeAddress(runtime_entry));
|
||||
__ blr(rscratch1);
|
||||
|
||||
// Generate oop map
|
||||
@@ -2883,6 +2928,8 @@ RuntimeStub* SharedRuntime::generate_throw_exception(SharedStubId id, address ru
|
||||
frame_complete,
|
||||
(framesize >> (LogBytesPerWord - LogBytesPerInt)),
|
||||
oop_maps, false);
|
||||
AOTCodeCache::store_code_blob(*stub, AOTCodeEntry::SharedBlob, StubInfo::blob(id));
|
||||
|
||||
return stub;
|
||||
}
|
||||
|
||||
@@ -2912,7 +2959,7 @@ RuntimeStub* SharedRuntime::generate_jfr_write_checkpoint() {
|
||||
|
||||
int insts_size = 1024;
|
||||
int locs_size = 64;
|
||||
const char* name = SharedRuntime::stub_name(SharedStubId::jfr_write_checkpoint_id);
|
||||
const char* name = SharedRuntime::stub_name(StubId::shared_jfr_write_checkpoint_id);
|
||||
CodeBuffer code(name, insts_size, locs_size);
|
||||
OopMapSet* oop_maps = new OopMapSet();
|
||||
MacroAssembler* masm = new MacroAssembler(&code);
|
||||
@@ -2951,7 +2998,7 @@ RuntimeStub* SharedRuntime::generate_jfr_return_lease() {
|
||||
int insts_size = 1024;
|
||||
int locs_size = 64;
|
||||
|
||||
const char* name = SharedRuntime::stub_name(SharedStubId::jfr_return_lease_id);
|
||||
const char* name = SharedRuntime::stub_name(StubId::shared_jfr_return_lease_id);
|
||||
CodeBuffer code(name, insts_size, locs_size);
|
||||
OopMapSet* oop_maps = new OopMapSet();
|
||||
MacroAssembler* masm = new MacroAssembler(&code);
|
||||
|
||||
@@ -19,42 +19,34 @@
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.runtime;
|
||||
#include "spin_wait_aarch64.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
|
||||
import sun.jvm.hotspot.types.TypeDataBase;
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/** Encapsulates the LockingMode enum in globalDefinitions.hpp in
|
||||
the VM. */
|
||||
|
||||
public class LockingMode {
|
||||
private static int monitor;
|
||||
private static int legacy;
|
||||
private static int lightweight;
|
||||
|
||||
static {
|
||||
VM.registerVMInitializedObserver(
|
||||
(o, d) -> initialize(VM.getVM().getTypeDataBase()));
|
||||
}
|
||||
|
||||
private static synchronized void initialize(TypeDataBase db) {
|
||||
monitor = db.lookupIntConstant("LM_MONITOR").intValue();
|
||||
legacy = db.lookupIntConstant("LM_LEGACY").intValue();
|
||||
lightweight = db.lookupIntConstant("LM_LIGHTWEIGHT").intValue();
|
||||
}
|
||||
|
||||
public static int getMonitor() {
|
||||
return monitor;
|
||||
}
|
||||
|
||||
public static int getLegacy() {
|
||||
return legacy;
|
||||
}
|
||||
|
||||
public static int getLightweight() {
|
||||
return lightweight;
|
||||
}
|
||||
bool SpinWait::supports(const char *name) {
|
||||
return name != nullptr &&
|
||||
(strcmp(name, "nop") == 0 ||
|
||||
strcmp(name, "isb") == 0 ||
|
||||
strcmp(name, "yield") == 0 ||
|
||||
strcmp(name, "sb") == 0 ||
|
||||
strcmp(name, "none") == 0);
|
||||
}
|
||||
|
||||
SpinWait::Inst SpinWait::from_name(const char* name) {
|
||||
assert(supports(name), "checked by OnSpinWaitInstNameConstraintFunc");
|
||||
|
||||
if (strcmp(name, "nop") == 0) {
|
||||
return SpinWait::NOP;
|
||||
} else if (strcmp(name, "isb") == 0) {
|
||||
return SpinWait::ISB;
|
||||
} else if (strcmp(name, "yield") == 0) {
|
||||
return SpinWait::YIELD;
|
||||
} else if (strcmp(name, "sb") == 0) {
|
||||
return SpinWait::SB;
|
||||
}
|
||||
|
||||
return SpinWait::NONE;
|
||||
}
|
||||
@@ -19,7 +19,6 @@
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_AARCH64_SPIN_WAIT_AARCH64_HPP
|
||||
@@ -31,18 +30,24 @@ public:
|
||||
NONE = -1,
|
||||
NOP,
|
||||
ISB,
|
||||
YIELD
|
||||
YIELD,
|
||||
SB
|
||||
};
|
||||
|
||||
private:
|
||||
Inst _inst;
|
||||
int _count;
|
||||
|
||||
Inst from_name(const char *name);
|
||||
|
||||
public:
|
||||
SpinWait(Inst inst = NONE, int count = 0) : _inst(inst), _count(count) {}
|
||||
SpinWait(Inst inst = NONE, int count = 0) : _inst(inst), _count(inst == NONE ? 0 : count) {}
|
||||
SpinWait(const char *name, int count) : SpinWait(from_name(name), count) {}
|
||||
|
||||
Inst inst() const { return _inst; }
|
||||
int inst_count() const { return _count; }
|
||||
|
||||
static bool supports(const char *name);
|
||||
};
|
||||
|
||||
#endif // CPU_AARCH64_SPIN_WAIT_AARCH64_HPP
|
||||
|
||||
@@ -26,6 +26,13 @@
|
||||
#ifndef CPU_AARCH64_STUBDECLARATIONS_HPP
|
||||
#define CPU_AARCH64_STUBDECLARATIONS_HPP
|
||||
|
||||
#define STUBGEN_PREUNIVERSE_BLOBS_ARCH_DO(do_stub, \
|
||||
do_arch_blob, \
|
||||
do_arch_entry, \
|
||||
do_arch_entry_init) \
|
||||
do_arch_blob(preuniverse, 0) \
|
||||
|
||||
|
||||
#define STUBGEN_INITIAL_BLOBS_ARCH_DO(do_stub, \
|
||||
do_arch_blob, \
|
||||
do_arch_entry, \
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -865,6 +865,10 @@ void TemplateInterpreterGenerator::lock_method() {
|
||||
// rcpool: cp cache
|
||||
// stack_pointer: previous sp
|
||||
void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
|
||||
// Save ConstMethod* in r5_const_method for later use to avoid loading multiple times
|
||||
Register r5_const_method = r5;
|
||||
__ ldr(r5_const_method, Address(rmethod, Method::const_offset()));
|
||||
|
||||
// initialize fixed part of activation frame
|
||||
if (native_call) {
|
||||
__ sub(esp, sp, 14 * wordSize);
|
||||
@@ -875,8 +879,7 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
|
||||
__ stp(zr, zr, Address(sp, 12 * wordSize));
|
||||
} else {
|
||||
__ sub(esp, sp, 12 * wordSize);
|
||||
__ ldr(rscratch1, Address(rmethod, Method::const_offset())); // get ConstMethod
|
||||
__ add(rbcp, rscratch1, in_bytes(ConstMethod::codes_offset())); // get codebase
|
||||
__ add(rbcp, r5_const_method, in_bytes(ConstMethod::codes_offset())); // get codebase
|
||||
__ mov(rscratch1, frame::interpreter_frame_initial_sp_offset);
|
||||
__ stp(rscratch1, rbcp, Address(__ pre(sp, -12 * wordSize)));
|
||||
}
|
||||
@@ -896,9 +899,10 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
|
||||
__ stp(rfp, lr, Address(sp, 10 * wordSize));
|
||||
__ lea(rfp, Address(sp, 10 * wordSize));
|
||||
|
||||
__ ldr(rcpool, Address(rmethod, Method::const_offset()));
|
||||
__ ldr(rcpool, Address(rcpool, ConstMethod::constants_offset()));
|
||||
__ ldr(rcpool, Address(rcpool, ConstantPool::cache_offset()));
|
||||
// Save ConstantPool* in r11_constants for later use to avoid loading multiple times
|
||||
Register r11_constants = r11;
|
||||
__ ldr(r11_constants, Address(r5_const_method, ConstMethod::constants_offset()));
|
||||
__ ldr(rcpool, Address(r11_constants, ConstantPool::cache_offset()));
|
||||
__ sub(rscratch1, rlocals, rfp);
|
||||
__ lsr(rscratch1, rscratch1, Interpreter::logStackElementSize); // rscratch1 = rlocals - fp();
|
||||
// Store relativized rlocals, see frame::interpreter_frame_locals().
|
||||
@@ -908,11 +912,12 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
|
||||
// leave last_sp as null
|
||||
__ stp(zr, r19_sender_sp, Address(sp, 8 * wordSize));
|
||||
|
||||
// Get mirror
|
||||
__ load_mirror(r10, rmethod, r5, rscratch2);
|
||||
// Get mirror. Resolve ConstantPool* -> InstanceKlass* -> Java mirror.
|
||||
__ ldr(r10, Address(r11_constants, ConstantPool::pool_holder_offset()));
|
||||
__ ldr(r10, Address(r10, in_bytes(Klass::java_mirror_offset())));
|
||||
__ resolve_oop_handle(r10, rscratch1, rscratch2);
|
||||
if (! native_call) {
|
||||
__ ldr(rscratch1, Address(rmethod, Method::const_offset()));
|
||||
__ ldrh(rscratch1, Address(rscratch1, ConstMethod::max_stack_offset()));
|
||||
__ ldrh(rscratch1, Address(r5_const_method, ConstMethod::max_stack_offset()));
|
||||
__ add(rscratch1, rscratch1, MAX2(3, Method::extra_stack_entries()));
|
||||
__ sub(rscratch1, sp, rscratch1, ext::uxtw, 3);
|
||||
__ andr(rscratch1, rscratch1, -16);
|
||||
@@ -1013,7 +1018,7 @@ address TemplateInterpreterGenerator::generate_CRC32_update_entry() {
|
||||
|
||||
Label slow_path;
|
||||
// If we need a safepoint check, generate full interpreter entry.
|
||||
__ safepoint_poll(slow_path, false /* at_return */, false /* acquire */, false /* in_nmethod */);
|
||||
__ safepoint_poll(slow_path, false /* at_return */, false /* in_nmethod */);
|
||||
|
||||
// We don't generate local frame and don't align stack because
|
||||
// we call stub code and there is no safepoint on this path.
|
||||
@@ -1060,7 +1065,7 @@ address TemplateInterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractI
|
||||
|
||||
Label slow_path;
|
||||
// If we need a safepoint check, generate full interpreter entry.
|
||||
__ safepoint_poll(slow_path, false /* at_return */, false /* acquire */, false /* in_nmethod */);
|
||||
__ safepoint_poll(slow_path, false /* at_return */, false /* in_nmethod */);
|
||||
|
||||
// We don't generate local frame and don't align stack because
|
||||
// we call stub code and there is no safepoint on this path.
|
||||
@@ -1450,7 +1455,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
Label L, Continue;
|
||||
|
||||
// No need for acquire as Java threads always disarm themselves.
|
||||
__ safepoint_poll(L, true /* at_return */, false /* acquire */, false /* in_nmethod */);
|
||||
__ safepoint_poll(L, true /* at_return */, false /* in_nmethod */);
|
||||
__ ldrw(rscratch2, Address(rthread, JavaThread::suspend_flags_offset()));
|
||||
__ cbz(rscratch2, Continue);
|
||||
__ bind(L);
|
||||
@@ -1593,6 +1598,30 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
__ bind(L);
|
||||
}
|
||||
|
||||
#if INCLUDE_JFR
|
||||
__ enter_jfr_critical_section();
|
||||
|
||||
// This poll test is to uphold the invariant that a JFR sampled frame
|
||||
// must not return to its caller without a prior safepoint poll check.
|
||||
// The earlier poll check in this routine is insufficient for this purpose
|
||||
// because the thread has transitioned back to Java.
|
||||
|
||||
Label slow_path;
|
||||
Label fast_path;
|
||||
__ safepoint_poll(slow_path, true /* at_return */, false /* in_nmethod */);
|
||||
__ br(Assembler::AL, fast_path);
|
||||
__ bind(slow_path);
|
||||
__ push(dtos);
|
||||
__ push(ltos);
|
||||
__ set_last_Java_frame(esp, rfp, __ pc(), rscratch1);
|
||||
__ super_call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::at_unwind), rthread);
|
||||
__ reset_last_Java_frame(true);
|
||||
__ pop(ltos);
|
||||
__ pop(dtos);
|
||||
__ bind(fast_path);
|
||||
|
||||
#endif // INCLUDE_JFR
|
||||
|
||||
// jvmti support
|
||||
// Note: This must happen _after_ handling/throwing any exceptions since
|
||||
// the exception handler code notifies the runtime of method exits
|
||||
@@ -1615,6 +1644,8 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
// remove frame anchor
|
||||
__ leave();
|
||||
|
||||
JFR_ONLY(__ leave_jfr_critical_section();)
|
||||
|
||||
// restore sender sp
|
||||
__ mov(sp, esp);
|
||||
|
||||
@@ -1862,6 +1893,7 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
|
||||
|
||||
Interpreter::_remove_activation_preserving_args_entry = __ pc();
|
||||
__ empty_expression_stack();
|
||||
__ restore_bcp(); // We could have returned from deoptimizing this frame, so restore rbcp.
|
||||
// Set the popframe_processing bit in pending_popframe_condition
|
||||
// indicating that we are currently handling popframe, so that
|
||||
// call_VMs that may happen later do not trigger new popframe
|
||||
|
||||
@@ -1144,6 +1144,7 @@ void TemplateTable::aastore() {
|
||||
// Get the value we will store
|
||||
__ ldr(r0, at_tos());
|
||||
// Now store using the appropriate barrier
|
||||
// Clobbers: r10, r11, r3
|
||||
do_oop_store(_masm, element_address, r0, IS_ARRAY);
|
||||
__ b(done);
|
||||
|
||||
@@ -1152,6 +1153,7 @@ void TemplateTable::aastore() {
|
||||
__ profile_null_seen(r2);
|
||||
|
||||
// Store a null
|
||||
// Clobbers: r10, r11, r3
|
||||
do_oop_store(_masm, element_address, noreg, IS_ARRAY);
|
||||
|
||||
// Pop stack arguments
|
||||
@@ -1757,7 +1759,7 @@ void TemplateTable::float_cmp(bool is_float, int unordered_result)
|
||||
|
||||
void TemplateTable::branch(bool is_jsr, bool is_wide)
|
||||
{
|
||||
__ profile_taken_branch(r0, r1);
|
||||
__ profile_taken_branch(r0);
|
||||
const ByteSize be_offset = MethodCounters::backedge_counter_offset() +
|
||||
InvocationCounter::counter_offset();
|
||||
const ByteSize inv_offset = MethodCounters::invocation_counter_offset() +
|
||||
@@ -1807,7 +1809,6 @@ void TemplateTable::branch(bool is_jsr, bool is_wide)
|
||||
if (UseLoopCounter) {
|
||||
// increment backedge counter for backward branches
|
||||
// r0: MDO
|
||||
// w1: MDO bumped taken-count
|
||||
// r2: target offset
|
||||
__ cmp(r2, zr);
|
||||
__ br(Assembler::GT, dispatch); // count only if backward branch
|
||||
@@ -1818,12 +1819,10 @@ void TemplateTable::branch(bool is_jsr, bool is_wide)
|
||||
__ ldr(rscratch1, Address(rmethod, Method::method_counters_offset()));
|
||||
__ cbnz(rscratch1, has_counters);
|
||||
__ push(r0);
|
||||
__ push(r1);
|
||||
__ push(r2);
|
||||
__ call_VM(noreg, CAST_FROM_FN_PTR(address,
|
||||
InterpreterRuntime::build_method_counters), rmethod);
|
||||
__ pop(r2);
|
||||
__ pop(r1);
|
||||
__ pop(r0);
|
||||
__ ldr(rscratch1, Address(rmethod, Method::method_counters_offset()));
|
||||
__ cbz(rscratch1, dispatch); // No MethodCounters allocated, OutOfMemory
|
||||
@@ -1890,6 +1889,8 @@ void TemplateTable::branch(bool is_jsr, bool is_wide)
|
||||
|
||||
__ mov(r19, r0); // save the nmethod
|
||||
|
||||
JFR_ONLY(__ enter_jfr_critical_section();)
|
||||
|
||||
call_VM(noreg, CAST_FROM_FN_PTR(address, SharedRuntime::OSR_migration_begin));
|
||||
|
||||
// r0 is OSR buffer, move it to expected parameter location
|
||||
@@ -1901,6 +1902,9 @@ void TemplateTable::branch(bool is_jsr, bool is_wide)
|
||||
Address(rfp, frame::interpreter_frame_sender_sp_offset * wordSize));
|
||||
// remove frame anchor
|
||||
__ leave();
|
||||
|
||||
JFR_ONLY(__ leave_jfr_critical_section();)
|
||||
|
||||
// Ensure compiled code always sees stack at proper alignment
|
||||
__ andr(sp, esp, -16);
|
||||
|
||||
@@ -2877,6 +2881,7 @@ void TemplateTable::putfield_or_static(int byte_no, bool is_static, RewriteContr
|
||||
__ pop(atos);
|
||||
if (!is_static) pop_and_check_object(obj);
|
||||
// Store into the field
|
||||
// Clobbers: r10, r11, r3
|
||||
do_oop_store(_masm, field, r0, IN_HEAP);
|
||||
if (rc == may_rewrite) {
|
||||
patch_bytecode(Bytecodes::_fast_aputfield, bc, r1, true, byte_no);
|
||||
@@ -3072,12 +3077,12 @@ void TemplateTable::fast_storefield(TosState state)
|
||||
// access constant pool cache
|
||||
__ load_field_entry(r2, r1);
|
||||
|
||||
// R1: field offset, R2: field holder, R3: flags
|
||||
load_resolved_field_entry(r2, r2, noreg, r1, r3);
|
||||
// R1: field offset, R2: field holder, R5: flags
|
||||
load_resolved_field_entry(r2, r2, noreg, r1, r5);
|
||||
|
||||
{
|
||||
Label notVolatile;
|
||||
__ tbz(r3, ResolvedFieldEntry::is_volatile_shift, notVolatile);
|
||||
__ tbz(r5, ResolvedFieldEntry::is_volatile_shift, notVolatile);
|
||||
__ membar(MacroAssembler::StoreStore | MacroAssembler::LoadStore);
|
||||
__ bind(notVolatile);
|
||||
}
|
||||
@@ -3093,6 +3098,7 @@ void TemplateTable::fast_storefield(TosState state)
|
||||
// access field
|
||||
switch (bytecode()) {
|
||||
case Bytecodes::_fast_aputfield:
|
||||
// Clobbers: r10, r11, r3
|
||||
do_oop_store(_masm, field, r0, IN_HEAP);
|
||||
break;
|
||||
case Bytecodes::_fast_lputfield:
|
||||
@@ -3125,7 +3131,7 @@ void TemplateTable::fast_storefield(TosState state)
|
||||
|
||||
{
|
||||
Label notVolatile;
|
||||
__ tbz(r3, ResolvedFieldEntry::is_volatile_shift, notVolatile);
|
||||
__ tbz(r5, ResolvedFieldEntry::is_volatile_shift, notVolatile);
|
||||
__ membar(MacroAssembler::StoreLoad | MacroAssembler::StoreStore);
|
||||
__ bind(notVolatile);
|
||||
}
|
||||
|
||||
@@ -51,21 +51,12 @@ uintptr_t VM_Version::_pac_mask;
|
||||
SpinWait VM_Version::_spin_wait;
|
||||
|
||||
static SpinWait get_spin_wait_desc() {
|
||||
if (strcmp(OnSpinWaitInst, "nop") == 0) {
|
||||
return SpinWait(SpinWait::NOP, OnSpinWaitInstCount);
|
||||
} else if (strcmp(OnSpinWaitInst, "isb") == 0) {
|
||||
return SpinWait(SpinWait::ISB, OnSpinWaitInstCount);
|
||||
} else if (strcmp(OnSpinWaitInst, "yield") == 0) {
|
||||
return SpinWait(SpinWait::YIELD, OnSpinWaitInstCount);
|
||||
} else if (strcmp(OnSpinWaitInst, "none") != 0) {
|
||||
vm_exit_during_initialization("The options for OnSpinWaitInst are nop, isb, yield, and none", OnSpinWaitInst);
|
||||
SpinWait spin_wait(OnSpinWaitInst, OnSpinWaitInstCount);
|
||||
if (spin_wait.inst() == SpinWait::SB && !VM_Version::supports_sb()) {
|
||||
vm_exit_during_initialization("OnSpinWaitInst is SB but current CPU does not support SB instruction");
|
||||
}
|
||||
|
||||
if (!FLAG_IS_DEFAULT(OnSpinWaitInstCount) && OnSpinWaitInstCount > 0) {
|
||||
vm_exit_during_initialization("OnSpinWaitInstCount cannot be used for OnSpinWaitInst 'none'");
|
||||
}
|
||||
|
||||
return SpinWait{};
|
||||
return spin_wait;
|
||||
}
|
||||
|
||||
void VM_Version::initialize() {
|
||||
@@ -379,7 +370,7 @@ void VM_Version::initialize() {
|
||||
FLAG_SET_DEFAULT(UseSHA3Intrinsics, true);
|
||||
}
|
||||
}
|
||||
} else if (UseSHA3Intrinsics) {
|
||||
} else if (UseSHA3Intrinsics && UseSIMDForSHA3Intrinsic) {
|
||||
warning("Intrinsics for SHA3-224, SHA3-256, SHA3-384 and SHA3-512 crypto hash functions not available on this CPU.");
|
||||
FLAG_SET_DEFAULT(UseSHA3Intrinsics, false);
|
||||
}
|
||||
|
||||
@@ -131,6 +131,7 @@ enum Ampere_CPU_Model {
|
||||
decl(SHA3, sha3, 17) \
|
||||
decl(SHA512, sha512, 21) \
|
||||
decl(SVE, sve, 22) \
|
||||
decl(SB, sb, 29) \
|
||||
decl(PACA, paca, 30) \
|
||||
/* flags above must follow Linux HWCAP */ \
|
||||
decl(SVEBITPERM, svebitperm, 27) \
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user