mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2026-01-11 19:11:41 +01:00
Compare commits
617 Commits
jbr-20+12
...
batrdmi/wa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
607dcb78a8 | ||
|
|
f9f5359629 | ||
|
|
6b19a747f7 | ||
|
|
7d7d9f9bf5 | ||
|
|
66c28a3606 | ||
|
|
e2321b5594 | ||
|
|
5813b10e65 | ||
|
|
d121a93cb1 | ||
|
|
f7638abee2 | ||
|
|
55b1310c24 | ||
|
|
bfe03f4bd1 | ||
|
|
15a09a1564 | ||
|
|
858380c36d | ||
|
|
a81b44d79d | ||
|
|
7f9aee3c7f | ||
|
|
0478a24483 | ||
|
|
c113772448 | ||
|
|
757194800f | ||
|
|
b9c4ac35ec | ||
|
|
adf8d95f7b | ||
|
|
b2986aef46 | ||
|
|
cea81933d9 | ||
|
|
6779e2c59b | ||
|
|
4b7c5f62a9 | ||
|
|
df204bb882 | ||
|
|
0d7fdcf415 | ||
|
|
73c8c50262 | ||
|
|
16cacd0b55 | ||
|
|
19496fcef9 | ||
|
|
9cb4769361 | ||
|
|
dc36d0afaf | ||
|
|
20ca5a41f4 | ||
|
|
e864ea8469 | ||
|
|
b3e31866ec | ||
|
|
4cdce4b44a | ||
|
|
2187957e7e | ||
|
|
14aa544c86 | ||
|
|
de5214531a | ||
|
|
ea6f74d64f | ||
|
|
56e174709b | ||
|
|
c5103ff4a8 | ||
|
|
49c103709e | ||
|
|
4b21d041d8 | ||
|
|
c1ee18adfb | ||
|
|
693e16b0a1 | ||
|
|
5ad126f446 | ||
|
|
ab8c1361bc | ||
|
|
2ceb80c60f | ||
|
|
703a6ef591 | ||
|
|
94a9b048af | ||
|
|
3a980b972f | ||
|
|
9bb932ce30 | ||
|
|
945950d863 | ||
|
|
d362e16924 | ||
|
|
07946aa49c | ||
|
|
2586b1a3c1 | ||
|
|
e1a77cfd5f | ||
|
|
3c7ae1225f | ||
|
|
619cd825b5 | ||
|
|
9d0009e92b | ||
|
|
3ebe5ad2d7 | ||
|
|
33d0618813 | ||
|
|
fba763f825 | ||
|
|
6053bf0f6a | ||
|
|
4435d56d3f | ||
|
|
fe70487d0b | ||
|
|
97f1321cb4 | ||
|
|
5e05e421ed | ||
|
|
e775acf889 | ||
|
|
9d116ec147 | ||
|
|
4b17d28a6d | ||
|
|
891156a744 | ||
|
|
e6c33e62b5 | ||
|
|
1bfcc2790a | ||
|
|
eb90c4fc04 | ||
|
|
4df4a1f8e2 | ||
|
|
35d17a00ab | ||
|
|
c5f462e83b | ||
|
|
269252aa3d | ||
|
|
6ed74ef654 | ||
|
|
8a148bc960 | ||
|
|
8713dfa64e | ||
|
|
542cc602a7 | ||
|
|
495c043533 | ||
|
|
d39d8c856a | ||
|
|
3466e99934 | ||
|
|
823b53d895 | ||
|
|
6a266c4de1 | ||
|
|
fe7a4617fe | ||
|
|
4cbac40de9 | ||
|
|
c1166a304d | ||
|
|
a1747ef81a | ||
|
|
67210abd04 | ||
|
|
7a194d31a3 | ||
|
|
b38bed6d0e | ||
|
|
118d93b3dc | ||
|
|
1fda8421b9 | ||
|
|
2d25c0a31c | ||
|
|
0ad6803ac2 | ||
|
|
cf84c8eaf2 | ||
|
|
f3a44a4835 | ||
|
|
37bd4fbe30 | ||
|
|
d4c9a88073 | ||
|
|
5dd851d872 | ||
|
|
85569e966c | ||
|
|
fef345b19f | ||
|
|
5c030cccae | ||
|
|
f888aa953c | ||
|
|
73f06468ae | ||
|
|
2ceebf681f | ||
|
|
ad7b7d40ce | ||
|
|
e38ae8a651 | ||
|
|
7012d4ba55 | ||
|
|
8c15f77aba | ||
|
|
6029120a5f | ||
|
|
8f5611593a | ||
|
|
e986a97a96 | ||
|
|
d4142d8441 | ||
|
|
0ec18382b7 | ||
|
|
87acfee3c3 | ||
|
|
f2c57186a4 | ||
|
|
536c9a512e | ||
|
|
f531dae4a0 | ||
|
|
ee6c39175b | ||
|
|
bd90c4cfa6 | ||
|
|
979efd4174 | ||
|
|
b9eeec2b6b | ||
|
|
13a5000d48 | ||
|
|
8ebebbce32 | ||
|
|
4bdd1c9148 | ||
|
|
b4e74aeabf | ||
|
|
953ce8da2c | ||
|
|
be82cff625 | ||
|
|
43dbf5899b | ||
|
|
755958e5ee | ||
|
|
1dafbe3f94 | ||
|
|
b2e86a6209 | ||
|
|
b22a38dedb | ||
|
|
121d4a5119 | ||
|
|
1166a8abd2 | ||
|
|
3644e26cef | ||
|
|
085949a117 | ||
|
|
b850f052d8 | ||
|
|
2dbedf0e93 | ||
|
|
4d6668e7ee | ||
|
|
5a9cd33632 | ||
|
|
f03934e270 | ||
|
|
3b476a1758 | ||
|
|
16047e8308 | ||
|
|
bf39b184ca | ||
|
|
f957ce9959 | ||
|
|
ae79af2ad6 | ||
|
|
07ed68efb2 | ||
|
|
090cdfc7a2 | ||
|
|
ed40d88f29 | ||
|
|
081691adf4 | ||
|
|
a4f2078bd6 | ||
|
|
c6e3daa5fa | ||
|
|
e137f9f2f0 | ||
|
|
4f44fd6308 | ||
|
|
edfb18a724 | ||
|
|
46633e644a | ||
|
|
f2a32d996a | ||
|
|
ccc1d31696 | ||
|
|
08a7ecf47e | ||
|
|
5fe837a35e | ||
|
|
8e9cfeb17c | ||
|
|
6e8f0387d6 | ||
|
|
bc668b994d | ||
|
|
03f25a9c69 | ||
|
|
a69ee85308 | ||
|
|
b8b9b97a1a | ||
|
|
fd594302f7 | ||
|
|
c7ab1caafb | ||
|
|
375f02fb21 | ||
|
|
d207da8a8c | ||
|
|
da4e96d596 | ||
|
|
48674d4f36 | ||
|
|
3b1bc21727 | ||
|
|
b8f9a915a2 | ||
|
|
1d26c4b149 | ||
|
|
3efbd5f0fa | ||
|
|
052a924985 | ||
|
|
c2ce43cbb0 | ||
|
|
f01573368f | ||
|
|
64da8620e1 | ||
|
|
b4e1e416da | ||
|
|
6d83482a6b | ||
|
|
6974978869 | ||
|
|
81fda1b756 | ||
|
|
7c60e6d2d6 | ||
|
|
9dce8652f2 | ||
|
|
b030c7de32 | ||
|
|
a07975bf3e | ||
|
|
88062eea67 | ||
|
|
aeef3ecdc4 | ||
|
|
5f6ad926d7 | ||
|
|
545ded1a82 | ||
|
|
29c70f1ab7 | ||
|
|
5d48da4574 | ||
|
|
ce85cac947 | ||
|
|
1decdcee71 | ||
|
|
8491fd5c12 | ||
|
|
6f8f28e756 | ||
|
|
8873192433 | ||
|
|
76f1865124 | ||
|
|
9db95edd01 | ||
|
|
9309786dbf | ||
|
|
3b7fc80b18 | ||
|
|
4fb424ba5f | ||
|
|
7515b304ca | ||
|
|
7401fe040d | ||
|
|
70d8428ebb | ||
|
|
30e3bf9da0 | ||
|
|
37f83b9b8e | ||
|
|
60616f243f | ||
|
|
ea6167104e | ||
|
|
c42ef70a45 | ||
|
|
94e14da0ef | ||
|
|
1ea0d6b424 | ||
|
|
c13e0ef3f8 | ||
|
|
79ccc791f2 | ||
|
|
5e1e449c11 | ||
|
|
d827fd830a | ||
|
|
9d76ac8a44 | ||
|
|
e5b65c40ea | ||
|
|
f8d9fa8873 | ||
|
|
6ad151d096 | ||
|
|
22b59b66d9 | ||
|
|
763d4bf074 | ||
|
|
739fdec7ea | ||
|
|
a11477ce25 | ||
|
|
71511283ce | ||
|
|
fb4979c05b | ||
|
|
112ca2b863 | ||
|
|
99017b06bf | ||
|
|
3419363e89 | ||
|
|
1abf971b93 | ||
|
|
bc12e9553d | ||
|
|
dd51f7e0b7 | ||
|
|
14c6ac457d | ||
|
|
02ea338177 | ||
|
|
49a7347ba5 | ||
|
|
aa48705ddd | ||
|
|
1ddc92fef5 | ||
|
|
1e222bccd3 | ||
|
|
43eff2b309 | ||
|
|
b88ee1ee22 | ||
|
|
aca4276e89 | ||
|
|
1f521a1204 | ||
|
|
5ae6bc23e8 | ||
|
|
968af74de4 | ||
|
|
36b61c5d7e | ||
|
|
2be315877b | ||
|
|
050eebf2e8 | ||
|
|
91a23d775f | ||
|
|
169a5d48af | ||
|
|
3675f4c2af | ||
|
|
543851db92 | ||
|
|
e2f8251490 | ||
|
|
6ecd08172b | ||
|
|
eca9749da0 | ||
|
|
2e20e7ec0f | ||
|
|
e45f3d5176 | ||
|
|
664e5b1d2e | ||
|
|
acd75e0f1c | ||
|
|
0b56b82243 | ||
|
|
acd5bcfc88 | ||
|
|
05c8cabdad | ||
|
|
eec992c6b0 | ||
|
|
f6d78cda85 | ||
|
|
a4dc035a97 | ||
|
|
f3ba332fdc | ||
|
|
df53fa752a | ||
|
|
5285035ed9 | ||
|
|
696287d6e8 | ||
|
|
48cc15602b | ||
|
|
f751e6087d | ||
|
|
4a6060ba2c | ||
|
|
0be2b2c2f1 | ||
|
|
bc2af47e1e | ||
|
|
d781ab09f7 | ||
|
|
a216960d71 | ||
|
|
3fa6778ab2 | ||
|
|
800e68d690 | ||
|
|
83abfa5d82 | ||
|
|
5652030f16 | ||
|
|
03f287d4ad | ||
|
|
d5bee4a0df | ||
|
|
47f233acec | ||
|
|
742bc041ea | ||
|
|
2283c3244f | ||
|
|
9f90eb0524 | ||
|
|
c6be2cd347 | ||
|
|
711e2520ad | ||
|
|
27b8e2f49e | ||
|
|
e1958971c9 | ||
|
|
84d7ff64d8 | ||
|
|
07afa3f41e | ||
|
|
0746bcb68f | ||
|
|
95ec2eaca3 | ||
|
|
d14e96d970 | ||
|
|
da4fdfbbf4 | ||
|
|
cd1cdcdb0d | ||
|
|
e9401e67b3 | ||
|
|
844a95b907 | ||
|
|
8d1dd6a6cf | ||
|
|
4e7cb156c8 | ||
|
|
8ecdaa6811 | ||
|
|
379f3094db | ||
|
|
12e3510f63 | ||
|
|
cb72f80925 | ||
|
|
cddd6def9f | ||
|
|
21008cad46 | ||
|
|
3b438a68ea | ||
|
|
caae53f4da | ||
|
|
cb5771dc2a | ||
|
|
5002eaa5cc | ||
|
|
e3358e77f5 | ||
|
|
df8ec09f8d | ||
|
|
09af637a9b | ||
|
|
584de68d78 | ||
|
|
bb422f5c14 | ||
|
|
0f28cb06ab | ||
|
|
84ee1a291c | ||
|
|
1b496064bf | ||
|
|
a07902bcbe | ||
|
|
fe541f05cc | ||
|
|
0fa7d9e8cd | ||
|
|
4020ed53dd | ||
|
|
8ff2c2639e | ||
|
|
6e23b43220 | ||
|
|
1f9ff41312 | ||
|
|
64b96e5cf5 | ||
|
|
f91762f56e | ||
|
|
8082c24a0d | ||
|
|
b920d2999f | ||
|
|
5725a93c07 | ||
|
|
ab7f58a377 | ||
|
|
d41f69f9c0 | ||
|
|
471e2f12b4 | ||
|
|
a93cf92635 | ||
|
|
36c9034ff1 | ||
|
|
cbd0688b32 | ||
|
|
04d7b7d574 | ||
|
|
d77c464c38 | ||
|
|
d7c1a7635d | ||
|
|
43f7f47ae0 | ||
|
|
26e08cf3d0 | ||
|
|
357a2cc22a | ||
|
|
b1ed40a87a | ||
|
|
b6ff8fa307 | ||
|
|
cfd44bb2cd | ||
|
|
01e7b88199 | ||
|
|
4b8399b5f0 | ||
|
|
a8f0f575ab | ||
|
|
746f5f589d | ||
|
|
4b297c1c16 | ||
|
|
dfb9c06633 | ||
|
|
f42caefe2e | ||
|
|
5feca688df | ||
|
|
39cd1635bf | ||
|
|
7765942aee | ||
|
|
11e7d53b23 | ||
|
|
141d5f5dee | ||
|
|
3beca2db07 | ||
|
|
9a40b76ac5 | ||
|
|
bb9aa4eae6 | ||
|
|
4cec141a90 | ||
|
|
6beeb8471c | ||
|
|
bf79f99c0c | ||
|
|
2028ec7412 | ||
|
|
ecb456ae29 | ||
|
|
6fca9ae047 | ||
|
|
fbd8b42d70 | ||
|
|
aff5ff14b2 | ||
|
|
15cb1fb788 | ||
|
|
b31a03c60a | ||
|
|
8f3bbe950f | ||
|
|
1caba0f13c | ||
|
|
eeb625e709 | ||
|
|
2057070eb0 | ||
|
|
7376c55219 | ||
|
|
d191e47516 | ||
|
|
a75ddb836b | ||
|
|
95c7c556a3 | ||
|
|
211fab8d36 | ||
|
|
7f3250d71c | ||
|
|
2a3879180e | ||
|
|
8351b30e00 | ||
|
|
91f9c0d0cf | ||
|
|
1169a15936 | ||
|
|
2baf2516e1 | ||
|
|
60f59a4a88 | ||
|
|
b3461c188a | ||
|
|
7e02039805 | ||
|
|
90390222bd | ||
|
|
1dc5039fed | ||
|
|
6f2223faa1 | ||
|
|
725f41ffd4 | ||
|
|
37234c856d | ||
|
|
1e1db5debd | ||
|
|
dfc16e047f | ||
|
|
8bd79d3efd | ||
|
|
9cd3e355d1 | ||
|
|
ec2629c052 | ||
|
|
cbee0bc9ef | ||
|
|
68645ebffb | ||
|
|
526eb54fc3 | ||
|
|
41ce658267 | ||
|
|
155b10ae86 | ||
|
|
d3f7e3b417 | ||
|
|
524af94937 | ||
|
|
cea409cc28 | ||
|
|
9ef6c0925a | ||
|
|
0c61bf109f | ||
|
|
91c9091d7e | ||
|
|
4c77bd32a0 | ||
|
|
d5aae0103a | ||
|
|
37df5f5625 | ||
|
|
699c42962e | ||
|
|
68da02c7b5 | ||
|
|
005b49bb78 | ||
|
|
91d00b3022 | ||
|
|
45ff10cc68 | ||
|
|
dbec22b84b | ||
|
|
b8598b0297 | ||
|
|
a14c3a493a | ||
|
|
00befddd7c | ||
|
|
7169ee5c73 | ||
|
|
3dd94f33b2 | ||
|
|
9d6b0285f5 | ||
|
|
812d805a48 | ||
|
|
43e191d64b | ||
|
|
14eb5ad0dc | ||
|
|
30d4145e2e | ||
|
|
4c5501c31c | ||
|
|
46e6e41b9a | ||
|
|
c0ee30a25a | ||
|
|
85ec1f8d02 | ||
|
|
6bd2794175 | ||
|
|
98da03af50 | ||
|
|
ffc249ae21 | ||
|
|
8d3399bf5f | ||
|
|
6677227301 | ||
|
|
986b834148 | ||
|
|
fc5f97fe37 | ||
|
|
2d13f53017 | ||
|
|
f84386cf6e | ||
|
|
51de765867 | ||
|
|
8a489658ab | ||
|
|
1e031e6a58 | ||
|
|
1080c4e4ae | ||
|
|
aff9a696cb | ||
|
|
76df73b390 | ||
|
|
32c7b6283d | ||
|
|
02dce24b59 | ||
|
|
d36abbe8da | ||
|
|
1ee59adcfe | ||
|
|
5934669ca8 | ||
|
|
6ff4775b71 | ||
|
|
d696104535 | ||
|
|
14fd1b6cdf | ||
|
|
4f9065d3d5 | ||
|
|
2259e427a5 | ||
|
|
205f992e9e | ||
|
|
710a143473 | ||
|
|
57930f8e53 | ||
|
|
5b4c415510 | ||
|
|
fb6eb6f267 | ||
|
|
da596182a4 | ||
|
|
85d4b49151 | ||
|
|
98d85e6f59 | ||
|
|
7c96608d9a | ||
|
|
c05015bc93 | ||
|
|
b2067e63da | ||
|
|
6a1e98cbf7 | ||
|
|
a92c1ff700 | ||
|
|
272745b374 | ||
|
|
26f2a978f6 | ||
|
|
8e22f2bb40 | ||
|
|
b17758a932 | ||
|
|
1bed23a1af | ||
|
|
4955835249 | ||
|
|
ef20ffe4d2 | ||
|
|
056ed48dda | ||
|
|
dbb2c4b6ac | ||
|
|
9833c025fd | ||
|
|
d7536588b3 | ||
|
|
d4e3e69505 | ||
|
|
2c61efe3de | ||
|
|
e31c537f05 | ||
|
|
955baa3c44 | ||
|
|
8df671c908 | ||
|
|
5bed9f7675 | ||
|
|
48b3ab02f9 | ||
|
|
4067321ef4 | ||
|
|
32f4dc8403 | ||
|
|
e945619ddd | ||
|
|
730ced9a10 | ||
|
|
3464019d7e | ||
|
|
e92b9e4030 | ||
|
|
767262e67c | ||
|
|
a366e82aa1 | ||
|
|
ac05bc8605 | ||
|
|
e1e67324c0 | ||
|
|
5757e2129e | ||
|
|
3993a1f9ea | ||
|
|
83a34086bc | ||
|
|
b6477fdb30 | ||
|
|
0c6094e796 | ||
|
|
2baeebbc02 | ||
|
|
da99e3e829 | ||
|
|
77e21c57ce | ||
|
|
fcc0cf9677 | ||
|
|
6fc58b8324 | ||
|
|
ce06a3b689 | ||
|
|
26cac088b4 | ||
|
|
46523b817c | ||
|
|
bc5ffc8e47 | ||
|
|
98ce45ff74 | ||
|
|
3ac91b08cb | ||
|
|
e0168a0eb0 | ||
|
|
99c3ab0177 | ||
|
|
0fb9469d93 | ||
|
|
0a4d0cee9f | ||
|
|
032be168b5 | ||
|
|
e393973761 | ||
|
|
fa68371bb8 | ||
|
|
04d8069bac | ||
|
|
3d254d3c8e | ||
|
|
2d18dda3f2 | ||
|
|
7c2f2994da | ||
|
|
07616de00c | ||
|
|
9444a081cc | ||
|
|
6a1b0b5649 | ||
|
|
5204528296 | ||
|
|
2d10d4f54e | ||
|
|
bd674dc55e | ||
|
|
479795b4d1 | ||
|
|
6e6202c14d | ||
|
|
17283cfe4c | ||
|
|
6076128996 | ||
|
|
6f297346dc | ||
|
|
dd5415309a | ||
|
|
12317ef7d0 | ||
|
|
372fc58e89 | ||
|
|
3c1bda4bc3 | ||
|
|
0d51f63a2e | ||
|
|
5d6779f709 | ||
|
|
38e6706315 | ||
|
|
4c90e87a6f | ||
|
|
9e3176bd09 | ||
|
|
c42478b723 | ||
|
|
d2eed079c3 | ||
|
|
923c952bec | ||
|
|
38377d5eb7 | ||
|
|
2d7792c783 | ||
|
|
c3380c03b1 | ||
|
|
1cf245d77c | ||
|
|
6335150cea | ||
|
|
622be797b9 | ||
|
|
3d0ab2b1aa | ||
|
|
6e248279cf | ||
|
|
f5ebbf3225 | ||
|
|
550e5d7822 | ||
|
|
d3d2e669b7 | ||
|
|
f3ebb420b7 | ||
|
|
1576f991fe | ||
|
|
f285cea9a6 | ||
|
|
343333abcf | ||
|
|
b3450e930e | ||
|
|
6b7d4b1f74 | ||
|
|
21a736954f | ||
|
|
4a28f3798d | ||
|
|
f766d92755 | ||
|
|
afa5d4ced3 | ||
|
|
bc6ac6f7af | ||
|
|
e016363b54 | ||
|
|
9424d6d487 | ||
|
|
40b0ed5657 | ||
|
|
adb3d4f14a | ||
|
|
30def49c72 | ||
|
|
a88a9e344f | ||
|
|
d5167a91a9 | ||
|
|
512fee1d1e | ||
|
|
a476ec5c81 | ||
|
|
99cab6a68e | ||
|
|
f6b6360155 | ||
|
|
b0e0b87891 | ||
|
|
1500d3dfb2 | ||
|
|
4e457acda0 | ||
|
|
774edeb521 | ||
|
|
9a0d1e7ce8 | ||
|
|
c74b6d4552 | ||
|
|
3844685be0 | ||
|
|
2b803493ba | ||
|
|
4732abf7f4 | ||
|
|
f694f8a767 | ||
|
|
f91943c19f | ||
|
|
6354a57b5c | ||
|
|
3e18773016 | ||
|
|
909e1edb18 | ||
|
|
55f5a83b88 | ||
|
|
d83faeaf9a | ||
|
|
e353b572a5 | ||
|
|
95a33fe150 | ||
|
|
5d799d80e6 | ||
|
|
4f50316a1a | ||
|
|
2fe0ce0148 | ||
|
|
251bff6bee | ||
|
|
f57d34242c | ||
|
|
88af204027 | ||
|
|
8d3d4397cc | ||
|
|
054c23f484 | ||
|
|
dc7e2562f4 | ||
|
|
5a20bc44b1 |
66
.github/workflows/build-cross-compile.yml
vendored
66
.github/workflows/build-cross-compile.yml
vendored
@@ -29,22 +29,22 @@ on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
gcc-major-version:
|
||||
required: false
|
||||
required: true
|
||||
type: string
|
||||
default: '10'
|
||||
apt-gcc-version:
|
||||
required: true
|
||||
type: string
|
||||
apt-gcc-cross-version:
|
||||
required: true
|
||||
type: string
|
||||
extra-conf-options:
|
||||
required: false
|
||||
type: string
|
||||
default: '10.3.0-1ubuntu1~20.04'
|
||||
apt-gcc-cross-suffix:
|
||||
required: false
|
||||
type: string
|
||||
default: 'cross1'
|
||||
|
||||
jobs:
|
||||
build-cross-compile:
|
||||
name: build
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -54,20 +54,35 @@ jobs:
|
||||
- arm
|
||||
- s390x
|
||||
- ppc64le
|
||||
- riscv64
|
||||
include:
|
||||
- target-cpu: aarch64
|
||||
debian-arch: arm64
|
||||
gnu-arch: aarch64
|
||||
debian-arch: arm64
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
- target-cpu: arm
|
||||
debian-arch: armhf
|
||||
gnu-arch: arm
|
||||
debian-arch: armhf
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
gnu-abi: eabihf
|
||||
- target-cpu: s390x
|
||||
debian-arch: s390x
|
||||
gnu-arch: s390x
|
||||
debian-arch: s390x
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
- target-cpu: ppc64le
|
||||
debian-arch: ppc64el
|
||||
gnu-arch: powerpc64le
|
||||
debian-arch: ppc64el
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
- target-cpu: riscv64
|
||||
gnu-arch: riscv64
|
||||
debian-arch: riscv64
|
||||
debian-repository: https://deb.debian.org/debian-ports
|
||||
debian-keyring: /usr/share/keyrings/debian-ports-archive-keyring.gpg
|
||||
debian-version: sid
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
@@ -95,9 +110,10 @@ jobs:
|
||||
sudo apt-get install \
|
||||
gcc-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
|
||||
g++-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
|
||||
gcc-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-version }}${{ inputs.apt-gcc-cross-suffix }} \
|
||||
g++-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-version }}${{ inputs.apt-gcc-cross-suffix }} \
|
||||
libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
|
||||
gcc-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-cross-version }} \
|
||||
g++-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-cross-version }} \
|
||||
libxrandr-dev libxtst-dev libcups2-dev libasound2-dev \
|
||||
debian-ports-archive-keyring
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
|
||||
|
||||
- name: 'Check cache for sysroot'
|
||||
@@ -113,14 +129,15 @@ jobs:
|
||||
|
||||
- name: 'Create sysroot'
|
||||
run: >
|
||||
sudo qemu-debootstrap
|
||||
sudo debootstrap
|
||||
--arch=${{ matrix.debian-arch }}
|
||||
--verbose
|
||||
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev
|
||||
--resolve-deps
|
||||
buster
|
||||
$(test -n "${{ matrix.debian-keyring }}" && echo "--keyring=${{ matrix.debian-keyring }}")
|
||||
${{ matrix.debian-version }}
|
||||
sysroot
|
||||
https://httpredir.debian.org/debian/
|
||||
${{ matrix.debian-repository }}
|
||||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Prepare sysroot'
|
||||
@@ -128,7 +145,9 @@ jobs:
|
||||
# Prepare sysroot and remove unused files to minimize cache
|
||||
sudo chroot sysroot symlinks -cr .
|
||||
sudo chown ${USER} -R sysroot
|
||||
rm -rf sysroot/{dev,proc,run,sys}
|
||||
rm -rf sysroot/{dev,proc,run,sys,var}
|
||||
rm -rf sysroot/usr/{sbin,bin,share}
|
||||
rm -rf sysroot/usr/lib/{apt,udev,systemd}
|
||||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Configure'
|
||||
@@ -143,8 +162,13 @@ jobs:
|
||||
--openjdk-target=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}
|
||||
--with-sysroot=sysroot
|
||||
--with-build-jdk=${{ steps.buildjdk.outputs.jdk-path }}
|
||||
CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-10
|
||||
CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-10
|
||||
--with-jmod-compress=zip-1
|
||||
CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-${{ inputs.gcc-major-version }}
|
||||
CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-${{ inputs.gcc-major-version }}
|
||||
${{ inputs.extra-conf-options }} || (
|
||||
echo "Dumping config.log:" &&
|
||||
cat config.log &&
|
||||
exit 1)
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
|
||||
19
.github/workflows/build-linux.yml
vendored
19
.github/workflows/build-linux.yml
vendored
@@ -42,6 +42,13 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: '[ "debug", "release" ]'
|
||||
gcc-major-version:
|
||||
required: true
|
||||
type: string
|
||||
gcc-package-suffix:
|
||||
required: false
|
||||
type: string
|
||||
default: ''
|
||||
apt-gcc-version:
|
||||
required: true
|
||||
type: string
|
||||
@@ -55,7 +62,7 @@ on:
|
||||
jobs:
|
||||
build-linux:
|
||||
name: build
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -101,8 +108,8 @@ jobs:
|
||||
fi
|
||||
sudo apt-get update
|
||||
sudo apt-get install --only-upgrade apt
|
||||
sudo apt-get install gcc-${{ inputs.apt-gcc-version }} g++-${{ inputs.apt-gcc-version }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }}
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
||||
sudo apt-get install gcc-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }}=${{ inputs.apt-gcc-version }} g++-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }}=${{ inputs.apt-gcc-version }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }}
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
@@ -115,7 +122,11 @@ jobs:
|
||||
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-zlib=system
|
||||
${{ inputs.extra-conf-options }}
|
||||
--with-jmod-compress=zip-1
|
||||
${{ inputs.extra-conf-options }} || (
|
||||
echo "Dumping config.log:" &&
|
||||
cat config.log &&
|
||||
exit 1)
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
|
||||
6
.github/workflows/build-macos.yml
vendored
6
.github/workflows/build-macos.yml
vendored
@@ -97,7 +97,11 @@ jobs:
|
||||
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-zlib=system
|
||||
${{ inputs.extra-conf-options }}
|
||||
--with-jmod-compress=zip-1
|
||||
${{ inputs.extra-conf-options }} || (
|
||||
echo "Dumping config.log:" &&
|
||||
cat config.log &&
|
||||
exit 1)
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
|
||||
6
.github/workflows/build-windows.yml
vendored
6
.github/workflows/build-windows.yml
vendored
@@ -110,7 +110,11 @@ jobs:
|
||||
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-msvc-toolset-version=${{ inputs.msvc-toolset-version }}
|
||||
${{ inputs.extra-conf-options }}
|
||||
--with-jmod-compress=zip-1
|
||||
${{ inputs.extra-conf-options }} || (
|
||||
echo "Dumping config.log:" &&
|
||||
cat config.log &&
|
||||
exit 1)
|
||||
env:
|
||||
# We need a minimal PATH on Windows
|
||||
# Set PATH to "", so just GITHUB_PATH is included
|
||||
|
||||
35
.github/workflows/main.yml
vendored
35
.github/workflows/main.yml
vendored
@@ -49,7 +49,7 @@ jobs:
|
||||
|
||||
select:
|
||||
name: 'Select platforms'
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
linux-x64: ${{ steps.include.outputs.linux-x64 }}
|
||||
linux-x86: ${{ steps.include.outputs.linux-x86 }}
|
||||
@@ -123,7 +123,8 @@ jobs:
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.3.0-15ubuntu1'
|
||||
# The linux-x64 jdk bundle is used as buildjdk for the cross-compile job
|
||||
if: needs.select.outputs.linux-x64 == 'true' || needs.select.outputs.linux-cross-compile == 'true'
|
||||
|
||||
@@ -133,11 +134,13 @@ jobs:
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x86
|
||||
apt-gcc-version: '10-multilib'
|
||||
gcc-major-version: '10'
|
||||
gcc-package-suffix: '-multilib'
|
||||
apt-gcc-version: '10.3.0-15ubuntu1'
|
||||
apt-architecture: 'i386'
|
||||
# Some multilib libraries do not have proper inter-dependencies, so we have to
|
||||
# install their dependencies manually.
|
||||
apt-extra-packages: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386'
|
||||
apt-extra-packages: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libc6-i386'
|
||||
extra-conf-options: '--with-target-bits=32'
|
||||
if: needs.select.outputs.linux-x86 == 'true'
|
||||
|
||||
@@ -149,7 +152,8 @@ jobs:
|
||||
platform: linux-x64
|
||||
make-target: 'hotspot'
|
||||
debug-levels: '[ "debug" ]'
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.3.0-15ubuntu1'
|
||||
extra-conf-options: '--disable-precompiled-headers'
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
@@ -161,7 +165,8 @@ jobs:
|
||||
platform: linux-x64
|
||||
make-target: 'hotspot'
|
||||
debug-levels: '[ "debug" ]'
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.3.0-15ubuntu1'
|
||||
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
@@ -173,7 +178,8 @@ jobs:
|
||||
platform: linux-x64
|
||||
make-target: 'hotspot'
|
||||
debug-levels: '[ "debug" ]'
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.3.0-15ubuntu1'
|
||||
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
@@ -186,7 +192,8 @@ jobs:
|
||||
make-target: 'hotspot'
|
||||
# Technically this is not the "debug" level, but we can't inject a new matrix state for just this job
|
||||
debug-levels: '[ "debug" ]'
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.3.0-15ubuntu1'
|
||||
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
@@ -196,6 +203,10 @@ jobs:
|
||||
- select
|
||||
- build-linux-x64
|
||||
uses: ./.github/workflows/build-cross-compile.yml
|
||||
with:
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.3.0-15ubuntu1'
|
||||
apt-gcc-cross-version: '10.3.0-8ubuntu1cross1'
|
||||
if: needs.select.outputs.linux-cross-compile == 'true'
|
||||
|
||||
build-macos-x64:
|
||||
@@ -223,7 +234,7 @@ jobs:
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-x64
|
||||
msvc-toolset-version: '14.25'
|
||||
msvc-toolset-version: '14.29'
|
||||
msvc-toolset-architecture: 'x86.x64'
|
||||
if: needs.select.outputs.windows-x64 == 'true'
|
||||
|
||||
@@ -251,7 +262,7 @@ jobs:
|
||||
with:
|
||||
platform: linux-x64
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
test-linux-x86:
|
||||
name: linux-x86
|
||||
@@ -261,7 +272,7 @@ jobs:
|
||||
with:
|
||||
platform: linux-x86
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
test-macos-x64:
|
||||
name: macos-x64
|
||||
@@ -286,7 +297,7 @@ jobs:
|
||||
# Remove bundles so they are not misconstrued as binary distributions from the JDK project
|
||||
remove-bundles:
|
||||
name: 'Remove bundle artifacts'
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
if: always()
|
||||
needs:
|
||||
- build-linux-x64
|
||||
|
||||
57
README.md
57
README.md
@@ -1,11 +1,64 @@
|
||||
# Welcome to the JDK!
|
||||
|
||||
## Wakefield
|
||||
This is a temporary section created to host information on the
|
||||
[Wakefield](https://wiki.openjdk.java.net/display/wakefield) project.
|
||||
|
||||
### Building
|
||||
There are two addition `configure` arguments:
|
||||
```
|
||||
--with-wayland specify prefix directory for the wayland package
|
||||
(expecting the headers under PATH/include)
|
||||
--with-wayland-include specify directory for the wayland include files
|
||||
```
|
||||
As usual, there should be no need to specify those explicitly unless you're doing
|
||||
something tricky.
|
||||
However, a variant of `libwayland-dev` needs to be installed on the build system.
|
||||
|
||||
### Running
|
||||
Make sure your system is configured such that `libwayland` can find the socket to connect to;
|
||||
usually this means that the environment variable `WAYLAND_DISPLAY` is set to something
|
||||
sensible. Then add this argument to `java`
|
||||
```
|
||||
-Dawt.toolkit.name=WLToolkit
|
||||
```
|
||||
|
||||
### Testing
|
||||
Testing that involves `Robot` is done inside a [Weston](https://gitlab.freedesktop.org/wayland/weston/)
|
||||
instance with a special module loaded called `libwakefield`
|
||||
that provides the necessary functionality. The Wayland-specific tests are therefore executed with a dedicated test driver
|
||||
`test/jdk/java/awt/wakefield/WakefieldTestDriver.java`. The driver also provides an easy
|
||||
way to run the test in several configurations with a different size and even number
|
||||
of "outputs" (monitors).
|
||||
|
||||
To run the Wayland-specific tests, perform these steps:
|
||||
* Install Weston version 9 (earlier versions are known NOT to work).
|
||||
* Obtain `libwakefield.so` either by building from source (available under
|
||||
`src/java.desktop/share/native/libwakefield` and not integrated into the rest of the
|
||||
build infrastructure; see `README.md` there)
|
||||
or by fetching the latest pre-built `x64` binary
|
||||
```
|
||||
wget https://github.com/mkartashev/wakefield/raw/main/libwakefield.so
|
||||
```
|
||||
* Set `LIBWAKEFIELD` environment variable to the full path to `libwakefield.so`
|
||||
```
|
||||
export LIBWAKEFIELD=/tmp/wakefield-testing/libwakefield.so
|
||||
```
|
||||
* Run `jtreg` like so
|
||||
```
|
||||
jtreg -e:XDG_RUNTIME_DIR -e:LIBWAKEFIELD -testjdk:... test/jdk/java/awt/wakefield/
|
||||
```
|
||||
|
||||
This was verified to work in `Ubuntu 21.10`.
|
||||
This does NOT work in `Ubuntu 21.04` or `Fedora 34`.
|
||||
|
||||
## Generic Info (not Wakefield-specific)
|
||||
For build instructions please see the
|
||||
[online documentation](https://openjdk.java.net/groups/build/doc/building.html),
|
||||
[online documentation](https://openjdk.org/groups/build/doc/building.html),
|
||||
or either of these files:
|
||||
|
||||
- [doc/building.html](doc/building.html) (html version)
|
||||
- [doc/building.md](doc/building.md) (markdown version)
|
||||
|
||||
See <https://openjdk.java.net/> for more information about
|
||||
See <https://openjdk.org/> for more information about
|
||||
the OpenJDK Community and the JDK.
|
||||
|
||||
32
bin/idea.sh
32
bin/idea.sh
@@ -215,14 +215,28 @@ replace_template_dir "$IDEA_OUTPUT"
|
||||
CLASSES=$IDEA_OUTPUT/classes
|
||||
|
||||
if [ "x$ANT_HOME" = "x" ] ; then
|
||||
# try some common locations, before giving up
|
||||
if [ -f "/usr/share/ant/lib/ant.jar" ] ; then
|
||||
ANT_HOME="/usr/share/ant"
|
||||
elif [ -f "/usr/local/Cellar/ant/1.9.4/libexec/lib/ant.jar" ] ; then
|
||||
ANT_HOME="/usr/local/Cellar/ant/1.9.4/libexec"
|
||||
else
|
||||
echo "FATAL: cannot find ant. Try setting ANT_HOME." >&2; exit 1
|
||||
fi
|
||||
# try some common locations
|
||||
if [ -f "/usr/share/ant/lib/ant.jar" ] ; then
|
||||
ANT_HOME="/usr/share/ant"
|
||||
else
|
||||
try_ant=$(ls /opt/homebrew/Cellar/ant/*/libexec/lib/ant.jar 2> /dev/null | sort -r | head -n 1)
|
||||
if [ "x$try_ant" != "x" ] ; then
|
||||
ANT_HOME=$(cd $(dirname $try_ant)/.. && pwd)
|
||||
else
|
||||
try_ant=$(ls /usr/local/Cellar/ant/*/libexec/lib/ant.jar 2> /dev/null | sort -r | head -n 1)
|
||||
if [ "x$try_ant" != "x" ] ; then
|
||||
ANT_HOME=$(cd $(dirname $try_ant)/.. && pwd)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [ ! -f "$ANT_HOME/lib/ant.jar" ] ; then
|
||||
echo "FATAL: ANT_HOME is incorrect. Try removing it and use autodetection, or fix the value" >&2; exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "x$ANT_HOME" = "x" ] ; then
|
||||
echo "FATAL: cannot find ant. Try setting ANT_HOME." >&2; exit 1
|
||||
fi
|
||||
CP=$ANT_HOME/lib/ant.jar
|
||||
rm -rf $CLASSES; mkdir $CLASSES
|
||||
@@ -230,7 +244,7 @@ rm -rf $CLASSES; mkdir $CLASSES
|
||||
# If we have a Windows boot JDK, we need a .exe suffix
|
||||
if [ -e "$BOOT_JDK/bin/java.exe" ] ; then
|
||||
JAVAC=javac.exe
|
||||
else
|
||||
else
|
||||
JAVAC=javac
|
||||
fi
|
||||
|
||||
|
||||
@@ -70,6 +70,9 @@
|
||||
<li><a href="#make-control-variables">Make Control Variables</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#running-tests">Running Tests</a></li>
|
||||
<li><a href="#signing">Signing</a><ul>
|
||||
<li><a href="#macos-1">macOS</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#cross-compiling">Cross-compiling</a><ul>
|
||||
<li><a href="#cross-compiling-the-easy-way-with-openjdk-devkits">Cross compiling the easy way with OpenJDK devkits</a></li>
|
||||
<li><a href="#boot-jdk-and-build-jdk">Boot JDK and Build JDK</a></li>
|
||||
@@ -112,13 +115,14 @@
|
||||
<li><a href="#developing-the-build-system-itself">Developing the Build System Itself</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#contributing-to-the-jdk">Contributing to the JDK</a></li>
|
||||
<li><a href="#editing-this-document">Editing this document</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<h2 id="tldr-instructions-for-the-impatient">TL;DR (Instructions for the Impatient)</h2>
|
||||
<p>If you are eager to try out building the JDK, these simple steps works most of the time. They assume that you have installed Git (and Cygwin if running on Windows) and cloned the top-level JDK repository that you want to build.</p>
|
||||
<ol type="1">
|
||||
<li><p><a href="#getting-the-source-code">Get the complete source code</a>:<br />
|
||||
<code>git clone https://git.openjdk.java.net/jdk/</code></p></li>
|
||||
<code>git clone https://git.openjdk.org/jdk/</code></p></li>
|
||||
<li><p><a href="#running-configure">Run configure</a>:<br />
|
||||
<code>bash configure</code></p>
|
||||
<p>If <code>configure</code> fails due to missing dependencies (to either the <a href="#native-compiler-toolchain-requirements">toolchain</a>, <a href="#build-tools-requirements">build tools</a>, <a href="#external-library-requirements">external libraries</a> or the <a href="#boot-jdk-requirements">boot JDK</a>), most of the time it prints a suggestion on how to resolve the situation on your platform. Follow the instructions, and try running <code>bash configure</code> again.</p></li>
|
||||
@@ -132,9 +136,9 @@
|
||||
<p>If any of these steps failed, or if you want to know more about build requirements or build functionality, please continue reading this document.</p>
|
||||
<h2 id="introduction">Introduction</h2>
|
||||
<p>The JDK is a complex software project. Building it requires a certain amount of technical expertise, a fair number of dependencies on external software, and reasonably powerful hardware.</p>
|
||||
<p>If you just want to use the JDK and not build it yourself, this document is not for you. See for instance <a href="http://openjdk.java.net/install">OpenJDK installation</a> for some methods of installing a prebuilt JDK.</p>
|
||||
<p>If you just want to use the JDK and not build it yourself, this document is not for you. See for instance <a href="http://openjdk.org/install">OpenJDK installation</a> for some methods of installing a prebuilt JDK.</p>
|
||||
<h2 id="getting-the-source-code">Getting the Source Code</h2>
|
||||
<p>Make sure you are getting the correct version. As of JDK 10, the source is no longer split into separate repositories so you only need to clone one single repository. At the <a href="https://git.openjdk.java.net/">OpenJDK Git site</a> you can see a list of all available repositories. If you want to build an older version, e.g. JDK 11, it is recommended that you get the <code>jdk11u</code> repo, which contains incremental updates, instead of the <code>jdk11</code> repo, which was frozen at JDK 11 GA.</p>
|
||||
<p>Make sure you are getting the correct version. As of JDK 10, the source is no longer split into separate repositories so you only need to clone one single repository. At the <a href="https://git.openjdk.org/">OpenJDK Git site</a> you can see a list of all available repositories. If you want to build an older version, e.g. JDK 11, it is recommended that you get the <code>jdk11u</code> repo, which contains incremental updates, instead of the <code>jdk11</code> repo, which was frozen at JDK 11 GA.</p>
|
||||
<p>If you are new to Git, a good place to start is the book <a href="https://git-scm.com/book/en/v2">Pro Git</a>. The rest of this document assumes a working knowledge of Git.</p>
|
||||
<h3 id="special-considerations">Special Considerations</h3>
|
||||
<p>For a smooth building experience, it is recommended that you follow these rules on where and how to check out the source code.</p>
|
||||
@@ -148,7 +152,7 @@
|
||||
<li><p>Do not put the JDK clone in a path under your Cygwin home directory. This is especially important if your user name contains spaces and/or mixed upper and lower case letters.</p></li>
|
||||
<li><p>You need to install a git client. You have two choices, Cygwin git or Git for Windows. Unfortunately there are pros and cons with each choice.</p>
|
||||
<ul>
|
||||
<li><p>The Cygwin <code>git</code> client has no line ending issues and understands Cygwin paths (which are used throughout the JDK build system). However, it does not currently work well with the Skara CLI tooling. Please see the <a href="https://wiki.openjdk.java.net/display/SKARA/Skara#Skara-Git">Skara wiki on Git clients</a> for up-to-date information about the Skara git client support.</p></li>
|
||||
<li><p>The Cygwin <code>git</code> client has no line ending issues and understands Cygwin paths (which are used throughout the JDK build system). However, it does not currently work well with the Skara CLI tooling. Please see the <a href="https://wiki.openjdk.org/display/SKARA/Skara#Skara-Git">Skara wiki on Git clients</a> for up-to-date information about the Skara git client support.</p></li>
|
||||
<li><p>The <a href="https://gitforwindows.org">Git for Windows</a> client has issues with line endings, and do not understand Cygwin paths. It does work well with the Skara CLI tooling, however. To alleviate the line ending problems, make sure you set <code>core.autocrlf</code> to <code>false</code> (this is asked during installation).</p></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
@@ -194,7 +198,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<p>The double version numbers for Linux are due to the hybrid model used at Oracle, where header files and external libraries from an older version are used when building on a more modern version of the OS.</p>
|
||||
<p>The Build Group has a wiki page with <a href="https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms">Supported Build Platforms</a>. From time to time, this is updated by contributors to list successes or failures of building on different platforms.</p>
|
||||
<p>The Build Group has a wiki page with <a href="https://wiki.openjdk.org/display/Build/Supported+Build+Platforms">Supported Build Platforms</a>. From time to time, this is updated by contributors to list successes or failures of building on different platforms.</p>
|
||||
<h3 id="windows">Windows</h3>
|
||||
<p>Windows XP is not a supported platform, but all newer Windows should be able to build the JDK.</p>
|
||||
<p>On Windows, it is important that you pay attention to the instructions in the <a href="#special-considerations">Special Considerations</a>.</p>
|
||||
@@ -233,7 +237,7 @@
|
||||
<p>For Alpine Linux, aside from basic tooling, install the GNU versions of some programs:</p>
|
||||
<pre><code>sudo apk add build-base bash grep zip</code></pre>
|
||||
<h3 id="aix">AIX</h3>
|
||||
<p>Please consult the AIX section of the <a href="https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of AIX are supported.</p>
|
||||
<p>Please consult the AIX section of the <a href="https://wiki.openjdk.org/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of AIX are supported.</p>
|
||||
<h2 id="native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requirements</h2>
|
||||
<p>Large portions of the JDK consists of native code, that needs to be compiled to be able to run on the target platform. In theory, toolchain and operating system should be independent factors, but in practice there's more or less a one-to-one correlation between target operating system and toolchain.</p>
|
||||
<table>
|
||||
@@ -300,11 +304,11 @@
|
||||
<p>It is advisable to keep an older version of Xcode for building the JDK when updating Xcode. This <a href="http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html">blog page</a> has good suggestions on managing multiple Xcode versions. To use a specific version of Xcode, use <code>xcode-select -s</code> before running <code>configure</code>, or use <code>--with-toolchain-path</code> to point to the version of Xcode to use, e.g. <code>configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin</code></p>
|
||||
<p>If you have recently (inadvertently) updated your OS and/or Xcode version, and the JDK can no longer be built, please see the section on <a href="#problems-with-the-build-environment">Problems with the Build Environment</a>, and <a href="#getting-help">Getting Help</a> to find out if there are any recent, non-merged patches available for this update.</p>
|
||||
<h3 id="microsoft-visual-studio">Microsoft Visual Studio</h3>
|
||||
<p>For aarch64 machines running Windows the minimum accepted version is Visual Studio 2019 (16.8 or higher). For all other platforms the minimum accepted version of Visual Studio is 2017. Older versions will not be accepted by <code>configure</code> and will not work. For all platforms the maximum accepted version of Visual Studio is 2022.</p>
|
||||
<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2017</code>.</p>
|
||||
<p>The minimum accepted version is Visual Studio 2019 version 16.8. (Note that this version is often presented as "MSVC 14.28", and reported by cl.exe as 19.28.) Older versions will not be accepted by <code>configure</code> and will not work. The maximum accepted version of Visual Studio is 2022.</p>
|
||||
<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2022</code>.</p>
|
||||
<p>If you have Visual Studio installed but <code>configure</code> fails to detect it, it may be because of <a href="#spaces-in-path">spaces in path</a>.</p>
|
||||
<h3 id="ibm-xl-cc">IBM XL C/C++</h3>
|
||||
<p>Please consult the AIX section of the <a href="https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of XLC are supported.</p>
|
||||
<p>Please consult the AIX section of the <a href="https://wiki.openjdk.org/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of XLC are supported.</p>
|
||||
<h2 id="boot-jdk-requirements">Boot JDK Requirements</h2>
|
||||
<p>Paradoxically, building the JDK requires a pre-existing JDK. This is called the "boot JDK". The boot JDK does not, however, have to be a JDK built directly from the source code available in the OpenJDK Community. If you are porting the JDK to a new platform, chances are that there already exists another JDK for that platform that is usable as boot JDK.</p>
|
||||
<p>The rule of thumb is that the boot JDK for building JDK major version <em>N</em> should be a JDK of major version <em>N-1</em>, so for building JDK 9 a JDK 8 would be suitable as boot JDK. However, the JDK should be able to "build itself", so an up-to-date build of the current JDK source is an acceptable alternative. If you are following the <em>N-1</em> rule, make sure you've got the latest update version, since JDK 8 GA might not be able to build JDK 9 on all platforms.</p>
|
||||
@@ -508,8 +512,8 @@
|
||||
<li><code>SPEC_FILTER</code></li>
|
||||
</ul>
|
||||
<h2 id="running-tests">Running Tests</h2>
|
||||
<p>Most of the JDK tests are using the <a href="http://openjdk.java.net/jtreg">JTReg</a> test framework. Make sure that your configuration knows where to find your installation of JTReg. If this is not picked up automatically, use the <code>--with-jtreg=<path to jtreg home></code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc.</p>
|
||||
<p>The <a href="https://wiki.openjdk.java.net/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
|
||||
<p>Most of the JDK tests are using the <a href="http://openjdk.org/jtreg">JTReg</a> test framework. Make sure that your configuration knows where to find your installation of JTReg. If this is not picked up automatically, use the <code>--with-jtreg=<path to jtreg home></code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc.</p>
|
||||
<p>The <a href="https://wiki.openjdk.org/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
|
||||
<p>Building of Hotspot Gtest suite requires the source code of Google Test framework. The top directory, which contains both <code>googletest</code> and <code>googlemock</code> directories, should be specified via <code>--with-gtest</code>. The supported version of Google Test is 1.8.1, whose source code can be obtained:</p>
|
||||
<ul>
|
||||
<li>by downloading and unpacking the source bundle from <a href="https://github.com/google/googletest/releases/tag/release-1.8.1">here</a></li>
|
||||
@@ -518,6 +522,12 @@
|
||||
<p>To execute the most basic tests (tier 1), use:</p>
|
||||
<pre><code>make run-test-tier1</code></pre>
|
||||
<p>For more details on how to run tests, please see <strong>Testing the JDK</strong> (<a href="testing.html">html</a>, <a href="testing.md">markdown</a>).</p>
|
||||
<h2 id="signing">Signing</h2>
|
||||
<h3 id="macos-1">macOS</h3>
|
||||
<p>Modern versions of macOS require applications to be signed and notarizied before distribution. See Apple's documentation for more background on what this means and how it works. To help support this, the JDK build can be configured to automatically sign all native binaries, and the JDK bundle, with all the options needed for successful notarization, as well as all the entitlements required by the JDK. To enable <code>hardened</code> signing, use configure parameter <code>--with-macosx-codesign=hardened</code> and configure the signing identity you wish to use with <code>--with-macosx-codesign-identity=<identity></code>. The identity refers to a signing identity from Apple that needs to be preinstalled on the build host.</p>
|
||||
<p>When not signing for distribution with the hardened option, the JDK build will still attempt to perform <code>adhoc</code> signing to add the special entitlement <code>com.apple.security.get-task-allow</code> to each binary. This entitlement is required to be able to dump core files from a process. Note that adding this entitlement makes the build invalid for notarization, so it is only added when signing in <code>debug</code> mode. To explicitly enable this kind of adhoc signing, use configure parameter <code>--with-macosx-codesign=debug</code>. It will be enabled by default in most cases.</p>
|
||||
<p>It's also possible to completely disable any explicit codesign operations done by the JDK build using the configure parameter <code>--without-macosx-codesign</code>. The exact behavior then depends on the architecture. For macOS on x64, it (at least at the time of this writing) results in completely unsigned binaries that should still work fine for development and debugging purposes. On aarch64, the Xcode linker will apply a default "adhoc" signing, without any entitlements. Such a build does not allow dumping core files.</p>
|
||||
<p>The default mode "auto" will try for <code>hardened</code> signing if the debug level is <code>release</code> and either the default identity or the specified identity is valid. If hardened isn't possible, then <code>debug</code> signing is chosen if it works. If nothing works, the codesign build step is disabled.</p>
|
||||
<h2 id="cross-compiling">Cross-compiling</h2>
|
||||
<p>Cross-compiling means using one platform (the <em>build</em> platform) to generate output that can ran on another platform (the <em>target</em> platform).</p>
|
||||
<p>The typical reason for cross-compiling is that the build is performed on a more powerful desktop computer, but the resulting binaries will be able to run on a different, typically low-performing system. Most of the complications that arise when building for embedded is due to this separation of <em>build</em> and <em>target</em> systems.</p>
|
||||
@@ -886,7 +896,7 @@ spawn failed</code></pre>
|
||||
<h4 id="spaces-in-path">Spaces in Path</h4>
|
||||
<p>On Windows, when configuring, <code>fixpath.sh</code> may report that some directory names have spaces. Usually, it assumes those directories have <a href="https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-8dot3name">short paths</a>. You can run <code>fsutil file setshortname</code> in <code>cmd</code> on certain directories, such as <code>Microsoft Visual Studio</code> or <code>Windows Kits</code>, to assign arbitrary short paths so <code>configure</code> can access them.</p>
|
||||
<h3 id="getting-help">Getting Help</h3>
|
||||
<p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <a href="mailto:build-dev@openjdk.java.net">build-dev@openjdk.java.net</a>. Please include the relevant parts of the configure and/or build log.</p>
|
||||
<p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <a href="mailto:build-dev@openjdk.org">build-dev@openjdk.org</a>. Please include the relevant parts of the configure and/or build log.</p>
|
||||
<p>If you need general help or advice about developing for the JDK, you can also contact the Adoption Group. See the section on <a href="#contributing-to-openjdk">Contributing to OpenJDK</a> for more information.</p>
|
||||
<h2 id="reproducible-builds">Reproducible Builds</h2>
|
||||
<p>Build reproducibility is the property of getting exactly the same bits out when building, every time, independent on who builds the product, or where. This is for many reasons a harder goal than it initially appears, but it is an important goal, for security reasons and others. Please see <a href="https://reproducible-builds.org">Reproducible Builds</a> for more information about the background and reasons for reproducible builds.</p>
|
||||
@@ -1027,11 +1037,13 @@ test-support/</code></pre>
|
||||
<pre><code>make COMPARE_BUILD=CONF=--enable-new-hotspot-feature:MAKE=hotspot</code></pre>
|
||||
<p>See <code>make/InitSupport.gmk</code> for details on how to use <code>COMPARE_BUILD</code>.</p>
|
||||
<p>To analyze build performance, run with <code>LOG=trace</code> and check <code>$BUILD/build-trace-time.log</code>. Use <code>JOBS=1</code> to avoid parallelism.</p>
|
||||
<p>Please check that you adhere to the <a href="http://openjdk.java.net/groups/build/doc/code-conventions.html">Code Conventions for the Build System</a> before submitting patches.</p>
|
||||
<p>Please check that you adhere to the <a href="http://openjdk.org/groups/build/doc/code-conventions.html">Code Conventions for the Build System</a> before submitting patches.</p>
|
||||
<h2 id="contributing-to-the-jdk">Contributing to the JDK</h2>
|
||||
<p>So, now you've built your JDK, and made your first patch, and want to contribute it back to the OpenJDK Community.</p>
|
||||
<p>First of all: Thank you! We gladly welcome your contribution. However, please bear in mind that the JDK is a massive project, and we must ask you to follow our rules and guidelines to be able to accept your contribution.</p>
|
||||
<p>The official place to start is the <a href="http://openjdk.java.net/contribute/">'How to contribute' page</a>. There is also an official (but somewhat outdated and skimpy on details) <a href="http://openjdk.java.net/guide/">Developer's Guide</a>.</p>
|
||||
<p>If this seems overwhelming to you, the Adoption Group is there to help you! A good place to start is their <a href="https://wiki.openjdk.java.net/display/Adoption/New+Contributor">'New Contributor' page</a>, or start reading the comprehensive <a href="https://adoptopenjdk.gitbooks.io/adoptopenjdk-getting-started-kit/en/">Getting Started Kit</a>. The Adoption Group will also happily answer any questions you have about contributing. Contact them by <a href="http://mail.openjdk.java.net/mailman/listinfo/adoption-discuss">mail</a> or <a href="http://openjdk.java.net/irc/">IRC</a>.</p>
|
||||
<p>The official place to start is the <a href="http://openjdk.org/contribute/">'How to contribute' page</a>. There is also an official (but somewhat outdated and skimpy on details) <a href="http://openjdk.org/guide/">Developer's Guide</a>.</p>
|
||||
<p>If this seems overwhelming to you, the Adoption Group is there to help you! A good place to start is their <a href="https://wiki.openjdk.org/display/Adoption/New+Contributor">'New Contributor' page</a>, or start reading the comprehensive <a href="https://adoptopenjdk.gitbooks.io/adoptopenjdk-getting-started-kit/en/">Getting Started Kit</a>. The Adoption Group will also happily answer any questions you have about contributing. Contact them by <a href="http://mail.openjdk.org/mailman/listinfo/adoption-discuss">mail</a> or <a href="http://openjdk.org/irc/">IRC</a>.</p>
|
||||
<h2 id="editing-this-document">Editing this document</h2>
|
||||
<p>If you want to contribute changes to this document, edit <code>doc/building.md</code> and then run <code>make update-build-docs</code> to generate the same changes in <code>doc/building.html</code>.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -7,7 +7,7 @@ the time. They assume that you have installed Git (and Cygwin if running
|
||||
on Windows) and cloned the top-level JDK repository that you want to build.
|
||||
|
||||
1. [Get the complete source code](#getting-the-source-code): \
|
||||
`git clone https://git.openjdk.java.net/jdk/`
|
||||
`git clone https://git.openjdk.org/jdk/`
|
||||
|
||||
2. [Run configure](#running-configure): \
|
||||
`bash configure`
|
||||
@@ -40,14 +40,14 @@ reasonably powerful hardware.
|
||||
|
||||
If you just want to use the JDK and not build it yourself, this document is not
|
||||
for you. See for instance [OpenJDK installation](
|
||||
http://openjdk.java.net/install) for some methods of installing a prebuilt
|
||||
http://openjdk.org/install) for some methods of installing a prebuilt
|
||||
JDK.
|
||||
|
||||
## Getting the Source Code
|
||||
|
||||
Make sure you are getting the correct version. As of JDK 10, the source is no
|
||||
longer split into separate repositories so you only need to clone one single
|
||||
repository. At the [OpenJDK Git site](https://git.openjdk.java.net/) you
|
||||
repository. At the [OpenJDK Git site](https://git.openjdk.org/) you
|
||||
can see a list of all available repositories. If you want to build an older version,
|
||||
e.g. JDK 11, it is recommended that you get the `jdk11u` repo, which contains
|
||||
incremental updates, instead of the `jdk11` repo, which was frozen at JDK 11 GA.
|
||||
@@ -96,7 +96,7 @@ on where and how to check out the source code.
|
||||
Cygwin paths (which are used throughout the JDK build system).
|
||||
However, it does not currently work well with the Skara CLI tooling.
|
||||
Please see the [Skara wiki on Git clients](
|
||||
https://wiki.openjdk.java.net/display/SKARA/Skara#Skara-Git) for
|
||||
https://wiki.openjdk.org/display/SKARA/Skara#Skara-Git) for
|
||||
up-to-date information about the Skara git client support.
|
||||
|
||||
* The [Git for Windows](https://gitforwindows.org) client has issues
|
||||
@@ -173,7 +173,7 @@ used at Oracle, where header files and external libraries from an older version
|
||||
are used when building on a more modern version of the OS.
|
||||
|
||||
The Build Group has a wiki page with [Supported Build Platforms](
|
||||
https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms). From
|
||||
https://wiki.openjdk.org/display/Build/Supported+Build+Platforms). From
|
||||
time to time, this is updated by contributors to list successes or failures of
|
||||
building on different platforms.
|
||||
|
||||
@@ -303,7 +303,7 @@ sudo apk add build-base bash grep zip
|
||||
### AIX
|
||||
|
||||
Please consult the AIX section of the [Supported Build Platforms](
|
||||
https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms) OpenJDK
|
||||
https://wiki.openjdk.org/display/Build/Supported+Build+Platforms) OpenJDK
|
||||
Build Wiki page for details about which versions of AIX are supported.
|
||||
|
||||
## Native Compiler (Toolchain) Requirements
|
||||
@@ -382,14 +382,14 @@ available for this update.
|
||||
|
||||
### Microsoft Visual Studio
|
||||
|
||||
For aarch64 machines running Windows the minimum accepted version is Visual Studio 2019
|
||||
(16.8 or higher). For all other platforms the minimum accepted version of
|
||||
Visual Studio is 2017. Older versions will not be accepted by `configure` and will
|
||||
not work. For all platforms the maximum accepted version of Visual Studio is 2022.
|
||||
The minimum accepted version is Visual Studio 2019 version 16.8. (Note that this
|
||||
version is often presented as "MSVC 14.28", and reported by cl.exe as 19.28.)
|
||||
Older versions will not be accepted by `configure` and will not work. The
|
||||
maximum accepted version of Visual Studio is 2022.
|
||||
|
||||
If you have multiple versions of Visual Studio installed, `configure` will by
|
||||
default pick the latest. You can request a specific version to be used by
|
||||
setting `--with-toolchain-version`, e.g. `--with-toolchain-version=2017`.
|
||||
setting `--with-toolchain-version`, e.g. `--with-toolchain-version=2022`.
|
||||
|
||||
If you have Visual Studio installed but `configure` fails to detect it, it may
|
||||
be because of [spaces in path](#spaces-in-path).
|
||||
@@ -397,7 +397,7 @@ be because of [spaces in path](#spaces-in-path).
|
||||
### IBM XL C/C++
|
||||
|
||||
Please consult the AIX section of the [Supported Build Platforms](
|
||||
https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms) OpenJDK
|
||||
https://wiki.openjdk.org/display/Build/Supported+Build+Platforms) OpenJDK
|
||||
Build Wiki page for details about which versions of XLC are supported.
|
||||
|
||||
|
||||
@@ -848,14 +848,14 @@ Suggestions for Advanced Users](#hints-and-suggestions-for-advanced-users) and
|
||||
|
||||
## Running Tests
|
||||
|
||||
Most of the JDK tests are using the [JTReg](http://openjdk.java.net/jtreg)
|
||||
Most of the JDK tests are using the [JTReg](http://openjdk.org/jtreg)
|
||||
test framework. Make sure that your configuration knows where to find your
|
||||
installation of JTReg. If this is not picked up automatically, use the
|
||||
`--with-jtreg=<path to jtreg home>` option to point to the JTReg framework.
|
||||
Note that this option should point to the JTReg home, i.e. the top directory,
|
||||
containing `lib/jtreg.jar` etc.
|
||||
|
||||
The [Adoption Group](https://wiki.openjdk.java.net/display/Adoption) provides
|
||||
The [Adoption Group](https://wiki.openjdk.org/display/Adoption) provides
|
||||
recent builds of jtreg [here](
|
||||
https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/).
|
||||
Download the latest `.tar.gz` file, unpack it, and point `--with-jtreg` to the
|
||||
@@ -877,6 +877,42 @@ make run-test-tier1
|
||||
For more details on how to run tests, please see **Testing the JDK**
|
||||
([html](testing.html), [markdown](testing.md)).
|
||||
|
||||
## Signing
|
||||
|
||||
### macOS
|
||||
|
||||
Modern versions of macOS require applications to be signed and notarizied before
|
||||
distribution. See Apple's documentation for more background on what this means
|
||||
and how it works. To help support this, the JDK build can be configured to
|
||||
automatically sign all native binaries, and the JDK bundle, with all the options
|
||||
needed for successful notarization, as well as all the entitlements required by
|
||||
the JDK. To enable `hardened` signing, use configure parameter
|
||||
`--with-macosx-codesign=hardened` and configure the signing identity you wish to
|
||||
use with `--with-macosx-codesign-identity=<identity>`. The identity refers to a
|
||||
signing identity from Apple that needs to be preinstalled on the build host.
|
||||
|
||||
When not signing for distribution with the hardened option, the JDK build will
|
||||
still attempt to perform `adhoc` signing to add the special entitlement
|
||||
`com.apple.security.get-task-allow` to each binary. This entitlement is required
|
||||
to be able to dump core files from a process. Note that adding this entitlement
|
||||
makes the build invalid for notarization, so it is only added when signing in
|
||||
`debug` mode. To explicitly enable this kind of adhoc signing, use configure
|
||||
parameter `--with-macosx-codesign=debug`. It will be enabled by default in most
|
||||
cases.
|
||||
|
||||
It's also possible to completely disable any explicit codesign operations done
|
||||
by the JDK build using the configure parameter `--without-macosx-codesign`.
|
||||
The exact behavior then depends on the architecture. For macOS on x64, it (at
|
||||
least at the time of this writing) results in completely unsigned binaries that
|
||||
should still work fine for development and debugging purposes. On aarch64, the
|
||||
Xcode linker will apply a default "adhoc" signing, without any entitlements.
|
||||
Such a build does not allow dumping core files.
|
||||
|
||||
The default mode "auto" will try for `hardened` signing if the debug level is
|
||||
`release` and either the default identity or the specified identity is valid.
|
||||
If hardened isn't possible, then `debug` signing is chosen if it works. If
|
||||
nothing works, the codesign build step is disabled.
|
||||
|
||||
## Cross-compiling
|
||||
|
||||
Cross-compiling means using one platform (the *build* platform) to generate
|
||||
@@ -1512,7 +1548,7 @@ You can run `fsutil file setshortname` in `cmd` on certain directories, such as
|
||||
|
||||
If none of the suggestions in this document helps you, or if you find what you
|
||||
believe is a bug in the build system, please contact the Build Group by sending
|
||||
a mail to [build-dev@openjdk.java.net](mailto:build-dev@openjdk.java.net).
|
||||
a mail to [build-dev@openjdk.org](mailto:build-dev@openjdk.org).
|
||||
Please include the relevant parts of the configure and/or build log.
|
||||
|
||||
If you need general help or advice about developing for the JDK, you can also
|
||||
@@ -1922,7 +1958,7 @@ To analyze build performance, run with `LOG=trace` and check `$BUILD/build-trace
|
||||
Use `JOBS=1` to avoid parallelism.
|
||||
|
||||
Please check that you adhere to the [Code Conventions for the Build System](
|
||||
http://openjdk.java.net/groups/build/doc/code-conventions.html) before
|
||||
http://openjdk.org/groups/build/doc/code-conventions.html) before
|
||||
submitting patches.
|
||||
|
||||
## Contributing to the JDK
|
||||
@@ -1935,19 +1971,25 @@ However, please bear in mind that the JDK is a massive project, and we must ask
|
||||
you to follow our rules and guidelines to be able to accept your contribution.
|
||||
|
||||
The official place to start is the ['How to contribute' page](
|
||||
http://openjdk.java.net/contribute/). There is also an official (but somewhat
|
||||
http://openjdk.org/contribute/). There is also an official (but somewhat
|
||||
outdated and skimpy on details) [Developer's Guide](
|
||||
http://openjdk.java.net/guide/).
|
||||
http://openjdk.org/guide/).
|
||||
|
||||
If this seems overwhelming to you, the Adoption Group is there to help you! A
|
||||
good place to start is their ['New Contributor' page](
|
||||
https://wiki.openjdk.java.net/display/Adoption/New+Contributor), or start
|
||||
https://wiki.openjdk.org/display/Adoption/New+Contributor), or start
|
||||
reading the comprehensive [Getting Started Kit](
|
||||
https://adoptopenjdk.gitbooks.io/adoptopenjdk-getting-started-kit/en/). The
|
||||
Adoption Group will also happily answer any questions you have about
|
||||
contributing. Contact them by [mail](
|
||||
http://mail.openjdk.java.net/mailman/listinfo/adoption-discuss) or [IRC](
|
||||
http://openjdk.java.net/irc/).
|
||||
http://mail.openjdk.org/mailman/listinfo/adoption-discuss) or [IRC](
|
||||
http://openjdk.org/irc/).
|
||||
|
||||
## Editing this document
|
||||
|
||||
If you want to contribute changes to this document, edit `doc/building.md` and
|
||||
then run `make update-build-docs` to generate the same changes in
|
||||
`doc/building.html`.
|
||||
|
||||
---
|
||||
# Override styles from the base CSS file that are not ideal for this document.
|
||||
|
||||
@@ -68,8 +68,8 @@
|
||||
<h3 id="counterexamples-and-updates">Counterexamples and Updates</h3>
|
||||
<p>Many of the guidelines mentioned here have (sometimes widespread) counterexamples in the HotSpot code base. Finding a counterexample is not sufficient justification for new code to follow the counterexample as a precedent, since readers of your code will rightfully expect your code to follow the greater bulk of precedents documented here.</p>
|
||||
<p>Occasionally a guideline mentioned here may be just out of synch with the actual HotSpot code base. If you find that a guideline is consistently contradicted by a large number of counterexamples, please bring it up for discussion and possible change. The architectural rule, of course, is "When in Rome do as the Romans". Sometimes in the suburbs of Rome the rules are a little different; these differences can be pointed out here.</p>
|
||||
<p>Proposed changes should be discussed on the <a href="mailto:hotspot-dev@openjdk.java.net">HotSpot Developers</a> mailing list. Changes are likely to be cautious and incremental, since HotSpot coders have been using these guidelines for years.</p>
|
||||
<p>Substantive changes are approved by <a href="https://www.rfc-editor.org/rfc/rfc7282.html">rough consensus</a> of the <a href="https://openjdk.java.net/census#hotspot">HotSpot Group</a> Members. The Group Lead determines whether consensus has been reached.</p>
|
||||
<p>Proposed changes should be discussed on the <a href="mailto:hotspot-dev@openjdk.org">HotSpot Developers</a> mailing list. Changes are likely to be cautious and incremental, since HotSpot coders have been using these guidelines for years.</p>
|
||||
<p>Substantive changes are approved by <a href="https://www.rfc-editor.org/rfc/rfc7282.html">rough consensus</a> of the <a href="https://openjdk.org/census#hotspot">HotSpot Group</a> Members. The Group Lead determines whether consensus has been reached.</p>
|
||||
<p>Editorial changes (changes that only affect the description of HotSpot style, not its substance) do not require the full consensus gathering process. The normal HotSpot pull request process may be used for editorial changes, with the additional requirement that the requisite reviewers are also HotSpot Group Members.</p>
|
||||
<h2 id="structure-and-formatting">Structure and Formatting</h2>
|
||||
<h3 id="factoring-and-class-design">Factoring and Class Design</h3>
|
||||
@@ -238,7 +238,7 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
|
||||
<p>Some reasons for this include</p>
|
||||
<ul>
|
||||
<li><p>Exceptions. Perhaps the largest core issue with adopting the use of Standard Library facilities is exceptions. HotSpot does not use exceptions and, for platforms which allow doing so, builds with them turned off. Many Standard Library facilities implicitly or explicitly use exceptions.</p></li>
|
||||
<li><p><code>assert</code>. An issue that is quickly encountered is the <code>assert</code> macro name collision (<a href="https://bugs.openjdk.java.net/browse/JDK-8007770">JDK-8007770</a>). Some mechanism for addressing this would be needed before much of the Standard Library could be used. (Not all Standard Library implementations use assert in header files, but some do.)</p></li>
|
||||
<li><p><code>assert</code>. An issue that is quickly encountered is the <code>assert</code> macro name collision (<a href="https://bugs.openjdk.org/browse/JDK-8007770">JDK-8007770</a>). Some mechanism for addressing this would be needed before much of the Standard Library could be used. (Not all Standard Library implementations use assert in header files, but some do.)</p></li>
|
||||
<li><p>Memory allocation. HotSpot requires explicit control over where allocations occur. The C++98/03 <code>std::allocator</code> class is too limited to support our usage. (Changes in more recent Standards may remove this limitation.)</p></li>
|
||||
<li><p>Implementation vagaries. Bugs, or simply different implementation choices, can lead to different behaviors among the various Standard Libraries we need to deal with.</p></li>
|
||||
<li><p>Inconsistent naming conventions. HotSpot and the C++ Standard use different naming conventions. The coexistence of those different conventions might appear jarring and reduce readability.</p></li>
|
||||
@@ -272,7 +272,7 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
|
||||
<p>Due to bugs in certain (very old) compilers, there is widespread use of enums and avoidance of in-class initialization of static integral constant members. Compilers having such bugs are no longer supported. Except where an enum is semantically appropriate, new code should use integral constants.</p>
|
||||
<h3 id="thread_local">thread_local</h3>
|
||||
<p>Avoid use of <code>thread_local</code> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm">n2659</a>); and instead, use the HotSpot macro <code>THREAD_LOCAL</code>, for which the initializer must be a constant expression. When <code>thread_local</code> must be used, use the Hotspot macro <code>APPROVED_CPP_THREAD_LOCAL</code> to indicate that the use has been given appropriate consideration.</p>
|
||||
<p>As was discussed in the review for <a href="https://mail.openjdk.java.net/pipermail/hotspot-dev/2019-September/039487.html">JDK-8230877</a>, <code>thread_local</code> allows dynamic initialization and destruction semantics. However, that support requires a run-time penalty for references to non-function-local <code>thread_local</code> variables defined in a different translation unit, even if they don't need dynamic initialization. Dynamic initialization and destruction of non-local <code>thread_local</code> variables also has the same ordering problems as for ordinary non-local variables. So we avoid use of <code>thread_local</code> in general, limiting its use to only those cases where dynamic initialization or destruction are essential. See <a href="https://bugs.openjdk.java.net/browse/JDK-8282469">JDK-8282469</a> for further discussion.</p>
|
||||
<p>As was discussed in the review for <a href="https://mail.openjdk.org/pipermail/hotspot-dev/2019-September/039487.html">JDK-8230877</a>, <code>thread_local</code> allows dynamic initialization and destruction semantics. However, that support requires a run-time penalty for references to non-function-local <code>thread_local</code> variables defined in a different translation unit, even if they don't need dynamic initialization. Dynamic initialization and destruction of non-local <code>thread_local</code> variables also has the same ordering problems as for ordinary non-local variables. So we avoid use of <code>thread_local</code> in general, limiting its use to only those cases where dynamic initialization or destruction are essential. See <a href="https://bugs.openjdk.org/browse/JDK-8282469">JDK-8282469</a> for further discussion.</p>
|
||||
<h3 id="nullptr">nullptr</h3>
|
||||
<p>Prefer <code>nullptr</code> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf">n2431</a>) to <code>NULL</code>. Don't use (constexpr or literal) 0 for pointers.</p>
|
||||
<p>For historical reasons there are widespread uses of both <code>NULL</code> and of integer 0 as a pointer value.</p>
|
||||
@@ -448,7 +448,6 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
|
||||
<li><p><code>[[deprecated]]</code> attribute (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3760.html">n3760</a>) — Not relevant in HotSpot code.</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>
|
||||
<li><p>Avoid most implicit conversion constructors and (implicit or explicit) conversion operators. (Note that conversion to <code>bool</code> isn't needed in HotSpot code because of the "no implicit boolean" guideline.)</p></li>
|
||||
<li><p>Avoid covariant return types.</p></li>
|
||||
<li><p>Avoid <code>goto</code> statements.</p></li>
|
||||
</ul>
|
||||
<h3 id="undecided-features">Undecided Features</h3>
|
||||
|
||||
@@ -55,13 +55,13 @@ suburbs of Rome the rules are a little different; these differences
|
||||
can be pointed out here.
|
||||
|
||||
Proposed changes should be discussed on the
|
||||
[HotSpot Developers](mailto:hotspot-dev@openjdk.java.net) mailing
|
||||
[HotSpot Developers](mailto:hotspot-dev@openjdk.org) mailing
|
||||
list. Changes are likely to be cautious and incremental, since HotSpot
|
||||
coders have been using these guidelines for years.
|
||||
|
||||
Substantive changes are approved by
|
||||
[rough consensus](https://www.rfc-editor.org/rfc/rfc7282.html) of
|
||||
the [HotSpot Group](https://openjdk.java.net/census#hotspot) Members.
|
||||
the [HotSpot Group](https://openjdk.org/census#hotspot) Members.
|
||||
The Group Lead determines whether consensus has been reached.
|
||||
|
||||
Editorial changes (changes that only affect the description of HotSpot
|
||||
@@ -550,7 +550,7 @@ turned off. Many Standard Library facilities implicitly or explicitly
|
||||
use exceptions.
|
||||
|
||||
* `assert`. An issue that is quickly encountered is the `assert` macro name
|
||||
collision ([JDK-8007770](https://bugs.openjdk.java.net/browse/JDK-8007770)).
|
||||
collision ([JDK-8007770](https://bugs.openjdk.org/browse/JDK-8007770)).
|
||||
Some mechanism for addressing this would be needed before much of the
|
||||
Standard Library could be used. (Not all Standard Library implementations
|
||||
use assert in header files, but some do.)
|
||||
@@ -661,7 +661,7 @@ be a constant expression. When `thread_local` must be used, use the Hotspot macr
|
||||
consideration.
|
||||
|
||||
As was discussed in the review for
|
||||
[JDK-8230877](https://mail.openjdk.java.net/pipermail/hotspot-dev/2019-September/039487.html),
|
||||
[JDK-8230877](https://mail.openjdk.org/pipermail/hotspot-dev/2019-September/039487.html),
|
||||
`thread_local` allows dynamic initialization and destruction
|
||||
semantics. However, that support requires a run-time penalty for
|
||||
references to non-function-local `thread_local` variables defined in a
|
||||
@@ -671,7 +671,7 @@ non-local `thread_local` variables also has the same ordering
|
||||
problems as for ordinary non-local variables. So we avoid use of
|
||||
`thread_local` in general, limiting its use to only those cases where dynamic
|
||||
initialization or destruction are essential. See
|
||||
[JDK-8282469](https://bugs.openjdk.java.net/browse/JDK-8282469)
|
||||
[JDK-8282469](https://bugs.openjdk.org/browse/JDK-8282469)
|
||||
for further discussion.
|
||||
|
||||
### nullptr
|
||||
@@ -1120,8 +1120,6 @@ normal expected behavior of the operation.
|
||||
conversion operators. (Note that conversion to `bool` isn't needed
|
||||
in HotSpot code because of the "no implicit boolean" guideline.)
|
||||
|
||||
* Avoid covariant return types.
|
||||
|
||||
* Avoid `goto` statements.
|
||||
|
||||
### Undecided Features
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
<li><a href="#pkcs11-tests">PKCS11 Tests</a></li>
|
||||
<li><a href="#client-ui-tests">Client UI Tests</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#editing-this-document">Editing this document</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<h2 id="using-make-test-the-run-test-framework">Using "make test" (the run-test framework)</h2>
|
||||
@@ -64,6 +65,9 @@ $ make exploded-test TEST=tier2</code></pre>
|
||||
<h3 id="configuration">Configuration</h3>
|
||||
<p>To be able to run JTReg tests, <code>configure</code> needs to know where to find the JTReg test framework. If it is not picked up automatically by configure, use the <code>--with-jtreg=<path to jtreg home></code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc. (An alternative is to set the <code>JT_HOME</code> environment variable to point to the JTReg home before running <code>configure</code>.)</p>
|
||||
<p>To be able to run microbenchmarks, <code>configure</code> needs to know where to find the JMH dependency. Use <code>--with-jmh=<path to JMH jars></code> to point to a directory containing the core JMH and transitive dependencies. The recommended dependencies can be retrieved by running <code>sh make/devkit/createJMHBundle.sh</code>, after which <code>--with-jmh=build/jmh/jars</code> should work.</p>
|
||||
<p>When tests fail or timeout, jtreg runs its failure handler to capture necessary data from the system where the test was run. This data can then be used to analyze the test failures. Collecting this data involves running various commands (which are listed in files residing in <code>test/failure_handler/src/share/conf</code>) and some of these commands use <code>sudo</code>. If the system's <code>sudoers</code> file isn't configured to allow running these commands, then it can result in password being prompted during the failure handler execution. Typically, when running locally, collecting this additional data isn't always necessary. To disable running the failure handler, use <code>--enable-jtreg-failure-handler=no</code> when running <code>configure</code>. If, however, you want to let the failure handler to run and don't want to be prompted for sudo password, then you can configure your <code>sudoers</code> file appropriately. Please read the necessary documentation of your operating system to see how to do that; here we only show one possible way of doing that - edit the <code>/etc/sudoers.d/sudoers</code> file to include the following line:</p>
|
||||
<pre><code>johndoe ALL=(ALL) NOPASSWD: /sbin/dmesg</code></pre>
|
||||
<p>This line configures <code>sudo</code> to <em>not</em> prompt for password for the <code>/sbin/dmesg</code> command (this is one of the commands that is listed in the files at <code>test/failure_handler/src/share/conf</code>), for the user <code>johndoe</code>. Here <code>johndoe</code> is the user account under which the jtreg tests are run. Replace the username with a relevant user account of your system.</p>
|
||||
<h2 id="test-selection">Test selection</h2>
|
||||
<p>All functionality is available using the <code>test</code> make target. In this use case, the test or tests to be executed is controlled using the <code>TEST</code> variable. To speed up subsequent test runs with no source code changes, <code>test-only</code> can be used instead, which do not depend on the source and test image build.</p>
|
||||
<p>For some common top-level tests, direct make targets have been generated. This includes all JTReg test groups, the hotspot gtest, and custom tests (if present). This means that <code>make test-tier1</code> is equivalent to <code>make test TEST="tier1"</code>, but the latter is more tab-completion friendly. For more complex test runs, the <code>test TEST="x"</code> solution needs to be used.</p>
|
||||
@@ -82,7 +86,7 @@ $ make exploded-test TEST=tier2</code></pre>
|
||||
<li><p><code>tier4</code>: This test group includes every other test not covered by previous tiers. It includes, for example, <code>vmTestbase</code> suites for Hotspot, which run for many hours even on large machines. It also runs GUI tests, so the same <code>TEST_JOBS</code> and <code>JTREG_KEYWORDS</code> caveats apply.</p></li>
|
||||
</ul>
|
||||
<h3 id="jtreg">JTReg</h3>
|
||||
<p>JTReg tests can be selected either by picking a JTReg test group, or a selection of files or directories containing JTReg tests.</p>
|
||||
<p>JTReg tests can be selected either by picking a JTReg test group, or a selection of files or directories containing JTReg tests. Documentation can be found at <a href="https://openjdk.org/jtreg/">https://openjdk.org/jtreg/</a>, note especially the extensive <a href="https://openjdk.org/jtreg/faq.html">FAQ</a>.</p>
|
||||
<p>JTReg test groups can be specified either without a test root, e.g. <code>:tier1</code> (or <code>tier1</code>, the initial colon is optional), or with, e.g. <code>hotspot:tier1</code>, <code>test/jdk:jdk_util</code> or <code>$(TOPDIR)/test/hotspot/jtreg:hotspot_all</code>. The test root can be specified either as an absolute path, or a path relative to the JDK top directory, or the <code>test</code> directory. For simplicity, the hotspot JTReg test root, which really is <code>hotspot/jtreg</code> can be abbreviated as just <code>hotspot</code>.</p>
|
||||
<p>When specified without a test root, all matching groups from all test roots will be added. Otherwise, only the group from the specified test root will be added.</p>
|
||||
<p>Individual JTReg tests or directories containing JTReg tests can also be specified, like <code>test/hotspot/jtreg/native_sanity/JniVersion.java</code> or <code>hotspot/jtreg/native_sanity</code>. Just like for test root selection, you can either specify an absolute path (which can even point to JTReg tests outside the source tree), or a path relative to either the JDK top directory or the <code>test</code> directory. <code>hotspot</code> can be used as an alias for <code>hotspot/jtreg</code> here as well.</p>
|
||||
@@ -251,5 +255,7 @@ $ make test JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US" TE
|
||||
<h4 id="windows">Windows</h4>
|
||||
<p>Type <code>gpedit</code> in the Search and then click Edit group policy; navigate to User Configuration -> Administrative Templates -> Windows Components -> File Explorer; in the right-side pane look for "Turn off Windows key hotkeys" and double click on it; enable or disable hotkeys.</p>
|
||||
<p>Note: restart is required to make the settings take effect.</p>
|
||||
<h2 id="editing-this-document">Editing this document</h2>
|
||||
<p>If you want to contribute changes to this document, edit <code>doc/testing.md</code> and then run <code>make update-build-docs</code> to generate the same changes in <code>doc/testing.html</code>.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -43,6 +43,31 @@ containing the core JMH and transitive dependencies. The recommended
|
||||
dependencies can be retrieved by running `sh make/devkit/createJMHBundle.sh`,
|
||||
after which `--with-jmh=build/jmh/jars` should work.
|
||||
|
||||
When tests fail or timeout, jtreg runs its failure handler to capture necessary
|
||||
data from the system where the test was run. This data can then be used to
|
||||
analyze the test failures. Collecting this data involves running various commands
|
||||
(which are listed in files residing in `test/failure_handler/src/share/conf`)
|
||||
and some of these commands use `sudo`. If the system's `sudoers` file isn't
|
||||
configured to allow running these commands, then it can result in password being
|
||||
prompted during the failure handler execution. Typically, when running locally,
|
||||
collecting this additional data isn't always necessary. To disable running the
|
||||
failure handler, use `--enable-jtreg-failure-handler=no` when running `configure`.
|
||||
If, however, you want to let the failure handler to run and don't want to be
|
||||
prompted for sudo password, then you can configure your `sudoers` file
|
||||
appropriately. Please read the necessary documentation of your operating system
|
||||
to see how to do that; here we only show one possible way of doing that - edit
|
||||
the `/etc/sudoers.d/sudoers` file to include the following line:
|
||||
|
||||
```
|
||||
johndoe ALL=(ALL) NOPASSWD: /sbin/dmesg
|
||||
```
|
||||
|
||||
This line configures `sudo` to _not_ prompt for password for the `/sbin/dmesg`
|
||||
command (this is one of the commands that is listed in the files
|
||||
at `test/failure_handler/src/share/conf`), for the user `johndoe`. Here `johndoe`
|
||||
is the user account under which the jtreg tests are run. Replace the username
|
||||
with a relevant user account of your system.
|
||||
|
||||
## Test selection
|
||||
|
||||
All functionality is available using the `test` make target. In this use case,
|
||||
@@ -113,7 +138,9 @@ apply.
|
||||
### JTReg
|
||||
|
||||
JTReg tests can be selected either by picking a JTReg test group, or a selection
|
||||
of files or directories containing JTReg tests.
|
||||
of files or directories containing JTReg tests. Documentation can be found at
|
||||
[https://openjdk.org/jtreg/](https://openjdk.org/jtreg/), note especially the
|
||||
extensive [FAQ](https://openjdk.org/jtreg/faq.html).
|
||||
|
||||
JTReg test groups can be specified either without a test root, e.g. `:tier1`
|
||||
(or `tier1`, the initial colon is optional), or with, e.g. `hotspot:tier1`,
|
||||
@@ -578,6 +605,12 @@ double click on it; enable or disable hotkeys.
|
||||
|
||||
Note: restart is required to make the settings take effect.
|
||||
|
||||
## Editing this document
|
||||
|
||||
If you want to contribute changes to this document, edit `doc/testing.md` and
|
||||
then run `make update-build-docs` to generate the same changes in
|
||||
`doc/testing.html`.
|
||||
|
||||
---
|
||||
# Override some definitions in the global css file that are not optimal for
|
||||
# this document.
|
||||
|
||||
@@ -278,16 +278,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
$(SYMBOLS_EXCLUDE_PATTERN), \
|
||||
$(ALL_JRE_FILES))
|
||||
|
||||
# On Macosx release builds, when there is a code signing certificate available,
|
||||
# the final bundle layout can be signed.
|
||||
SIGN_BUNDLE := false
|
||||
ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
|
||||
ifneq ($(CODESIGN), )
|
||||
SIGN_BUNDLE := true
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(SIGN_BUNDLE), true)
|
||||
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
|
||||
# Macosx release build and code signing available.
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -189,7 +189,7 @@ $(eval $(call SetupBuildDemo, Font2DTest, \
|
||||
$(eval $(call SetupBuildDemo, J2Ddemo, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
MAIN_CLASS := java2d.J2Ddemo, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked cast, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked cast lossy-conversions, \
|
||||
JAR_NAME := J2Ddemo, \
|
||||
))
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -48,6 +48,30 @@ $(BUILDTOOLS_OUTPUTDIR)/gensrc/%.interim/module-info.java: \
|
||||
TARGETS += $(patsubst %, $(BUILDTOOLS_OUTPUTDIR)/gensrc/%/module-info.java, \
|
||||
$(INTERIM_LANGTOOLS_MODULES))
|
||||
|
||||
################################################################################
|
||||
# Generate interim versions of the ToolProvider.java files for the interim
|
||||
# langtools modules, which will allow to load javac from the interim
|
||||
# jdk.compiler.
|
||||
|
||||
INTERIM_TOOL_PROVIDER_PATTERN := \
|
||||
$(foreach m, $(INTERIM_LANGTOOLS_BASE_MODULES), -e 's/"$m"/"$m.interim"/g')
|
||||
|
||||
$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.java: \
|
||||
$(TOPDIR)/src/java.compiler/share/classes/javax/tools/ToolProvider.java
|
||||
$(call LogInfo, Generating ToolProvider.java for java.compiler.interim)
|
||||
$(call MakeDir, $(@D))
|
||||
$(SED) $(INTERIM_TOOL_PROVIDER_PATTERN) $< > $@
|
||||
|
||||
java.compiler.interim_EXTRA_FILES := \
|
||||
$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.java
|
||||
|
||||
TARGETS += $(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.java
|
||||
|
||||
################################################################################
|
||||
# Use the up-to-date PreviewFeature.java and NoPreview.java from the current
|
||||
# sources, instead of the versions from the boot JDK, as javac may be referring
|
||||
# to constants from the up-to-date versions.
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_PREVIEW_FEATURES, \
|
||||
FILES := $(TOPDIR)/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java \
|
||||
$(TOPDIR)/src/java.base/share/classes/jdk/internal/javac/NoPreview.java, \
|
||||
@@ -73,8 +97,10 @@ define SetupInterimModule
|
||||
$(TOPDIR)/src/$1/share/classes, \
|
||||
EXCLUDES := sun javax/tools/snippet-files, \
|
||||
EXCLUDE_FILES := $(TOPDIR)/src/$1/share/classes/module-info.java \
|
||||
$(TOPDIR)/src/$1/share/classes/javax/tools/ToolProvider.java \
|
||||
Standard.java, \
|
||||
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java, \
|
||||
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java \
|
||||
$($1.interim_EXTRA_FILES), \
|
||||
COPY := .gif .png .xml .css .svg .js .js.template .txt javax.tools.JavaCompilerTool, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules/$1.interim, \
|
||||
DISABLED_WARNINGS := module options, \
|
||||
|
||||
@@ -121,8 +121,8 @@ TARGETS += $($(MODULE))
|
||||
# Since the other modules are declared in different invocations of this file,
|
||||
# use the macro to find the correct target file to depend on.
|
||||
# Only the javac compilation actually depends on other modules so limit
|
||||
# dependency declaration to that by using the *_COMPILE_TARGET variable.
|
||||
$($(MODULE)_COMPILE_TARGET): $(foreach d, $(call FindDepsForModule, $(MODULE)), \
|
||||
# dependency declaration to that by using the *_MODFILELIST variable.
|
||||
$($(MODULE)_MODFILELIST): $(foreach d, $(call FindDepsForModule, $(MODULE)), \
|
||||
$(call SetupJavaCompilationApiTarget, $d, \
|
||||
$(if $($d_BIN), $($d_BIN), $(JDK_OUTPUTDIR)/modules/$d)))
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -77,6 +77,13 @@ $(eval $(call SetupJavaCompilation, COMPILE_DEPEND, \
|
||||
INCLUDES := build/tools/depend, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/depend, \
|
||||
DISABLED_WARNINGS := options, \
|
||||
JAVAC_FLAGS := \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED, \
|
||||
))
|
||||
|
||||
DEPEND_SERVICE_PROVIDER := $(BUILDTOOLS_OUTPUTDIR)/depend/META-INF/services/com.sun.source.util.Plugin
|
||||
|
||||
@@ -226,6 +226,20 @@ else
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
|
||||
endif
|
||||
|
||||
# Unless we are creating a very large module, use the small tool JVM options
|
||||
JMOD_SMALL_FLAGS :=
|
||||
ifeq ($(findstring $(MODULE), java.base java.desktop jdk.localedata), )
|
||||
JMOD_SMALL_FLAGS += $(JAVA_TOOL_FLAGS_SMALL)
|
||||
endif
|
||||
|
||||
ifeq ($(INTERIM_JMOD), true)
|
||||
# Interim JMODs are not shipped anywhere, so there is no reason
|
||||
# to compress them at all.
|
||||
JMOD_FLAGS += --compress zip-0
|
||||
else
|
||||
JMOD_FLAGS += --compress $(JMOD_COMPRESS)
|
||||
endif
|
||||
|
||||
# Create jmods in the support dir and then move them into place to keep the
|
||||
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
|
||||
$(eval $(call SetupExecute, create_$(JMOD_FILE), \
|
||||
@@ -234,7 +248,7 @@ $(eval $(call SetupExecute, create_$(JMOD_FILE), \
|
||||
OUTPUT_FILE := $(JMODS_DIR)/$(JMOD_FILE), \
|
||||
SUPPORT_DIR := $(JMODS_SUPPORT_DIR), \
|
||||
PRE_COMMAND := $(RM) $(JMODS_DIR)/$(JMOD_FILE) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
|
||||
COMMAND := $(JMOD) create --module-version $(VERSION_SHORT) \
|
||||
COMMAND := $(JMOD) $(JMOD_SMALL_FLAGS) create --module-version $(VERSION_SHORT) \
|
||||
--target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \
|
||||
--module-path $(JMODS_DIR) $(JMOD_FLAGS) \
|
||||
--date $(SOURCE_DATE_ISO_8601) \
|
||||
|
||||
@@ -69,8 +69,6 @@ JAVADOC_TAGS := \
|
||||
-tag beaninfo:X \
|
||||
-tag revised:X \
|
||||
-tag since.unbundled:X \
|
||||
-tag spec:X \
|
||||
-tag specdefault:X \
|
||||
-tag Note:X \
|
||||
-tag ToDo:X \
|
||||
-tag 'apiNote:a:API Note:' \
|
||||
@@ -86,6 +84,7 @@ JAVADOC_TAGS := \
|
||||
-tag since \
|
||||
-tag serialData \
|
||||
-tag factory \
|
||||
-tag spec \
|
||||
-tag see \
|
||||
-taglet build.tools.taglet.ExtLink \
|
||||
-taglet build.tools.taglet.Incubating \
|
||||
|
||||
@@ -134,7 +134,7 @@ epilogue: check-bad-file-names
|
||||
$(ECHO) '* The build README (doc/building.md) is a great source of information,'
|
||||
$(ECHO) 'especially the chapter "Fixing Unexpected Build Failures". Check it out!'
|
||||
$(ECHO)
|
||||
$(ECHO) '* If you still need assistance please contact build-dev@openjdk.java.net.'
|
||||
$(ECHO) '* If you still need assistance please contact build-dev@openjdk.org.'
|
||||
$(ECHO)
|
||||
|
||||
TARGETS += epilogue
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -48,6 +48,7 @@ JIMAGE_PKGS := \
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_JRTFS, \
|
||||
COMPILER := bootjdk, \
|
||||
DISABLED_WARNINGS := options, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_JDK8), \
|
||||
SRC := $(TOPDIR)/src/java.base/share/classes, \
|
||||
EXCLUDE_FILES := module-info.java, \
|
||||
|
||||
@@ -854,7 +854,7 @@ define SetupRunJtregTestBody
|
||||
-dir:$$(JTREG_TOPDIR) \
|
||||
-reportDir:$$($1_TEST_RESULTS_DIR) \
|
||||
-workDir:$$($1_TEST_SUPPORT_DIR) \
|
||||
-status:$$$${JTREG_STATUS} \
|
||||
$$$${JTREG_STATUS} \
|
||||
$$(JTREG_OPTIONS) \
|
||||
$$(JTREG_FAILURE_HANDLER_OPTIONS) \
|
||||
$$(JTREG_COV_OPTIONS) \
|
||||
@@ -1185,13 +1185,11 @@ ifeq ($(TEST_OPTS_JCOV), true)
|
||||
JCOV_SOURCE_DIFF := $(JCOV_OUTPUT_DIR)/source_diff
|
||||
JCOV_DIFF_COVERAGE_REPORT := $(JCOV_OUTPUT_DIR)/diff_coverage_report
|
||||
|
||||
ifneq ($(and $(HG), $(wildcard $(TOPDIR)/.hg)), )
|
||||
DIFF_COMMAND := $(HG) -R $(TOPDIR) diff -r $(TEST_OPTS_JCOV_DIFF_CHANGESET) > $(JCOV_SOURCE_DIFF)
|
||||
else ifneq ($(and $(GIT), $(wildcard $(TOPDIR)/.git)), )
|
||||
ifneq ($(and $(GIT), $(wildcard $(TOPDIR)/.git)), )
|
||||
DIFF_COMMAND := $(GIT) -C $(TOPDIR) diff $(TEST_OPTS_JCOV_DIFF_CHANGESET) > $(JCOV_SOURCE_DIFF)
|
||||
else
|
||||
$(info Error: Must be either hg or git source tree for diff coverage.)
|
||||
$(error Neither hg nor git source tree.)
|
||||
$(info Error: Must be a git source tree for diff coverage.)
|
||||
$(error No git source tree.)
|
||||
endif
|
||||
|
||||
jcov-gen-diffcoverage: jcov-stop-grabber
|
||||
|
||||
@@ -169,7 +169,6 @@ ZIPEXE := zip
|
||||
UNZIP := unzip
|
||||
EXPR := expr
|
||||
FILE := file
|
||||
HG := hg
|
||||
ULIMIT := ulimit
|
||||
|
||||
ifeq ($(OPENJDK_BUILD_OS), windows)
|
||||
|
||||
@@ -42,11 +42,7 @@ $(eval $(call IncludeCustomExtension, SourceRevision-pre.gmk))
|
||||
STORED_SOURCE_REVISION := $(TOPDIR)/.src-rev
|
||||
|
||||
USE_SCM := false
|
||||
ifneq ($(and $(HG), $(wildcard $(TOPDIR)/.hg)), )
|
||||
USE_SCM := true
|
||||
SCM_DIR := .hg
|
||||
ID_COMMAND := $(PRINTF) "hg:%s" "$$($(HG) id -i)"
|
||||
else ifneq ($(and $(GIT), $(wildcard $(TOPDIR)/.git)), )
|
||||
ifneq ($(and $(GIT), $(wildcard $(TOPDIR)/.git)), )
|
||||
USE_SCM := true
|
||||
SCM_DIR := .git
|
||||
ID_COMMAND := $(PRINTF) "git:%s%s\n" \
|
||||
@@ -85,7 +81,7 @@ ifeq ($(USE_SCM), true)
|
||||
REPO_REVISIONS += $$(SUPPORT_OUTPUTDIR)/src-rev/$$($1_FILENAME)
|
||||
endef
|
||||
|
||||
# Setup rules for all repos. This makes sure all the "hg id" calls are made
|
||||
# Setup rules for all repos. This makes sure all the "git log" calls are made
|
||||
# in parallel.
|
||||
$(foreach repo, $(call FindAllReposRel), \
|
||||
$(eval $(call SetupGetRevisionForRepo, $(repo))) \
|
||||
|
||||
@@ -453,7 +453,7 @@ AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
|
||||
# in the source tree when configure runs
|
||||
file_to_test="$TOPDIR/Makefile"
|
||||
if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
|
||||
AC_MSG_ERROR([Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin.])
|
||||
AC_MSG_ERROR([Bad file permissions on src files. This is usually caused by cloning the repositories with non cygwin tools in a directory not created in cygwin.])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -342,7 +342,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
|
||||
UTIL_LOOKUP_PROGS(READELF, greadelf readelf)
|
||||
UTIL_LOOKUP_PROGS(DOT, dot)
|
||||
UTIL_LOOKUP_PROGS(HG, hg)
|
||||
UTIL_LOOKUP_PROGS(STAT, stat)
|
||||
UTIL_LOOKUP_PROGS(TIME, time)
|
||||
UTIL_LOOKUP_PROGS(FLOCK, flock)
|
||||
@@ -376,41 +375,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
UTIL_REQUIRE_PROGS(MIG, mig)
|
||||
UTIL_REQUIRE_PROGS(XATTR, xattr)
|
||||
UTIL_LOOKUP_PROGS(CODESIGN, codesign)
|
||||
|
||||
# Check for user provided code signing identity.
|
||||
UTIL_ARG_WITH(NAME: macosx-codesign-identity, TYPE: string,
|
||||
DEFAULT: openjdk_codesign, CHECK_VALUE: UTIL_CHECK_STRING_NON_EMPTY,
|
||||
DESC: [specify the macosx code signing identity],
|
||||
CHECKING_MSG: [for macosx code signing identity]
|
||||
)
|
||||
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
|
||||
|
||||
if test "x$CODESIGN" != "x"; then
|
||||
# Verify that the codesign certificate is present
|
||||
AC_MSG_CHECKING([if codesign certificate is present])
|
||||
$RM codesign-testfile
|
||||
$TOUCH codesign-testfile
|
||||
$CODESIGN -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile 2>&AS_MESSAGE_LOG_FD \
|
||||
>&AS_MESSAGE_LOG_FD || CODESIGN=
|
||||
$RM codesign-testfile
|
||||
if test "x$CODESIGN" = x; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
# Verify that the codesign has --option runtime
|
||||
AC_MSG_CHECKING([if codesign has --option runtime])
|
||||
$RM codesign-testfile
|
||||
$TOUCH codesign-testfile
|
||||
$CODESIGN --option runtime -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile \
|
||||
2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
|
||||
$RM codesign-testfile
|
||||
if test "x$CODESIGN" = x; then
|
||||
AC_MSG_ERROR([codesign does not have --option runtime. macOS 10.13.6 and above is required.])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
UTIL_REQUIRE_PROGS(SETFILE, SetFile)
|
||||
fi
|
||||
if ! test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
|
||||
@@ -40,6 +40,7 @@ export AWK="@AWK@"
|
||||
export BASH="@BASH@"
|
||||
export CAT="@CAT@"
|
||||
export CMP="@CMP@"
|
||||
export CODESIGN="@CODESIGN@"
|
||||
export CP="@CP@"
|
||||
export CUT="@CUT@"
|
||||
export DIFF="@DIFF@"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
AC_INIT(OpenJDK, openjdk, build-dev@openjdk.java.net,,http://openjdk.java.net)
|
||||
AC_INIT(OpenJDK, openjdk, build-dev@openjdk.org,,https://openjdk.org)
|
||||
|
||||
AC_CONFIG_AUX_DIR([$TOPDIR/make/autoconf/build-aux])
|
||||
m4_include([build-aux/pkg.m4])
|
||||
@@ -133,6 +133,7 @@ BASIC_SETUP_DEFAULT_LOG
|
||||
###############################################################################
|
||||
|
||||
# We need build & target for this.
|
||||
JDKOPT_SETUP_JMOD_OPTIONS
|
||||
JDKOPT_SETUP_JLINK_OPTIONS
|
||||
JDKVER_SETUP_JDK_VERSION_NUMBERS
|
||||
|
||||
@@ -247,6 +248,7 @@ JDKOPT_EXCLUDE_TRANSLATIONS
|
||||
JDKOPT_ENABLE_DISABLE_MANPAGES
|
||||
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE
|
||||
JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT
|
||||
JDKOPT_SETUP_MACOSX_SIGNING
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
||||
@@ -167,11 +167,7 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-WX"
|
||||
|
||||
WARNINGS_ENABLE_ALL="-W3"
|
||||
DISABLED_WARNINGS="4800"
|
||||
if test "x$TOOLCHAIN_VERSION" = x2017; then
|
||||
# VS2017 incorrectly triggers this warning for constexpr
|
||||
DISABLED_WARNINGS="$DISABLED_WARNINGS 4307"
|
||||
fi
|
||||
DISABLED_WARNINGS="4800 5105"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
@@ -534,25 +530,15 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
TOOLCHAIN_CFLAGS_JVM="-qtbtable=full -qtune=balanced \
|
||||
-qalias=noansi -qstrict -qtls=default -qnortti -qnoeh -qignerrno -qstackprotect"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:strictStrings -MP"
|
||||
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:strictStrings -Zc:wchar_t-"
|
||||
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:strictStrings -MP"
|
||||
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:wchar_t-"
|
||||
fi
|
||||
|
||||
# CFLAGS C language level for JDK sources (hotspot only uses C++)
|
||||
# Ideally we would have a common level across all toolchains so that all sources
|
||||
# are sure to conform to the same standard. Unfortunately neither our sources nor
|
||||
# our toolchains are in a condition to support that. But what we loosely aim for is
|
||||
# C99 level.
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
# Explicitly set C99. clang and xlclang support the same flag.
|
||||
LANGSTD_CFLAGS="-std=c99"
|
||||
LANGSTD_CFLAGS="-std=c11"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# MSVC doesn't support C99/C11 explicitly, unless you compile as C++:
|
||||
# LANGSTD_CFLAGS="-TP"
|
||||
# but that requires numerous changes to the sources files. So we are limited
|
||||
# to C89/C90 plus whatever extensions Visual Studio has decided to implement.
|
||||
# This is the lowest bar for shared code.
|
||||
LANGSTD_CFLAGS=""
|
||||
LANGSTD_CFLAGS="-std:c11"
|
||||
fi
|
||||
TOOLCHAIN_CFLAGS_JDK_CONLY="$LANGSTD_CFLAGS $TOOLCHAIN_CFLAGS_JDK_CONLY"
|
||||
|
||||
|
||||
@@ -472,6 +472,31 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_BUILD],
|
||||
AC_SUBST(STATIC_BUILD)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# jmod options.
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JMOD_OPTIONS],
|
||||
[
|
||||
# Final JMODs are recompiled often during development, and java.base JMOD
|
||||
# includes the JVM libraries. In release mode, prefer to compress JMODs fully.
|
||||
# In debug mode, pay with a little extra space, but win a lot of CPU time back
|
||||
# with the lightest (but still some) compression.
|
||||
if test "x$DEBUG_LEVEL" = xrelease; then
|
||||
DEFAULT_JMOD_COMPRESS="zip-6"
|
||||
else
|
||||
DEFAULT_JMOD_COMPRESS="zip-1"
|
||||
fi
|
||||
|
||||
UTIL_ARG_WITH(NAME: jmod-compress, TYPE: literal,
|
||||
VALID_VALUES: [zip-0 zip-1 zip-2 zip-3 zip-4 zip-5 zip-6 zip-7 zip-8 zip-9],
|
||||
DEFAULT: $DEFAULT_JMOD_COMPRESS,
|
||||
CHECKING_MSG: [for JMOD compression type],
|
||||
DESC: [specify JMOD compression type (zip-[0-9])]
|
||||
)
|
||||
AC_SUBST(JMOD_COMPRESS)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# jlink options.
|
||||
@@ -696,3 +721,105 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
|
||||
|
||||
UTIL_DEPRECATED_ARG_ENABLE(reproducible-build)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Setup signing on macOS. This can either be setup to sign with a real identity
|
||||
# and enabling the hardened runtime, or it can simply add the debug entitlement
|
||||
# com.apple.security.get-task-allow without actually signing any binaries. The
|
||||
# latter is needed to be able to debug processes and dump core files on modern
|
||||
# versions of macOS. It can also be skipped completely.
|
||||
#
|
||||
# Check if codesign will run with the given parameters
|
||||
# $1: Parameters to run with
|
||||
# $2: Checking message
|
||||
# Sets CODESIGN_SUCCESS=true/false
|
||||
AC_DEFUN([JDKOPT_CHECK_CODESIGN_PARAMS],
|
||||
[
|
||||
PARAMS="$1"
|
||||
MESSAGE="$2"
|
||||
CODESIGN_TESTFILE="$CONFIGURESUPPORT_OUTPUTDIR/codesign-testfile"
|
||||
$RM "$CODESIGN_TESTFILE"
|
||||
$TOUCH "$CODESIGN_TESTFILE"
|
||||
CODESIGN_SUCCESS=false
|
||||
$CODESIGN $PARAMS "$CODESIGN_TESTFILE" 2>&AS_MESSAGE_LOG_FD \
|
||||
>&AS_MESSAGE_LOG_FD && CODESIGN_SUCCESS=true
|
||||
$RM "$CODESIGN_TESTFILE"
|
||||
AC_MSG_CHECKING([$MESSAGE])
|
||||
if test "x$CODESIGN_SUCCESS" = "xtrue"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([JDKOPT_CHECK_CODESIGN_HARDENED],
|
||||
[
|
||||
JDKOPT_CHECK_CODESIGN_PARAMS([-s "$MACOSX_CODESIGN_IDENTITY" --option runtime],
|
||||
[if codesign with hardened runtime is possible])
|
||||
])
|
||||
|
||||
AC_DEFUN([JDKOPT_CHECK_CODESIGN_DEBUG],
|
||||
[
|
||||
JDKOPT_CHECK_CODESIGN_PARAMS([-s -], [if debug mode codesign is possible])
|
||||
])
|
||||
|
||||
AC_DEFUN([JDKOPT_SETUP_MACOSX_SIGNING],
|
||||
[
|
||||
ENABLE_CODESIGN=false
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx" && test "x$CODESIGN" != "x"; then
|
||||
|
||||
UTIL_ARG_WITH(NAME: macosx-codesign, TYPE: literal, OPTIONAL: true,
|
||||
VALID_VALUES: [hardened debug auto], DEFAULT: auto,
|
||||
ENABLED_DEFAULT: true,
|
||||
CHECKING_MSG: [for macosx code signing mode],
|
||||
DESC: [set the macosx code signing mode (hardened, debug, auto)]
|
||||
)
|
||||
|
||||
MACOSX_CODESIGN_MODE=disabled
|
||||
if test "x$MACOSX_CODESIGN_ENABLED" = "xtrue"; then
|
||||
|
||||
# Check for user provided code signing identity.
|
||||
UTIL_ARG_WITH(NAME: macosx-codesign-identity, TYPE: string,
|
||||
DEFAULT: openjdk_codesign, CHECK_VALUE: UTIL_CHECK_STRING_NON_EMPTY,
|
||||
DESC: [specify the macosx code signing identity],
|
||||
CHECKING_MSG: [for macosx code signing identity]
|
||||
)
|
||||
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
|
||||
|
||||
if test "x$MACOSX_CODESIGN" = "xauto"; then
|
||||
# Only try to default to hardened signing on release builds
|
||||
if test "x$DEBUG_LEVEL" = "xrelease"; then
|
||||
JDKOPT_CHECK_CODESIGN_HARDENED
|
||||
if test "x$CODESIGN_SUCCESS" = "xtrue"; then
|
||||
MACOSX_CODESIGN_MODE=hardened
|
||||
fi
|
||||
fi
|
||||
if test "x$MACOSX_CODESIGN_MODE" = "xdisabled"; then
|
||||
JDKOPT_CHECK_CODESIGN_DEBUG
|
||||
if test "x$CODESIGN_SUCCESS" = "xtrue"; then
|
||||
MACOSX_CODESIGN_MODE=debug
|
||||
fi
|
||||
fi
|
||||
AC_MSG_CHECKING([for macosx code signing mode])
|
||||
AC_MSG_RESULT([$MACOSX_CODESIGN_MODE])
|
||||
elif test "x$MACOSX_CODESIGN" = "xhardened"; then
|
||||
JDKOPT_CHECK_CODESIGN_HARDENED
|
||||
if test "x$CODESIGN_SUCCESS" = "xfalse"; then
|
||||
AC_MSG_ERROR([Signing with hardened runtime is not possible])
|
||||
fi
|
||||
MACOSX_CODESIGN_MODE=hardened
|
||||
elif test "x$MACOSX_CODESIGN" = "xdebug"; then
|
||||
JDKOPT_CHECK_CODESIGN_DEBUG
|
||||
if test "x$CODESIGN_SUCCESS" = "xfalse"; then
|
||||
AC_MSG_ERROR([Signing in debug mode is not possible])
|
||||
fi
|
||||
MACOSX_CODESIGN_MODE=debug
|
||||
else
|
||||
AC_MSG_ERROR([unknown value for --with-macosx-codesign: $MACOSX_CODESIGN])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
|
||||
AC_SUBST(MACOSX_CODESIGN_MODE)
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -275,6 +275,8 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_JVMCI],
|
||||
AC_MSG_RESULT([yes])
|
||||
elif test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
elif test "x$OPENJDK_TARGET_CPU" = "xriscv64"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU])
|
||||
AVAILABLE=false
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
################################################################################
|
||||
|
||||
# Minimum supported version
|
||||
JTREG_MINIMUM_VERSION=6.1
|
||||
JTREG_MINIMUM_VERSION=7
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
||||
94
make/autoconf/lib-wayland.m4
Normal file
94
make/autoconf/lib-wayland.m4
Normal file
@@ -0,0 +1,94 @@
|
||||
#
|
||||
# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2021, JetBrains s.r.o.. 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.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Setup wayland
|
||||
################################################################################
|
||||
AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
||||
[
|
||||
AC_ARG_WITH(wayland, [AS_HELP_STRING([--with-wayland],
|
||||
[specify prefix directory for the wayland package
|
||||
(expecting the headers under PATH/include)])])
|
||||
AC_ARG_WITH(wayland-include, [AS_HELP_STRING([--with-wayland-include],
|
||||
[specify directory for the wayland include files])])
|
||||
|
||||
if test "x$NEEDS_LIB_WAYLAND" = xfalse; then
|
||||
if (test "x${with_wayland}" != x && test "x${with_wayland}" != xno) || \
|
||||
(test "x${with_wayland_include}" != x && test "x${with_wayland_include}" != xno); then
|
||||
AC_MSG_WARN([[wayland not used, so --with-wayland[-*] is ignored]])
|
||||
fi
|
||||
WAYLAND_CFLAGS=
|
||||
WAYLAND_LIBS=
|
||||
else
|
||||
WAYLAND_FOUND=no
|
||||
|
||||
if test "x${with_wayland}" = xno || test "x${with_wayland_include}" = xno; then
|
||||
AC_MSG_ERROR([It is not possible to disable the use of wayland. Remove the --without-wayland option.])
|
||||
fi
|
||||
|
||||
if test "x${with_wayland}" != x; then
|
||||
AC_MSG_CHECKING([for wayland headers])
|
||||
if test -s "${with_wayland}/include/wayland-client.h" && test -s "${with_wayland}/include/wayland-cursor.h"; then
|
||||
WAYLAND_CFLAGS="-I${with_wayland}/include"
|
||||
WAYLAND_LIBS="-L${with_wayland}/lib -lwayland-client -lwayland-cursor"
|
||||
|
||||
WAYLAND_FOUND=yes
|
||||
AC_MSG_RESULT([$WAYLAND_FOUND])
|
||||
else
|
||||
AC_MSG_ERROR([Can't find 'include/wayland-client.h' and 'include/wayland-cursor.h' under ${with_wayland} given with the --with-wayland option.])
|
||||
fi
|
||||
fi
|
||||
if test "x${with_wayland_include}" != x; then
|
||||
AC_MSG_CHECKING([for wayland headers])
|
||||
if test -s "${with_wayland_include}/wayland-client.h" && test -s "${with_wayland_include}/wayland-cursor.h"; then
|
||||
WAYLAND_CFLAGS="-I${with_wayland_include}"
|
||||
WAYLAND_FOUND=yes
|
||||
AC_MSG_RESULT([$WAYLAND_FOUND])
|
||||
else
|
||||
AC_MSG_ERROR([Can't find 'wayland-client.h' and 'wayland-cursor.h' under ${with_wayland_include} given with the --with-wayland-include option.])
|
||||
fi
|
||||
fi
|
||||
if test "x$WAYLAND_FOUND" = xno; then
|
||||
# Are the wayland headers installed in the default /usr/include location?
|
||||
AC_CHECK_HEADERS([wayland-client.h wayland-cursor.h],
|
||||
[ WAYLAND_FOUND=yes ],
|
||||
[ WAYLAND_FOUND=no; break ]
|
||||
)
|
||||
if test "x$WAYLAND_FOUND" = xyes; then
|
||||
WAYLAND_CFLAGS=
|
||||
WAYLAND_LIBS="-lwayland-client -lwayland-cursor"
|
||||
DEFAULT_WAYLAND=yes
|
||||
fi
|
||||
fi
|
||||
if test "x$WAYLAND_FOUND" = xno; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([wayland])
|
||||
AC_MSG_ERROR([Could not find wayland! $HELP_MSG ])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(WAYLAND_CFLAGS)
|
||||
AC_SUBST(WAYLAND_LIBS)
|
||||
])
|
||||
@@ -33,6 +33,7 @@ m4_include([lib-freetype.m4])
|
||||
m4_include([lib-hsdis.m4])
|
||||
m4_include([lib-std.m4])
|
||||
m4_include([lib-x11.m4])
|
||||
m4_include([lib-wayland.m4])
|
||||
|
||||
m4_include([lib-tests.m4])
|
||||
|
||||
@@ -41,14 +42,20 @@ m4_include([lib-tests.m4])
|
||||
################################################################################
|
||||
AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
|
||||
[
|
||||
# Check if X11 is needed
|
||||
# Check if X11 and wayland is needed
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# No X11 support on windows or macosx
|
||||
# No X11 and wayland support on windows or macosx
|
||||
NEEDS_LIB_X11=false
|
||||
NEEDS_LIB_WAYLAND=false
|
||||
elif test "x$ENABLE_HEADLESS_ONLY" = xtrue; then
|
||||
# No X11 support needed when building headless only
|
||||
NEEDS_LIB_X11=false
|
||||
NEEDS_LIB_WAYLAND=false
|
||||
else
|
||||
# All other instances need X11, even if building headless only, libawt still
|
||||
# All other instances need X11 and wayland, even if building headless only, libawt still
|
||||
# needs X11 headers.
|
||||
NEEDS_LIB_X11=true
|
||||
NEEDS_LIB_WAYLAND=true
|
||||
fi
|
||||
|
||||
# Check if fontconfig is needed
|
||||
@@ -105,6 +112,7 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
|
||||
LIB_SETUP_LIBFFI
|
||||
LIB_SETUP_MISC_LIBS
|
||||
LIB_SETUP_X11
|
||||
LIB_SETUP_WAYLAND
|
||||
|
||||
LIB_TESTS_SETUP_GTEST
|
||||
|
||||
|
||||
@@ -453,13 +453,15 @@ endif
|
||||
# Necessary additional compiler flags to compile X11
|
||||
X_CFLAGS:=@X_CFLAGS@
|
||||
X_LIBS:=@X_LIBS@
|
||||
|
||||
WAYLAND_CFLAGS:=@WAYLAND_CFLAGS@
|
||||
WAYLAND_LIBS:=@WAYLAND_LIBS@
|
||||
# The lowest required version of macosx
|
||||
MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
|
||||
# The highest allowed version of macosx
|
||||
MACOSX_VERSION_MAX=@MACOSX_VERSION_MAX@
|
||||
|
||||
# The macosx code signing identity to use
|
||||
# The macosx code signing configuration
|
||||
MACOSX_CODESIGN_MODE:=@MACOSX_CODESIGN_MODE@
|
||||
MACOSX_CODESIGN_IDENTITY=@MACOSX_CODESIGN_IDENTITY@
|
||||
|
||||
# Toolchain type: gcc, clang, xlc, microsoft...
|
||||
@@ -664,7 +666,7 @@ JAVAC = $(JAVAC_CMD)
|
||||
JAVADOC = $(JAVADOC_CMD)
|
||||
JAR = $(JAR_CMD)
|
||||
JLINK = $(JLINK_CMD)
|
||||
JMOD = $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
|
||||
JMOD = $(JMOD_CMD)
|
||||
|
||||
BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
|
||||
BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
|
||||
@@ -701,6 +703,7 @@ JAVADOC_MAIN_CLASS = -m jdk.javadoc.interim/jdk.javadoc.internal.tool.Main
|
||||
NEW_JAVAC = $(INTERIM_LANGTOOLS_ARGS) $(JAVAC_MAIN_CLASS)
|
||||
NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS)
|
||||
|
||||
JMOD_COMPRESS:=@JMOD_COMPRESS@
|
||||
JLINK_KEEP_PACKAGED_MODULES:=@JLINK_KEEP_PACKAGED_MODULES@
|
||||
|
||||
RCFLAGS := @RCFLAGS@
|
||||
@@ -767,7 +770,6 @@ READELF:=@READELF@
|
||||
EXPR:=@EXPR@
|
||||
FILE:=@FILE@
|
||||
DOT:=@DOT@
|
||||
HG:=@HG@
|
||||
GIT:=@GIT@
|
||||
OBJCOPY:=@OBJCOPY@
|
||||
SETFILE:=@SETFILE@
|
||||
|
||||
@@ -52,7 +52,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
|
||||
# Minimum supported versions, empty means unspecified
|
||||
TOOLCHAIN_MINIMUM_VERSION_clang="3.5"
|
||||
TOOLCHAIN_MINIMUM_VERSION_gcc="6.0"
|
||||
TOOLCHAIN_MINIMUM_VERSION_microsoft="19.10.0.0" # VS2017
|
||||
TOOLCHAIN_MINIMUM_VERSION_microsoft="19.28.0.0" # VS2019 16.8, aka MSVC 14.28
|
||||
TOOLCHAIN_MINIMUM_VERSION_xlc=""
|
||||
|
||||
# Minimum supported linker versions, empty means unspecified
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -25,21 +25,7 @@
|
||||
|
||||
################################################################################
|
||||
# The order of these defines the priority by which we try to find them.
|
||||
VALID_VS_VERSIONS="2019 2017 2022"
|
||||
|
||||
VS_DESCRIPTION_2017="Microsoft Visual Studio 2017"
|
||||
VS_VERSION_INTERNAL_2017=141
|
||||
VS_MSVCR_2017=vcruntime140.dll
|
||||
VS_MSVCP_2017=msvcp140.dll
|
||||
VS_ENVVAR_2017="VS150COMNTOOLS"
|
||||
VS_USE_UCRT_2017="true"
|
||||
VS_VS_INSTALLDIR_2017="Microsoft Visual Studio/2017"
|
||||
VS_EDITIONS_2017="BuildTools Community Professional Enterprise"
|
||||
VS_SDK_INSTALLDIR_2017=
|
||||
VS_VS_PLATFORM_NAME_2017="v141"
|
||||
VS_SDK_PLATFORM_NAME_2017=
|
||||
VS_SUPPORTED_2017=true
|
||||
VS_TOOLSET_SUPPORTED_2017=true
|
||||
VALID_VS_VERSIONS="2022 2019"
|
||||
|
||||
VS_DESCRIPTION_2019="Microsoft Visual Studio 2019"
|
||||
VS_VERSION_INTERNAL_2019=142
|
||||
@@ -84,7 +70,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
|
||||
UTIL_FIXUP_PATH(VS_BASE, NOFAIL)
|
||||
|
||||
if test "x$VS_BASE" != x && test -d "$VS_BASE"; then
|
||||
# In VS 2017 and VS 2019, the default installation is in a subdir named after the edition.
|
||||
# In VS 2019, the default installation is in a subdir named after the edition.
|
||||
# Find the first one present and use that.
|
||||
if test "x$VS_EDITIONS" != x; then
|
||||
for edition in $VS_EDITIONS; do
|
||||
@@ -97,20 +83,18 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
|
||||
|
||||
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
|
||||
if test "x$TARGET_CPU" = xx86; then
|
||||
VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
|
||||
VCVARSFILES="vcvars32.bat vcvarsamd64_x86.bat"
|
||||
elif test "x$TARGET_CPU" = xx86_64; then
|
||||
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
|
||||
vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
|
||||
VCVARSFILES="vcvars64.bat vcvarsx86_amd64.bat"
|
||||
elif test "x$TARGET_CPU" = xaarch64; then
|
||||
# for host x86-64, target aarch64
|
||||
# aarch64 requires Visual Studio 16.8 or higher
|
||||
VCVARSFILES="vc/auxiliary/build/vcvarsamd64_arm64.bat \
|
||||
vc/auxiliary/build/vcvarsx86_arm64.bat"
|
||||
VCVARSFILES="vcvarsamd64_arm64.bat vcvarsx86_arm64.bat"
|
||||
fi
|
||||
|
||||
for VCVARSFILE in $VCVARSFILES; do
|
||||
if test -f "$VS_BASE/$VCVARSFILE"; then
|
||||
VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
|
||||
if test -f "$VS_BASE/vc/auxiliary/build/$VCVARSFILE"; then
|
||||
VS_ENV_CMD="$VS_BASE/vc/auxiliary/build/$VCVARSFILE"
|
||||
break
|
||||
fi
|
||||
done
|
||||
@@ -172,11 +156,9 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
|
||||
# build environment and assigns it to VS_ENV_CMD
|
||||
AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
|
||||
[
|
||||
# VS2017 provides the option to install previous minor versions of the MSVC
|
||||
# toolsets. It is not possible to directly download earlier minor versions of
|
||||
# VS2017 and in order to build with a previous minor compiler toolset version,
|
||||
# it is now possible to compile with earlier minor versions by passing
|
||||
# -vcvars_ver=<toolset_version> argument to vcvarsall.bat.
|
||||
# Since VS2017 MS provides the option to install previous minor versions of
|
||||
# the toolset. In order to build with a previous minor compiler toolset
|
||||
# version, pass -vcvars_ver=<toolset_version> argument to vcvarsall.bat.
|
||||
AC_ARG_WITH(msvc-toolset-version, [AS_HELP_STRING([--with-msvc-toolset-version],
|
||||
[specific MSVC toolset version to use, passed as -vcvars_ver argument to
|
||||
pass to vcvarsall.bat (Windows only)])])
|
||||
@@ -494,14 +476,9 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
|
||||
|
||||
if test "x$MSVC_DLL" = x; then
|
||||
if test "x$VCINSTALLDIR" != x; then
|
||||
if test "$VS_VERSION" -lt 2017; then
|
||||
# Probe: Using well-known location from Visual Studio 12.0 and older
|
||||
POSSIBLE_MSVC_DLL="$VCINSTALLDIR/redist/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME"
|
||||
else
|
||||
# Probe: Using well-known location from VS 2017 and VS 2019
|
||||
POSSIBLE_MSVC_DLL="`ls $VCToolsRedistDir/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME 2> /dev/null`"
|
||||
fi
|
||||
# In case any of the above finds more than one file, loop over them.
|
||||
# Probe: Using well-known location
|
||||
POSSIBLE_MSVC_DLL="`ls $VCToolsRedistDir/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME 2> /dev/null`"
|
||||
# If the above finds more than one file, loop over them.
|
||||
for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$possible_msvc_dll],
|
||||
[well-known location in VCINSTALLDIR])
|
||||
|
||||
@@ -402,8 +402,11 @@ define SetupJavaCompilationBody
|
||||
|
||||
$1_COMPILE_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch
|
||||
$1_FILELIST := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch.filelist
|
||||
$1_MODFILELIST := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch.modfiles
|
||||
$1_MODFILELIST_FIXED := $$($1_MODFILELIST).fixed
|
||||
|
||||
$1_API_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi
|
||||
$1_API_INTERNAL := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_internalapi
|
||||
|
||||
# Put headers in a temp dir to filter out those that actually
|
||||
# changed before copying them to the real header dir.
|
||||
@@ -437,6 +440,8 @@ define SetupJavaCompilationBody
|
||||
$1_API_DIGEST_FLAGS := \
|
||||
-classpath $$(BUILDTOOLS_OUTPUTDIR)/depend \
|
||||
-Xplugin:"depend $$($1_API_TARGET)" \
|
||||
"-XDinternalAPIPath=$$($1_API_INTERNAL)" \
|
||||
"-XDLOG_LEVEL=$(LOG_LEVEL)" \
|
||||
#
|
||||
|
||||
$1_EXTRA_DEPS := $$(BUILDTOOLS_OUTPUTDIR)/depend/_the.COMPILE_DEPEND_batch
|
||||
@@ -447,16 +452,39 @@ define SetupJavaCompilationBody
|
||||
# list of files.
|
||||
$$($1_FILELIST): $$($1_SRCS) $$($1_VARDEPS_FILE)
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(call LogWarn, Compiling $$(words $$($1_SRCS)) files for $1)
|
||||
$$(call LogWarn, Compiling up to $$(words $$($1_SRCS)) files for $1)
|
||||
$$(eval $$(call ListPathsSafely, $1_SRCS, $$($1_FILELIST)))
|
||||
|
||||
# Create a $$($1_MODFILELIST) file with significant modified dependencies
|
||||
# (either sources files or the other mark dependencies).
|
||||
# It is then sent using a side-channel
|
||||
# to the custom Depend plugin. The Depend plugin will check the provided list
|
||||
# of modified files, and if none of the Java source files is changed in a way
|
||||
# observable from outside of the file, and the list of modified files does
|
||||
# not include a non-Java source file, it will only compile the modified files.
|
||||
# Otherwise, all module's sources will be compiled. If a non-Java file is included,
|
||||
# it will be considered to be a significant change, and all module source will
|
||||
# be recompiled
|
||||
$$($1_MODFILELIST): $$($1_SRCS) $$($1_DEPENDS) \
|
||||
$$($1_VARDEPS_FILE) $$($1_EXTRA_DEPS) $$($1_JAVAC_SERVER_CONFIG)
|
||||
$$(eval $1_MODFILES := $$?)
|
||||
$$(eval $$(call ListPathsSafely, $1_MODFILES, $$($1_MODFILELIST)))
|
||||
|
||||
# Convert the paths in the MODFILELIST file to Windows-style paths
|
||||
# on Windows. This is needed because javac operates on Windows-style paths
|
||||
# when running on Windows. On other platforms this just copies the MODFILELIST file.
|
||||
$$($1_MODFILELIST_FIXED): $$($1_MODFILELIST)
|
||||
$$(call FixPathFile, $$($1_MODFILELIST), $$($1_MODFILELIST_FIXED))
|
||||
|
||||
# Do the actual compilation
|
||||
$$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_FILELIST) $$($1_DEPENDS) \
|
||||
$$($1_VARDEPS_FILE) $$($1_EXTRA_DEPS) $$($1_JAVAC_SERVER_CONFIG)
|
||||
$$($1_VARDEPS_FILE) $$($1_EXTRA_DEPS) $$($1_JAVAC_SERVER_CONFIG) \
|
||||
$$($1_MODFILELIST_FIXED)
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(call ExecuteWithLog, $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$$($1_SAFE_NAME)_batch, \
|
||||
$$($1_JAVAC_CMD) $$($1_FLAGS) \
|
||||
$$($1_API_DIGEST_FLAGS) \
|
||||
-XDmodifiedInputs=$$($1_MODFILELIST_FIXED) \
|
||||
-d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_FILELIST)) && \
|
||||
$(TOUCH) $$@
|
||||
|
||||
|
||||
@@ -127,14 +127,13 @@ endef
|
||||
# the build was created from
|
||||
SOURCE_REVISION_TRACKER := $(SUPPORT_OUTPUTDIR)/src-rev/source-revision-tracker
|
||||
|
||||
# Locate all hg repositories included in the forest, as absolute paths
|
||||
# Locate all sourcecode repositories included in the forest, as absolute paths
|
||||
FindAllReposAbs = \
|
||||
$(strip $(sort $(dir $(filter-out $(TOPDIR)/build/%, $(wildcard \
|
||||
$(addprefix $(TOPDIR)/, .hg */.hg */*/.hg */*/*/.hg */*/*/*/.hg) \
|
||||
$(addprefix $(TOPDIR)/, .git */.git */*/.git */*/*/.git */*/*/*/.git) \
|
||||
)))))
|
||||
|
||||
# Locate all hg repositories included in the forest, as relative paths
|
||||
# Locate all sourcecode repositories included in the forest, as relative paths
|
||||
FindAllReposRel = \
|
||||
$(strip $(subst $(TOPDIR)/,.,$(patsubst $(TOPDIR)/%/, %, $(FindAllReposAbs))))
|
||||
|
||||
@@ -443,12 +442,23 @@ endif
|
||||
# list.
|
||||
# This is normally not needed since we use the FIXPATH prefix for command lines,
|
||||
# but might be needed in certain circumstances.
|
||||
#
|
||||
# FixPathFile is the file version of FixPath. It instead takes a file with paths in $1
|
||||
# and outputs the 'fixed' paths into the file in $2. If the file in $2 already exists
|
||||
# it is overwritten.
|
||||
# On non-Windows platforms this instead does a copy, so that $2 can still be used
|
||||
# as a depenendency of a make rule, instead of having to conditionally depend on
|
||||
# $1 instead, based on the target platform.
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
FixPath = \
|
||||
$(strip $(subst \,\\, $(shell $(FIXPATH_BASE) print $(patsubst $(FIXPATH), , $1))))
|
||||
FixPathFile = \
|
||||
$(shell $(FIXPATH_BASE) convert $1 $2)
|
||||
else
|
||||
FixPath = \
|
||||
$1
|
||||
FixPathFile = \
|
||||
$(shell $(CP) $1 $2)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -267,10 +267,15 @@ endif
|
||||
# specialized file is found, returns the default file.
|
||||
# $1 Executable to find entitlements file for.
|
||||
ENTITLEMENTS_DIR := $(TOPDIR)/make/data/macosxsigning
|
||||
DEFAULT_ENTITLEMENTS_FILE := $(ENTITLEMENTS_DIR)/default.plist
|
||||
ifeq ($(MACOSX_CODESIGN_MODE), debug)
|
||||
CODESIGN_PLIST_SUFFIX := -debug
|
||||
else
|
||||
CODESIGN_PLIST_SUFFIX :=
|
||||
endif
|
||||
DEFAULT_ENTITLEMENTS_FILE := $(ENTITLEMENTS_DIR)/default$(CODESIGN_PLIST_SUFFIX).plist
|
||||
|
||||
GetEntitlementsFile = \
|
||||
$(foreach f, $(ENTITLEMENTS_DIR)/$(strip $(notdir $1)).plist, \
|
||||
$(foreach f, $(ENTITLEMENTS_DIR)/$(strip $(notdir $1))$(CODESIGN_PLIST_SUFFIX).plist, \
|
||||
$(if $(wildcard $f), $f, $(DEFAULT_ENTITLEMENTS_FILE)) \
|
||||
)
|
||||
|
||||
@@ -338,10 +343,15 @@ define SetupCompileNativeFileBody
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(DISABLE_WARNING_PREFIX), )
|
||||
$1_WARNINGS_FLAGS := $$(addprefix $(DISABLE_WARNING_PREFIX), \
|
||||
$$($$($1_BASE)_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)_$$($1_FILENAME)))
|
||||
endif
|
||||
|
||||
$1_BASE_CFLAGS := $$($$($1_BASE)_CFLAGS) $$($$($1_BASE)_EXTRA_CFLAGS) \
|
||||
$$($$($1_BASE)_SYSROOT_CFLAGS)
|
||||
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_WARNINGS_FLAGS)
|
||||
$1_BASE_CXXFLAGS := $$($$($1_BASE)_CXXFLAGS) $$($$($1_BASE)_EXTRA_CXXFLAGS) \
|
||||
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS)
|
||||
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS) $$($1_WARNINGS_FLAGS)
|
||||
$1_BASE_ASFLAGS := $$($$($1_BASE)_ASFLAGS) $$($$($1_BASE)_EXTRA_ASFLAGS)
|
||||
|
||||
ifneq ($$(filter %.c, $$($1_FILENAME)), )
|
||||
@@ -802,7 +812,7 @@ define SetupNativeCompilationBody
|
||||
ifeq ($(TOOLCHAIN_TYPE), microsoft)
|
||||
$1_PCH_FILE := $$($1_OBJECT_DIR)/$1.pch
|
||||
$1_GENERATED_PCH_SRC := $$($1_OBJECT_DIR)/$1_pch.cpp
|
||||
$1_GENERATED_PCH_OBJ := $$($1_OBJECT_DIR)/$1_pch.obj
|
||||
$1_GENERATED_PCH_OBJ := $$($1_OBJECT_DIR)/$1_pch$(OBJ_SUFFIX)
|
||||
|
||||
$$(eval $$(call SetupCompileNativeFile, $1_$$(notdir $$($1_GENERATED_PCH_SRC)), \
|
||||
FILE := $$($1_GENERATED_PCH_SRC), \
|
||||
@@ -909,15 +919,15 @@ define SetupNativeCompilationBody
|
||||
# For some unknown reason, in this case CL actually outputs the show
|
||||
# includes to stderr so need to redirect it to hide the output from the
|
||||
# main log.
|
||||
$$(call ExecuteWithLog, $$($1_RES_DEPS_FILE).obj, \
|
||||
$$(call ExecuteWithLog, $$($1_RES_DEPS_FILE)$(OBJ_SUFFIX), \
|
||||
$$($1_CC) $$(filter-out -l%, $$($1_RCFLAGS)) \
|
||||
$$($1_SYSROOT_CFLAGS) -showIncludes -nologo -TC \
|
||||
$(CC_OUT_OPTION)$$($1_RES_DEPS_FILE).obj -P -Fi$$($1_RES_DEPS_FILE).pp \
|
||||
$(CC_OUT_OPTION)$$($1_RES_DEPS_FILE)$(OBJ_SUFFIX) -P -Fi$$($1_RES_DEPS_FILE).pp \
|
||||
$$($1_VERSIONINFO_RESOURCE)) 2>&1 \
|
||||
| $(TR) -d '\r' | $(GREP) -v -e "^Note: including file:" \
|
||||
-e "^$$(notdir $$($1_VERSIONINFO_RESOURCE))$$$$" || test "$$$$?" = "1" ; \
|
||||
$(ECHO) $$($1_RES): \\ > $$($1_RES_DEPS_FILE) ; \
|
||||
$(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_RES_DEPS_FILE).obj.log \
|
||||
$(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_RES_DEPS_FILE)$(OBJ_SUFFIX).log \
|
||||
>> $$($1_RES_DEPS_FILE) ; \
|
||||
$(ECHO) >> $$($1_RES_DEPS_FILE) ;\
|
||||
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_RES_DEPS_FILE) \
|
||||
@@ -1204,11 +1214,16 @@ define SetupNativeCompilationBody
|
||||
$$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
|
||||
endif
|
||||
endif
|
||||
# This only works if the openjdk_codesign identity is present on the system. Let
|
||||
# silently fail otherwise.
|
||||
ifneq ($(CODESIGN), )
|
||||
# On macosx, optionally run codesign on every binary.
|
||||
# Remove signature explicitly first to avoid warnings if the linker
|
||||
# added a default adhoc signature.
|
||||
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
|
||||
$(CODESIGN) --remove-signature $$@
|
||||
$(CODESIGN) -f -s "$(MACOSX_CODESIGN_IDENTITY)" --timestamp --options runtime \
|
||||
--entitlements $$(call GetEntitlementsFile, $$@) $$@
|
||||
else ifeq ($(MACOSX_CODESIGN_MODE), debug)
|
||||
$(CODESIGN) --remove-signature $$@
|
||||
$(CODESIGN) -f -s - --entitlements $$(call GetEntitlementsFile, $$@) $$@
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -29,7 +29,7 @@ PRODUCT_SUFFIX="Runtime Environment"
|
||||
JDK_RC_PLATFORM_NAME=Platform
|
||||
COMPANY_NAME=N/A
|
||||
HOTSPOT_VM_DISTRO="OpenJDK"
|
||||
VENDOR_URL=https://openjdk.java.net/
|
||||
VENDOR_URL=https://openjdk.org/
|
||||
VENDOR_URL_BUG=https://bugreport.java.com/bugreport/
|
||||
VENDOR_URL_VM_BUG=https://bugreport.java.com/bugreport/crash.jsp
|
||||
|
||||
|
||||
@@ -26,16 +26,16 @@
|
||||
# Versions and download locations for dependencies used by GitHub Actions (GHA)
|
||||
|
||||
GTEST_VERSION=1.8.1
|
||||
JTREG_VERSION=6.1+2
|
||||
JTREG_VERSION=7+1
|
||||
|
||||
LINUX_X64_BOOT_JDK_EXT=tar.gz
|
||||
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_linux-x64_bin.tar.gz
|
||||
LINUX_X64_BOOT_JDK_SHA256=0f60aef7b8504983d6e374fe94d09a7bedcf05ec559e812d801a33bd4ebd23d0
|
||||
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk19/877d6127e982470ba2a7faa31cc93d04/36/GPL/openjdk-19_linux-x64_bin.tar.gz
|
||||
LINUX_X64_BOOT_JDK_SHA256=f47aba585cfc9ecff1ed8e023524e8309f4315ed8b80100b40c7dcc232c12f96
|
||||
|
||||
MACOS_X64_BOOT_JDK_EXT=tar.gz
|
||||
MACOS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_macos-x64_bin.tar.gz
|
||||
MACOS_X64_BOOT_JDK_SHA256=527b61b4265caf45cdcbacfcf8fbcd0b4b280bede1eff32a5b252d855ff0534b
|
||||
MACOS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk19/877d6127e982470ba2a7faa31cc93d04/36/GPL/openjdk-19_macos-x64_bin.tar.gz
|
||||
MACOS_X64_BOOT_JDK_SHA256=bfd33f5b2590fd552ae2d9231340c6b4704a872f927dce1c52860b78c49a5a11
|
||||
|
||||
WINDOWS_X64_BOOT_JDK_EXT=zip
|
||||
WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_windows-x64_bin.zip
|
||||
WINDOWS_X64_BOOT_JDK_SHA256=a5b91d4c12752d44aa75df70ae3e2311287b3e60c288b07dade106376c688277
|
||||
WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk19/877d6127e982470ba2a7faa31cc93d04/36/GPL/openjdk-19_windows-x64_bin.zip
|
||||
WINDOWS_X64_BOOT_JDK_SHA256=8fabcee7c4e8d3b53486777ecd27bb906d67d7c1efd1bf22a8290cf659afa487
|
||||
|
||||
@@ -388,7 +388,7 @@ var getJibProfilesCommon = function (input, data) {
|
||||
};
|
||||
};
|
||||
|
||||
common.boot_jdk_version = "18";
|
||||
common.boot_jdk_version = "19";
|
||||
common.boot_jdk_build_number = "36";
|
||||
common.boot_jdk_home = input.get("boot_jdk", "install_path") + "/jdk-"
|
||||
+ common.boot_jdk_version
|
||||
@@ -553,7 +553,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"ANT_HOME": input.get("ant", "home_path")
|
||||
}
|
||||
};
|
||||
[ "linux-x64", "macosx-x64", "windows-x64", "linux-aarch64"]
|
||||
[ "linux-x64", "macosx-aarch64", "macosx-x64", "windows-x64", "linux-aarch64"]
|
||||
.forEach(function (name) {
|
||||
var maketestName = name + "-testmake";
|
||||
profiles[maketestName] = concatObjects(profiles[name], testmakeBase);
|
||||
@@ -1131,9 +1131,9 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
jtreg: {
|
||||
server: "jpg",
|
||||
product: "jtreg",
|
||||
version: "6.1",
|
||||
version: "7",
|
||||
build_number: "1",
|
||||
file: "bundles/jtreg-6.1+1.zip",
|
||||
file: "bundles/jtreg-7+1.zip",
|
||||
environment_name: "JT_HOME",
|
||||
environment_path: input.get("jtreg", "home_path") + "/bin",
|
||||
configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"),
|
||||
@@ -1142,12 +1142,12 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
jmh: {
|
||||
organization: common.organization,
|
||||
ext: "tar.gz",
|
||||
revision: "1.34+1.0"
|
||||
revision: "1.35+1.0"
|
||||
},
|
||||
|
||||
jcov: {
|
||||
organization: common.organization,
|
||||
revision: "3.0-12-jdk-asm+1.0",
|
||||
revision: "3.0-13-jdk-asm+1.0",
|
||||
ext: "zip",
|
||||
environment_name: "JCOV_HOME",
|
||||
},
|
||||
|
||||
@@ -37,6 +37,6 @@ DEFAULT_VERSION_DATE=2023-03-21
|
||||
DEFAULT_VERSION_CLASSFILE_MAJOR=64 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
|
||||
DEFAULT_VERSION_CLASSFILE_MINOR=0
|
||||
DEFAULT_VERSION_DOCS_API_SINCE=11
|
||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="18 19 20"
|
||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="19 20"
|
||||
DEFAULT_JDK_SOURCE_TARGET_VERSION=20
|
||||
DEFAULT_PROMOTED_VERSION_PRE=ea
|
||||
|
||||
@@ -194,7 +194,6 @@ JVM_RegisterLambdaProxyClassForArchiving
|
||||
JVM_RegisterSignal
|
||||
JVM_ReleaseUTF
|
||||
JVM_ReportFinalizationComplete
|
||||
JVM_ResumeThread
|
||||
JVM_ExtentLocalCache
|
||||
JVM_SetExtentLocalCache
|
||||
JVM_SetArrayElement
|
||||
@@ -205,9 +204,7 @@ JVM_SetStackWalkContinuation
|
||||
JVM_SetThreadPriority
|
||||
JVM_Sleep
|
||||
JVM_StartThread
|
||||
JVM_StopThread
|
||||
JVM_SupportsCX8
|
||||
JVM_SuspendThread
|
||||
JVM_TotalMemory
|
||||
JVM_UnloadLibrary
|
||||
JVM_WaitForReferencePendingList
|
||||
@@ -227,4 +224,5 @@ JVM_VirtualThreadMountBegin
|
||||
JVM_VirtualThreadMountEnd
|
||||
JVM_VirtualThreadUnmountBegin
|
||||
JVM_VirtualThreadUnmountEnd
|
||||
JVM_VirtualThreadHideFrames
|
||||
#
|
||||
|
||||
18
make/data/macosxsigning/default-debug.plist
Normal file
18
make/data/macosxsigning/default-debug.plist
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.debugger</key>
|
||||
<true/>
|
||||
<key>com.apple.security.get-task-allow</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
20
make/data/macosxsigning/java-debug.plist
Normal file
20
make/data/macosxsigning/java-debug.plist
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.debugger</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.audio-input</key>
|
||||
<true/>
|
||||
<key>com.apple.security.get-task-allow</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
JMH_VERSION=1.35
|
||||
COMMONS_MATH3_VERSION=3.2
|
||||
JOPT_SIMPLE_VERSION=4.6
|
||||
JOPT_SIMPLE_VERSION=5.0.4
|
||||
|
||||
BUNDLE_NAME=jmh-$JMH_VERSION.tar.gz
|
||||
|
||||
|
||||
@@ -120,12 +120,8 @@ endif
|
||||
ifneq ($(call check-jvm-feature, cds), true)
|
||||
JVM_CFLAGS_FEATURES += -DINCLUDE_CDS=0
|
||||
JVM_EXCLUDE_FILES += \
|
||||
cdsProtectionDomain.cpp \
|
||||
classLoaderDataShared.cpp \
|
||||
classLoaderExt.cpp \
|
||||
dumpTimeSharedClassInfo.cpp \
|
||||
lambdaProxyClassDictionary.cpp \
|
||||
runTimeSharedClassInfo.cpp \
|
||||
systemDictionaryShared.cpp
|
||||
JVM_EXCLUDE_PATTERNS += cds/
|
||||
endif
|
||||
|
||||
@@ -53,7 +53,7 @@ endif
|
||||
# platform dependent.
|
||||
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
DUMP_SYMBOLS_CMD := $(NM) --defined-only *.o
|
||||
DUMP_SYMBOLS_CMD := $(NM) --defined-only *$(OBJ_SUFFIX)
|
||||
ifneq ($(FILTER_SYMBOLS_PATTERN), )
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
|
||||
endif
|
||||
@@ -67,7 +67,7 @@ ifeq ($(call isTargetOs, linux), true)
|
||||
else ifeq ($(call isTargetOs, macosx), true)
|
||||
# nm on macosx prints out "warning: nm: no name list" to stderr for
|
||||
# files without symbols. Hide this, even at the expense of hiding real errors.
|
||||
DUMP_SYMBOLS_CMD := $(NM) -Uj *.o 2> /dev/null
|
||||
DUMP_SYMBOLS_CMD := $(NM) -Uj *$(OBJ_SUFFIX) 2> /dev/null
|
||||
ifneq ($(FILTER_SYMBOLS_PATTERN), )
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
|
||||
endif
|
||||
@@ -89,7 +89,7 @@ else ifeq ($(call isTargetOs, aix), true)
|
||||
# which may be installed under /opt/freeware/bin. So better use an absolute path here!
|
||||
# NM=/usr/bin/nm
|
||||
|
||||
DUMP_SYMBOLS_CMD := $(NM) -X64 -B -C *.o
|
||||
DUMP_SYMBOLS_CMD := $(NM) -X64 -B -C *$(OBJ_SUFFIX)
|
||||
FILTER_SYMBOLS_AWK_SCRIPT := \
|
||||
'{ \
|
||||
if (($$2="d" || $$2="D") && ($$3 ~ /^__vft/ || $$3 ~ /^gHotSpotVM/)) print $$3; \
|
||||
@@ -98,7 +98,7 @@ else ifeq ($(call isTargetOs, aix), true)
|
||||
}'
|
||||
|
||||
else ifeq ($(call isTargetOs, windows), true)
|
||||
DUMP_SYMBOLS_CMD := $(DUMPBIN) -symbols *.obj
|
||||
DUMP_SYMBOLS_CMD := $(DUMPBIN) -symbols *$(OBJ_SUFFIX)
|
||||
|
||||
# The following lines create a list of vftable symbols to be filtered out of
|
||||
# the mapfile. Removing this line causes the linker to complain about too many
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -24,6 +24,17 @@
|
||||
*/
|
||||
package build.tools.depend;
|
||||
|
||||
import com.sun.source.tree.ClassTree;
|
||||
import com.sun.source.tree.CompilationUnitTree;
|
||||
import com.sun.source.tree.IdentifierTree;
|
||||
import com.sun.source.tree.ImportTree;
|
||||
import com.sun.source.tree.LiteralTree;
|
||||
import com.sun.source.tree.MemberReferenceTree;
|
||||
import com.sun.source.tree.MemberSelectTree;
|
||||
import com.sun.source.tree.MethodTree;
|
||||
import com.sun.source.tree.ModifiersTree;
|
||||
import com.sun.source.tree.Tree;
|
||||
import com.sun.source.tree.VariableTree;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
@@ -86,8 +97,37 @@ import com.sun.source.util.TaskEvent;
|
||||
import com.sun.source.util.TaskEvent.Kind;
|
||||
import com.sun.source.util.TaskListener;
|
||||
import com.sun.source.util.TreePath;
|
||||
import com.sun.source.util.TreeScanner;
|
||||
import com.sun.source.util.Trees;
|
||||
import com.sun.tools.javac.api.BasicJavacTask;
|
||||
import com.sun.tools.javac.code.Flags;
|
||||
import com.sun.tools.javac.main.JavaCompiler;
|
||||
import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
|
||||
import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
|
||||
import com.sun.tools.javac.util.Context;
|
||||
import com.sun.tools.javac.util.Context.Key;
|
||||
import com.sun.tools.javac.util.ListBuffer;
|
||||
import com.sun.tools.javac.util.Options;
|
||||
import com.sun.tools.javac.util.StringUtils;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Proxy;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.IdentityHashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.stream.StreamSupport;
|
||||
import javax.lang.model.element.ElementKind;
|
||||
import javax.lang.model.element.Name;
|
||||
import javax.tools.ForwardingJavaFileManager;
|
||||
import javax.tools.JavaFileManager;
|
||||
import javax.tools.StandardLocation;
|
||||
import javax.tools.ToolProvider;
|
||||
|
||||
public class Depend implements Plugin {
|
||||
|
||||
@@ -98,6 +138,45 @@ public class Depend implements Plugin {
|
||||
|
||||
@Override
|
||||
public void init(JavacTask jt, String... args) {
|
||||
addExports();
|
||||
|
||||
AtomicBoolean noApiChange = new AtomicBoolean();
|
||||
try {
|
||||
Context context = ((BasicJavacTask) jt).getContext();
|
||||
Options options = Options.instance(context);
|
||||
String modifiedInputs = options.get("modifiedInputs");
|
||||
if (modifiedInputs == null) {
|
||||
throw new IllegalStateException("Expected modifiedInputs to be set using -XDmodifiedInputs=<list-of-files>");
|
||||
}
|
||||
String logLevel = options.get("LOG_LEVEL");
|
||||
boolean debug = "trace".equals(logLevel) || "debug".equals(logLevel);
|
||||
String internalAPIPath = options.get("internalAPIPath");
|
||||
if (internalAPIPath == null) {
|
||||
throw new IllegalStateException("Expected internalAPIPath to be set using -XDinternalAPIPath=<internal-API-path>");
|
||||
}
|
||||
Set<Path> modified = Files.readAllLines(Paths.get(modifiedInputs)).stream()
|
||||
.map(Paths::get)
|
||||
.collect(Collectors.toSet());
|
||||
Path internalAPIDigestFile = Paths.get(internalAPIPath);
|
||||
JavaCompiler compiler = JavaCompiler.instance(context);
|
||||
Class<?> initialFileParserIntf = Class.forName("com.sun.tools.javac.main.JavaCompiler$InitialFileParserIntf");
|
||||
Class<?> initialFileParser = Class.forName("com.sun.tools.javac.main.JavaCompiler$InitialFileParser");
|
||||
Field initialParserKeyField = initialFileParser.getDeclaredField("initialParserKey");
|
||||
@SuppressWarnings("unchecked")
|
||||
Key<Object> key = (Key<Object>) initialParserKeyField.get(null);
|
||||
Object initialParserInstance =
|
||||
Proxy.newProxyInstance(Depend.class.getClassLoader(),
|
||||
new Class<?>[] {initialFileParserIntf},
|
||||
new FilteredInitialFileParser(compiler,
|
||||
modified,
|
||||
internalAPIDigestFile,
|
||||
noApiChange,
|
||||
debug));
|
||||
context.<Object>put(key, initialParserInstance);
|
||||
} catch (Exception ex) {
|
||||
throw new IllegalStateException(ex);
|
||||
}
|
||||
|
||||
jt.addTaskListener(new TaskListener() {
|
||||
private final Map<ModuleElement, Set<PackageElement>> apiPackages = new HashMap<>();
|
||||
private final MessageDigest apiHash;
|
||||
@@ -134,7 +213,7 @@ public class Depend implements Plugin {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (te.getKind() == Kind.COMPILATION) {
|
||||
if (te.getKind() == Kind.COMPILATION && !noApiChange.get()) {
|
||||
String previousSignature = null;
|
||||
File digestFile = new File(args[0]);
|
||||
try (InputStream in = new FileInputStream(digestFile)) {
|
||||
@@ -156,6 +235,116 @@ public class Depend implements Plugin {
|
||||
});
|
||||
}
|
||||
|
||||
private void addExports() {
|
||||
var systemCompiler = ToolProvider.getSystemJavaCompiler();
|
||||
try (JavaFileManager jfm = systemCompiler.getStandardFileManager(null, null, null)) {
|
||||
JavaFileManager fm = new ForwardingJavaFileManager<JavaFileManager>(jfm) {
|
||||
@Override
|
||||
public ClassLoader getClassLoader(JavaFileManager.Location location) {
|
||||
if (location == StandardLocation.CLASS_PATH) {
|
||||
return Depend.class.getClassLoader();
|
||||
}
|
||||
return super.getClassLoader(location);
|
||||
}
|
||||
};
|
||||
((JavacTask) systemCompiler.getTask(null, fm, null,
|
||||
List.of("-proc:only", "-XDaccessInternalAPI=true"),
|
||||
List.of("java.lang.Object"), null))
|
||||
.analyze();
|
||||
} catch (IOException ex) {
|
||||
throw new IllegalStateException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private com.sun.tools.javac.util.List<JCCompilationUnit> doFilteredParse(
|
||||
JavaCompiler compiler, Iterable<JavaFileObject> fileObjects, Set<Path> modified,
|
||||
Path internalAPIDigestFile, AtomicBoolean noApiChange,
|
||||
boolean debug) {
|
||||
Map<String, String> internalAPI = new LinkedHashMap<>();
|
||||
if (Files.isReadable(internalAPIDigestFile)) {
|
||||
try {
|
||||
Files.readAllLines(internalAPIDigestFile, StandardCharsets.UTF_8)
|
||||
.forEach(line -> {
|
||||
String[] keyAndValue = line.split("=");
|
||||
internalAPI.put(keyAndValue[0], keyAndValue[1]);
|
||||
});
|
||||
} catch (IOException ex) {
|
||||
throw new IllegalStateException(ex);
|
||||
}
|
||||
}
|
||||
Map<JavaFileObject, JCCompilationUnit> files2CUT = new IdentityHashMap<>();
|
||||
boolean fullRecompile = modified.stream()
|
||||
.map(Path::toString)
|
||||
.anyMatch(f -> !StringUtils.toLowerCase(f).endsWith(".java"));
|
||||
ListBuffer<JCCompilationUnit> result = new ListBuffer<>();
|
||||
for (JavaFileObject jfo : fileObjects) {
|
||||
if (modified.contains(Path.of(jfo.getName()))) {
|
||||
JCCompilationUnit parsed = compiler.parse(jfo);
|
||||
files2CUT.put(jfo, parsed);
|
||||
String currentSignature = treeDigest(parsed);
|
||||
if (!currentSignature.equals(internalAPI.get(jfo.getName()))) {
|
||||
fullRecompile |= true;
|
||||
internalAPI.put(jfo.getName(), currentSignature);
|
||||
}
|
||||
result.add(parsed);
|
||||
}
|
||||
}
|
||||
|
||||
if (fullRecompile) {
|
||||
for (JavaFileObject jfo : fileObjects) {
|
||||
if (!modified.contains(Path.of(jfo.getName()))) {
|
||||
JCCompilationUnit parsed = files2CUT.get(jfo);
|
||||
if (parsed == null) {
|
||||
parsed = compiler.parse(jfo);
|
||||
internalAPI.put(jfo.getName(), treeDigest(parsed));
|
||||
}
|
||||
result.add(parsed);
|
||||
}
|
||||
}
|
||||
try (OutputStream out = Files.newOutputStream(internalAPIDigestFile)) {
|
||||
String hashes = internalAPI.entrySet()
|
||||
.stream()
|
||||
.map(e -> e.getKey() + "=" + e.getValue())
|
||||
.collect(Collectors.joining("\n"));
|
||||
out.write(hashes.getBytes(StandardCharsets.UTF_8));
|
||||
} catch (IOException ex) {
|
||||
throw new IllegalStateException(ex);
|
||||
}
|
||||
} else {
|
||||
noApiChange.set(true);
|
||||
}
|
||||
if (debug) {
|
||||
long allJavaInputs = StreamSupport.stream(fileObjects.spliterator(), false).count();
|
||||
String module = StreamSupport.stream(fileObjects.spliterator(), false)
|
||||
.map(fo -> fo.toUri().toString())
|
||||
.filter(path -> path.contains("/share/classes/"))
|
||||
.map(path -> path.substring(0, path.indexOf("/share/classes/")))
|
||||
.map(path -> path.substring(path.lastIndexOf("/") + 1))
|
||||
.findAny()
|
||||
.orElseGet(() -> "unknown");
|
||||
String nonJavaModifiedFiles = modified.stream()
|
||||
.map(Path::toString)
|
||||
.filter(f -> !StringUtils.toLowerCase(f)
|
||||
.endsWith(".java"))
|
||||
.collect(Collectors.joining(", "));
|
||||
System.err.println("compiling module: " + module +
|
||||
", all Java inputs: " + allJavaInputs +
|
||||
", modified files (Java or non-Java): " + modified.size() +
|
||||
", full recompile: " + fullRecompile +
|
||||
", non-Java modified files: " + nonJavaModifiedFiles);
|
||||
}
|
||||
return result.toList();
|
||||
}
|
||||
|
||||
private String treeDigest(JCCompilationUnit cu) {
|
||||
try {
|
||||
TreeVisitor v = new TreeVisitor(MessageDigest.getInstance("MD5"));
|
||||
v.scan(cu, null);
|
||||
return Depend.this.toString(v.apiHash.digest());
|
||||
} catch (NoSuchAlgorithmException ex) {
|
||||
throw new IllegalStateException(ex);
|
||||
}
|
||||
}
|
||||
private String toString(byte[] digest) {
|
||||
return HexFormat.of().withUpperCase().formatHex(digest);
|
||||
}
|
||||
@@ -537,4 +726,192 @@ public class Depend implements Plugin {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final class TreeVisitor extends TreeScanner<Void, Void> {
|
||||
|
||||
private final Set<Name> seenIdentifiers = new HashSet<>();
|
||||
private final MessageDigest apiHash;
|
||||
private final Charset utf8;
|
||||
|
||||
public TreeVisitor(MessageDigest apiHash) {
|
||||
this.apiHash = apiHash;
|
||||
utf8 = Charset.forName("UTF-8");
|
||||
}
|
||||
|
||||
private void update(CharSequence data) {
|
||||
apiHash.update(data.toString().getBytes(utf8));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void scan(Tree tree, Void p) {
|
||||
update("(");
|
||||
if (tree != null) {
|
||||
update(tree.getKind().name());
|
||||
};
|
||||
super.scan(tree, p);
|
||||
update(")");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visitCompilationUnit(CompilationUnitTree node, Void p) {
|
||||
seenIdentifiers.clear();
|
||||
scan(node.getPackage(), p);
|
||||
scan(node.getTypeDecls(), p);
|
||||
scan(((JCCompilationUnit) node).getModuleDecl(), p);
|
||||
List<ImportTree> importantImports = new ArrayList<>();
|
||||
for (ImportTree imp : node.getImports()) {
|
||||
Tree t = imp.getQualifiedIdentifier();
|
||||
if (t.getKind() == Tree.Kind.MEMBER_SELECT) {
|
||||
Name member = ((MemberSelectTree) t).getIdentifier();
|
||||
if (member.contentEquals("*") || seenIdentifiers.contains(member)) {
|
||||
importantImports.add(imp);
|
||||
}
|
||||
} else {
|
||||
//should not happen, possibly erroneous source?
|
||||
importantImports.add(imp);
|
||||
}
|
||||
}
|
||||
importantImports.sort((imp1, imp2) -> {
|
||||
if (imp1.isStatic() ^ imp2.isStatic()) {
|
||||
return imp1.isStatic() ? -1 : 1;
|
||||
} else {
|
||||
return imp1.getQualifiedIdentifier().toString().compareTo(imp2.getQualifiedIdentifier().toString());
|
||||
}
|
||||
});
|
||||
scan(importantImports, p);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visitIdentifier(IdentifierTree node, Void p) {
|
||||
update(node.getName());
|
||||
seenIdentifiers.add(node.getName());
|
||||
return super.visitIdentifier(node, p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visitMemberSelect(MemberSelectTree node, Void p) {
|
||||
update(node.getIdentifier());
|
||||
return super.visitMemberSelect(node, p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visitMemberReference(MemberReferenceTree node, Void p) {
|
||||
update(node.getName());
|
||||
return super.visitMemberReference(node, p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void scan(Iterable<? extends Tree> nodes, Void p) {
|
||||
update("(");
|
||||
super.scan(nodes, p);
|
||||
update(")");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visitClass(ClassTree node, Void p) {
|
||||
update(node.getSimpleName());
|
||||
scan(node.getModifiers(), p);
|
||||
scan(node.getTypeParameters(), p);
|
||||
scan(node.getExtendsClause(), p);
|
||||
scan(node.getImplementsClause(), p);
|
||||
scan(node.getMembers()
|
||||
.stream()
|
||||
.filter(this::importantMember)
|
||||
.collect(Collectors.toList()),
|
||||
p);
|
||||
return null;
|
||||
}
|
||||
|
||||
private boolean importantMember(Tree m) {
|
||||
return switch (m.getKind()) {
|
||||
case ANNOTATION_TYPE, CLASS, ENUM, INTERFACE, RECORD ->
|
||||
!isPrivate(((ClassTree) m).getModifiers());
|
||||
case METHOD ->
|
||||
!isPrivate(((MethodTree) m).getModifiers());
|
||||
case VARIABLE ->
|
||||
!isPrivate(((VariableTree) m).getModifiers()) ||
|
||||
isRecordComponent((VariableTree) m);
|
||||
case BLOCK -> false;
|
||||
default -> throw new IllegalStateException("Unexpected tree kind: " + m.getKind());
|
||||
};
|
||||
}
|
||||
|
||||
private boolean isPrivate(ModifiersTree mt) {
|
||||
return mt.getFlags().contains(Modifier.PRIVATE);
|
||||
}
|
||||
|
||||
private boolean isRecordComponent(VariableTree vt) {
|
||||
return (((JCVariableDecl) vt).mods.flags & Flags.RECORD) != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visitVariable(VariableTree node, Void p) {
|
||||
update(node.getName());
|
||||
return super.visitVariable(node, p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visitMethod(MethodTree node, Void p) {
|
||||
update(node.getName());
|
||||
scan(node.getModifiers(), p);
|
||||
scan(node.getReturnType(), p);
|
||||
scan(node.getTypeParameters(), p);
|
||||
scan(node.getParameters(), p);
|
||||
scan(node.getReceiverParameter(), p);
|
||||
scan(node.getThrows(), p);
|
||||
scan(node.getDefaultValue(), p);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visitLiteral(LiteralTree node, Void p) {
|
||||
update(String.valueOf(node.getValue()));
|
||||
return super.visitLiteral(node, p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visitModifiers(ModifiersTree node, Void p) {
|
||||
update(node.getFlags().toString());
|
||||
return super.visitModifiers(node, p);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class FilteredInitialFileParser implements InvocationHandler {
|
||||
|
||||
private final JavaCompiler compiler;
|
||||
private final Set<Path> modified;
|
||||
private final Path internalAPIDigestFile;
|
||||
private final AtomicBoolean noApiChange;
|
||||
private final boolean debug;
|
||||
|
||||
public FilteredInitialFileParser(JavaCompiler compiler,
|
||||
Set<Path> modified,
|
||||
Path internalAPIDigestFile,
|
||||
AtomicBoolean noApiChange,
|
||||
boolean debug) {
|
||||
this.compiler = compiler;
|
||||
this.modified = modified;
|
||||
this.internalAPIDigestFile = internalAPIDigestFile;
|
||||
this.noApiChange = noApiChange;
|
||||
this.debug = debug;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
|
||||
return switch (method.getName()) {
|
||||
case "parse" -> doFilteredParse(compiler,
|
||||
(Iterable<JavaFileObject>) args[0],
|
||||
modified,
|
||||
internalAPIDigestFile,
|
||||
noApiChange,
|
||||
debug);
|
||||
default -> throw new UnsupportedOperationException();
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -52,6 +52,8 @@ public class DependTest {
|
||||
test.testModules();
|
||||
test.testAnnotations();
|
||||
test.testRecords();
|
||||
test.testImports();
|
||||
test.testModifiers();
|
||||
}
|
||||
|
||||
public void testMethods() throws Exception {
|
||||
@@ -145,7 +147,8 @@ public class DependTest {
|
||||
"@SuppressWarnings(\"any\")\n" +
|
||||
"public class Test {\n" +
|
||||
"}",
|
||||
false);
|
||||
false,
|
||||
true); //Tree hash does not tolerate undocumented annotations
|
||||
doOrdinaryTest("package test;" +
|
||||
"public class Test {\n" +
|
||||
"}",
|
||||
@@ -156,6 +159,83 @@ public class DependTest {
|
||||
true);
|
||||
}
|
||||
|
||||
public void testImports() throws Exception {
|
||||
doOrdinaryTest("package test;" +
|
||||
"public class Test {\n" +
|
||||
"}",
|
||||
"package test;" +
|
||||
"import java.util.List;\n" +
|
||||
"public class Test {\n" +
|
||||
" private List l;\n" +
|
||||
"}",
|
||||
false);
|
||||
doOrdinaryTest("package test;" +
|
||||
"public class Test {\n" +
|
||||
"}",
|
||||
"package test;" +
|
||||
"import java.util.List;\n" +
|
||||
"public class Test {\n" +
|
||||
" public List l;\n" +
|
||||
"}",
|
||||
true);
|
||||
doOrdinaryTest("package test;" +
|
||||
"public class Test {\n" +
|
||||
"}",
|
||||
"package test;" +
|
||||
"import java.util.List;\n" +
|
||||
"public class Test {\n" +
|
||||
" List l;\n" +
|
||||
"}",
|
||||
false,
|
||||
true);
|
||||
doOrdinaryTest("package test;" +
|
||||
"import java.util.*;\n" +
|
||||
"public abstract class Test implements List {\n" +
|
||||
"}\n" +
|
||||
"class H {\n" +
|
||||
" public interface List {}\n" +
|
||||
"}",
|
||||
"package test;" +
|
||||
"import java.util.*;\n" +
|
||||
"import test.H.List;\n" +
|
||||
"public abstract class Test implements List {\n" +
|
||||
"}\n" +
|
||||
"class H {\n" +
|
||||
" public interface List {}\n" +
|
||||
"}",
|
||||
true);
|
||||
doOrdinaryTest("package test;" +
|
||||
"public class Test {\n" +
|
||||
"}",
|
||||
"package test;" +
|
||||
"import java.util.*;\n" +
|
||||
"public class Test {\n" +
|
||||
"}",
|
||||
false,
|
||||
true);
|
||||
doOrdinaryTest("package test;" +
|
||||
"import java.util.*;\n" +
|
||||
"public class Test {\n" +
|
||||
"}",
|
||||
"package test;" +
|
||||
"public class Test {\n" +
|
||||
"}",
|
||||
false,
|
||||
true);
|
||||
}
|
||||
|
||||
public void testModifiers() throws Exception {
|
||||
doOrdinaryTest("package test;" +
|
||||
"public class Test {\n" +
|
||||
" String l;\n" +
|
||||
"}",
|
||||
"package test;" +
|
||||
"public class Test {\n" +
|
||||
" public String l;\n" +
|
||||
"}",
|
||||
true);
|
||||
}
|
||||
|
||||
public void testModules() throws Exception {
|
||||
doModuleTest("module m { }",
|
||||
"module m { requires java.compiler; }",
|
||||
@@ -199,11 +279,13 @@ public class DependTest {
|
||||
doOrdinaryTest("package test; public record Test (int x, int y) { }",
|
||||
"package test; public record Test (int x, int y) {" +
|
||||
"public Test { } }", // compact ctr
|
||||
false);
|
||||
false,
|
||||
true);
|
||||
doOrdinaryTest("package test; public record Test (int x, int y) { }",
|
||||
"package test; public record Test (int x, int y) {" +
|
||||
"public Test (int x, int y) { this.x=x; this.y=y;} }", // canonical ctr
|
||||
false);
|
||||
false,
|
||||
true);
|
||||
doOrdinaryTest("package test; public record Test (int x, int y) { }",
|
||||
"package test; public record Test (int y, int x) { }", // reverse
|
||||
true);
|
||||
@@ -227,6 +309,7 @@ public class DependTest {
|
||||
private Path scratchServices;
|
||||
private Path scratchClasses;
|
||||
private Path apiHash;
|
||||
private Path treeHash;
|
||||
|
||||
private void setupClass() throws IOException {
|
||||
depend = Paths.get(Depend.class.getProtectionDomain().getCodeSource().getLocation().getPath());
|
||||
@@ -244,34 +327,53 @@ public class DependTest {
|
||||
Files.createDirectories(scratchClasses);
|
||||
|
||||
apiHash = scratch.resolve("api");
|
||||
treeHash = scratch.resolve("tree");
|
||||
}
|
||||
|
||||
private void doOrdinaryTest(String codeBefore, String codeAfter, boolean hashChangeExpected) throws Exception {
|
||||
doOrdinaryTest(codeBefore, codeAfter, hashChangeExpected, hashChangeExpected);
|
||||
}
|
||||
|
||||
private void doOrdinaryTest(String codeBefore, String codeAfter, boolean apiHashChangeExpected, boolean treeHashChangeExpected) throws Exception {
|
||||
List<String> options =
|
||||
Arrays.asList("-d", scratchClasses.toString(),
|
||||
"-processorpath", depend.toString() + File.pathSeparator + scratchServices.toString(),
|
||||
"-Xplugin:depend " + apiHash.toString());
|
||||
"-Xplugin:depend " + apiHash.toString() + " " + treeHash.toString(),
|
||||
"-XDmodifiedInputs=build-all");
|
||||
List<TestJavaFileObject> beforeFiles =
|
||||
Arrays.asList(new TestJavaFileObject("module-info", "module m { exports test; }"),
|
||||
new TestJavaFileObject("test.Test", codeBefore));
|
||||
compiler.getTask(null, null, null, options, null, beforeFiles).call();
|
||||
byte[] originalHash = Files.readAllBytes(apiHash);
|
||||
byte[] originalApiHash = Files.readAllBytes(apiHash);
|
||||
byte[] originalTreeHash = Files.readAllBytes(treeHash);
|
||||
List<TestJavaFileObject> afterFiles =
|
||||
Arrays.asList(new TestJavaFileObject("module-info", "module m { exports test; }"),
|
||||
new TestJavaFileObject("test.Test", codeAfter));
|
||||
compiler.getTask(null, null, null, options, null, afterFiles).call();
|
||||
byte[] newHash = Files.readAllBytes(apiHash);
|
||||
byte[] newApiHash = Files.readAllBytes(apiHash);
|
||||
byte[] newTreeHash = Files.readAllBytes(treeHash);
|
||||
|
||||
if (Arrays.equals(originalHash, newHash) ^ !hashChangeExpected) {
|
||||
throw new AssertionError("Unexpected hash state.");
|
||||
if (Arrays.equals(originalApiHash, newApiHash) ^ !apiHashChangeExpected) {
|
||||
throw new AssertionError("Unexpected API hash state.");
|
||||
}
|
||||
|
||||
if (Arrays.equals(originalTreeHash, newTreeHash) ^ !treeHashChangeExpected) {
|
||||
throw new AssertionError("Unexpected Tree hash state, " +
|
||||
"original: " + new String(originalTreeHash) +
|
||||
", new: " + new String(newTreeHash));
|
||||
}
|
||||
}
|
||||
|
||||
private void doModuleTest(String codeBefore, String codeAfter, boolean hashChangeExpected) throws Exception {
|
||||
doModuleTest(codeBefore, codeAfter, hashChangeExpected, hashChangeExpected);
|
||||
}
|
||||
|
||||
private void doModuleTest(String codeBefore, String codeAfter, boolean apiHashChangeExpected, boolean treeHashChangeExpected) throws Exception {
|
||||
List<String> options =
|
||||
Arrays.asList("-d", scratchClasses.toString(),
|
||||
"-processorpath", depend.toString() + File.pathSeparator + scratchServices.toString(),
|
||||
"-Xplugin:depend " + apiHash.toString());
|
||||
"-Xplugin:depend " + apiHash.toString() + " " + treeHash.toString(),
|
||||
"-XDmodifiedInputs=build-all");
|
||||
List<TestJavaFileObject> beforeFiles =
|
||||
Arrays.asList(new TestJavaFileObject("module-info", codeBefore),
|
||||
new TestJavaFileObject("test.Test1", "package test; public interface Test1 {}"),
|
||||
@@ -279,7 +381,8 @@ public class DependTest {
|
||||
new TestJavaFileObject("test.TestImpl1", "package test; public class TestImpl1 implements Test1, Test2 {}"),
|
||||
new TestJavaFileObject("test.TestImpl2", "package test; public class TestImpl2 implements Test1, Test2 {}"));
|
||||
compiler.getTask(null, null, null, options, null, beforeFiles).call();
|
||||
byte[] originalHash = Files.readAllBytes(apiHash);
|
||||
byte[] originalApiHash = Files.readAllBytes(apiHash);
|
||||
byte[] originalTreeHash = Files.readAllBytes(treeHash);
|
||||
List<TestJavaFileObject> afterFiles =
|
||||
Arrays.asList(new TestJavaFileObject("module-info", codeAfter),
|
||||
new TestJavaFileObject("test.Test1", "package test; public interface Test1 {}"),
|
||||
@@ -287,10 +390,17 @@ public class DependTest {
|
||||
new TestJavaFileObject("test.TestImpl1", "package test; public class TestImpl1 implements Test1, Test2 {}"),
|
||||
new TestJavaFileObject("test.TestImpl2", "package test; public class TestImpl2 implements Test1, Test2 {}"));
|
||||
compiler.getTask(null, null, null, options, null, afterFiles).call();
|
||||
byte[] newHash = Files.readAllBytes(apiHash);
|
||||
byte[] newApiHash = Files.readAllBytes(apiHash);
|
||||
byte[] newTreeHash = Files.readAllBytes(treeHash);
|
||||
|
||||
if (Arrays.equals(originalHash, newHash) ^ !hashChangeExpected) {
|
||||
throw new AssertionError("Unexpected hash state.");
|
||||
if (Arrays.equals(originalApiHash, newApiHash) ^ !apiHashChangeExpected) {
|
||||
throw new AssertionError("Unexpected API hash state.");
|
||||
}
|
||||
|
||||
if (Arrays.equals(originalTreeHash, newTreeHash) ^ !treeHashChangeExpected) {
|
||||
throw new AssertionError("Unexpected Tree hash state, " +
|
||||
"original: " + new String(originalTreeHash) +
|
||||
", new: " + new String(newTreeHash));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -919,8 +919,6 @@ class DTDParser implements DTDConstants {
|
||||
} catch (Exception e) {
|
||||
error("exception", e.getClass().getName(), e.getMessage());
|
||||
e.printStackTrace();
|
||||
} catch (ThreadDeath e) {
|
||||
error("terminated");
|
||||
}
|
||||
return (nerrors > 0) ? null : dtd;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -94,25 +94,20 @@ public class GenerateBreakIteratorData {
|
||||
rules = (ResourceBundle) Class.forName(
|
||||
localizedBundleName("sun.text.resources", "BreakIteratorRules")).getDeclaredConstructor().newInstance();
|
||||
|
||||
if (info.containsKey("CharacterData")) {
|
||||
generateDataFile(info.getString("CharacterData"),
|
||||
rules.getString("CharacterBreakRules"),
|
||||
classNames[0]);
|
||||
}
|
||||
if (info.containsKey("WordData")) {
|
||||
generateDataFile(info.getString("WordData"),
|
||||
rules.getString("WordBreakRules"),
|
||||
classNames[1]);
|
||||
classNames[0]);
|
||||
}
|
||||
if (info.containsKey("LineData")) {
|
||||
generateDataFile(info.getString("LineData"),
|
||||
rules.getString("LineBreakRules"),
|
||||
classNames[2]);
|
||||
classNames[1]);
|
||||
}
|
||||
if (info.containsKey("SentenceData")) {
|
||||
generateDataFile(info.getString("SentenceData"),
|
||||
rules.getString("SentenceBreakRules"),
|
||||
classNames[3]);
|
||||
classNames[2]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -56,7 +56,7 @@ public class Incubating implements Taglet {
|
||||
}
|
||||
|
||||
private static final String MESSAGE =
|
||||
"<BR><b><a href=\"http://openjdk.java.net/jeps/11\">Incubating Feature.</a>"
|
||||
"<BR><b><a href=\"https://openjdk.org/jeps/11\">Incubating Feature.</a>"
|
||||
+ " Will be removed in a future release.</b>";
|
||||
|
||||
@Override
|
||||
|
||||
@@ -79,7 +79,7 @@ ifeq ($(call isTargetOs, macosx aix linux), true)
|
||||
SRC := $(TOPDIR)/src/$(MODULE)/unix/native/jspawnhelper, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKEXE) -I$(TOPDIR)/src/$(MODULE)/unix/native/libjava, \
|
||||
EXTRA_OBJECT_FILES := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc.o, \
|
||||
EXTRA_OBJECT_FILES := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc$(OBJ_SUFFIX), \
|
||||
LDFLAGS := $(LDFLAGS_JDKEXE), \
|
||||
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
|
||||
))
|
||||
|
||||
@@ -43,10 +43,13 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBNET, \
|
||||
NAME := net, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB), \
|
||||
DISABLED_WARNINGS_gcc := format-nonliteral unused-function, \
|
||||
DISABLED_WARNINGS_clang := parentheses-equality constant-logical-operand \
|
||||
format-nonliteral undef, \
|
||||
DISABLED_WARNINGS_microsoft := 4244 4047 4133 4996, \
|
||||
DISABLED_WARNINGS_gcc_net_util_md.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_gcc_NetworkInterface.c := unused-function, \
|
||||
DISABLED_WARNINGS_clang_net_util_md.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_microsoft_InetAddress.c := 4244, \
|
||||
DISABLED_WARNINGS_microsoft_NetworkInterface.c := 4133, \
|
||||
DISABLED_WARNINGS_microsoft_NetworkInterface_winXP.c := 4133, \
|
||||
DISABLED_WARNINGS_microsoft_ResolverConfigurationImpl.c := 4996, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_windows := -delayload:secur32.dll -delayload:iphlpapi.dll, \
|
||||
@@ -70,8 +73,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBNIO, \
|
||||
OPTIMIZATION := HIGH, \
|
||||
WARNINGS_AS_ERRORS_xlc := false, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB), \
|
||||
DISABLED_WARNINGS_gcc := undef, \
|
||||
DISABLED_WARNINGS_clang := undef, \
|
||||
EXTRA_HEADER_DIRS := \
|
||||
libnio/ch \
|
||||
libnio/fs \
|
||||
@@ -101,8 +102,7 @@ ifeq ($(call isTargetOs, macosx), true)
|
||||
NAME := osxsecurity, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB), \
|
||||
DISABLED_WARNINGS_clang := deprecated-declarations \
|
||||
missing-method-return-type, \
|
||||
DISABLED_WARNINGS_clang_KeystoreImpl.m := deprecated-declarations, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
-L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
@@ -130,7 +130,6 @@ ifeq ($(call isTargetOsType, unix), true)
|
||||
NAME := jsig, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJSIG_CFLAGS), \
|
||||
DISABLED_WARNINGS_gcc := undef, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LIBS_linux := $(LIBDL), \
|
||||
|
||||
@@ -30,7 +30,7 @@ GENDATA_TZDB :=
|
||||
#
|
||||
TZDATA_DIR := $(MODULE_SRC)/share/data/tzdata
|
||||
TZDATA_TZFILE := africa antarctica asia australasia europe northamerica southamerica backward etcetera gmt jdk11_backward
|
||||
TZDATA_TZFILES := $(addprefix $(TZDATA_DIR)/,$(TZDATA_TZFILE))
|
||||
TZDATA_TZFILES := $(wildcard $(TZDATA_DIR)/*)
|
||||
|
||||
GENDATA_TZDB_DAT := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/tzdb.dat
|
||||
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
#
|
||||
|
||||
#
|
||||
# Rules to create $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/util/regex/EmojiData.java
|
||||
# Rules to create $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/util/regex/EmojiData.java
|
||||
#
|
||||
|
||||
GENSRC_EMOJIDATA := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/util/regex/EmojiData.java
|
||||
GENSRC_EMOJIDATA := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/util/regex/EmojiData.java
|
||||
|
||||
EMOJIDATATEMP = $(MODULE_SRC)/share/classes/java/util/regex/EmojiData.java.template
|
||||
EMOJIDATATEMP = $(MODULE_SRC)/share/classes/jdk/internal/util/regex/EmojiData.java.template
|
||||
UNICODEDATA = $(MODULE_SRC)/share/data/unicodedata
|
||||
|
||||
$(GENSRC_EMOJIDATA): $(BUILD_TOOLS_JDK) $(EMOJIDATATEMP) $(UNICODEDATA)/emoji/emoji-data.txt
|
||||
|
||||
@@ -48,9 +48,14 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBFDLIBM, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
|
||||
CFLAGS_windows_debug := -DLOGGING, \
|
||||
CFLAGS_aix := -qfloat=nomaf, \
|
||||
DISABLED_WARNINGS_gcc := sign-compare misleading-indentation array-bounds, \
|
||||
DISABLED_WARNINGS_clang := sign-compare misleading-indentation, \
|
||||
DISABLED_WARNINGS_microsoft := 4146 4244 4018, \
|
||||
DISABLED_WARNINGS_gcc := sign-compare, \
|
||||
DISABLED_WARNINGS_gcc_k_rem_pio2.c := maybe-uninitialized, \
|
||||
DISABLED_WARNINGS_clang := sign-compare, \
|
||||
DISABLED_WARNINGS_microsoft := 4146, \
|
||||
DISABLED_WARNINGS_microsoft_e_exp.c := 4244, \
|
||||
DISABLED_WARNINGS_microsoft_s_ceil.c := 4018, \
|
||||
DISABLED_WARNINGS_microsoft_s_expm1.c := 4244, \
|
||||
DISABLED_WARNINGS_microsoft_s_floor.c := 4018, \
|
||||
ARFLAGS := $(ARFLAGS), \
|
||||
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
|
||||
))
|
||||
@@ -93,7 +98,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \
|
||||
jdk_util.c_CFLAGS := $(VERSION_CFLAGS), \
|
||||
EXTRA_HEADER_DIRS := libfdlibm, \
|
||||
WARNINGS_AS_ERRORS_xlc := false, \
|
||||
DISABLED_WARNINGS_gcc := unused-result unused-function, \
|
||||
DISABLED_WARNINGS_gcc_ProcessImpl_md.c := unused-result, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/, \
|
||||
@@ -134,8 +139,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBZIP, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
$(LIBZ_CFLAGS), \
|
||||
CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
|
||||
DISABLED_WARNINGS_gcc := unused-function implicit-fallthrough, \
|
||||
DISABLED_WARNINGS_clang := format-nonliteral, \
|
||||
DISABLED_WARNINGS_gcc_zip_util.c := unused-function, \
|
||||
DISABLED_WARNINGS_clang_gzwrite.c := format-nonliteral, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LIBS_unix := -ljvm -ljava $(LIBZ_LIBS), \
|
||||
@@ -205,8 +210,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \
|
||||
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
|
||||
OPTIMIZATION := HIGH, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
|
||||
DISABLED_WARNINGS_gcc := unused-function implicit-fallthrough, \
|
||||
DISABLED_WARNINGS_clang := sometimes-uninitialized format-nonliteral, \
|
||||
DISABLED_WARNINGS_gcc := unused-function, \
|
||||
DISABLED_WARNINGS_clang := format-nonliteral, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LIBS_unix := $(LIBZ_LIBS), \
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
DISABLED_WARNINGS_java += lossy-conversions
|
||||
DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
COPY += .gif .png .wav .txt .xml .css .pf
|
||||
|
||||
@@ -190,7 +190,7 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
common/font \
|
||||
#
|
||||
|
||||
LIBAWT_XAWT_EXCLUDES := medialib debug
|
||||
LIBAWT_XAWT_EXCLUDES := medialib debug wl
|
||||
|
||||
LIBAWT_XAWT_EXTRA_HEADER_DIRS := \
|
||||
$(LIBAWT_DEFAULT_HEADER_DIRS) \
|
||||
@@ -262,6 +262,83 @@ endif
|
||||
|
||||
################################################################################
|
||||
|
||||
ifeq ($(call isTargetOs, windows macosx), false)
|
||||
ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
||||
|
||||
LIBAWT_WLAWT_EXTRA_SRC := \
|
||||
common/awt \
|
||||
common/java2d \
|
||||
common/font \
|
||||
#
|
||||
|
||||
LIBAWT_WLAWT_EXCLUDES := medialib debug opengl x11
|
||||
LIBAWT_WLAWT_EXCLUDE_FILES := common/awt/X11Color.c common/awt/awt_Font.c
|
||||
|
||||
LIBAWT_WLAWT_EXTRA_HEADER_DIRS := \
|
||||
$(LIBAWT_DEFAULT_HEADER_DIRS) \
|
||||
libawt_wlawt/awt \
|
||||
include \
|
||||
common/awt/debug \
|
||||
common/awt/systemscale \
|
||||
common/font \
|
||||
common/java2d/wl \
|
||||
#
|
||||
|
||||
# Enable 'wakefield' extension for java.awt.Robot support
|
||||
WAKEFIELD_ROBOT_CFLAGS=-DWAKEFIELD_ROBOT
|
||||
|
||||
LIBAWT_WLAWT_CFLAGS += -DWLAWT \
|
||||
$(WAKEFIELD_ROBOT_CFLAGS) \
|
||||
$(FONTCONFIG_CFLAGS) \
|
||||
$(CUPS_CFLAGS)
|
||||
|
||||
LIBAWT_WLAWT_LIBS := $(LIBM) -lawt $(WAYLAND_LIBS) $(LIBDL) -ljava -ljvm -lrt
|
||||
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
LIBAWT_WLAWT_LIBS += -lpthread
|
||||
endif
|
||||
|
||||
ifeq ($(TOOLCHAIN_TYPE), gcc)
|
||||
# Turn off all warnings for the following files since they contain warnings
|
||||
# that cannot be turned of individually.
|
||||
# redefining a macro
|
||||
BUILD_LIBAWT_WLAWT_awt_Font.c_CFLAGS := -w
|
||||
# initializing a declared 'extern'
|
||||
BUILD_LIBAWT_WLAWT_debug_mem.c_CFLAGS := -w
|
||||
endif
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT_WLAWT, \
|
||||
NAME := awt_wlawt, \
|
||||
EXCLUDE_FILES := $(LIBAWT_WLAWT_EXCLUDE_FILES), \
|
||||
EXTRA_SRC := $(LIBAWT_WLAWT_EXTRA_SRC), \
|
||||
EXTRA_HEADER_DIRS := $(LIBAWT_WLAWT_EXTRA_HEADER_DIRS), \
|
||||
EXCLUDES := $(LIBAWT_WLAWT_EXCLUDES), \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_WLAWT_CFLAGS), \
|
||||
WARNINGS_AS_ERRORS_xlc := false, \
|
||||
DISABLED_WARNINGS_gcc := type-limits pointer-to-int-cast \
|
||||
unused-result maybe-uninitialized format \
|
||||
format-security int-to-pointer-cast parentheses \
|
||||
implicit-fallthrough undef unused-function, \
|
||||
DISABLED_WARNINGS_clang := parentheses format undef \
|
||||
logical-op-parentheses format-nonliteral int-conversion, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN) \
|
||||
-L$(INSTALL_LIBRARIES_HERE), \
|
||||
LIBS := $(LIBAWT_WLAWT_LIBS), \
|
||||
))
|
||||
|
||||
$(BUILD_LIBAWT_WLAWT): $(call FindLib, java.base, java)
|
||||
|
||||
$(BUILD_LIBAWT_WLAWT): $(BUILD_LIBAWT)
|
||||
|
||||
TARGETS += $(BUILD_LIBAWT_WLAWT)
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
# The fast floor code loses precision.
|
||||
LCMS_CFLAGS=-DCMS_DONT_USE_FAST_FLOOR
|
||||
|
||||
@@ -492,13 +569,9 @@ ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), )
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
|
||||
X11TextRenderer.c
|
||||
LIBFONTMANAGER_OPTIMIZATION := HIGHEST
|
||||
else ifeq ($(call isTargetOs, macosx), true)
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
|
||||
X11TextRenderer.c \
|
||||
fontpath.c \
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
|
||||
lcdglyph.c
|
||||
else
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
|
||||
@@ -523,7 +596,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
|
||||
EXTRA_HEADER_DIRS := $(LIBFONTMANAGER_EXTRA_HEADER_DIRS), \
|
||||
EXTRA_SRC := $(LIBFONTMANAGER_EXTRA_SRC), \
|
||||
WARNINGS_AS_ERRORS_xlc := false, \
|
||||
DISABLED_WARNINGS_gcc := $(HARFBUZZ_DISABLED_WARNINGS_gcc), \
|
||||
DISABLED_WARNINGS_gcc := $(HARFBUZZ_DISABLED_WARNINGS_gcc) unused-result, \
|
||||
DISABLED_WARNINGS_CXX_gcc := $(HARFBUZZ_DISABLED_WARNINGS_CXX_gcc), \
|
||||
DISABLED_WARNINGS_clang := $(HARFBUZZ_DISABLED_WARNINGS_clang), \
|
||||
DISABLED_WARNINGS_microsoft := $(HARFBUZZ_DISABLED_WARNINGS_microsoft), \
|
||||
@@ -553,6 +626,51 @@ TARGETS += $(BUILD_LIBFONTMANAGER)
|
||||
|
||||
################################################################################
|
||||
|
||||
ifeq ($(call isTargetOs, windows macosx), false)
|
||||
ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
||||
|
||||
LIBFONTMANAGER_XAWT_EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES)
|
||||
LIBFONTMANAGER_XAWT_CFLAGS := $(LIBFONTMANAGER_CFLAGS)
|
||||
LIBFONTMANAGER_XAWT_OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION)
|
||||
LIBFONTMANAGER_XAWT_EXTRA_HEADER_DIRS := $(LIBFONTMANAGER_EXTRA_HEADER_DIRS) \
|
||||
libfontmanager
|
||||
LIBFONTMANAGER_XAWT_EXTRA_SRC :=
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER_XAWT, \
|
||||
NAME := fontmanager_xawt, \
|
||||
EXCLUDE_FILES := $(LIBFONTMANAGER_XAWT_EXCLUDE_FILES) \
|
||||
AccelGlyphCache.c, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFONTMANAGER_XAWT_CFLAGS), \
|
||||
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBFONTMANAGER_XAWT_CFLAGS), \
|
||||
OPTIMIZATION := $(LIBFONTMANAGER_XAWT_OPTIMIZATION), \
|
||||
CFLAGS_windows = -DCC_NOEX, \
|
||||
EXTRA_HEADER_DIRS := $(LIBFONTMANAGER_XAWT_EXTRA_HEADER_DIRS), \
|
||||
EXTRA_SRC := $(LIBFONTMANAGER_XAWT_EXTRA_SRC), \
|
||||
WARNINGS_AS_ERRORS_xlc := false, \
|
||||
DISABLED_WARNINGS_gcc := $(HARFBUZZ_DISABLED_WARNINGS_gcc), \
|
||||
DISABLED_WARNINGS_CXX_gcc := $(HARFBUZZ_DISABLED_WARNINGS_CXX_gcc), \
|
||||
DISABLED_WARNINGS_clang := $(HARFBUZZ_DISABLED_WARNINGS_clang), \
|
||||
DISABLED_WARNINGS_microsoft := $(HARFBUZZ_DISABLED_WARNINGS_microsoft), \
|
||||
LDFLAGS := $(subst -Xlinker -z -Xlinker defs,, \
|
||||
$(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB))) $(LDFLAGS_CXX_JDK) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
|
||||
LDFLAGS_aix := -Wl$(COMMA)-berok, \
|
||||
LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \
|
||||
LIBS_unix := -lfontmanager -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \
|
||||
))
|
||||
|
||||
$(BUILD_LIBFONTMANAGER_XAWT): $(BUILD_LIBFONTMANAGER)
|
||||
$(BUILD_LIBFONTMANAGER_XAWT): $(BUILD_LIBAWT_XAWT)
|
||||
|
||||
TARGETS += $(BUILD_LIBFONTMANAGER_XAWT)
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
|
||||
LIBJAWT_CFLAGS := -EHsc -DUNICODE -D_UNICODE
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -40,6 +40,19 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJ2GSS, \
|
||||
|
||||
TARGETS += $(BUILD_LIBJ2GSS)
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBSSPI_BRIDGE, \
|
||||
NAME := sspi_bridge, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
-I$(TOPDIR)/src/java.security.jgss/share/native/libj2gss, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN) \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBSSPI_BRIDGE)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
ifneq ($(BUILD_CRYPTO), false)
|
||||
@@ -57,17 +70,6 @@ ifneq ($(BUILD_CRYPTO), false)
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBW2K_LSA_AUTH)
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBSSPI_BRIDGE, \
|
||||
NAME := sspi_bridge, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
-I$(TOPDIR)/src/java.security.jgss/share/native/libj2gss, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN) \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBSSPI_BRIDGE)
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
DISABLED_WARNINGS_java += lossy-conversions
|
||||
DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:$(call CommaList, javax.xml.catalog javax.xml.datatype \
|
||||
javax.xml.transform javax.xml.validation javax.xml.xpath)'
|
||||
|
||||
@@ -42,6 +42,7 @@ if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
|
||||
LDD_CMD="$OTOOL -L"
|
||||
DIS_CMD="$OTOOL -v -V -t"
|
||||
STAT_PRINT_SIZE="-f %z"
|
||||
STRIP="$STRIP -no_code_signature_warning"
|
||||
elif [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
FULLDUMP_CMD="$DUMPBIN -all"
|
||||
LDD_CMD="$DUMPBIN -dependents"
|
||||
@@ -674,14 +675,22 @@ compare_bin_file() {
|
||||
ORIG_THIS_FILE="$THIS_FILE"
|
||||
ORIG_OTHER_FILE="$OTHER_FILE"
|
||||
|
||||
if [ "$STRIP_ALL" = "true" ] || [[ "$STRIP_BEFORE_COMPARE" = *"$BIN_FILE"* ]]; then
|
||||
if [ "$STRIP_ALL" = "true" ] || [[ "$STRIP_BEFORE_COMPARE" = *"$BIN_FILE"* ]] \
|
||||
|| [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
|
||||
THIS_STRIPPED_FILE=$FILE_WORK_DIR/this/$NAME
|
||||
OTHER_STRIPPED_FILE=$FILE_WORK_DIR/other/$NAME
|
||||
$MKDIR -p $FILE_WORK_DIR/this $FILE_WORK_DIR/other
|
||||
$CP $THIS_FILE $THIS_STRIPPED_FILE
|
||||
$CP $OTHER_FILE $OTHER_STRIPPED_FILE
|
||||
$STRIP $THIS_STRIPPED_FILE
|
||||
$STRIP $OTHER_STRIPPED_FILE
|
||||
if [ "$STRIP_ALL" = "true" ] || [[ "$STRIP_BEFORE_COMPARE" = *"$BIN_FILE"* ]]; then
|
||||
$STRIP $THIS_STRIPPED_FILE
|
||||
$STRIP $OTHER_STRIPPED_FILE
|
||||
fi
|
||||
# On macosx, always remove any signature before comparing
|
||||
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
|
||||
$CODESIGN --remove-signature $THIS_STRIPPED_FILE
|
||||
$CODESIGN --remove-signature $OTHER_STRIPPED_FILE
|
||||
fi
|
||||
THIS_FILE="$THIS_STRIPPED_FILE"
|
||||
OTHER_FILE="$OTHER_STRIPPED_FILE"
|
||||
fi
|
||||
|
||||
@@ -352,6 +352,21 @@ function convert_path() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Treat $1 as name of a file containing paths. Convert those paths to Windows style,
|
||||
# and output them to the file specified by $2.
|
||||
# If the output file already exists, it is overwritten.
|
||||
function convert_file() {
|
||||
infile="$1"
|
||||
outfile="$2"
|
||||
if [[ -e $outfile ]] ; then
|
||||
rm $outfile
|
||||
fi
|
||||
while read line; do
|
||||
convert_path "$line"
|
||||
echo "$result" >> $outfile
|
||||
done < $infile
|
||||
}
|
||||
|
||||
# Treat $1 as name of a file containing paths. Convert those paths to Windows style,
|
||||
# in a new temporary file, and return a string "@<temp file>" pointing to that
|
||||
# new file.
|
||||
@@ -498,6 +513,8 @@ if [[ "$ACTION" == "import" ]] ; then
|
||||
elif [[ "$ACTION" == "print" ]] ; then
|
||||
print_command_line "$@"
|
||||
echo "$result"
|
||||
elif [[ "$ACTION" == "convert" ]] ; then
|
||||
convert_file "$@"
|
||||
elif [[ "$ACTION" == "exec" ]] ; then
|
||||
exec_command_line "$@"
|
||||
# Propagate exit code
|
||||
|
||||
@@ -86,7 +86,7 @@ the methods in the CustomControlsContext interface.
|
||||
|
||||
Here are some resources for learning about and using the Java2D(TM)
|
||||
|
||||
OpenJDK group page: http://openjdk.java.net/groups/2d/
|
||||
OpenJDK group page: https://openjdk.org/groups/2d/
|
||||
|
||||
Learning Java 2D: http://www.oracle.com/technetwork/articles/java/java2dpart1-137217.html
|
||||
|
||||
|
||||
@@ -460,6 +460,7 @@ alloc_class chunk1(
|
||||
);
|
||||
|
||||
alloc_class chunk2 (
|
||||
// Governing predicates for load/store and arithmetic
|
||||
P0,
|
||||
P1,
|
||||
P2,
|
||||
@@ -467,8 +468,8 @@ alloc_class chunk2 (
|
||||
P4,
|
||||
P5,
|
||||
P6,
|
||||
P7,
|
||||
|
||||
// Extra predicates
|
||||
P8,
|
||||
P9,
|
||||
P10,
|
||||
@@ -477,6 +478,9 @@ alloc_class chunk2 (
|
||||
P13,
|
||||
P14,
|
||||
P15,
|
||||
|
||||
// Preserved for all-true predicate
|
||||
P7,
|
||||
);
|
||||
|
||||
alloc_class chunk3(RFLAGS);
|
||||
@@ -1909,19 +1913,19 @@ static enum RC rc_class(OptoReg::Name reg) {
|
||||
}
|
||||
|
||||
// we have 32 int registers * 2 halves
|
||||
int slots_of_int_registers = RegisterImpl::max_slots_per_register * RegisterImpl::number_of_registers;
|
||||
int slots_of_int_registers = Register::number_of_registers * Register::max_slots_per_register;
|
||||
|
||||
if (reg < slots_of_int_registers) {
|
||||
return rc_int;
|
||||
}
|
||||
|
||||
// we have 32 float register * 8 halves
|
||||
int slots_of_float_registers = FloatRegisterImpl::max_slots_per_register * FloatRegisterImpl::number_of_registers;
|
||||
int slots_of_float_registers = FloatRegister::number_of_registers * FloatRegister::max_slots_per_register;
|
||||
if (reg < slots_of_int_registers + slots_of_float_registers) {
|
||||
return rc_float;
|
||||
}
|
||||
|
||||
int slots_of_predicate_registers = PRegisterImpl::max_slots_per_register * PRegisterImpl::number_of_registers;
|
||||
int slots_of_predicate_registers = PRegister::number_of_registers * PRegister::max_slots_per_register;
|
||||
if (reg < slots_of_int_registers + slots_of_float_registers + slots_of_predicate_registers) {
|
||||
return rc_predicate;
|
||||
}
|
||||
@@ -3368,7 +3372,7 @@ encode %{
|
||||
} else {
|
||||
relocInfo::relocType rtype = $src->constant_reloc();
|
||||
if (rtype == relocInfo::oop_type) {
|
||||
__ movoop(dst_reg, (jobject)con, /*immediate*/true);
|
||||
__ movoop(dst_reg, (jobject)con);
|
||||
} else if (rtype == relocInfo::metadata_type) {
|
||||
__ mov_metadata(dst_reg, (Metadata*)con);
|
||||
} else {
|
||||
@@ -3622,7 +3626,7 @@ encode %{
|
||||
address call;
|
||||
if (!_method) {
|
||||
// A call to a runtime wrapper, e.g. new, new_typeArray_Java, uncommon_trap.
|
||||
call = __ trampoline_call(Address(addr, relocInfo::runtime_call_type), &cbuf);
|
||||
call = __ trampoline_call(Address(addr, relocInfo::runtime_call_type));
|
||||
if (call == NULL) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return;
|
||||
@@ -3631,7 +3635,7 @@ encode %{
|
||||
int method_index = resolved_method_index(cbuf);
|
||||
RelocationHolder rspec = _optimized_virtual ? opt_virtual_call_Relocation::spec(method_index)
|
||||
: static_call_Relocation::spec(method_index);
|
||||
call = __ trampoline_call(Address(addr, rspec), &cbuf);
|
||||
call = __ trampoline_call(Address(addr, rspec));
|
||||
if (call == NULL) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return;
|
||||
@@ -3639,10 +3643,10 @@ encode %{
|
||||
if (CodeBuffer::supports_shared_stubs() && _method->can_be_statically_bound()) {
|
||||
// Calls of the same statically bound method can share
|
||||
// a stub to the interpreter.
|
||||
cbuf.shared_stub_to_interp_for(_method, cbuf.insts()->mark_off());
|
||||
cbuf.shared_stub_to_interp_for(_method, call - cbuf.insts_begin());
|
||||
} else {
|
||||
// Emit stub for static call
|
||||
address stub = CompiledStaticCall::emit_to_interp_stub(cbuf);
|
||||
address stub = CompiledStaticCall::emit_to_interp_stub(cbuf, call);
|
||||
if (stub == NULL) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return;
|
||||
@@ -3650,7 +3654,6 @@ encode %{
|
||||
}
|
||||
}
|
||||
|
||||
_masm.clear_inst_mark();
|
||||
__ post_call_nop();
|
||||
|
||||
// Only non uncommon_trap calls need to reinitialize ptrue.
|
||||
@@ -3697,7 +3700,6 @@ encode %{
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return;
|
||||
}
|
||||
_masm.clear_inst_mark();
|
||||
__ post_call_nop();
|
||||
} else {
|
||||
Label retaddr;
|
||||
@@ -5540,6 +5542,7 @@ operand pRegGov()
|
||||
%{
|
||||
constraint(ALLOC_IN_RC(gov_pr));
|
||||
match(RegVectMask);
|
||||
match(pReg);
|
||||
op_cost(0);
|
||||
format %{ %}
|
||||
interface(REG_INTER);
|
||||
|
||||
@@ -127,11 +127,14 @@ source %{
|
||||
|
||||
const bool Matcher::match_rule_supported_superword(int opcode, int vlen, BasicType bt) {
|
||||
if (UseSVE == 0) {
|
||||
// ConvD2I and ConvL2F are not profitable to be vectorized on NEON, because no direct
|
||||
// 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) ||
|
||||
(opcode == Op_VectorCastL2X && bt == T_FLOAT)) {
|
||||
(opcode == Op_VectorCastL2X && bt == T_FLOAT) ||
|
||||
opcode == Op_AddReductionVD || opcode == Op_AddReductionVF ||
|
||||
opcode == Op_MulReductionVD || opcode == Op_MulReductionVF ||
|
||||
opcode == Op_MulVL) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -153,7 +156,6 @@ source %{
|
||||
// Check whether specific Op is supported.
|
||||
// Fail fast, otherwise fall through to common vector_size_supported() check.
|
||||
switch (opcode) {
|
||||
case Op_MulVL:
|
||||
case Op_AndVMask:
|
||||
case Op_OrVMask:
|
||||
case Op_XorVMask:
|
||||
@@ -1494,7 +1496,6 @@ instruct vand_notL_masked(vReg dst_src1, vReg src2, immL_M1 m1, pRegGov pg) %{
|
||||
// vector abs
|
||||
|
||||
instruct vabsB(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (AbsVB src));
|
||||
format %{ "vabsB $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -1510,7 +1511,6 @@ instruct vabsB(vReg dst, vReg src) %{
|
||||
%}
|
||||
|
||||
instruct vabsS(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (AbsVS src));
|
||||
format %{ "vabsS $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -1526,7 +1526,6 @@ instruct vabsS(vReg dst, vReg src) %{
|
||||
%}
|
||||
|
||||
instruct vabsI(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (AbsVI src));
|
||||
format %{ "vabsI $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -1542,7 +1541,6 @@ instruct vabsI(vReg dst, vReg src) %{
|
||||
%}
|
||||
|
||||
instruct vabsL(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (AbsVL src));
|
||||
format %{ "vabsL $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -1558,7 +1556,6 @@ instruct vabsL(vReg dst, vReg src) %{
|
||||
%}
|
||||
|
||||
instruct vabsF(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (AbsVF src));
|
||||
format %{ "vabsF $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -1574,7 +1571,6 @@ instruct vabsF(vReg dst, vReg src) %{
|
||||
%}
|
||||
|
||||
instruct vabsD(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (AbsVD src));
|
||||
format %{ "vabsD $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -1655,11 +1651,11 @@ instruct vabsD_masked(vReg dst_src, pRegGov pg) %{
|
||||
|
||||
// vector fabs diff
|
||||
|
||||
instruct vfabd(vReg dst, vReg src1, vReg src2) %{
|
||||
predicate(Matcher::vector_length_in_bytes(n) <= 16);
|
||||
instruct vfabd_neon(vReg dst, vReg src1, vReg src2) %{
|
||||
predicate(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
|
||||
match(Set dst (AbsVF (SubVF src1 src2)));
|
||||
match(Set dst (AbsVD (SubVD src1 src2)));
|
||||
format %{ "vfabd $dst, $src1, $src2\t# vector <= 128 bits" %}
|
||||
format %{ "vfabd_neon $dst, $src1, $src2" %}
|
||||
ins_encode %{
|
||||
__ fabd($dst$$FloatRegister, get_arrangement(this),
|
||||
$src1$$FloatRegister, $src2$$FloatRegister);
|
||||
@@ -1667,12 +1663,40 @@ instruct vfabd(vReg dst, vReg src1, vReg src2) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vfabd_sve(vReg dst_src1, vReg src2) %{
|
||||
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
|
||||
match(Set dst_src1 (AbsVF (SubVF dst_src1 src2)));
|
||||
match(Set dst_src1 (AbsVD (SubVD dst_src1 src2)));
|
||||
format %{ "vfabd_sve $dst_src1, $dst_src1, $src2" %}
|
||||
ins_encode %{
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
__ sve_fabd($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
ptrue, $src2$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// vector fabs diff - predicated
|
||||
|
||||
instruct vfabd_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst_src1 (AbsVF (SubVF (Binary dst_src1 src2) pg) pg));
|
||||
match(Set dst_src1 (AbsVD (SubVD (Binary dst_src1 src2) pg) pg));
|
||||
format %{ "vfabd_masked $dst_src1, $pg, $dst_src1, $src2" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
__ sve_fabd($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
$pg$$PRegister, $src2$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// ------------------------------ Vector neg -----------------------------------
|
||||
|
||||
// vector neg
|
||||
|
||||
instruct vnegI(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (NegVI src));
|
||||
format %{ "vnegI $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -1690,7 +1714,6 @@ instruct vnegI(vReg dst, vReg src) %{
|
||||
%}
|
||||
|
||||
instruct vnegL(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (NegVL src));
|
||||
format %{ "vnegL $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -1706,7 +1729,6 @@ instruct vnegL(vReg dst, vReg src) %{
|
||||
%}
|
||||
|
||||
instruct vnegF(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (NegVF src));
|
||||
format %{ "vnegF $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -1722,7 +1744,6 @@ instruct vnegF(vReg dst, vReg src) %{
|
||||
%}
|
||||
|
||||
instruct vnegD(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (NegVD src));
|
||||
format %{ "vnegD $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -1786,7 +1807,6 @@ instruct vnegD_masked(vReg dst_src, pRegGov pg) %{
|
||||
// vector sqrt
|
||||
|
||||
instruct vsqrtF(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (SqrtVF src));
|
||||
format %{ "vsqrtF $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -1802,7 +1822,6 @@ instruct vsqrtF(vReg dst, vReg src) %{
|
||||
%}
|
||||
|
||||
instruct vsqrtD(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (SqrtVD src));
|
||||
format %{ "vsqrtD $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -2022,13 +2041,11 @@ instruct vmla(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
match(Set dst_src1 (AddVB dst_src1 (MulVB src2 src3)));
|
||||
match(Set dst_src1 (AddVS dst_src1 (MulVS src2 src3)));
|
||||
match(Set dst_src1 (AddVI dst_src1 (MulVI src2 src3)));
|
||||
match(Set dst_src1 (AddVL dst_src1 (MulVL src2 src3)));
|
||||
format %{ "vmla $dst_src1, src2, src3" %}
|
||||
format %{ "vmla $dst_src1, $src2, $src3" %}
|
||||
ins_encode %{
|
||||
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) && bt != T_LONG) {
|
||||
// NEON mlav does not accept T2D arrangement.
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
__ mlav($dst_src1$$FloatRegister, get_arrangement(this),
|
||||
$src2$$FloatRegister, $src3$$FloatRegister);
|
||||
} else {
|
||||
@@ -2040,13 +2057,25 @@ instruct vmla(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmlaL(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst_src1 (AddVL dst_src1 (MulVL src2 src3)));
|
||||
format %{ "vmlaL $dst_src1, $src2, $src3" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
__ sve_mla($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
ptrue, $src2$$FloatRegister, $src3$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmla_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst_src1 (AddVB (Binary dst_src1 (MulVB src2 src3)) pg));
|
||||
match(Set dst_src1 (AddVS (Binary dst_src1 (MulVS src2 src3)) pg));
|
||||
match(Set dst_src1 (AddVI (Binary dst_src1 (MulVI src2 src3)) pg));
|
||||
match(Set dst_src1 (AddVL (Binary dst_src1 (MulVL src2 src3)) pg));
|
||||
format %{ "vmla_masked $dst_src1, $pg, src2, src3" %}
|
||||
format %{ "vmla_masked $dst_src1, $pg, $src2, $src3" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
__ sve_mla($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
@@ -2101,13 +2130,11 @@ instruct vmls(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
match(Set dst_src1 (SubVB dst_src1 (MulVB src2 src3)));
|
||||
match(Set dst_src1 (SubVS dst_src1 (MulVS src2 src3)));
|
||||
match(Set dst_src1 (SubVI dst_src1 (MulVI src2 src3)));
|
||||
match(Set dst_src1 (SubVL dst_src1 (MulVL src2 src3)));
|
||||
format %{ "vmls $dst_src1, src2, src3" %}
|
||||
format %{ "vmls $dst_src1, $src2, $src3" %}
|
||||
ins_encode %{
|
||||
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) && bt != T_LONG) {
|
||||
// NEON mlsv does not accept T2D arrangement.
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
__ mlsv($dst_src1$$FloatRegister, get_arrangement(this),
|
||||
$src2$$FloatRegister, $src3$$FloatRegister);
|
||||
} else {
|
||||
@@ -2119,13 +2146,25 @@ instruct vmls(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmlsL(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst_src1 (SubVL dst_src1 (MulVL src2 src3)));
|
||||
format %{ "vmlsL $dst_src1, $src2, $src3" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
__ sve_mls($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
ptrue, $src2$$FloatRegister, $src3$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmls_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst_src1 (SubVB (Binary dst_src1 (MulVB src2 src3)) pg));
|
||||
match(Set dst_src1 (SubVS (Binary dst_src1 (MulVS src2 src3)) pg));
|
||||
match(Set dst_src1 (SubVI (Binary dst_src1 (MulVI src2 src3)) pg));
|
||||
match(Set dst_src1 (SubVL (Binary dst_src1 (MulVL src2 src3)) pg));
|
||||
format %{ "vmls_masked $dst_src1, $pg, src2, src3" %}
|
||||
format %{ "vmls_masked $dst_src1, $pg, $src2, $src3" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
__ sve_mls($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
@@ -2137,9 +2176,8 @@ instruct vmls_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
// vector fmls
|
||||
|
||||
// dst_src1 = dst_src1 + -src2 * src3
|
||||
// The NegVF/NegVD must not be predicated.
|
||||
instruct vfmls1(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
predicate(UseFMA && !n->in(2)->in(1)->as_Vector()->is_predicated_vector());
|
||||
predicate(UseFMA);
|
||||
match(Set dst_src1 (FmaVF dst_src1 (Binary (NegVF src2) src3)));
|
||||
match(Set dst_src1 (FmaVD dst_src1 (Binary (NegVD src2) src3)));
|
||||
format %{ "vfmls1 $dst_src1, $src2, $src3" %}
|
||||
@@ -2159,9 +2197,8 @@ instruct vfmls1(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
%}
|
||||
|
||||
// dst_src1 = dst_src1 + src2 * -src3
|
||||
// The NegVF/NegVD must not be predicated.
|
||||
instruct vfmls2(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
predicate(UseFMA && !n->in(2)->in(2)->as_Vector()->is_predicated_vector());
|
||||
predicate(UseFMA);
|
||||
match(Set dst_src1 (FmaVF dst_src1 (Binary src2 (NegVF src3))));
|
||||
match(Set dst_src1 (FmaVD dst_src1 (Binary src2 (NegVD src3))));
|
||||
format %{ "vfmls2 $dst_src1, $src2, $src3" %}
|
||||
@@ -2183,10 +2220,8 @@ instruct vfmls2(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
// vector fmsb - predicated
|
||||
|
||||
// dst_src1 = dst_src1 * -src2 + src3
|
||||
// The NegVF/NegVD must not be predicated.
|
||||
instruct vfmsb_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
predicate(UseFMA && UseSVE > 0 &&
|
||||
!n->in(1)->in(2)->as_Vector()->is_predicated_vector());
|
||||
predicate(UseFMA && UseSVE > 0);
|
||||
match(Set dst_src1 (FmaVF (Binary dst_src1 (NegVF src2)) (Binary src3 pg)));
|
||||
match(Set dst_src1 (FmaVD (Binary dst_src1 (NegVD src2)) (Binary src3 pg)));
|
||||
format %{ "vfmsb_masked $dst_src1, $pg, $src2, $src3" %}
|
||||
@@ -2201,11 +2236,8 @@ instruct vfmsb_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
// vector fnmla (sve)
|
||||
|
||||
// dst_src1 = -dst_src1 + -src2 * src3
|
||||
// The NegVF/NegVD must not be predicated.
|
||||
instruct vfnmla1(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
predicate(UseFMA && UseSVE > 0 &&
|
||||
!n->in(1)->as_Vector()->is_predicated_vector() &&
|
||||
!n->in(2)->in(1)->as_Vector()->is_predicated_vector());
|
||||
predicate(UseFMA && UseSVE > 0);
|
||||
match(Set dst_src1 (FmaVF (NegVF dst_src1) (Binary (NegVF src2) src3)));
|
||||
match(Set dst_src1 (FmaVD (NegVD dst_src1) (Binary (NegVD src2) src3)));
|
||||
format %{ "vfnmla1 $dst_src1, $src2, $src3" %}
|
||||
@@ -2218,11 +2250,8 @@ instruct vfnmla1(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
%}
|
||||
|
||||
// dst_src1 = -dst_src1 + src2 * -src3
|
||||
// The NegVF/NegVD must not be predicated.
|
||||
instruct vfnmla2(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
predicate(UseFMA && UseSVE > 0 &&
|
||||
!n->in(1)->as_Vector()->is_predicated_vector() &&
|
||||
!n->in(2)->in(2)->as_Vector()->is_predicated_vector());
|
||||
predicate(UseFMA && UseSVE > 0);
|
||||
match(Set dst_src1 (FmaVF (NegVF dst_src1) (Binary src2 (NegVF src3))));
|
||||
match(Set dst_src1 (FmaVD (NegVD dst_src1) (Binary src2 (NegVD src3))));
|
||||
format %{ "vfnmla2 $dst_src1, $src2, $src3" %}
|
||||
@@ -2237,11 +2266,8 @@ instruct vfnmla2(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
// vector fnmad - predicated
|
||||
|
||||
// dst_src1 = -src3 + dst_src1 * -src2
|
||||
// The NegVF/NegVD must not be predicated.
|
||||
instruct vfnmad_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
predicate(UseFMA && UseSVE > 0 &&
|
||||
!n->in(1)->in(2)->as_Vector()->is_predicated_vector() &&
|
||||
!n->in(2)->in(1)->as_Vector()->is_predicated_vector());
|
||||
predicate(UseFMA && UseSVE > 0);
|
||||
match(Set dst_src1 (FmaVF (Binary dst_src1 (NegVF src2)) (Binary (NegVF src3) pg)));
|
||||
match(Set dst_src1 (FmaVD (Binary dst_src1 (NegVD src2)) (Binary (NegVD src3) pg)));
|
||||
format %{ "vfnmad_masked $dst_src1, $pg, $src2, $src3" %}
|
||||
@@ -2256,10 +2282,8 @@ instruct vfnmad_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
// vector fnmls (sve)
|
||||
|
||||
// dst_src1 = -dst_src1 + src2 * src3
|
||||
// The NegVF/NegVD must not be predicated.
|
||||
instruct vfnmls(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
predicate(UseFMA && UseSVE > 0 &&
|
||||
!n->in(1)->as_Vector()->is_predicated_vector());
|
||||
predicate(UseFMA && UseSVE > 0);
|
||||
match(Set dst_src1 (FmaVF (NegVF dst_src1) (Binary src2 src3)));
|
||||
match(Set dst_src1 (FmaVD (NegVD dst_src1) (Binary src2 src3)));
|
||||
format %{ "vfnmls $dst_src1, $src2, $src3" %}
|
||||
@@ -2274,10 +2298,8 @@ instruct vfnmls(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
// vector fnmsb - predicated
|
||||
|
||||
// dst_src1 = -src3 + dst_src1 * src2
|
||||
// The NegVF/NegVD must not be predicated.
|
||||
instruct vfnmsb_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
predicate(UseFMA && UseSVE > 0 &&
|
||||
!n->in(2)->in(1)->as_Vector()->is_predicated_vector());
|
||||
predicate(UseFMA && UseSVE > 0);
|
||||
match(Set dst_src1 (FmaVF (Binary dst_src1 src2) (Binary (NegVF src3) pg)));
|
||||
match(Set dst_src1 (FmaVD (Binary dst_src1 src2) (Binary (NegVD src3) pg)));
|
||||
format %{ "vfnmsb_masked $dst_src1, $pg, $src2, $src3" %}
|
||||
@@ -4637,9 +4659,8 @@ instruct vloadmask_neon(vReg dst, vReg src) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vloadmaskB_sve(pRegGov dst, vReg src, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && !n->is_predicated_vector() &&
|
||||
Matcher::vector_element_basic_type(n) == T_BYTE);
|
||||
instruct vloadmaskB_sve(pReg dst, vReg src, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) == T_BYTE);
|
||||
match(Set dst (VectorLoadMask src));
|
||||
effect(KILL cr);
|
||||
format %{ "vloadmaskB_sve $dst, $src\t# KILL cr" %}
|
||||
@@ -4650,9 +4671,8 @@ instruct vloadmaskB_sve(pRegGov dst, vReg src, rFlagsReg cr) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vloadmask_extend_sve(pRegGov dst, vReg src, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && !n->is_predicated_vector() &&
|
||||
Matcher::vector_element_basic_type(n) != T_BYTE);
|
||||
instruct vloadmask_extend_sve(pReg dst, vReg src, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) != T_BYTE);
|
||||
match(Set dst (VectorLoadMask src));
|
||||
effect(TEMP tmp, KILL cr);
|
||||
format %{ "vloadmask_extend_sve $dst, $src\t# KILL $tmp, cr" %}
|
||||
@@ -4665,7 +4685,7 @@ instruct vloadmask_extend_sve(pRegGov dst, vReg src, vReg tmp, rFlagsReg cr) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vloadmaskB_masked(pRegGov dst, vReg src, pRegGov pg, rFlagsReg cr) %{
|
||||
instruct vloadmaskB_masked(pReg dst, vReg src, pRegGov pg, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) == T_BYTE);
|
||||
match(Set dst (VectorLoadMask src pg));
|
||||
effect(KILL cr);
|
||||
@@ -4677,7 +4697,7 @@ instruct vloadmaskB_masked(pRegGov dst, vReg src, pRegGov pg, rFlagsReg cr) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vloadmask_extend_masked(pRegGov dst, vReg src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
|
||||
instruct vloadmask_extend_masked(pReg dst, vReg src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) != T_BYTE);
|
||||
match(Set dst (VectorLoadMask src pg));
|
||||
effect(TEMP tmp, KILL cr);
|
||||
@@ -4731,7 +4751,7 @@ instruct vstoremask_narrow_neon(vReg dst, vReg src, immI_gt_1 size) %{
|
||||
|
||||
// vector store mask - sve
|
||||
|
||||
instruct vstoremaskB_sve(vReg dst, pRegGov src, immI_1 size) %{
|
||||
instruct vstoremaskB_sve(vReg dst, pReg src, immI_1 size) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorStoreMask src size));
|
||||
format %{ "vstoremaskB_sve $dst, $src" %}
|
||||
@@ -4741,7 +4761,7 @@ instruct vstoremaskB_sve(vReg dst, pRegGov src, immI_1 size) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vstoremask_narrow_sve(vReg dst, pRegGov src, immI_gt_1 size, vReg tmp) %{
|
||||
instruct vstoremask_narrow_sve(vReg dst, pReg src, immI_gt_1 size, vReg tmp) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorStoreMask src size));
|
||||
effect(TEMP_DEF dst, TEMP tmp);
|
||||
@@ -4758,8 +4778,8 @@ instruct vstoremask_narrow_sve(vReg dst, pRegGov src, immI_gt_1 size, vReg tmp)
|
||||
// Combined rules for vector mask load when the vector element type is not T_BYTE
|
||||
|
||||
// VectorLoadMask+LoadVector, and the VectorLoadMask is unpredicated.
|
||||
instruct vloadmask_loadV(pRegGov dst, indirect mem, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && !n->is_predicated_vector() &&
|
||||
instruct vloadmask_loadV(pReg dst, indirect mem, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
type2aelembytes(Matcher::vector_element_basic_type(n)) > 1);
|
||||
match(Set dst (VectorLoadMask (LoadVector mem)));
|
||||
effect(TEMP tmp, KILL cr);
|
||||
@@ -4780,7 +4800,7 @@ instruct vloadmask_loadV(pRegGov dst, indirect mem, vReg tmp, rFlagsReg cr) %{
|
||||
%}
|
||||
|
||||
// VectorLoadMask+LoadVector, and the VectorLoadMask is predicated.
|
||||
instruct vloadmask_loadV_masked(pRegGov dst, indirect mem, pRegGov pg,
|
||||
instruct vloadmask_loadV_masked(pReg dst, indirect mem, pRegGov pg,
|
||||
vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
type2aelembytes(Matcher::vector_element_basic_type(n)) > 1);
|
||||
@@ -4801,8 +4821,8 @@ instruct vloadmask_loadV_masked(pRegGov dst, indirect mem, pRegGov pg,
|
||||
%}
|
||||
|
||||
// VectorLoadMask+LoadVectorMasked, and the VectorLoadMask is unpredicated.
|
||||
instruct vloadmask_loadVMasked(pRegGov dst, vmemA mem, pRegGov pg, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && !n->is_predicated_vector() &&
|
||||
instruct vloadmask_loadVMasked(pReg dst, vmemA mem, pRegGov pg, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
type2aelembytes(Matcher::vector_element_basic_type(n)) > 1);
|
||||
match(Set dst (VectorLoadMask (LoadVectorMasked mem pg)));
|
||||
effect(TEMP tmp, KILL cr);
|
||||
@@ -4828,7 +4848,7 @@ instruct vloadmask_loadVMasked(pRegGov dst, vmemA mem, pRegGov pg, vReg tmp, rFl
|
||||
%}
|
||||
|
||||
// VectorLoadMask+LoadVectorMasked, and the VectorLoadMask is predicated.
|
||||
instruct vloadmask_loadVMasked_masked(pRegGov dst, vmemA mem, pRegGov pg1, pRegGov pg2,
|
||||
instruct vloadmask_loadVMasked_masked(pReg dst, vmemA mem, pRegGov pg1, pRegGov pg2,
|
||||
vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
type2aelembytes(Matcher::vector_element_basic_type(n)) > 1);
|
||||
@@ -4858,7 +4878,7 @@ instruct vloadmask_loadVMasked_masked(pRegGov dst, vmemA mem, pRegGov pg1, pRegG
|
||||
// Combined rules for vector mask store when the vector element type is not T_BYTE
|
||||
|
||||
// StoreVector+VectorStoreMask, and the vector size of "src" is equal to the MaxVectorSize.
|
||||
instruct storeV_vstoremask(indirect mem, pRegGov src, immI_gt_1 esize, vReg tmp) %{
|
||||
instruct storeV_vstoremask(indirect mem, pReg src, immI_gt_1 esize, vReg tmp) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length_in_bytes(n->as_StoreVector()->in(MemNode::ValueIn)->in(1)) == MaxVectorSize);
|
||||
match(Set mem (StoreVector mem (VectorStoreMask src esize)));
|
||||
@@ -4879,7 +4899,7 @@ instruct storeV_vstoremask(indirect mem, pRegGov src, immI_gt_1 esize, vReg tmp)
|
||||
%}
|
||||
|
||||
// StoreVector+VectorStoreMask, and the vector size of "src" is less than the MaxVectorSize.
|
||||
instruct storeV_vstoremask_masked(indirect mem, pRegGov src, immI_gt_1 esize,
|
||||
instruct storeV_vstoremask_masked(indirect mem, pReg src, immI_gt_1 esize,
|
||||
vReg tmp, pRegGov pgtmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length_in_bytes(n->as_StoreVector()->in(MemNode::ValueIn)->in(1)) < MaxVectorSize);
|
||||
@@ -4901,7 +4921,7 @@ instruct storeV_vstoremask_masked(indirect mem, pRegGov src, immI_gt_1 esize,
|
||||
%}
|
||||
|
||||
// StoreVectorMasked+VectorStoreMask, and the vector size of "src" is equal to the MaxVectorSize.
|
||||
instruct storeVMasked_vstoremask(vmemA mem, pRegGov src, pRegGov pg, immI_gt_1 esize, vReg tmp) %{
|
||||
instruct storeVMasked_vstoremask(vmemA mem, pReg src, pRegGov pg, immI_gt_1 esize, vReg tmp) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length_in_bytes(n->as_StoreVector()->in(MemNode::ValueIn)->in(1)) == MaxVectorSize);
|
||||
match(Set mem (StoreVectorMasked mem (Binary (VectorStoreMask src esize) pg)));
|
||||
@@ -4927,7 +4947,7 @@ instruct storeVMasked_vstoremask(vmemA mem, pRegGov src, pRegGov pg, immI_gt_1 e
|
||||
%}
|
||||
|
||||
// StoreVectorMasked+VectorStoreMask, and the vector size of "src" is less than the MaxVectorSize.
|
||||
instruct storeVMasked_vstoremask_masked(vmemA mem, pRegGov src, pRegGov pg, immI_gt_1 esize,
|
||||
instruct storeVMasked_vstoremask_masked(vmemA mem, pReg src, pRegGov pg, immI_gt_1 esize,
|
||||
vReg tmp, pRegGov pgtmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length_in_bytes(n->as_StoreVector()->in(MemNode::ValueIn)->in(1)) < MaxVectorSize);
|
||||
@@ -4957,7 +4977,7 @@ instruct storeVMasked_vstoremask_masked(vmemA mem, pRegGov src, pRegGov pg, immI
|
||||
|
||||
// vector mask logical ops: and/or/xor/and_not
|
||||
|
||||
instruct vmask_and(pRegGov pd, pRegGov pn, pRegGov pm) %{
|
||||
instruct vmask_and(pReg pd, pReg pn, pReg pm) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set pd (AndVMask pn pm));
|
||||
format %{ "vmask_and $pd, $pn, $pm" %}
|
||||
@@ -4967,7 +4987,7 @@ instruct vmask_and(pRegGov pd, pRegGov pn, pRegGov pm) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmask_or(pRegGov pd, pRegGov pn, pRegGov pm) %{
|
||||
instruct vmask_or(pReg pd, pReg pn, pReg pm) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set pd (OrVMask pn pm));
|
||||
format %{ "vmask_or $pd, $pn, $pm" %}
|
||||
@@ -4977,7 +4997,7 @@ instruct vmask_or(pRegGov pd, pRegGov pn, pRegGov pm) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmask_xor(pRegGov pd, pRegGov pn, pRegGov pm) %{
|
||||
instruct vmask_xor(pReg pd, pReg pn, pReg pm) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set pd (XorVMask pn pm));
|
||||
format %{ "vmask_xor $pd, $pn, $pm" %}
|
||||
@@ -4987,7 +5007,7 @@ instruct vmask_xor(pRegGov pd, pRegGov pn, pRegGov pm) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmask_and_notI(pRegGov pd, pRegGov pn, pRegGov pm, immI_M1 m1) %{
|
||||
instruct vmask_and_notI(pReg pd, pReg pn, pReg pm, immI_M1 m1) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set pd (AndVMask pn (XorVMask pm (MaskAll m1))));
|
||||
format %{ "vmask_and_notI $pd, $pn, $pm" %}
|
||||
@@ -4997,7 +5017,7 @@ instruct vmask_and_notI(pRegGov pd, pRegGov pn, pRegGov pm, immI_M1 m1) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmask_and_notL(pRegGov pd, pRegGov pn, pRegGov pm, immL_M1 m1) %{
|
||||
instruct vmask_and_notL(pReg pd, pReg pn, pReg pm, immL_M1 m1) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set pd (AndVMask pn (XorVMask pm (MaskAll m1))));
|
||||
format %{ "vmask_and_notL $pd, $pn, $pm" %}
|
||||
@@ -5025,7 +5045,7 @@ instruct vmaskcmp_neon(vReg dst, vReg src1, vReg src2, immI cond) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcmp_sve(pRegGov dst, vReg src1, vReg src2, immI cond, rFlagsReg cr) %{
|
||||
instruct vmaskcmp_sve(pReg dst, vReg src1, vReg src2, immI cond, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorMaskCmp (Binary src1 src2) cond));
|
||||
effect(KILL cr);
|
||||
@@ -5040,7 +5060,7 @@ instruct vmaskcmp_sve(pRegGov dst, vReg src1, vReg src2, immI cond, rFlagsReg cr
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcmp_masked(pRegGov dst, vReg src1, vReg src2, immI cond,
|
||||
instruct vmaskcmp_masked(pReg dst, vReg src1, vReg src2, immI cond,
|
||||
pRegGov pg, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorMaskCmp (Binary src1 src2) (Binary cond pg)));
|
||||
@@ -5067,7 +5087,49 @@ instruct vmaskcast_same_esize_neon(vReg dst_src) %{
|
||||
ins_pipe(pipe_class_empty);
|
||||
%}
|
||||
|
||||
instruct vmaskcast_same_esize_sve(pRegGov dst_src) %{
|
||||
instruct vmaskcast_extend_neon(vReg dst, vReg src) %{
|
||||
predicate(UseSVE == 0 &&
|
||||
Matcher::vector_length_in_bytes(n) > Matcher::vector_length_in_bytes(n->in(1)));
|
||||
match(Set dst (VectorMaskCast src));
|
||||
format %{ "vmaskcast_extend_neon $dst, $src" %}
|
||||
ins_encode %{
|
||||
BasicType dst_bt = Matcher::vector_element_basic_type(this);
|
||||
if (is_floating_point_type(dst_bt)) {
|
||||
dst_bt = (dst_bt == T_FLOAT) ? T_INT : T_LONG;
|
||||
}
|
||||
uint length_in_bytes_dst = Matcher::vector_length_in_bytes(this);
|
||||
BasicType src_bt = Matcher::vector_element_basic_type(this, $src);
|
||||
if (is_floating_point_type(src_bt)) {
|
||||
src_bt = (src_bt == T_FLOAT) ? T_INT : T_LONG;
|
||||
}
|
||||
__ neon_vector_extend($dst$$FloatRegister, dst_bt, length_in_bytes_dst,
|
||||
$src$$FloatRegister, src_bt);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcast_narrow_neon(vReg dst, vReg src) %{
|
||||
predicate(UseSVE == 0 &&
|
||||
Matcher::vector_length_in_bytes(n) < Matcher::vector_length_in_bytes(n->in(1)));
|
||||
match(Set dst (VectorMaskCast src));
|
||||
format %{ "vmaskcast_narrow_neon $dst, $src" %}
|
||||
ins_encode %{
|
||||
BasicType dst_bt = Matcher::vector_element_basic_type(this);
|
||||
if (is_floating_point_type(dst_bt)) {
|
||||
dst_bt = (dst_bt == T_FLOAT) ? T_INT : T_LONG;
|
||||
}
|
||||
BasicType src_bt = Matcher::vector_element_basic_type(this, $src);
|
||||
if (is_floating_point_type(src_bt)) {
|
||||
src_bt = (src_bt == T_FLOAT) ? T_INT : T_LONG;
|
||||
}
|
||||
uint length_in_bytes_src = Matcher::vector_length_in_bytes(this, $src);
|
||||
__ neon_vector_narrow($dst$$FloatRegister, dst_bt,
|
||||
$src$$FloatRegister, src_bt, length_in_bytes_src);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcast_same_esize_sve(pReg dst_src) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length_in_bytes(n) == Matcher::vector_length_in_bytes(n->in(1)));
|
||||
match(Set dst_src (VectorMaskCast dst_src));
|
||||
@@ -5077,11 +5139,11 @@ instruct vmaskcast_same_esize_sve(pRegGov dst_src) %{
|
||||
ins_pipe(pipe_class_empty);
|
||||
%}
|
||||
|
||||
instruct vmaskcast_extend(pRegGov dst, pReg src) %{
|
||||
instruct vmaskcast_extend_sve(pReg dst, pReg src) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length_in_bytes(n) > Matcher::vector_length_in_bytes(n->in(1)));
|
||||
match(Set dst (VectorMaskCast src));
|
||||
format %{ "vmaskcast_extend $dst, $src" %}
|
||||
format %{ "vmaskcast_extend_sve $dst, $src" %}
|
||||
ins_encode %{
|
||||
uint length_in_bytes_dst = Matcher::vector_length_in_bytes(this);
|
||||
uint length_in_bytes_src = Matcher::vector_length_in_bytes(this, $src);
|
||||
@@ -5094,11 +5156,11 @@ instruct vmaskcast_extend(pRegGov dst, pReg src) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcast_narrow(pRegGov dst, pReg src) %{
|
||||
instruct vmaskcast_narrow_sve(pReg dst, pReg src) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length_in_bytes(n) < Matcher::vector_length_in_bytes(n->in(1)));
|
||||
match(Set dst (VectorMaskCast src));
|
||||
format %{ "vmaskcast_narrow $dst, $src" %}
|
||||
format %{ "vmaskcast_narrow_sve $dst, $src" %}
|
||||
ins_encode %{
|
||||
uint length_in_bytes_dst = Matcher::vector_length_in_bytes(this);
|
||||
uint length_in_bytes_src = Matcher::vector_length_in_bytes(this, $src);
|
||||
@@ -5113,7 +5175,7 @@ instruct vmaskcast_narrow(pRegGov dst, pReg src) %{
|
||||
|
||||
// vector mask reinterpret
|
||||
|
||||
instruct vmask_reinterpret_same_esize(pRegGov dst_src) %{
|
||||
instruct vmask_reinterpret_same_esize(pReg dst_src) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length(n) == Matcher::vector_length(n->in(1)) &&
|
||||
Matcher::vector_length_in_bytes(n) == Matcher::vector_length_in_bytes(n->in(1)));
|
||||
@@ -5124,7 +5186,7 @@ instruct vmask_reinterpret_same_esize(pRegGov dst_src) %{
|
||||
ins_pipe(pipe_class_empty);
|
||||
%}
|
||||
|
||||
instruct vmask_reinterpret_diff_esize(pRegGov dst, pRegGov src, vReg tmp, rFlagsReg cr) %{
|
||||
instruct vmask_reinterpret_diff_esize(pReg dst, pReg src, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length(n) != Matcher::vector_length(n->in(1)) &&
|
||||
Matcher::vector_length_in_bytes(n) == Matcher::vector_length_in_bytes(n->in(1)));
|
||||
@@ -5256,7 +5318,7 @@ instruct vmask_firsttrue_8or16e(iRegINoSp dst, vReg src) %{
|
||||
// them are set.
|
||||
|
||||
instruct vmask_firsttrue_sve(iRegINoSp dst, pReg src, pReg ptmp) %{
|
||||
predicate(UseSVE > 0 && !n->is_predicated_vector());
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorMaskFirstTrue src));
|
||||
effect(TEMP ptmp);
|
||||
format %{ "vmask_firsttrue_sve $dst, $src\t# KILL $ptmp" %}
|
||||
@@ -5270,7 +5332,7 @@ instruct vmask_firsttrue_sve(iRegINoSp dst, pReg src, pReg ptmp) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmask_firsttrue_masked(iRegINoSp dst, pReg src, pRegGov pg, pReg ptmp) %{
|
||||
instruct vmask_firsttrue_masked(iRegINoSp dst, pReg src, pReg pg, pReg ptmp) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorMaskFirstTrue src pg));
|
||||
effect(TEMP ptmp);
|
||||
@@ -5382,7 +5444,7 @@ instruct vmask_tolong_sve(iRegLNoSp dst, pReg src, vReg tmp1, vReg tmp2) %{
|
||||
|
||||
// fromlong
|
||||
|
||||
instruct vmask_fromlong(pRegGov dst, iRegL src, vReg tmp1, vReg tmp2) %{
|
||||
instruct vmask_fromlong(pReg dst, iRegL src, vReg tmp1, vReg tmp2) %{
|
||||
match(Set dst (VectorLongToMask src));
|
||||
effect(TEMP tmp1, TEMP tmp2);
|
||||
format %{ "vmask_fromlong $dst, $src\t# vector (sve2). KILL $tmp1, $tmp2" %}
|
||||
@@ -5399,7 +5461,7 @@ instruct vmask_fromlong(pRegGov dst, iRegL src, vReg tmp1, vReg tmp2) %{
|
||||
|
||||
// maskAll
|
||||
|
||||
instruct vmaskAll_immI(pRegGov dst, immI src, rFlagsReg cr) %{
|
||||
instruct vmaskAll_immI(pReg dst, immI src, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (MaskAll src));
|
||||
effect(KILL cr);
|
||||
@@ -5417,8 +5479,8 @@ instruct vmaskAll_immI(pRegGov dst, immI src, rFlagsReg cr) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskAllI(pRegGov dst, iRegIorL2I src, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && !n->is_predicated_vector());
|
||||
instruct vmaskAllI(pReg dst, iRegIorL2I src, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (MaskAll src));
|
||||
effect(TEMP tmp, KILL cr);
|
||||
format %{ "vmaskAllI $dst, $src\t# KILL $tmp, cr" %}
|
||||
@@ -5433,7 +5495,7 @@ instruct vmaskAllI(pRegGov dst, iRegIorL2I src, vReg tmp, rFlagsReg cr) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskAllI_masked(pRegGov dst, iRegIorL2I src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
|
||||
instruct vmaskAllI_masked(pReg dst, iRegIorL2I src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (MaskAll src pg));
|
||||
effect(TEMP tmp, KILL cr);
|
||||
@@ -5448,7 +5510,7 @@ instruct vmaskAllI_masked(pRegGov dst, iRegIorL2I src, pRegGov pg, vReg tmp, rFl
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskAll_immL(pRegGov dst, immL src, rFlagsReg cr) %{
|
||||
instruct vmaskAll_immL(pReg dst, immL src, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (MaskAll src));
|
||||
effect(KILL cr);
|
||||
@@ -5466,8 +5528,8 @@ instruct vmaskAll_immL(pRegGov dst, immL src, rFlagsReg cr) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskAllL(pRegGov dst, iRegL src, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && !n->is_predicated_vector());
|
||||
instruct vmaskAllL(pReg dst, iRegL src, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (MaskAll src));
|
||||
effect(TEMP tmp, KILL cr);
|
||||
format %{ "vmaskAllL $dst, $src\t# KILL $tmp, cr" %}
|
||||
@@ -5482,7 +5544,7 @@ instruct vmaskAllL(pRegGov dst, iRegL src, vReg tmp, rFlagsReg cr) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskAllL_masked(pRegGov dst, iRegL src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
|
||||
instruct vmaskAllL_masked(pReg dst, iRegL src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (MaskAll src pg));
|
||||
effect(TEMP tmp, KILL cr);
|
||||
@@ -5499,7 +5561,7 @@ instruct vmaskAllL_masked(pRegGov dst, iRegL src, pRegGov pg, vReg tmp, rFlagsRe
|
||||
|
||||
// vetcor mask generation
|
||||
|
||||
instruct vmask_gen_I(pRegGov pd, iRegIorL2I src, rFlagsReg cr) %{
|
||||
instruct vmask_gen_I(pReg pd, iRegIorL2I src, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set pd (VectorMaskGen (ConvI2L src)));
|
||||
effect(KILL cr);
|
||||
@@ -5511,7 +5573,7 @@ instruct vmask_gen_I(pRegGov pd, iRegIorL2I src, rFlagsReg cr) %{
|
||||
ins_pipe(pipe_class_default);
|
||||
%}
|
||||
|
||||
instruct vmask_gen_L(pRegGov pd, iRegL src, rFlagsReg cr) %{
|
||||
instruct vmask_gen_L(pReg pd, iRegL src, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set pd (VectorMaskGen src));
|
||||
effect(KILL cr);
|
||||
@@ -5523,7 +5585,7 @@ instruct vmask_gen_L(pRegGov pd, iRegL src, rFlagsReg cr) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmask_gen_imm(pRegGov pd, immL con, rFlagsReg cr) %{
|
||||
instruct vmask_gen_imm(pReg pd, immL con, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set pd (VectorMaskGen con));
|
||||
effect(KILL cr);
|
||||
@@ -5540,7 +5602,6 @@ instruct vmask_gen_imm(pRegGov pd, immL con, rFlagsReg cr) %{
|
||||
// vector popcount - INT
|
||||
|
||||
instruct vpopcountI(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (PopCountVI src));
|
||||
format %{ "vpopcountI $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -5578,8 +5639,7 @@ instruct vpopcountI(vReg dst, vReg src) %{
|
||||
// vector popcount - LONG
|
||||
|
||||
instruct vpopcountL(vReg dst, vReg src) %{
|
||||
predicate(Matcher::vector_element_basic_type(n) == T_LONG &&
|
||||
!n->as_Vector()->is_predicated_vector());
|
||||
predicate(Matcher::vector_element_basic_type(n) == T_LONG);
|
||||
match(Set dst (PopCountVL src));
|
||||
format %{ "vpopcountL $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -5601,8 +5661,7 @@ instruct vpopcountL(vReg dst, vReg src) %{
|
||||
// "vpopcountL" rule.
|
||||
|
||||
instruct vpopcountL_I(vReg dst, vReg src, vReg tmp) %{
|
||||
predicate(Matcher::vector_element_basic_type(n) == T_INT &&
|
||||
!n->as_Vector()->is_predicated_vector());
|
||||
predicate(Matcher::vector_element_basic_type(n) == T_INT);
|
||||
match(Set dst (PopCountVL src));
|
||||
effect(TEMP_DEF dst, TEMP tmp);
|
||||
format %{ "vpopcountL_I $dst, $src\t# KILL $tmp" %}
|
||||
@@ -5674,6 +5733,48 @@ instruct vblend_sve(vReg dst, vReg src1, vReg src2, pReg pg) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// ------------------------- Vector conditional move --------------------------
|
||||
|
||||
instruct vcmove_neon(vReg dst, vReg src1, vReg src2, immI cond, cmpOp copnd) %{
|
||||
predicate(UseSVE == 0 ||
|
||||
(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)) &&
|
||||
n->in(1)->in(2)->get_int() != BoolTest::ne));
|
||||
match(Set dst (CMoveVF (Binary copnd cond) (Binary src1 src2)));
|
||||
match(Set dst (CMoveVD (Binary copnd cond) (Binary src1 src2)));
|
||||
effect(TEMP_DEF dst);
|
||||
format %{ "vcmove_neon.$copnd $dst, $src1, $src2\t# vector conditional move fp" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
assert(length_in_bytes == 8 || length_in_bytes == 16, "must be");
|
||||
__ neon_compare($dst$$FloatRegister, bt, $src1$$FloatRegister,
|
||||
$src2$$FloatRegister, (int)($cond$$constant),
|
||||
/* isQ */ length_in_bytes == 16);
|
||||
__ bsl($dst$$FloatRegister, length_in_bytes == 16 ? __ T16B : __ T8B,
|
||||
$src2$$FloatRegister, $src1$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vcmove_sve(vReg dst, vReg src1, vReg src2, immI cond, cmpOp copnd, pRegGov pgtmp) %{
|
||||
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)) ||
|
||||
(UseSVE > 0 && n->in(1)->in(2)->get_int() == BoolTest::ne));
|
||||
match(Set dst (CMoveVF (Binary copnd cond) (Binary src1 src2)));
|
||||
match(Set dst (CMoveVD (Binary copnd cond) (Binary src1 src2)));
|
||||
effect(TEMP pgtmp);
|
||||
format %{ "vcmove_sve.$copnd $dst, $src1, $src2\t# vector conditional move fp. KILL $pgtmp" %}
|
||||
ins_encode %{
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
__ sve_compare($pgtmp$$PRegister, bt, ptrue, $src1$$FloatRegister,
|
||||
$src2$$FloatRegister, (int)($cond$$constant));
|
||||
__ sve_sel($dst$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
$pgtmp$$PRegister, $src2$$FloatRegister, $src1$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// ------------------------------ Vector round ---------------------------------
|
||||
|
||||
// vector Math.round
|
||||
@@ -5778,7 +5879,7 @@ instruct vtest_anytrue_neon(iRegINoSp dst, vReg src1, vReg src2, vReg tmp, rFlag
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vtest_anytrue_sve(iRegINoSp dst, pRegGov src1, pRegGov src2, rFlagsReg cr) %{
|
||||
instruct vtest_anytrue_sve(iRegINoSp dst, pReg src1, pReg src2, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
static_cast<const VectorTestNode*>(n)->get_predicate() == BoolTest::ne);
|
||||
match(Set dst (VectorTest src1 src2));
|
||||
@@ -5812,7 +5913,7 @@ instruct vtest_alltrue_neon(iRegINoSp dst, vReg src1, vReg src2, vReg tmp, rFlag
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vtest_alltrue_sve(iRegINoSp dst, pRegGov src1, pRegGov src2, pReg ptmp, rFlagsReg cr) %{
|
||||
instruct vtest_alltrue_sve(iRegINoSp dst, pReg src1, pReg src2, pReg ptmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
static_cast<const VectorTestNode*>(n)->get_predicate() == BoolTest::overflow);
|
||||
match(Set dst (VectorTest src1 src2));
|
||||
@@ -6053,7 +6154,6 @@ instruct scatter_storeD_masked(indirect mem, vReg src, vReg idx, pRegGov pg, vRe
|
||||
// ------------------------------ CountLeadingZerosV ---------------------------
|
||||
|
||||
instruct vcountLeadingZeros(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (CountLeadingZerosV src));
|
||||
format %{ "vcountLeadingZeros $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -6101,7 +6201,6 @@ instruct vcountLeadingZeros_masked(vReg dst_src, pRegGov pg) %{
|
||||
// ------------------------------ CountTrailingZerosV --------------------------
|
||||
|
||||
instruct vcountTrailingZeros(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (CountTrailingZerosV src));
|
||||
format %{ "vcountTrailingZeros $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -6163,7 +6262,6 @@ instruct vcountTrailingZeros_masked(vReg dst_src, pRegGov pg) %{
|
||||
// ------------------------------ ReverseV -------------------------------------
|
||||
|
||||
instruct vreverse(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (ReverseV src));
|
||||
format %{ "vreverse $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -6210,7 +6308,6 @@ instruct vreverse_masked(vReg dst_src, pRegGov pg) %{
|
||||
// ------------------------------ ReverseBytesV --------------------------------
|
||||
|
||||
instruct vreverseBytes(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (ReverseBytesV src));
|
||||
format %{ "vreverseBytes $dst, $src" %}
|
||||
ins_encode %{
|
||||
|
||||
@@ -117,11 +117,14 @@ source %{
|
||||
|
||||
const bool Matcher::match_rule_supported_superword(int opcode, int vlen, BasicType bt) {
|
||||
if (UseSVE == 0) {
|
||||
// ConvD2I and ConvL2F are not profitable to be vectorized on NEON, because no direct
|
||||
// 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) ||
|
||||
(opcode == Op_VectorCastL2X && bt == T_FLOAT)) {
|
||||
(opcode == Op_VectorCastL2X && bt == T_FLOAT) ||
|
||||
opcode == Op_AddReductionVD || opcode == Op_AddReductionVF ||
|
||||
opcode == Op_MulReductionVD || opcode == Op_MulReductionVF ||
|
||||
opcode == Op_MulVL) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -143,7 +146,6 @@ source %{
|
||||
// Check whether specific Op is supported.
|
||||
// Fail fast, otherwise fall through to common vector_size_supported() check.
|
||||
switch (opcode) {
|
||||
case Op_MulVL:
|
||||
case Op_AndVMask:
|
||||
case Op_OrVMask:
|
||||
case Op_XorVMask:
|
||||
@@ -806,7 +808,6 @@ dnl UNARY_OP($1, $2, $3, $4, $5 )
|
||||
dnl UNARY_OP(rule_name, op_name, insn_neon, insn_sve, size)
|
||||
define(`UNARY_OP', `
|
||||
instruct $1(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst ($2 src));
|
||||
format %{ "$1 $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -871,11 +872,11 @@ UNARY_OP_PREDICATE_WITH_SIZE(vabsD, AbsVD, sve_fabs, D)
|
||||
|
||||
// vector fabs diff
|
||||
|
||||
instruct vfabd(vReg dst, vReg src1, vReg src2) %{
|
||||
predicate(Matcher::vector_length_in_bytes(n) <= 16);
|
||||
instruct vfabd_neon(vReg dst, vReg src1, vReg src2) %{
|
||||
predicate(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
|
||||
match(Set dst (AbsVF (SubVF src1 src2)));
|
||||
match(Set dst (AbsVD (SubVD src1 src2)));
|
||||
format %{ "vfabd $dst, $src1, $src2\t# vector <= 128 bits" %}
|
||||
format %{ "vfabd_neon $dst, $src1, $src2" %}
|
||||
ins_encode %{
|
||||
__ fabd($dst$$FloatRegister, get_arrangement(this),
|
||||
$src1$$FloatRegister, $src2$$FloatRegister);
|
||||
@@ -883,12 +884,40 @@ instruct vfabd(vReg dst, vReg src1, vReg src2) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vfabd_sve(vReg dst_src1, vReg src2) %{
|
||||
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
|
||||
match(Set dst_src1 (AbsVF (SubVF dst_src1 src2)));
|
||||
match(Set dst_src1 (AbsVD (SubVD dst_src1 src2)));
|
||||
format %{ "vfabd_sve $dst_src1, $dst_src1, $src2" %}
|
||||
ins_encode %{
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
__ sve_fabd($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
ptrue, $src2$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// vector fabs diff - predicated
|
||||
|
||||
instruct vfabd_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst_src1 (AbsVF (SubVF (Binary dst_src1 src2) pg) pg));
|
||||
match(Set dst_src1 (AbsVD (SubVD (Binary dst_src1 src2) pg) pg));
|
||||
format %{ "vfabd_masked $dst_src1, $pg, $dst_src1, $src2" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
__ sve_fabd($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
$pg$$PRegister, $src2$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// ------------------------------ Vector neg -----------------------------------
|
||||
|
||||
// vector neg
|
||||
|
||||
instruct vnegI(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (NegVI src));
|
||||
format %{ "vnegI $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -1054,13 +1083,11 @@ instruct vmla(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
match(Set dst_src1 (AddVB dst_src1 (MulVB src2 src3)));
|
||||
match(Set dst_src1 (AddVS dst_src1 (MulVS src2 src3)));
|
||||
match(Set dst_src1 (AddVI dst_src1 (MulVI src2 src3)));
|
||||
match(Set dst_src1 (AddVL dst_src1 (MulVL src2 src3)));
|
||||
format %{ "vmla $dst_src1, src2, src3" %}
|
||||
format %{ "vmla $dst_src1, $src2, $src3" %}
|
||||
ins_encode %{
|
||||
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) && bt != T_LONG) {
|
||||
// NEON mlav does not accept T2D arrangement.
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
__ mlav($dst_src1$$FloatRegister, get_arrangement(this),
|
||||
$src2$$FloatRegister, $src3$$FloatRegister);
|
||||
} else {
|
||||
@@ -1072,13 +1099,25 @@ instruct vmla(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmlaL(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst_src1 (AddVL dst_src1 (MulVL src2 src3)));
|
||||
format %{ "vmlaL $dst_src1, $src2, $src3" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
__ sve_mla($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
ptrue, $src2$$FloatRegister, $src3$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmla_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst_src1 (AddVB (Binary dst_src1 (MulVB src2 src3)) pg));
|
||||
match(Set dst_src1 (AddVS (Binary dst_src1 (MulVS src2 src3)) pg));
|
||||
match(Set dst_src1 (AddVI (Binary dst_src1 (MulVI src2 src3)) pg));
|
||||
match(Set dst_src1 (AddVL (Binary dst_src1 (MulVL src2 src3)) pg));
|
||||
format %{ "vmla_masked $dst_src1, $pg, src2, src3" %}
|
||||
format %{ "vmla_masked $dst_src1, $pg, $src2, $src3" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
__ sve_mla($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
@@ -1133,13 +1172,11 @@ instruct vmls(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
match(Set dst_src1 (SubVB dst_src1 (MulVB src2 src3)));
|
||||
match(Set dst_src1 (SubVS dst_src1 (MulVS src2 src3)));
|
||||
match(Set dst_src1 (SubVI dst_src1 (MulVI src2 src3)));
|
||||
match(Set dst_src1 (SubVL dst_src1 (MulVL src2 src3)));
|
||||
format %{ "vmls $dst_src1, src2, src3" %}
|
||||
format %{ "vmls $dst_src1, $src2, $src3" %}
|
||||
ins_encode %{
|
||||
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) && bt != T_LONG) {
|
||||
// NEON mlsv does not accept T2D arrangement.
|
||||
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
|
||||
__ mlsv($dst_src1$$FloatRegister, get_arrangement(this),
|
||||
$src2$$FloatRegister, $src3$$FloatRegister);
|
||||
} else {
|
||||
@@ -1151,13 +1188,25 @@ instruct vmls(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmlsL(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst_src1 (SubVL dst_src1 (MulVL src2 src3)));
|
||||
format %{ "vmlsL $dst_src1, $src2, $src3" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
__ sve_mls($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
ptrue, $src2$$FloatRegister, $src3$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmls_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst_src1 (SubVB (Binary dst_src1 (MulVB src2 src3)) pg));
|
||||
match(Set dst_src1 (SubVS (Binary dst_src1 (MulVS src2 src3)) pg));
|
||||
match(Set dst_src1 (SubVI (Binary dst_src1 (MulVI src2 src3)) pg));
|
||||
match(Set dst_src1 (SubVL (Binary dst_src1 (MulVL src2 src3)) pg));
|
||||
format %{ "vmls_masked $dst_src1, $pg, src2, src3" %}
|
||||
format %{ "vmls_masked $dst_src1, $pg, $src2, $src3" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
__ sve_mls($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
@@ -1169,9 +1218,8 @@ instruct vmls_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
// vector fmls
|
||||
|
||||
// dst_src1 = dst_src1 + -src2 * src3
|
||||
// The NegVF/NegVD must not be predicated.
|
||||
instruct vfmls1(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
predicate(UseFMA && !n->in(2)->in(1)->as_Vector()->is_predicated_vector());
|
||||
predicate(UseFMA);
|
||||
match(Set dst_src1 (FmaVF dst_src1 (Binary (NegVF src2) src3)));
|
||||
match(Set dst_src1 (FmaVD dst_src1 (Binary (NegVD src2) src3)));
|
||||
format %{ "vfmls1 $dst_src1, $src2, $src3" %}
|
||||
@@ -1191,9 +1239,8 @@ instruct vfmls1(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
%}
|
||||
|
||||
// dst_src1 = dst_src1 + src2 * -src3
|
||||
// The NegVF/NegVD must not be predicated.
|
||||
instruct vfmls2(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
predicate(UseFMA && !n->in(2)->in(2)->as_Vector()->is_predicated_vector());
|
||||
predicate(UseFMA);
|
||||
match(Set dst_src1 (FmaVF dst_src1 (Binary src2 (NegVF src3))));
|
||||
match(Set dst_src1 (FmaVD dst_src1 (Binary src2 (NegVD src3))));
|
||||
format %{ "vfmls2 $dst_src1, $src2, $src3" %}
|
||||
@@ -1215,10 +1262,8 @@ instruct vfmls2(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
// vector fmsb - predicated
|
||||
|
||||
// dst_src1 = dst_src1 * -src2 + src3
|
||||
// The NegVF/NegVD must not be predicated.
|
||||
instruct vfmsb_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
predicate(UseFMA && UseSVE > 0 &&
|
||||
!n->in(1)->in(2)->as_Vector()->is_predicated_vector());
|
||||
predicate(UseFMA && UseSVE > 0);
|
||||
match(Set dst_src1 (FmaVF (Binary dst_src1 (NegVF src2)) (Binary src3 pg)));
|
||||
match(Set dst_src1 (FmaVD (Binary dst_src1 (NegVD src2)) (Binary src3 pg)));
|
||||
format %{ "vfmsb_masked $dst_src1, $pg, $src2, $src3" %}
|
||||
@@ -1233,11 +1278,8 @@ instruct vfmsb_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
// vector fnmla (sve)
|
||||
|
||||
// dst_src1 = -dst_src1 + -src2 * src3
|
||||
// The NegVF/NegVD must not be predicated.
|
||||
instruct vfnmla1(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
predicate(UseFMA && UseSVE > 0 &&
|
||||
!n->in(1)->as_Vector()->is_predicated_vector() &&
|
||||
!n->in(2)->in(1)->as_Vector()->is_predicated_vector());
|
||||
predicate(UseFMA && UseSVE > 0);
|
||||
match(Set dst_src1 (FmaVF (NegVF dst_src1) (Binary (NegVF src2) src3)));
|
||||
match(Set dst_src1 (FmaVD (NegVD dst_src1) (Binary (NegVD src2) src3)));
|
||||
format %{ "vfnmla1 $dst_src1, $src2, $src3" %}
|
||||
@@ -1250,11 +1292,8 @@ instruct vfnmla1(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
%}
|
||||
|
||||
// dst_src1 = -dst_src1 + src2 * -src3
|
||||
// The NegVF/NegVD must not be predicated.
|
||||
instruct vfnmla2(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
predicate(UseFMA && UseSVE > 0 &&
|
||||
!n->in(1)->as_Vector()->is_predicated_vector() &&
|
||||
!n->in(2)->in(2)->as_Vector()->is_predicated_vector());
|
||||
predicate(UseFMA && UseSVE > 0);
|
||||
match(Set dst_src1 (FmaVF (NegVF dst_src1) (Binary src2 (NegVF src3))));
|
||||
match(Set dst_src1 (FmaVD (NegVD dst_src1) (Binary src2 (NegVD src3))));
|
||||
format %{ "vfnmla2 $dst_src1, $src2, $src3" %}
|
||||
@@ -1269,11 +1308,8 @@ instruct vfnmla2(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
// vector fnmad - predicated
|
||||
|
||||
// dst_src1 = -src3 + dst_src1 * -src2
|
||||
// The NegVF/NegVD must not be predicated.
|
||||
instruct vfnmad_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
predicate(UseFMA && UseSVE > 0 &&
|
||||
!n->in(1)->in(2)->as_Vector()->is_predicated_vector() &&
|
||||
!n->in(2)->in(1)->as_Vector()->is_predicated_vector());
|
||||
predicate(UseFMA && UseSVE > 0);
|
||||
match(Set dst_src1 (FmaVF (Binary dst_src1 (NegVF src2)) (Binary (NegVF src3) pg)));
|
||||
match(Set dst_src1 (FmaVD (Binary dst_src1 (NegVD src2)) (Binary (NegVD src3) pg)));
|
||||
format %{ "vfnmad_masked $dst_src1, $pg, $src2, $src3" %}
|
||||
@@ -1288,10 +1324,8 @@ instruct vfnmad_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
// vector fnmls (sve)
|
||||
|
||||
// dst_src1 = -dst_src1 + src2 * src3
|
||||
// The NegVF/NegVD must not be predicated.
|
||||
instruct vfnmls(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
predicate(UseFMA && UseSVE > 0 &&
|
||||
!n->in(1)->as_Vector()->is_predicated_vector());
|
||||
predicate(UseFMA && UseSVE > 0);
|
||||
match(Set dst_src1 (FmaVF (NegVF dst_src1) (Binary src2 src3)));
|
||||
match(Set dst_src1 (FmaVD (NegVD dst_src1) (Binary src2 src3)));
|
||||
format %{ "vfnmls $dst_src1, $src2, $src3" %}
|
||||
@@ -1306,10 +1340,8 @@ instruct vfnmls(vReg dst_src1, vReg src2, vReg src3) %{
|
||||
// vector fnmsb - predicated
|
||||
|
||||
// dst_src1 = -src3 + dst_src1 * src2
|
||||
// The NegVF/NegVD must not be predicated.
|
||||
instruct vfnmsb_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
|
||||
predicate(UseFMA && UseSVE > 0 &&
|
||||
!n->in(2)->in(1)->as_Vector()->is_predicated_vector());
|
||||
predicate(UseFMA && UseSVE > 0);
|
||||
match(Set dst_src1 (FmaVF (Binary dst_src1 src2) (Binary (NegVF src3) pg)));
|
||||
match(Set dst_src1 (FmaVD (Binary dst_src1 src2) (Binary (NegVD src3) pg)));
|
||||
format %{ "vfnmsb_masked $dst_src1, $pg, $src2, $src3" %}
|
||||
@@ -3061,9 +3093,8 @@ instruct vloadmask_neon(vReg dst, vReg src) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vloadmaskB_sve(pRegGov dst, vReg src, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && !n->is_predicated_vector() &&
|
||||
Matcher::vector_element_basic_type(n) == T_BYTE);
|
||||
instruct vloadmaskB_sve(pReg dst, vReg src, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) == T_BYTE);
|
||||
match(Set dst (VectorLoadMask src));
|
||||
effect(KILL cr);
|
||||
format %{ "vloadmaskB_sve $dst, $src\t# KILL cr" %}
|
||||
@@ -3074,9 +3105,8 @@ instruct vloadmaskB_sve(pRegGov dst, vReg src, rFlagsReg cr) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vloadmask_extend_sve(pRegGov dst, vReg src, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && !n->is_predicated_vector() &&
|
||||
Matcher::vector_element_basic_type(n) != T_BYTE);
|
||||
instruct vloadmask_extend_sve(pReg dst, vReg src, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) != T_BYTE);
|
||||
match(Set dst (VectorLoadMask src));
|
||||
effect(TEMP tmp, KILL cr);
|
||||
format %{ "vloadmask_extend_sve $dst, $src\t# KILL $tmp, cr" %}
|
||||
@@ -3089,7 +3119,7 @@ instruct vloadmask_extend_sve(pRegGov dst, vReg src, vReg tmp, rFlagsReg cr) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vloadmaskB_masked(pRegGov dst, vReg src, pRegGov pg, rFlagsReg cr) %{
|
||||
instruct vloadmaskB_masked(pReg dst, vReg src, pRegGov pg, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) == T_BYTE);
|
||||
match(Set dst (VectorLoadMask src pg));
|
||||
effect(KILL cr);
|
||||
@@ -3101,7 +3131,7 @@ instruct vloadmaskB_masked(pRegGov dst, vReg src, pRegGov pg, rFlagsReg cr) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vloadmask_extend_masked(pRegGov dst, vReg src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
|
||||
instruct vloadmask_extend_masked(pReg dst, vReg src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) != T_BYTE);
|
||||
match(Set dst (VectorLoadMask src pg));
|
||||
effect(TEMP tmp, KILL cr);
|
||||
@@ -3155,7 +3185,7 @@ instruct vstoremask_narrow_neon(vReg dst, vReg src, immI_gt_1 size) %{
|
||||
|
||||
// vector store mask - sve
|
||||
|
||||
instruct vstoremaskB_sve(vReg dst, pRegGov src, immI_1 size) %{
|
||||
instruct vstoremaskB_sve(vReg dst, pReg src, immI_1 size) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorStoreMask src size));
|
||||
format %{ "vstoremaskB_sve $dst, $src" %}
|
||||
@@ -3165,7 +3195,7 @@ instruct vstoremaskB_sve(vReg dst, pRegGov src, immI_1 size) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vstoremask_narrow_sve(vReg dst, pRegGov src, immI_gt_1 size, vReg tmp) %{
|
||||
instruct vstoremask_narrow_sve(vReg dst, pReg src, immI_gt_1 size, vReg tmp) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorStoreMask src size));
|
||||
effect(TEMP_DEF dst, TEMP tmp);
|
||||
@@ -3182,8 +3212,8 @@ instruct vstoremask_narrow_sve(vReg dst, pRegGov src, immI_gt_1 size, vReg tmp)
|
||||
// Combined rules for vector mask load when the vector element type is not T_BYTE
|
||||
|
||||
// VectorLoadMask+LoadVector, and the VectorLoadMask is unpredicated.
|
||||
instruct vloadmask_loadV(pRegGov dst, indirect mem, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && !n->is_predicated_vector() &&
|
||||
instruct vloadmask_loadV(pReg dst, indirect mem, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
type2aelembytes(Matcher::vector_element_basic_type(n)) > 1);
|
||||
match(Set dst (VectorLoadMask (LoadVector mem)));
|
||||
effect(TEMP tmp, KILL cr);
|
||||
@@ -3204,7 +3234,7 @@ instruct vloadmask_loadV(pRegGov dst, indirect mem, vReg tmp, rFlagsReg cr) %{
|
||||
%}
|
||||
|
||||
// VectorLoadMask+LoadVector, and the VectorLoadMask is predicated.
|
||||
instruct vloadmask_loadV_masked(pRegGov dst, indirect mem, pRegGov pg,
|
||||
instruct vloadmask_loadV_masked(pReg dst, indirect mem, pRegGov pg,
|
||||
vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
type2aelembytes(Matcher::vector_element_basic_type(n)) > 1);
|
||||
@@ -3225,8 +3255,8 @@ instruct vloadmask_loadV_masked(pRegGov dst, indirect mem, pRegGov pg,
|
||||
%}
|
||||
|
||||
// VectorLoadMask+LoadVectorMasked, and the VectorLoadMask is unpredicated.
|
||||
instruct vloadmask_loadVMasked(pRegGov dst, vmemA mem, pRegGov pg, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && !n->is_predicated_vector() &&
|
||||
instruct vloadmask_loadVMasked(pReg dst, vmemA mem, pRegGov pg, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
type2aelembytes(Matcher::vector_element_basic_type(n)) > 1);
|
||||
match(Set dst (VectorLoadMask (LoadVectorMasked mem pg)));
|
||||
effect(TEMP tmp, KILL cr);
|
||||
@@ -3252,7 +3282,7 @@ instruct vloadmask_loadVMasked(pRegGov dst, vmemA mem, pRegGov pg, vReg tmp, rFl
|
||||
%}
|
||||
|
||||
// VectorLoadMask+LoadVectorMasked, and the VectorLoadMask is predicated.
|
||||
instruct vloadmask_loadVMasked_masked(pRegGov dst, vmemA mem, pRegGov pg1, pRegGov pg2,
|
||||
instruct vloadmask_loadVMasked_masked(pReg dst, vmemA mem, pRegGov pg1, pRegGov pg2,
|
||||
vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
type2aelembytes(Matcher::vector_element_basic_type(n)) > 1);
|
||||
@@ -3282,7 +3312,7 @@ instruct vloadmask_loadVMasked_masked(pRegGov dst, vmemA mem, pRegGov pg1, pRegG
|
||||
// Combined rules for vector mask store when the vector element type is not T_BYTE
|
||||
|
||||
// StoreVector+VectorStoreMask, and the vector size of "src" is equal to the MaxVectorSize.
|
||||
instruct storeV_vstoremask(indirect mem, pRegGov src, immI_gt_1 esize, vReg tmp) %{
|
||||
instruct storeV_vstoremask(indirect mem, pReg src, immI_gt_1 esize, vReg tmp) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length_in_bytes(n->as_StoreVector()->in(MemNode::ValueIn)->in(1)) == MaxVectorSize);
|
||||
match(Set mem (StoreVector mem (VectorStoreMask src esize)));
|
||||
@@ -3303,7 +3333,7 @@ instruct storeV_vstoremask(indirect mem, pRegGov src, immI_gt_1 esize, vReg tmp)
|
||||
%}
|
||||
|
||||
// StoreVector+VectorStoreMask, and the vector size of "src" is less than the MaxVectorSize.
|
||||
instruct storeV_vstoremask_masked(indirect mem, pRegGov src, immI_gt_1 esize,
|
||||
instruct storeV_vstoremask_masked(indirect mem, pReg src, immI_gt_1 esize,
|
||||
vReg tmp, pRegGov pgtmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length_in_bytes(n->as_StoreVector()->in(MemNode::ValueIn)->in(1)) < MaxVectorSize);
|
||||
@@ -3325,7 +3355,7 @@ instruct storeV_vstoremask_masked(indirect mem, pRegGov src, immI_gt_1 esize,
|
||||
%}
|
||||
|
||||
// StoreVectorMasked+VectorStoreMask, and the vector size of "src" is equal to the MaxVectorSize.
|
||||
instruct storeVMasked_vstoremask(vmemA mem, pRegGov src, pRegGov pg, immI_gt_1 esize, vReg tmp) %{
|
||||
instruct storeVMasked_vstoremask(vmemA mem, pReg src, pRegGov pg, immI_gt_1 esize, vReg tmp) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length_in_bytes(n->as_StoreVector()->in(MemNode::ValueIn)->in(1)) == MaxVectorSize);
|
||||
match(Set mem (StoreVectorMasked mem (Binary (VectorStoreMask src esize) pg)));
|
||||
@@ -3351,7 +3381,7 @@ instruct storeVMasked_vstoremask(vmemA mem, pRegGov src, pRegGov pg, immI_gt_1 e
|
||||
%}
|
||||
|
||||
// StoreVectorMasked+VectorStoreMask, and the vector size of "src" is less than the MaxVectorSize.
|
||||
instruct storeVMasked_vstoremask_masked(vmemA mem, pRegGov src, pRegGov pg, immI_gt_1 esize,
|
||||
instruct storeVMasked_vstoremask_masked(vmemA mem, pReg src, pRegGov pg, immI_gt_1 esize,
|
||||
vReg tmp, pRegGov pgtmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length_in_bytes(n->as_StoreVector()->in(MemNode::ValueIn)->in(1)) < MaxVectorSize);
|
||||
@@ -3383,7 +3413,7 @@ dnl
|
||||
dnl VMASK_BITWISE_OP($1, $2, $3 )
|
||||
dnl VMASK_BITWISE_OP(type, op_name, insn)
|
||||
define(`VMASK_BITWISE_OP', `
|
||||
instruct vmask_$1(pRegGov pd, pRegGov pn, pRegGov pm) %{
|
||||
instruct vmask_$1(pReg pd, pReg pn, pReg pm) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set pd ($2 pn pm));
|
||||
format %{ "vmask_$1 $pd, $pn, $pm" %}
|
||||
@@ -3396,7 +3426,7 @@ dnl
|
||||
dnl VMASK_AND_NOT($1 )
|
||||
dnl VMASK_AND_NOT(type)
|
||||
define(`VMASK_AND_NOT', `
|
||||
instruct vmask_and_not$1(pRegGov pd, pRegGov pn, pRegGov pm, imm$1_M1 m1) %{
|
||||
instruct vmask_and_not$1(pReg pd, pReg pn, pReg pm, imm$1_M1 m1) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set pd (AndVMask pn (XorVMask pm (MaskAll m1))));
|
||||
format %{ "vmask_and_not$1 $pd, $pn, $pm" %}
|
||||
@@ -3431,7 +3461,7 @@ instruct vmaskcmp_neon(vReg dst, vReg src1, vReg src2, immI cond) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcmp_sve(pRegGov dst, vReg src1, vReg src2, immI cond, rFlagsReg cr) %{
|
||||
instruct vmaskcmp_sve(pReg dst, vReg src1, vReg src2, immI cond, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorMaskCmp (Binary src1 src2) cond));
|
||||
effect(KILL cr);
|
||||
@@ -3446,7 +3476,7 @@ instruct vmaskcmp_sve(pRegGov dst, vReg src1, vReg src2, immI cond, rFlagsReg cr
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcmp_masked(pRegGov dst, vReg src1, vReg src2, immI cond,
|
||||
instruct vmaskcmp_masked(pReg dst, vReg src1, vReg src2, immI cond,
|
||||
pRegGov pg, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorMaskCmp (Binary src1 src2) (Binary cond pg)));
|
||||
@@ -3473,7 +3503,49 @@ instruct vmaskcast_same_esize_neon(vReg dst_src) %{
|
||||
ins_pipe(pipe_class_empty);
|
||||
%}
|
||||
|
||||
instruct vmaskcast_same_esize_sve(pRegGov dst_src) %{
|
||||
instruct vmaskcast_extend_neon(vReg dst, vReg src) %{
|
||||
predicate(UseSVE == 0 &&
|
||||
Matcher::vector_length_in_bytes(n) > Matcher::vector_length_in_bytes(n->in(1)));
|
||||
match(Set dst (VectorMaskCast src));
|
||||
format %{ "vmaskcast_extend_neon $dst, $src" %}
|
||||
ins_encode %{
|
||||
BasicType dst_bt = Matcher::vector_element_basic_type(this);
|
||||
if (is_floating_point_type(dst_bt)) {
|
||||
dst_bt = (dst_bt == T_FLOAT) ? T_INT : T_LONG;
|
||||
}
|
||||
uint length_in_bytes_dst = Matcher::vector_length_in_bytes(this);
|
||||
BasicType src_bt = Matcher::vector_element_basic_type(this, $src);
|
||||
if (is_floating_point_type(src_bt)) {
|
||||
src_bt = (src_bt == T_FLOAT) ? T_INT : T_LONG;
|
||||
}
|
||||
__ neon_vector_extend($dst$$FloatRegister, dst_bt, length_in_bytes_dst,
|
||||
$src$$FloatRegister, src_bt);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcast_narrow_neon(vReg dst, vReg src) %{
|
||||
predicate(UseSVE == 0 &&
|
||||
Matcher::vector_length_in_bytes(n) < Matcher::vector_length_in_bytes(n->in(1)));
|
||||
match(Set dst (VectorMaskCast src));
|
||||
format %{ "vmaskcast_narrow_neon $dst, $src" %}
|
||||
ins_encode %{
|
||||
BasicType dst_bt = Matcher::vector_element_basic_type(this);
|
||||
if (is_floating_point_type(dst_bt)) {
|
||||
dst_bt = (dst_bt == T_FLOAT) ? T_INT : T_LONG;
|
||||
}
|
||||
BasicType src_bt = Matcher::vector_element_basic_type(this, $src);
|
||||
if (is_floating_point_type(src_bt)) {
|
||||
src_bt = (src_bt == T_FLOAT) ? T_INT : T_LONG;
|
||||
}
|
||||
uint length_in_bytes_src = Matcher::vector_length_in_bytes(this, $src);
|
||||
__ neon_vector_narrow($dst$$FloatRegister, dst_bt,
|
||||
$src$$FloatRegister, src_bt, length_in_bytes_src);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcast_same_esize_sve(pReg dst_src) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length_in_bytes(n) == Matcher::vector_length_in_bytes(n->in(1)));
|
||||
match(Set dst_src (VectorMaskCast dst_src));
|
||||
@@ -3483,11 +3555,11 @@ instruct vmaskcast_same_esize_sve(pRegGov dst_src) %{
|
||||
ins_pipe(pipe_class_empty);
|
||||
%}
|
||||
|
||||
instruct vmaskcast_extend(pRegGov dst, pReg src) %{
|
||||
instruct vmaskcast_extend_sve(pReg dst, pReg src) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length_in_bytes(n) > Matcher::vector_length_in_bytes(n->in(1)));
|
||||
match(Set dst (VectorMaskCast src));
|
||||
format %{ "vmaskcast_extend $dst, $src" %}
|
||||
format %{ "vmaskcast_extend_sve $dst, $src" %}
|
||||
ins_encode %{
|
||||
uint length_in_bytes_dst = Matcher::vector_length_in_bytes(this);
|
||||
uint length_in_bytes_src = Matcher::vector_length_in_bytes(this, $src);
|
||||
@@ -3500,11 +3572,11 @@ instruct vmaskcast_extend(pRegGov dst, pReg src) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmaskcast_narrow(pRegGov dst, pReg src) %{
|
||||
instruct vmaskcast_narrow_sve(pReg dst, pReg src) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length_in_bytes(n) < Matcher::vector_length_in_bytes(n->in(1)));
|
||||
match(Set dst (VectorMaskCast src));
|
||||
format %{ "vmaskcast_narrow $dst, $src" %}
|
||||
format %{ "vmaskcast_narrow_sve $dst, $src" %}
|
||||
ins_encode %{
|
||||
uint length_in_bytes_dst = Matcher::vector_length_in_bytes(this);
|
||||
uint length_in_bytes_src = Matcher::vector_length_in_bytes(this, $src);
|
||||
@@ -3519,7 +3591,7 @@ instruct vmaskcast_narrow(pRegGov dst, pReg src) %{
|
||||
|
||||
// vector mask reinterpret
|
||||
|
||||
instruct vmask_reinterpret_same_esize(pRegGov dst_src) %{
|
||||
instruct vmask_reinterpret_same_esize(pReg dst_src) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length(n) == Matcher::vector_length(n->in(1)) &&
|
||||
Matcher::vector_length_in_bytes(n) == Matcher::vector_length_in_bytes(n->in(1)));
|
||||
@@ -3530,7 +3602,7 @@ instruct vmask_reinterpret_same_esize(pRegGov dst_src) %{
|
||||
ins_pipe(pipe_class_empty);
|
||||
%}
|
||||
|
||||
instruct vmask_reinterpret_diff_esize(pRegGov dst, pRegGov src, vReg tmp, rFlagsReg cr) %{
|
||||
instruct vmask_reinterpret_diff_esize(pReg dst, pReg src, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
Matcher::vector_length(n) != Matcher::vector_length(n->in(1)) &&
|
||||
Matcher::vector_length_in_bytes(n) == Matcher::vector_length_in_bytes(n->in(1)));
|
||||
@@ -3662,7 +3734,7 @@ instruct vmask_firsttrue_8or16e(iRegINoSp dst, vReg src) %{
|
||||
// them are set.
|
||||
|
||||
instruct vmask_firsttrue_sve(iRegINoSp dst, pReg src, pReg ptmp) %{
|
||||
predicate(UseSVE > 0 && !n->is_predicated_vector());
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorMaskFirstTrue src));
|
||||
effect(TEMP ptmp);
|
||||
format %{ "vmask_firsttrue_sve $dst, $src\t# KILL $ptmp" %}
|
||||
@@ -3676,7 +3748,7 @@ instruct vmask_firsttrue_sve(iRegINoSp dst, pReg src, pReg ptmp) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmask_firsttrue_masked(iRegINoSp dst, pReg src, pRegGov pg, pReg ptmp) %{
|
||||
instruct vmask_firsttrue_masked(iRegINoSp dst, pReg src, pReg pg, pReg ptmp) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (VectorMaskFirstTrue src pg));
|
||||
effect(TEMP ptmp);
|
||||
@@ -3788,7 +3860,7 @@ instruct vmask_tolong_sve(iRegLNoSp dst, pReg src, vReg tmp1, vReg tmp2) %{
|
||||
|
||||
// fromlong
|
||||
|
||||
instruct vmask_fromlong(pRegGov dst, iRegL src, vReg tmp1, vReg tmp2) %{
|
||||
instruct vmask_fromlong(pReg dst, iRegL src, vReg tmp1, vReg tmp2) %{
|
||||
match(Set dst (VectorLongToMask src));
|
||||
effect(TEMP tmp1, TEMP tmp2);
|
||||
format %{ "vmask_fromlong $dst, $src\t# vector (sve2). KILL $tmp1, $tmp2" %}
|
||||
@@ -3808,7 +3880,7 @@ dnl
|
||||
dnl VMASKALL_IMM($1, $2 )
|
||||
dnl VMASKALL_IMM(type, var_type)
|
||||
define(`VMASKALL_IMM', `
|
||||
instruct vmaskAll_imm$1(pRegGov dst, imm$1 src, rFlagsReg cr) %{
|
||||
instruct vmaskAll_imm$1(pReg dst, imm$1 src, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (MaskAll src));
|
||||
effect(KILL cr);
|
||||
@@ -3829,8 +3901,8 @@ dnl
|
||||
dnl VMASKALL($1, $2 )
|
||||
dnl VMASKALL(type, arg_type)
|
||||
define(`VMASKALL', `
|
||||
instruct vmaskAll$1(pRegGov dst, $2 src, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 && !n->is_predicated_vector());
|
||||
instruct vmaskAll$1(pReg dst, $2 src, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (MaskAll src));
|
||||
effect(TEMP tmp, KILL cr);
|
||||
format %{ "vmaskAll$1 $dst, $src\t# KILL $tmp, cr" %}
|
||||
@@ -3848,7 +3920,7 @@ dnl
|
||||
dnl VMASKALL_PREDICATE($1, $2 )
|
||||
dnl VMASKALL_PREDICATE(type, arg_type)
|
||||
define(`VMASKALL_PREDICATE', `
|
||||
instruct vmaskAll$1_masked(pRegGov dst, $2 src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
|
||||
instruct vmaskAll$1_masked(pReg dst, $2 src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set dst (MaskAll src pg));
|
||||
effect(TEMP tmp, KILL cr);
|
||||
@@ -3872,7 +3944,7 @@ VMASKALL_PREDICATE(L, iRegL)
|
||||
|
||||
// vetcor mask generation
|
||||
|
||||
instruct vmask_gen_I(pRegGov pd, iRegIorL2I src, rFlagsReg cr) %{
|
||||
instruct vmask_gen_I(pReg pd, iRegIorL2I src, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set pd (VectorMaskGen (ConvI2L src)));
|
||||
effect(KILL cr);
|
||||
@@ -3884,7 +3956,7 @@ instruct vmask_gen_I(pRegGov pd, iRegIorL2I src, rFlagsReg cr) %{
|
||||
ins_pipe(pipe_class_default);
|
||||
%}
|
||||
|
||||
instruct vmask_gen_L(pRegGov pd, iRegL src, rFlagsReg cr) %{
|
||||
instruct vmask_gen_L(pReg pd, iRegL src, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set pd (VectorMaskGen src));
|
||||
effect(KILL cr);
|
||||
@@ -3896,7 +3968,7 @@ instruct vmask_gen_L(pRegGov pd, iRegL src, rFlagsReg cr) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vmask_gen_imm(pRegGov pd, immL con, rFlagsReg cr) %{
|
||||
instruct vmask_gen_imm(pReg pd, immL con, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0);
|
||||
match(Set pd (VectorMaskGen con));
|
||||
effect(KILL cr);
|
||||
@@ -3913,7 +3985,6 @@ instruct vmask_gen_imm(pRegGov pd, immL con, rFlagsReg cr) %{
|
||||
// vector popcount - INT
|
||||
|
||||
instruct vpopcountI(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (PopCountVI src));
|
||||
format %{ "vpopcountI $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -3951,8 +4022,7 @@ instruct vpopcountI(vReg dst, vReg src) %{
|
||||
// vector popcount - LONG
|
||||
|
||||
instruct vpopcountL(vReg dst, vReg src) %{
|
||||
predicate(Matcher::vector_element_basic_type(n) == T_LONG &&
|
||||
!n->as_Vector()->is_predicated_vector());
|
||||
predicate(Matcher::vector_element_basic_type(n) == T_LONG);
|
||||
match(Set dst (PopCountVL src));
|
||||
format %{ "vpopcountL $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -3974,8 +4044,7 @@ instruct vpopcountL(vReg dst, vReg src) %{
|
||||
// "vpopcountL" rule.
|
||||
|
||||
instruct vpopcountL_I(vReg dst, vReg src, vReg tmp) %{
|
||||
predicate(Matcher::vector_element_basic_type(n) == T_INT &&
|
||||
!n->as_Vector()->is_predicated_vector());
|
||||
predicate(Matcher::vector_element_basic_type(n) == T_INT);
|
||||
match(Set dst (PopCountVL src));
|
||||
effect(TEMP_DEF dst, TEMP tmp);
|
||||
format %{ "vpopcountL_I $dst, $src\t# KILL $tmp" %}
|
||||
@@ -4036,6 +4105,48 @@ instruct vblend_sve(vReg dst, vReg src1, vReg src2, pReg pg) %{
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// ------------------------- Vector conditional move --------------------------
|
||||
|
||||
instruct vcmove_neon(vReg dst, vReg src1, vReg src2, immI cond, cmpOp copnd) %{
|
||||
predicate(UseSVE == 0 ||
|
||||
(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)) &&
|
||||
n->in(1)->in(2)->get_int() != BoolTest::ne));
|
||||
match(Set dst (CMoveVF (Binary copnd cond) (Binary src1 src2)));
|
||||
match(Set dst (CMoveVD (Binary copnd cond) (Binary src1 src2)));
|
||||
effect(TEMP_DEF dst);
|
||||
format %{ "vcmove_neon.$copnd $dst, $src1, $src2\t# vector conditional move fp" %}
|
||||
ins_encode %{
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
assert(length_in_bytes == 8 || length_in_bytes == 16, "must be");
|
||||
__ neon_compare($dst$$FloatRegister, bt, $src1$$FloatRegister,
|
||||
$src2$$FloatRegister, (int)($cond$$constant),
|
||||
/* isQ */ length_in_bytes == 16);
|
||||
__ bsl($dst$$FloatRegister, length_in_bytes == 16 ? __ T16B : __ T8B,
|
||||
$src2$$FloatRegister, $src1$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vcmove_sve(vReg dst, vReg src1, vReg src2, immI cond, cmpOp copnd, pRegGov pgtmp) %{
|
||||
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)) ||
|
||||
(UseSVE > 0 && n->in(1)->in(2)->get_int() == BoolTest::ne));
|
||||
match(Set dst (CMoveVF (Binary copnd cond) (Binary src1 src2)));
|
||||
match(Set dst (CMoveVD (Binary copnd cond) (Binary src1 src2)));
|
||||
effect(TEMP pgtmp);
|
||||
format %{ "vcmove_sve.$copnd $dst, $src1, $src2\t# vector conditional move fp. KILL $pgtmp" %}
|
||||
ins_encode %{
|
||||
assert(UseSVE > 0, "must be sve");
|
||||
BasicType bt = Matcher::vector_element_basic_type(this);
|
||||
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
|
||||
__ sve_compare($pgtmp$$PRegister, bt, ptrue, $src1$$FloatRegister,
|
||||
$src2$$FloatRegister, (int)($cond$$constant));
|
||||
__ sve_sel($dst$$FloatRegister, __ elemType_to_regVariant(bt),
|
||||
$pgtmp$$PRegister, $src2$$FloatRegister, $src1$$FloatRegister);
|
||||
%}
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
// ------------------------------ Vector round ---------------------------------
|
||||
|
||||
// vector Math.round
|
||||
@@ -4140,7 +4251,7 @@ instruct vtest_anytrue_neon(iRegINoSp dst, vReg src1, vReg src2, vReg tmp, rFlag
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vtest_anytrue_sve(iRegINoSp dst, pRegGov src1, pRegGov src2, rFlagsReg cr) %{
|
||||
instruct vtest_anytrue_sve(iRegINoSp dst, pReg src1, pReg src2, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
static_cast<const VectorTestNode*>(n)->get_predicate() == BoolTest::ne);
|
||||
match(Set dst (VectorTest src1 src2));
|
||||
@@ -4174,7 +4285,7 @@ instruct vtest_alltrue_neon(iRegINoSp dst, vReg src1, vReg src2, vReg tmp, rFlag
|
||||
ins_pipe(pipe_slow);
|
||||
%}
|
||||
|
||||
instruct vtest_alltrue_sve(iRegINoSp dst, pRegGov src1, pRegGov src2, pReg ptmp, rFlagsReg cr) %{
|
||||
instruct vtest_alltrue_sve(iRegINoSp dst, pReg src1, pReg src2, pReg ptmp, rFlagsReg cr) %{
|
||||
predicate(UseSVE > 0 &&
|
||||
static_cast<const VectorTestNode*>(n)->get_predicate() == BoolTest::overflow);
|
||||
match(Set dst (VectorTest src1 src2));
|
||||
@@ -4415,7 +4526,6 @@ instruct scatter_storeD_masked(indirect mem, vReg src, vReg idx, pRegGov pg, vRe
|
||||
// ------------------------------ CountLeadingZerosV ---------------------------
|
||||
|
||||
instruct vcountLeadingZeros(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (CountLeadingZerosV src));
|
||||
format %{ "vcountLeadingZeros $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -4452,7 +4562,6 @@ UNARY_OP_PREDICATE(vcountLeadingZeros, CountLeadingZerosV, sve_clz)
|
||||
// ------------------------------ CountTrailingZerosV --------------------------
|
||||
|
||||
instruct vcountTrailingZeros(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (CountTrailingZerosV src));
|
||||
format %{ "vcountTrailingZeros $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -4514,7 +4623,6 @@ instruct vcountTrailingZeros_masked(vReg dst_src, pRegGov pg) %{
|
||||
// ------------------------------ ReverseV -------------------------------------
|
||||
|
||||
instruct vreverse(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (ReverseV src));
|
||||
format %{ "vreverse $dst, $src" %}
|
||||
ins_encode %{
|
||||
@@ -4550,7 +4658,6 @@ UNARY_OP_PREDICATE(vreverse, ReverseV, sve_rbit)
|
||||
// ------------------------------ ReverseBytesV --------------------------------
|
||||
|
||||
instruct vreverseBytes(vReg dst, vReg src) %{
|
||||
predicate(!n->as_Vector()->is_predicated_vector());
|
||||
match(Set dst (ReverseBytesV src));
|
||||
format %{ "vreverseBytes $dst, $src" %}
|
||||
ins_encode %{
|
||||
|
||||
@@ -62,23 +62,23 @@ class Argument {
|
||||
};
|
||||
};
|
||||
|
||||
REGISTER_DECLARATION(Register, c_rarg0, r0);
|
||||
REGISTER_DECLARATION(Register, c_rarg1, r1);
|
||||
REGISTER_DECLARATION(Register, c_rarg2, r2);
|
||||
REGISTER_DECLARATION(Register, c_rarg3, r3);
|
||||
REGISTER_DECLARATION(Register, c_rarg4, r4);
|
||||
REGISTER_DECLARATION(Register, c_rarg5, r5);
|
||||
REGISTER_DECLARATION(Register, c_rarg6, r6);
|
||||
REGISTER_DECLARATION(Register, c_rarg7, r7);
|
||||
constexpr Register c_rarg0 = r0;
|
||||
constexpr Register c_rarg1 = r1;
|
||||
constexpr Register c_rarg2 = r2;
|
||||
constexpr Register c_rarg3 = r3;
|
||||
constexpr Register c_rarg4 = r4;
|
||||
constexpr Register c_rarg5 = r5;
|
||||
constexpr Register c_rarg6 = r6;
|
||||
constexpr Register c_rarg7 = r7;
|
||||
|
||||
REGISTER_DECLARATION(FloatRegister, c_farg0, v0);
|
||||
REGISTER_DECLARATION(FloatRegister, c_farg1, v1);
|
||||
REGISTER_DECLARATION(FloatRegister, c_farg2, v2);
|
||||
REGISTER_DECLARATION(FloatRegister, c_farg3, v3);
|
||||
REGISTER_DECLARATION(FloatRegister, c_farg4, v4);
|
||||
REGISTER_DECLARATION(FloatRegister, c_farg5, v5);
|
||||
REGISTER_DECLARATION(FloatRegister, c_farg6, v6);
|
||||
REGISTER_DECLARATION(FloatRegister, c_farg7, v7);
|
||||
constexpr FloatRegister c_farg0 = v0;
|
||||
constexpr FloatRegister c_farg1 = v1;
|
||||
constexpr FloatRegister c_farg2 = v2;
|
||||
constexpr FloatRegister c_farg3 = v3;
|
||||
constexpr FloatRegister c_farg4 = v4;
|
||||
constexpr FloatRegister c_farg5 = v5;
|
||||
constexpr FloatRegister c_farg6 = v6;
|
||||
constexpr FloatRegister c_farg7 = v7;
|
||||
|
||||
// Symbolically name the register arguments used by the Java calling convention.
|
||||
// We have control over the convention for java so we can do what we please.
|
||||
@@ -96,25 +96,25 @@ REGISTER_DECLARATION(FloatRegister, c_farg7, v7);
|
||||
// |--------------------------------------------------------------------|
|
||||
|
||||
|
||||
REGISTER_DECLARATION(Register, j_rarg0, c_rarg1);
|
||||
REGISTER_DECLARATION(Register, j_rarg1, c_rarg2);
|
||||
REGISTER_DECLARATION(Register, j_rarg2, c_rarg3);
|
||||
REGISTER_DECLARATION(Register, j_rarg3, c_rarg4);
|
||||
REGISTER_DECLARATION(Register, j_rarg4, c_rarg5);
|
||||
REGISTER_DECLARATION(Register, j_rarg5, c_rarg6);
|
||||
REGISTER_DECLARATION(Register, j_rarg6, c_rarg7);
|
||||
REGISTER_DECLARATION(Register, j_rarg7, c_rarg0);
|
||||
constexpr Register j_rarg0 = c_rarg1;
|
||||
constexpr Register j_rarg1 = c_rarg2;
|
||||
constexpr Register j_rarg2 = c_rarg3;
|
||||
constexpr Register j_rarg3 = c_rarg4;
|
||||
constexpr Register j_rarg4 = c_rarg5;
|
||||
constexpr Register j_rarg5 = c_rarg6;
|
||||
constexpr Register j_rarg6 = c_rarg7;
|
||||
constexpr Register j_rarg7 = c_rarg0;
|
||||
|
||||
// Java floating args are passed as per C
|
||||
|
||||
REGISTER_DECLARATION(FloatRegister, j_farg0, v0);
|
||||
REGISTER_DECLARATION(FloatRegister, j_farg1, v1);
|
||||
REGISTER_DECLARATION(FloatRegister, j_farg2, v2);
|
||||
REGISTER_DECLARATION(FloatRegister, j_farg3, v3);
|
||||
REGISTER_DECLARATION(FloatRegister, j_farg4, v4);
|
||||
REGISTER_DECLARATION(FloatRegister, j_farg5, v5);
|
||||
REGISTER_DECLARATION(FloatRegister, j_farg6, v6);
|
||||
REGISTER_DECLARATION(FloatRegister, j_farg7, v7);
|
||||
constexpr FloatRegister j_farg0 = v0;
|
||||
constexpr FloatRegister j_farg1 = v1;
|
||||
constexpr FloatRegister j_farg2 = v2;
|
||||
constexpr FloatRegister j_farg3 = v3;
|
||||
constexpr FloatRegister j_farg4 = v4;
|
||||
constexpr FloatRegister j_farg5 = v5;
|
||||
constexpr FloatRegister j_farg6 = v6;
|
||||
constexpr FloatRegister j_farg7 = v7;
|
||||
|
||||
// registers used to hold VM data either temporarily within a method
|
||||
// or across method calls
|
||||
@@ -123,40 +123,28 @@ REGISTER_DECLARATION(FloatRegister, j_farg7, v7);
|
||||
|
||||
// r8 is used for indirect result location return
|
||||
// we use it and r9 as scratch registers
|
||||
REGISTER_DECLARATION(Register, rscratch1, r8);
|
||||
REGISTER_DECLARATION(Register, rscratch2, r9);
|
||||
constexpr Register rscratch1 = r8;
|
||||
constexpr Register rscratch2 = r9;
|
||||
|
||||
// current method -- must be in a call-clobbered register
|
||||
REGISTER_DECLARATION(Register, rmethod, r12);
|
||||
constexpr Register rmethod = r12;
|
||||
|
||||
// non-volatile (callee-save) registers are r16-29
|
||||
// of which the following are dedicated global state
|
||||
|
||||
// link register
|
||||
REGISTER_DECLARATION(Register, lr, r30);
|
||||
// frame pointer
|
||||
REGISTER_DECLARATION(Register, rfp, r29);
|
||||
// current thread
|
||||
REGISTER_DECLARATION(Register, rthread, r28);
|
||||
// base of heap
|
||||
REGISTER_DECLARATION(Register, rheapbase, r27);
|
||||
// constant pool cache
|
||||
REGISTER_DECLARATION(Register, rcpool, r26);
|
||||
// r25 is a callee-saved temp
|
||||
// REGISTER_DECLARATION(Register, unused, r25);
|
||||
// locals on stack
|
||||
REGISTER_DECLARATION(Register, rlocals, r24);
|
||||
// bytecode pointer
|
||||
REGISTER_DECLARATION(Register, rbcp, r22);
|
||||
// Dispatch table base
|
||||
REGISTER_DECLARATION(Register, rdispatch, r21);
|
||||
// Java expression stack pointer
|
||||
REGISTER_DECLARATION(Register, esp, r20);
|
||||
// Sender's SP while in interpreter
|
||||
REGISTER_DECLARATION(Register, r19_sender_sp, r19);
|
||||
constexpr Register lr = r30; // link register
|
||||
constexpr Register rfp = r29; // frame pointer
|
||||
constexpr Register rthread = r28; // current thread
|
||||
constexpr Register rheapbase = r27; // base of heap
|
||||
constexpr Register rcpool = r26; // constant pool cache
|
||||
constexpr Register rlocals = r24; // locals on stack
|
||||
constexpr Register rbcp = r22; // bytecode pointer
|
||||
constexpr Register rdispatch = r21; // dispatch table base
|
||||
constexpr Register esp = r20; // Java expression stack pointer
|
||||
constexpr Register r19_sender_sp = r19; // sender's SP while in interpreter
|
||||
|
||||
// Preserved predicate register with all elements set TRUE.
|
||||
REGISTER_DECLARATION(PRegister, ptrue, p7);
|
||||
constexpr PRegister ptrue = p7;
|
||||
|
||||
#define assert_cond(ARG1) assert(ARG1, #ARG1)
|
||||
|
||||
@@ -277,29 +265,29 @@ public:
|
||||
}
|
||||
|
||||
void rf(Register r, int lsb) {
|
||||
f(r->encoding_nocheck(), lsb + 4, lsb);
|
||||
f(r->raw_encoding(), lsb + 4, lsb);
|
||||
}
|
||||
|
||||
// reg|ZR
|
||||
void zrf(Register r, int lsb) {
|
||||
f(r->encoding_nocheck() - (r == zr), lsb + 4, lsb);
|
||||
f(r->raw_encoding() - (r == zr), lsb + 4, lsb);
|
||||
}
|
||||
|
||||
// reg|SP
|
||||
void srf(Register r, int lsb) {
|
||||
f(r == sp ? 31 : r->encoding_nocheck(), lsb + 4, lsb);
|
||||
f(r == sp ? 31 : r->raw_encoding(), lsb + 4, lsb);
|
||||
}
|
||||
|
||||
void rf(FloatRegister r, int lsb) {
|
||||
f(r->encoding_nocheck(), lsb + 4, lsb);
|
||||
f(r->raw_encoding(), lsb + 4, lsb);
|
||||
}
|
||||
|
||||
void prf(PRegister r, int lsb) {
|
||||
f(r->encoding_nocheck(), lsb + 3, lsb);
|
||||
f(r->raw_encoding(), lsb + 3, lsb);
|
||||
}
|
||||
|
||||
void pgrf(PRegister r, int lsb) {
|
||||
f(r->encoding_nocheck(), lsb + 2, lsb);
|
||||
f(r->raw_encoding(), lsb + 2, lsb);
|
||||
}
|
||||
|
||||
unsigned get(int msb = 31, int lsb = 0) {
|
||||
@@ -329,7 +317,7 @@ class Post : public PrePost {
|
||||
Register _idx;
|
||||
bool _is_postreg;
|
||||
public:
|
||||
Post(Register reg, int o) : PrePost(reg, o) { _idx = NULL; _is_postreg = false; }
|
||||
Post(Register reg, int o) : PrePost(reg, o) { _idx = noreg; _is_postreg = false; }
|
||||
Post(Register reg, Register idx) : PrePost(reg, 0) { _idx = idx; _is_postreg = true; }
|
||||
Register idx_reg() { return _idx; }
|
||||
bool is_postreg() {return _is_postreg; }
|
||||
@@ -627,8 +615,7 @@ class InternalAddress: public Address {
|
||||
InternalAddress(address target) : Address(target, relocInfo::internal_word_type) {}
|
||||
};
|
||||
|
||||
const int FPUStateSizeInWords = FloatRegisterImpl::number_of_registers *
|
||||
FloatRegisterImpl::save_slots_per_register;
|
||||
const int FPUStateSizeInWords = FloatRegister::number_of_registers * FloatRegister::save_slots_per_register;
|
||||
|
||||
typedef enum {
|
||||
PLDL1KEEP = 0b00000, PLDL1STRM, PLDL2KEEP, PLDL2STRM, PLDL3KEEP, PLDL3STRM,
|
||||
@@ -3155,6 +3142,7 @@ public:
|
||||
sve_predicate_reg_insn(op1, op2, Zd_or_Zdn_or_Vd, T, Pg, Zn_or_Zm); \
|
||||
}
|
||||
|
||||
INSN(sve_fabd, 0b01100101, 0b001000100); // floating-point absolute difference
|
||||
INSN(sve_fabs, 0b00000100, 0b011100101);
|
||||
INSN(sve_fadd, 0b01100101, 0b000000100);
|
||||
INSN(sve_fadda, 0b01100101, 0b011000001); // add strictly-ordered reduction to scalar Vd
|
||||
|
||||
@@ -308,7 +308,7 @@ void SimpleExceptionStub::emit_code(LIR_Assembler* ce) {
|
||||
if (_obj->is_cpu_register()) {
|
||||
__ mov(rscratch1, _obj->as_register());
|
||||
}
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(_stub)), NULL, rscratch2);
|
||||
__ far_call(RuntimeAddress(Runtime1::entry_for(_stub)), rscratch2);
|
||||
ce->add_call_info_here(_info);
|
||||
debug_only(__ should_not_reach_here());
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ enum {
|
||||
|
||||
// registers
|
||||
enum {
|
||||
pd_nof_cpu_regs_frame_map = RegisterImpl::number_of_registers, // number of registers used during code emission
|
||||
pd_nof_fpu_regs_frame_map = FloatRegisterImpl::number_of_registers, // number of registers used during code emission
|
||||
pd_nof_cpu_regs_frame_map = Register::number_of_registers, // number of GP registers used during code emission
|
||||
pd_nof_fpu_regs_frame_map = FloatRegister::number_of_registers, // number of FP registers used during code emission
|
||||
|
||||
pd_nof_caller_save_cpu_regs_frame_map = 19 - 2 /* rscratch1 and rscratch2 */ R18_RESERVED_ONLY(- 1), // number of registers killed by calls
|
||||
pd_nof_caller_save_fpu_regs_frame_map = 32, // number of registers killed by calls
|
||||
|
||||
@@ -331,7 +331,7 @@ void LIR_Assembler::jobject2reg(jobject o, Register reg) {
|
||||
if (o == NULL) {
|
||||
__ mov(reg, zr);
|
||||
} else {
|
||||
__ movoop(reg, o, /*immediate*/true);
|
||||
__ movoop(reg, o);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -339,18 +339,6 @@ void LIRGenerator::do_MonitorExit(MonitorExit* x) {
|
||||
monitor_exit(obj_temp, lock, syncTempOpr(), LIR_OprFact::illegalOpr, x->monitor_no());
|
||||
}
|
||||
|
||||
void LIRGenerator::do_continuation_doYield(Intrinsic* x) {
|
||||
BasicTypeList signature(0);
|
||||
CallingConvention* cc = frame_map()->java_calling_convention(&signature, true);
|
||||
|
||||
const LIR_Opr result_reg = result_register_for(x->type());
|
||||
address entry = StubRoutines::cont_doYield();
|
||||
LIR_Opr result = rlock_result(x);
|
||||
CodeEmitInfo* info = state_for(x, x->state());
|
||||
__ call_runtime(entry, LIR_OprFact::illegalOpr, result_reg, cc->args(), info);
|
||||
__ move(result_reg, result);
|
||||
}
|
||||
|
||||
void LIRGenerator::do_NegateOp(NegateOp* x) {
|
||||
|
||||
LIRItem from(x->x(), this);
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "logging/logStream.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "prims/downcallLinker.hpp"
|
||||
#include "runtime/globals.hpp"
|
||||
#include "runtime/stubCodeGenerator.hpp"
|
||||
|
||||
#define __ _masm->
|
||||
@@ -247,8 +248,10 @@ void DowncallStubGenerator::generate() {
|
||||
__ strw(tmp1, Address(rthread, JavaThread::thread_state_offset()));
|
||||
|
||||
// Force this write out before the read below
|
||||
__ membar(Assembler::LoadLoad | Assembler::LoadStore |
|
||||
Assembler::StoreLoad | Assembler::StoreStore);
|
||||
if (!UseSystemMemoryBarrier) {
|
||||
__ membar(Assembler::LoadLoad | Assembler::LoadStore |
|
||||
Assembler::StoreLoad | Assembler::StoreStore);
|
||||
}
|
||||
|
||||
__ verify_sve_vector_length(tmp1);
|
||||
|
||||
|
||||
@@ -188,16 +188,11 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
}
|
||||
|
||||
// We must always be able to find a recognizable pc
|
||||
CodeBlob* sender_blob = CodeCache::find_blob_unsafe(sender_pc);
|
||||
CodeBlob* sender_blob = CodeCache::find_blob(sender_pc);
|
||||
if (sender_pc == NULL || sender_blob == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Could be a zombie method
|
||||
if (sender_blob->is_zombie() || sender_blob->is_unloaded()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Could just be some random pointer within the codeBlob
|
||||
if (!sender_blob->code_contains(sender_pc)) {
|
||||
return false;
|
||||
|
||||
@@ -165,10 +165,8 @@ inline frame::frame(intptr_t* sp, intptr_t* fp) {
|
||||
DEBUG_ONLY(_frame_index = -1;)
|
||||
|
||||
// Here's a sticky one. This constructor can be called via AsyncGetCallTrace
|
||||
// when last_Java_sp is non-null but the pc fetched is junk. If we are truly
|
||||
// unlucky the junk value could be to a zombied method and we'll die on the
|
||||
// find_blob call. This is also why we can have no asserts on the validity
|
||||
// of the pc we find here. AsyncGetCallTrace -> pd_get_top_frame_for_signal_handler
|
||||
// when last_Java_sp is non-null but the pc fetched is junk.
|
||||
// AsyncGetCallTrace -> pd_get_top_frame_for_signal_handler
|
||||
// -> pd_last_frame should use a specialized version of pd_last_frame which could
|
||||
// call a specilaized frame constructor instead of this one.
|
||||
// Then we could use the assert below. However this assert is of somewhat dubious
|
||||
@@ -412,7 +410,7 @@ inline frame frame::sender_for_compiled_frame(RegisterMap* map) const {
|
||||
// in C2 code but it will have been pushed onto the stack. so we
|
||||
// have to find it relative to the unextended sp
|
||||
|
||||
assert(_cb->frame_size() >= 0, "must have non-zero frame size");
|
||||
assert(_cb->frame_size() > 0, "must have non-zero frame size");
|
||||
intptr_t* l_sender_sp = (!PreserveFramePointer || _sp_is_trusted) ? unextended_sp() + _cb->frame_size()
|
||||
: sender_sp();
|
||||
assert(!_sp_is_trusted || l_sender_sp == real_fp(), "");
|
||||
|
||||
@@ -99,7 +99,8 @@ void G1BarrierSetAssembler::g1_write_barrier_pre(MacroAssembler* masm,
|
||||
Register obj,
|
||||
Register pre_val,
|
||||
Register thread,
|
||||
Register tmp,
|
||||
Register tmp1,
|
||||
Register tmp2,
|
||||
bool tosca_live,
|
||||
bool expand_call) {
|
||||
// If expand_call is true then we expand the call_VM_leaf macro
|
||||
@@ -111,8 +112,8 @@ void G1BarrierSetAssembler::g1_write_barrier_pre(MacroAssembler* masm,
|
||||
Label done;
|
||||
Label runtime;
|
||||
|
||||
assert_different_registers(obj, pre_val, tmp, rscratch1);
|
||||
assert(pre_val != noreg && tmp != noreg, "expecting a register");
|
||||
assert_different_registers(obj, pre_val, tmp1, tmp2);
|
||||
assert(pre_val != noreg && tmp1 != noreg && tmp2 != noreg, "expecting a register");
|
||||
|
||||
Address in_progress(thread, in_bytes(G1ThreadLocalData::satb_mark_queue_active_offset()));
|
||||
Address index(thread, in_bytes(G1ThreadLocalData::satb_mark_queue_index_offset()));
|
||||
@@ -120,12 +121,12 @@ void G1BarrierSetAssembler::g1_write_barrier_pre(MacroAssembler* masm,
|
||||
|
||||
// Is marking active?
|
||||
if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
|
||||
__ ldrw(tmp, in_progress);
|
||||
__ ldrw(tmp1, in_progress);
|
||||
} else {
|
||||
assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
|
||||
__ ldrb(tmp, in_progress);
|
||||
__ ldrb(tmp1, in_progress);
|
||||
}
|
||||
__ cbzw(tmp, done);
|
||||
__ cbzw(tmp1, done);
|
||||
|
||||
// Do we need to load the previous value?
|
||||
if (obj != noreg) {
|
||||
@@ -139,17 +140,17 @@ void G1BarrierSetAssembler::g1_write_barrier_pre(MacroAssembler* masm,
|
||||
// Is index == 0?
|
||||
// (The index field is typed as size_t.)
|
||||
|
||||
__ ldr(tmp, index); // tmp := *index_adr
|
||||
__ cbz(tmp, runtime); // tmp == 0?
|
||||
__ ldr(tmp1, index); // tmp := *index_adr
|
||||
__ cbz(tmp1, runtime); // tmp == 0?
|
||||
// If yes, goto runtime
|
||||
|
||||
__ sub(tmp, tmp, wordSize); // tmp := tmp - wordSize
|
||||
__ str(tmp, index); // *index_adr := tmp
|
||||
__ ldr(rscratch1, buffer);
|
||||
__ add(tmp, tmp, rscratch1); // tmp := tmp + *buffer_adr
|
||||
__ sub(tmp1, tmp1, wordSize); // tmp := tmp - wordSize
|
||||
__ str(tmp1, index); // *index_adr := tmp
|
||||
__ ldr(tmp2, buffer);
|
||||
__ add(tmp1, tmp1, tmp2); // tmp := tmp + *buffer_adr
|
||||
|
||||
// Record the previous value
|
||||
__ str(pre_val, Address(tmp, 0));
|
||||
__ str(pre_val, Address(tmp1, 0));
|
||||
__ b(done);
|
||||
|
||||
__ bind(runtime);
|
||||
@@ -185,12 +186,12 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
|
||||
Register store_addr,
|
||||
Register new_val,
|
||||
Register thread,
|
||||
Register tmp,
|
||||
Register tmp1,
|
||||
Register tmp2) {
|
||||
assert(thread == rthread, "must be");
|
||||
assert_different_registers(store_addr, new_val, thread, tmp, tmp2,
|
||||
assert_different_registers(store_addr, new_val, thread, tmp1, tmp2,
|
||||
rscratch1);
|
||||
assert(store_addr != noreg && new_val != noreg && tmp != noreg
|
||||
assert(store_addr != noreg && new_val != noreg && tmp1 != noreg
|
||||
&& tmp2 != noreg, "expecting a register");
|
||||
|
||||
Address queue_index(thread, in_bytes(G1ThreadLocalData::dirty_card_queue_index_offset()));
|
||||
@@ -205,9 +206,9 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
|
||||
|
||||
// Does store cross heap regions?
|
||||
|
||||
__ eor(tmp, store_addr, new_val);
|
||||
__ lsr(tmp, tmp, HeapRegion::LogOfHRGrainBytes);
|
||||
__ cbz(tmp, done);
|
||||
__ eor(tmp1, store_addr, new_val);
|
||||
__ lsr(tmp1, tmp1, HeapRegion::LogOfHRGrainBytes);
|
||||
__ cbz(tmp1, done);
|
||||
|
||||
// crosses regions, storing NULL?
|
||||
|
||||
@@ -215,7 +216,7 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
|
||||
|
||||
// storing region crossing non-NULL, is card already dirty?
|
||||
|
||||
const Register card_addr = tmp;
|
||||
const Register card_addr = tmp1;
|
||||
|
||||
__ lsr(card_addr, store_addr, CardTable::card_shift());
|
||||
|
||||
@@ -258,12 +259,12 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
|
||||
}
|
||||
|
||||
void G1BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Register dst, Address src, Register tmp1, Register tmp_thread) {
|
||||
Register dst, Address src, Register tmp1, Register tmp2) {
|
||||
bool on_oop = is_reference_type(type);
|
||||
bool on_weak = (decorators & ON_WEAK_OOP_REF) != 0;
|
||||
bool on_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0;
|
||||
bool on_reference = on_weak || on_phantom;
|
||||
ModRefBarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
|
||||
ModRefBarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp2);
|
||||
if (on_oop && on_reference) {
|
||||
// LR is live. It must be saved around calls.
|
||||
__ enter(/*strip_ret_addr*/true); // barrier may call runtime
|
||||
@@ -273,7 +274,8 @@ void G1BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorator
|
||||
noreg /* obj */,
|
||||
dst /* pre_val */,
|
||||
rthread /* thread */,
|
||||
tmp1 /* tmp */,
|
||||
tmp1 /* tmp1 */,
|
||||
tmp2 /* tmp2 */,
|
||||
true /* tosca_live */,
|
||||
true /* expand_call */);
|
||||
__ leave();
|
||||
@@ -281,26 +283,27 @@ void G1BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorator
|
||||
}
|
||||
|
||||
void G1BarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2) {
|
||||
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
|
||||
// flatten object address if needed
|
||||
if (dst.index() == noreg && dst.offset() == 0) {
|
||||
if (dst.base() != r3) {
|
||||
__ mov(r3, dst.base());
|
||||
if (dst.base() != tmp3) {
|
||||
__ mov(tmp3, dst.base());
|
||||
}
|
||||
} else {
|
||||
__ lea(r3, dst);
|
||||
__ lea(tmp3, dst);
|
||||
}
|
||||
|
||||
g1_write_barrier_pre(masm,
|
||||
r3 /* obj */,
|
||||
tmp3 /* obj */,
|
||||
tmp2 /* pre_val */,
|
||||
rthread /* thread */,
|
||||
tmp1 /* tmp */,
|
||||
tmp1 /* tmp1 */,
|
||||
rscratch2 /* tmp2 */,
|
||||
val != noreg /* tosca_live */,
|
||||
false /* expand_call */);
|
||||
|
||||
if (val == noreg) {
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, Address(r3, 0), noreg, noreg, noreg);
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp3, 0), noreg, noreg, noreg, noreg);
|
||||
} else {
|
||||
// G1 barrier needs uncompressed oop for region cross check.
|
||||
Register new_val = val;
|
||||
@@ -308,12 +311,12 @@ void G1BarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet deco
|
||||
new_val = rscratch2;
|
||||
__ mov(new_val, val);
|
||||
}
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, Address(r3, 0), val, noreg, noreg);
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp3, 0), val, noreg, noreg, noreg);
|
||||
g1_write_barrier_post(masm,
|
||||
r3 /* store_adr */,
|
||||
tmp3 /* store_adr */,
|
||||
new_val /* new_val */,
|
||||
rthread /* thread */,
|
||||
tmp1 /* tmp */,
|
||||
tmp1 /* tmp1 */,
|
||||
tmp2 /* tmp2 */);
|
||||
}
|
||||
|
||||
@@ -380,6 +383,15 @@ void G1BarrierSetAssembler::generate_c1_pre_barrier_runtime_stub(StubAssembler*
|
||||
Label done;
|
||||
Label runtime;
|
||||
|
||||
// Is marking still active?
|
||||
if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
|
||||
__ ldrw(tmp, in_progress);
|
||||
} else {
|
||||
assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
|
||||
__ ldrb(tmp, in_progress);
|
||||
}
|
||||
__ cbzw(tmp, done);
|
||||
|
||||
// Can we store original value in the thread's buffer?
|
||||
__ ldr(tmp, queue_index);
|
||||
__ cbz(tmp, runtime);
|
||||
|
||||
@@ -45,7 +45,8 @@ protected:
|
||||
Register obj,
|
||||
Register pre_val,
|
||||
Register thread,
|
||||
Register tmp,
|
||||
Register tmp1,
|
||||
Register tmp2,
|
||||
bool tosca_live,
|
||||
bool expand_call);
|
||||
|
||||
@@ -53,11 +54,11 @@ protected:
|
||||
Register store_addr,
|
||||
Register new_val,
|
||||
Register thread,
|
||||
Register tmp,
|
||||
Register tmp1,
|
||||
Register tmp2);
|
||||
|
||||
virtual void oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2);
|
||||
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3);
|
||||
|
||||
public:
|
||||
#ifdef COMPILER1
|
||||
@@ -69,7 +70,7 @@ public:
|
||||
#endif
|
||||
|
||||
void load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Register dst, Address src, Register tmp1, Register tmp_thread);
|
||||
Register dst, Address src, Register tmp1, Register tmp2);
|
||||
};
|
||||
|
||||
#endif // CPU_AARCH64_GC_G1_G1BARRIERSETASSEMBLER_AARCH64_HPP
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#define __ masm->
|
||||
|
||||
void BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Register dst, Address src, Register tmp1, Register tmp_thread) {
|
||||
Register dst, Address src, Register tmp1, Register tmp2) {
|
||||
|
||||
// LR is live. It must be saved around calls.
|
||||
|
||||
@@ -80,7 +80,7 @@ void BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators,
|
||||
}
|
||||
|
||||
void BarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2) {
|
||||
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
|
||||
bool in_heap = (decorators & IN_HEAP) != 0;
|
||||
bool in_native = (decorators & IN_NATIVE) != 0;
|
||||
switch (type) {
|
||||
@@ -285,13 +285,12 @@ void BarrierSetAssembler::c2i_entry_barrier(MacroAssembler* masm) {
|
||||
__ cbnz(rscratch2, method_live);
|
||||
|
||||
// Is it a weak but alive CLD?
|
||||
__ stp(r10, r11, Address(__ pre(sp, -2 * wordSize)));
|
||||
__ push(RegSet::of(r10), sp);
|
||||
__ ldr(r10, Address(rscratch1, ClassLoaderData::holder_offset()));
|
||||
|
||||
// Uses rscratch1 & rscratch2, so we must pass new temporaries.
|
||||
__ resolve_weak_handle(r10, r11);
|
||||
__ resolve_weak_handle(r10, rscratch1, rscratch2);
|
||||
__ mov(rscratch1, r10);
|
||||
__ ldp(r10, r11, Address(__ post(sp, 2 * wordSize)));
|
||||
__ pop(RegSet::of(r10), sp);
|
||||
__ cbnz(rscratch1, method_live);
|
||||
|
||||
__ bind(bad_call);
|
||||
|
||||
@@ -49,9 +49,9 @@ public:
|
||||
virtual void arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
|
||||
Register start, Register end, Register tmp, RegSet saved_regs) {}
|
||||
virtual void load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Register dst, Address src, Register tmp1, Register tmp_thread);
|
||||
Register dst, Address src, Register tmp1, Register tmp2);
|
||||
virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2);
|
||||
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3);
|
||||
|
||||
virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register jni_env,
|
||||
Register obj, Register tmp, Label& slowpath);
|
||||
@@ -72,6 +72,12 @@ public:
|
||||
virtual void nmethod_entry_barrier(MacroAssembler* masm, Label* slow_path, Label* continuation, Label* guard);
|
||||
virtual void c2i_entry_barrier(MacroAssembler* masm);
|
||||
|
||||
virtual bool supports_instruction_patching() {
|
||||
NMethodPatchingType patching_type = nmethod_patching_type();
|
||||
return patching_type == NMethodPatchingType::conc_instruction_and_data_patch ||
|
||||
patching_type == NMethodPatchingType::stw_instruction_and_data_patch;
|
||||
}
|
||||
|
||||
static address patching_epoch_addr();
|
||||
static void clear_patching_epoch();
|
||||
static void increment_patching_epoch();
|
||||
|
||||
@@ -78,21 +78,21 @@ void CardTableBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembl
|
||||
}
|
||||
|
||||
void CardTableBarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2) {
|
||||
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
|
||||
bool in_heap = (decorators & IN_HEAP) != 0;
|
||||
bool is_array = (decorators & IS_ARRAY) != 0;
|
||||
bool on_anonymous = (decorators & ON_UNKNOWN_OOP_REF) != 0;
|
||||
bool precise = is_array || on_anonymous;
|
||||
|
||||
bool needs_post_barrier = val != noreg && in_heap;
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, noreg, noreg);
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, noreg, noreg, noreg);
|
||||
if (needs_post_barrier) {
|
||||
// flatten object address if needed
|
||||
if (!precise || (dst.index() == noreg && dst.offset() == 0)) {
|
||||
store_check(masm, dst.base(), dst);
|
||||
} else {
|
||||
__ lea(r3, dst);
|
||||
store_check(masm, r3, dst);
|
||||
__ lea(tmp3, dst);
|
||||
store_check(masm, tmp3, dst);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ protected:
|
||||
virtual void gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators,
|
||||
Register start, Register count, Register tmp, RegSet saved_regs);
|
||||
virtual void oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2);
|
||||
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -45,10 +45,10 @@ void ModRefBarrierSetAssembler::arraycopy_epilogue(MacroAssembler* masm, Decorat
|
||||
}
|
||||
|
||||
void ModRefBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2) {
|
||||
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
|
||||
if (is_reference_type(type)) {
|
||||
oop_store_at(masm, decorators, type, dst, val, tmp1, tmp2);
|
||||
oop_store_at(masm, decorators, type, dst, val, tmp1, tmp2, tmp3);
|
||||
} else {
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2);
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2, tmp3);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ protected:
|
||||
Register start, Register count, Register tmp, RegSet saved_regs) {}
|
||||
|
||||
virtual void oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2) = 0;
|
||||
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) = 0;
|
||||
|
||||
public:
|
||||
virtual void arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
virtual void arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
|
||||
Register start, Register count, Register tmp, RegSet saved_regs);
|
||||
virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2);
|
||||
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3);
|
||||
};
|
||||
|
||||
#endif // CPU_AARCH64_GC_SHARED_MODREFBARRIERSETASSEMBLER_AARCH64_HPP
|
||||
|
||||
@@ -85,7 +85,7 @@ void ShenandoahBarrierSetAssembler::shenandoah_write_barrier_pre(MacroAssembler*
|
||||
bool tosca_live,
|
||||
bool expand_call) {
|
||||
if (ShenandoahSATBBarrier) {
|
||||
satb_write_barrier_pre(masm, obj, pre_val, thread, tmp, tosca_live, expand_call);
|
||||
satb_write_barrier_pre(masm, obj, pre_val, thread, tmp, rscratch1, tosca_live, expand_call);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,8 @@ void ShenandoahBarrierSetAssembler::satb_write_barrier_pre(MacroAssembler* masm,
|
||||
Register obj,
|
||||
Register pre_val,
|
||||
Register thread,
|
||||
Register tmp,
|
||||
Register tmp1,
|
||||
Register tmp2,
|
||||
bool tosca_live,
|
||||
bool expand_call) {
|
||||
// If expand_call is true then we expand the call_VM_leaf macro
|
||||
@@ -105,8 +106,8 @@ void ShenandoahBarrierSetAssembler::satb_write_barrier_pre(MacroAssembler* masm,
|
||||
Label done;
|
||||
Label runtime;
|
||||
|
||||
assert_different_registers(obj, pre_val, tmp, rscratch1);
|
||||
assert(pre_val != noreg && tmp != noreg, "expecting a register");
|
||||
assert_different_registers(obj, pre_val, tmp1, tmp2);
|
||||
assert(pre_val != noreg && tmp1 != noreg && tmp2 != noreg, "expecting a register");
|
||||
|
||||
Address in_progress(thread, in_bytes(ShenandoahThreadLocalData::satb_mark_queue_active_offset()));
|
||||
Address index(thread, in_bytes(ShenandoahThreadLocalData::satb_mark_queue_index_offset()));
|
||||
@@ -114,12 +115,12 @@ void ShenandoahBarrierSetAssembler::satb_write_barrier_pre(MacroAssembler* masm,
|
||||
|
||||
// Is marking active?
|
||||
if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
|
||||
__ ldrw(tmp, in_progress);
|
||||
__ ldrw(tmp1, in_progress);
|
||||
} else {
|
||||
assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
|
||||
__ ldrb(tmp, in_progress);
|
||||
__ ldrb(tmp1, in_progress);
|
||||
}
|
||||
__ cbzw(tmp, done);
|
||||
__ cbzw(tmp1, done);
|
||||
|
||||
// Do we need to load the previous value?
|
||||
if (obj != noreg) {
|
||||
@@ -133,17 +134,17 @@ void ShenandoahBarrierSetAssembler::satb_write_barrier_pre(MacroAssembler* masm,
|
||||
// Is index == 0?
|
||||
// (The index field is typed as size_t.)
|
||||
|
||||
__ ldr(tmp, index); // tmp := *index_adr
|
||||
__ cbz(tmp, runtime); // tmp == 0?
|
||||
__ ldr(tmp1, index); // tmp := *index_adr
|
||||
__ cbz(tmp1, runtime); // tmp == 0?
|
||||
// If yes, goto runtime
|
||||
|
||||
__ sub(tmp, tmp, wordSize); // tmp := tmp - wordSize
|
||||
__ str(tmp, index); // *index_adr := tmp
|
||||
__ ldr(rscratch1, buffer);
|
||||
__ add(tmp, tmp, rscratch1); // tmp := tmp + *buffer_adr
|
||||
__ sub(tmp1, tmp1, wordSize); // tmp := tmp - wordSize
|
||||
__ str(tmp1, index); // *index_adr := tmp
|
||||
__ ldr(tmp2, buffer);
|
||||
__ add(tmp1, tmp1, tmp2); // tmp := tmp + *buffer_adr
|
||||
|
||||
// Record the previous value
|
||||
__ str(pre_val, Address(tmp, 0));
|
||||
__ str(pre_val, Address(tmp1, 0));
|
||||
__ b(done);
|
||||
|
||||
__ bind(runtime);
|
||||
@@ -307,7 +308,7 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm,
|
||||
void ShenandoahBarrierSetAssembler::iu_barrier(MacroAssembler* masm, Register dst, Register tmp) {
|
||||
if (ShenandoahIUBarrier) {
|
||||
__ push_call_clobbered_registers();
|
||||
satb_write_barrier_pre(masm, noreg, dst, rthread, tmp, true, false);
|
||||
satb_write_barrier_pre(masm, noreg, dst, rthread, tmp, rscratch1, true, false);
|
||||
__ pop_call_clobbered_registers();
|
||||
}
|
||||
}
|
||||
@@ -328,10 +329,10 @@ void ShenandoahBarrierSetAssembler::iu_barrier(MacroAssembler* masm, Register ds
|
||||
// dst: rscratch1 (might use rscratch1 as temporary output register to avoid clobbering src)
|
||||
//
|
||||
void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Register dst, Address src, Register tmp1, Register tmp_thread) {
|
||||
Register dst, Address src, Register tmp1, Register tmp2) {
|
||||
// 1: non-reference load, no additional barrier is needed
|
||||
if (!is_reference_type(type)) {
|
||||
BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
|
||||
BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp2);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -345,7 +346,7 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d
|
||||
}
|
||||
assert_different_registers(dst, src.base(), src.index());
|
||||
|
||||
BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
|
||||
BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp2);
|
||||
|
||||
load_reference_barrier(masm, dst, src, decorators);
|
||||
|
||||
@@ -354,7 +355,7 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d
|
||||
dst = result_dst;
|
||||
}
|
||||
} else {
|
||||
BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
|
||||
BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp2);
|
||||
}
|
||||
|
||||
// 3: apply keep-alive barrier if needed
|
||||
@@ -365,7 +366,8 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d
|
||||
noreg /* obj */,
|
||||
dst /* pre_val */,
|
||||
rthread /* thread */,
|
||||
tmp1 /* tmp */,
|
||||
tmp1 /* tmp1 */,
|
||||
tmp2 /* tmp2 */,
|
||||
true /* tosca_live */,
|
||||
true /* expand_call */);
|
||||
__ pop_call_clobbered_registers();
|
||||
@@ -374,24 +376,24 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d
|
||||
}
|
||||
|
||||
void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2) {
|
||||
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
|
||||
bool on_oop = is_reference_type(type);
|
||||
if (!on_oop) {
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2);
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2, tmp3);
|
||||
return;
|
||||
}
|
||||
|
||||
// flatten object address if needed
|
||||
if (dst.index() == noreg && dst.offset() == 0) {
|
||||
if (dst.base() != r3) {
|
||||
__ mov(r3, dst.base());
|
||||
if (dst.base() != tmp3) {
|
||||
__ mov(tmp3, dst.base());
|
||||
}
|
||||
} else {
|
||||
__ lea(r3, dst);
|
||||
__ lea(tmp3, dst);
|
||||
}
|
||||
|
||||
shenandoah_write_barrier_pre(masm,
|
||||
r3 /* obj */,
|
||||
tmp3 /* obj */,
|
||||
tmp2 /* pre_val */,
|
||||
rthread /* thread */,
|
||||
tmp1 /* tmp */,
|
||||
@@ -399,7 +401,7 @@ void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet
|
||||
false /* expand_call */);
|
||||
|
||||
if (val == noreg) {
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, Address(r3, 0), noreg, noreg, noreg);
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp3, 0), noreg, noreg, noreg, noreg);
|
||||
} else {
|
||||
iu_barrier(masm, val, tmp1);
|
||||
// G1 barrier needs uncompressed oop for region cross check.
|
||||
@@ -408,7 +410,7 @@ void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet
|
||||
new_val = rscratch2;
|
||||
__ mov(new_val, val);
|
||||
}
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, Address(r3, 0), val, noreg, noreg);
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp3, 0), val, noreg, noreg, noreg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,7 +43,8 @@ private:
|
||||
Register obj,
|
||||
Register pre_val,
|
||||
Register thread,
|
||||
Register tmp,
|
||||
Register tmp1,
|
||||
Register tmp2,
|
||||
bool tosca_live,
|
||||
bool expand_call);
|
||||
void shenandoah_write_barrier_pre(MacroAssembler* masm,
|
||||
@@ -74,9 +75,9 @@ public:
|
||||
virtual void arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
|
||||
Register src, Register dst, Register count, RegSet saved_regs);
|
||||
virtual void load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Register dst, Address src, Register tmp1, Register tmp_thread);
|
||||
Register dst, Address src, Register tmp1, Register tmp2);
|
||||
virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2);
|
||||
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3);
|
||||
virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register jni_env,
|
||||
Register obj, Register tmp, Label& slowpath);
|
||||
void cmpxchg_oop(MacroAssembler* masm, Register addr, Register expected, Register new_val,
|
||||
|
||||
@@ -108,7 +108,8 @@ void ZBarrierSetAssembler::store_at(MacroAssembler* masm,
|
||||
Address dst,
|
||||
Register val,
|
||||
Register tmp1,
|
||||
Register tmp2) {
|
||||
Register tmp2,
|
||||
Register tmp3) {
|
||||
// Verify value
|
||||
if (is_reference_type(type)) {
|
||||
// Note that src could be noreg, which means we
|
||||
@@ -116,7 +117,7 @@ void ZBarrierSetAssembler::store_at(MacroAssembler* masm,
|
||||
if (val != noreg) {
|
||||
Label done;
|
||||
|
||||
// tmp1 and tmp2 are often set to noreg.
|
||||
// tmp1, tmp2 and tmp3 are often set to noreg.
|
||||
RegSet savedRegs = RegSet::of(rscratch1);
|
||||
__ push(savedRegs, sp);
|
||||
|
||||
@@ -131,7 +132,7 @@ void ZBarrierSetAssembler::store_at(MacroAssembler* masm,
|
||||
}
|
||||
|
||||
// Store value
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2);
|
||||
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2, noreg);
|
||||
}
|
||||
|
||||
#endif // ASSERT
|
||||
|
||||
@@ -59,7 +59,8 @@ public:
|
||||
Address dst,
|
||||
Register val,
|
||||
Register tmp1,
|
||||
Register tmp2);
|
||||
Register tmp2,
|
||||
Register tmp3);
|
||||
#endif // ASSERT
|
||||
|
||||
virtual void arraycopy_prologue(MacroAssembler* masm,
|
||||
|
||||
@@ -278,7 +278,7 @@ void InterpreterMacroAssembler::load_resolved_reference_at_index(
|
||||
// load pointer for resolved_references[] objArray
|
||||
ldr(result, Address(result, ConstantPool::cache_offset_in_bytes()));
|
||||
ldr(result, Address(result, ConstantPoolCache::resolved_references_offset_in_bytes()));
|
||||
resolve_oop_handle(result, tmp);
|
||||
resolve_oop_handle(result, tmp, rscratch2);
|
||||
// Add in the index
|
||||
add(index, index, arrayOopDesc::base_offset_in_bytes(T_OBJECT) >> LogBytesPerHeapOop);
|
||||
load_heap_oop(result, Address(result, index, Address::uxtw(LogBytesPerHeapOop)));
|
||||
|
||||
@@ -175,11 +175,11 @@ void CodeInstaller::pd_relocate_poll(address pc, jint mark, JVMCI_TRAPS) {
|
||||
|
||||
// convert JVMCI register indices (as used in oop maps) to HotSpot registers
|
||||
VMReg CodeInstaller::get_hotspot_reg(jint jvmci_reg, JVMCI_TRAPS) {
|
||||
if (jvmci_reg < RegisterImpl::number_of_registers) {
|
||||
if (jvmci_reg < Register::number_of_registers) {
|
||||
return as_Register(jvmci_reg)->as_VMReg();
|
||||
} else {
|
||||
jint floatRegisterNumber = jvmci_reg - RegisterImpl::number_of_declared_registers;
|
||||
if (floatRegisterNumber >= 0 && floatRegisterNumber < FloatRegisterImpl::number_of_registers) {
|
||||
jint floatRegisterNumber = jvmci_reg - Register::number_of_declared_registers;
|
||||
if (floatRegisterNumber >= 0 && floatRegisterNumber < FloatRegister::number_of_registers) {
|
||||
return as_FloatRegister(floatRegisterNumber)->as_VMReg();
|
||||
}
|
||||
JVMCI_ERROR_NULL("invalid register number: %d", jvmci_reg);
|
||||
|
||||
@@ -684,7 +684,7 @@ static inline bool target_needs_far_branch(address addr) {
|
||||
return !CodeCache::is_non_nmethod(addr);
|
||||
}
|
||||
|
||||
void MacroAssembler::far_call(Address entry, CodeBuffer *cbuf, Register tmp) {
|
||||
void MacroAssembler::far_call(Address entry, Register tmp) {
|
||||
assert(ReservedCodeCacheSize < 4*G, "branch out of range");
|
||||
assert(CodeCache::find_blob(entry.target()) != NULL,
|
||||
"destination of far call not found in code cache");
|
||||
@@ -697,15 +697,13 @@ void MacroAssembler::far_call(Address entry, CodeBuffer *cbuf, Register tmp) {
|
||||
// the code cache cannot exceed 2Gb (ADRP limit is 4GB).
|
||||
adrp(tmp, entry, offset);
|
||||
add(tmp, tmp, offset);
|
||||
if (cbuf) cbuf->set_insts_mark();
|
||||
blr(tmp);
|
||||
} else {
|
||||
if (cbuf) cbuf->set_insts_mark();
|
||||
bl(entry);
|
||||
}
|
||||
}
|
||||
|
||||
int MacroAssembler::far_jump(Address entry, CodeBuffer *cbuf, Register tmp) {
|
||||
int MacroAssembler::far_jump(Address entry, Register tmp) {
|
||||
assert(ReservedCodeCacheSize < 4*G, "branch out of range");
|
||||
assert(CodeCache::find_blob(entry.target()) != NULL,
|
||||
"destination of far call not found in code cache");
|
||||
@@ -719,10 +717,8 @@ int MacroAssembler::far_jump(Address entry, CodeBuffer *cbuf, Register tmp) {
|
||||
// the code cache cannot exceed 2Gb (ADRP limit is 4GB).
|
||||
adrp(tmp, entry, offset);
|
||||
add(tmp, tmp, offset);
|
||||
if (cbuf) cbuf->set_insts_mark();
|
||||
br(tmp);
|
||||
} else {
|
||||
if (cbuf) cbuf->set_insts_mark();
|
||||
b(entry);
|
||||
}
|
||||
return pc() - start;
|
||||
@@ -849,9 +845,40 @@ void MacroAssembler::call_VM_helper(Register oop_result, address entry_point, in
|
||||
call_VM_base(oop_result, noreg, noreg, entry_point, number_of_arguments, check_exceptions);
|
||||
}
|
||||
|
||||
// Check the entry target is always reachable from any branch.
|
||||
static bool is_always_within_branch_range(Address entry) {
|
||||
const address target = entry.target();
|
||||
|
||||
if (!CodeCache::contains(target)) {
|
||||
// We always use trampolines for callees outside CodeCache.
|
||||
assert(entry.rspec().type() == relocInfo::runtime_call_type, "non-runtime call of an external target");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!MacroAssembler::far_branches()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (entry.rspec().type() == relocInfo::runtime_call_type) {
|
||||
// Runtime calls are calls of a non-compiled method (stubs, adapters).
|
||||
// Non-compiled methods stay forever in CodeCache.
|
||||
// We check whether the longest possible branch is within the branch range.
|
||||
assert(CodeCache::find_blob(target) != NULL &&
|
||||
!CodeCache::find_blob(target)->is_compiled(),
|
||||
"runtime call of compiled method");
|
||||
const address right_longest_branch_start = CodeCache::high_bound() - NativeInstruction::instruction_size;
|
||||
const address left_longest_branch_start = CodeCache::low_bound();
|
||||
const bool is_reachable = Assembler::reachable_from_branch_at(left_longest_branch_start, target) &&
|
||||
Assembler::reachable_from_branch_at(right_longest_branch_start, target);
|
||||
return is_reachable;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Maybe emit a call via a trampoline. If the code cache is small
|
||||
// trampolines won't be emitted.
|
||||
address MacroAssembler::trampoline_call(Address entry, CodeBuffer* cbuf) {
|
||||
address MacroAssembler::trampoline_call(Address entry) {
|
||||
assert(entry.rspec().type() == relocInfo::runtime_call_type
|
||||
|| entry.rspec().type() == relocInfo::opt_virtual_call_type
|
||||
|| entry.rspec().type() == relocInfo::static_call_type
|
||||
@@ -859,22 +886,7 @@ address MacroAssembler::trampoline_call(Address entry, CodeBuffer* cbuf) {
|
||||
|
||||
address target = entry.target();
|
||||
|
||||
// We might need a trampoline if branches are far.
|
||||
bool need_trampoline = far_branches();
|
||||
if (!need_trampoline && entry.rspec().type() == relocInfo::runtime_call_type && !CodeCache::contains(target)) {
|
||||
// If it is a runtime call of an address outside small CodeCache,
|
||||
// we need to check whether it is in range.
|
||||
assert(target < CodeCache::low_bound() || target >= CodeCache::high_bound(), "target is inside CodeCache");
|
||||
// Case 1: -------T-------L====CodeCache====H-------
|
||||
// ^-------longest branch---|
|
||||
// Case 2: -------L====CodeCache====H-------T-------
|
||||
// |-------longest branch ---^
|
||||
address longest_branch_start = (target < CodeCache::low_bound()) ? CodeCache::high_bound() - NativeInstruction::instruction_size
|
||||
: CodeCache::low_bound();
|
||||
need_trampoline = !reachable_from_branch_at(longest_branch_start, target);
|
||||
}
|
||||
|
||||
if (need_trampoline) {
|
||||
if (!is_always_within_branch_range(entry)) {
|
||||
if (!in_scratch_emit_size()) {
|
||||
// We don't want to emit a trampoline if C2 is generating dummy
|
||||
// code during its branch shortening phase.
|
||||
@@ -892,13 +904,12 @@ address MacroAssembler::trampoline_call(Address entry, CodeBuffer* cbuf) {
|
||||
target = pc();
|
||||
}
|
||||
|
||||
if (cbuf) cbuf->set_insts_mark();
|
||||
address call_pc = pc();
|
||||
relocate(entry.rspec());
|
||||
bl(target);
|
||||
|
||||
// just need to return a non-null address
|
||||
postcond(pc() != badAddress);
|
||||
return pc();
|
||||
return call_pc;
|
||||
}
|
||||
|
||||
// Emit a trampoline stub for a call to a target which is too far away.
|
||||
@@ -2198,7 +2209,7 @@ int MacroAssembler::push(unsigned int bitset, Register stack) {
|
||||
regs[count++] = reg;
|
||||
bitset >>= 1;
|
||||
}
|
||||
regs[count++] = zr->encoding_nocheck();
|
||||
regs[count++] = zr->raw_encoding();
|
||||
count &= ~1; // Only push an even number of regs
|
||||
|
||||
if (count) {
|
||||
@@ -2228,7 +2239,7 @@ int MacroAssembler::pop(unsigned int bitset, Register stack) {
|
||||
regs[count++] = reg;
|
||||
bitset >>= 1;
|
||||
}
|
||||
regs[count++] = zr->encoding_nocheck();
|
||||
regs[count++] = zr->raw_encoding();
|
||||
count &= ~1;
|
||||
|
||||
for (int i = 2; i < count; i += 2) {
|
||||
@@ -2383,9 +2394,9 @@ int MacroAssembler::push_p(unsigned int bitset, Register stack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned char regs[PRegisterImpl::number_of_saved_registers];
|
||||
unsigned char regs[PRegister::number_of_registers];
|
||||
int count = 0;
|
||||
for (int reg = 0; reg < PRegisterImpl::number_of_saved_registers; reg++) {
|
||||
for (int reg = 0; reg < PRegister::number_of_registers; reg++) {
|
||||
if (1 & bitset)
|
||||
regs[count++] = reg;
|
||||
bitset >>= 1;
|
||||
@@ -2420,9 +2431,9 @@ int MacroAssembler::pop_p(unsigned int bitset, Register stack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned char regs[PRegisterImpl::number_of_saved_registers];
|
||||
unsigned char regs[PRegister::number_of_registers];
|
||||
int count = 0;
|
||||
for (int reg = 0; reg < PRegisterImpl::number_of_saved_registers; reg++) {
|
||||
for (int reg = 0; reg < PRegister::number_of_registers; reg++) {
|
||||
if (1 & bitset)
|
||||
regs[count++] = reg;
|
||||
bitset >>= 1;
|
||||
@@ -2453,7 +2464,7 @@ void MacroAssembler::verify_heapbase(const char* msg) {
|
||||
if (CheckCompressedOops) {
|
||||
Label ok;
|
||||
push(1 << rscratch1->encoding(), sp); // cmpptr trashes rscratch1
|
||||
cmpptr(rheapbase, ExternalAddress((address)CompressedOops::ptrs_base_addr()));
|
||||
cmpptr(rheapbase, ExternalAddress(CompressedOops::ptrs_base_addr()));
|
||||
br(Assembler::EQ, ok);
|
||||
stop(msg);
|
||||
bind(ok);
|
||||
@@ -2463,7 +2474,7 @@ void MacroAssembler::verify_heapbase(const char* msg) {
|
||||
}
|
||||
#endif
|
||||
|
||||
void MacroAssembler::resolve_jobject(Register value, Register thread, Register tmp) {
|
||||
void MacroAssembler::resolve_jobject(Register value, Register tmp1, Register tmp2) {
|
||||
Label done, not_weak;
|
||||
cbz(value, done); // Use NULL as-is.
|
||||
|
||||
@@ -2472,13 +2483,13 @@ void MacroAssembler::resolve_jobject(Register value, Register thread, Register t
|
||||
|
||||
// Resolve jweak.
|
||||
access_load_at(T_OBJECT, IN_NATIVE | ON_PHANTOM_OOP_REF, value,
|
||||
Address(value, -JNIHandles::weak_tag_value), tmp, thread);
|
||||
Address(value, -JNIHandles::weak_tag_value), tmp1, tmp2);
|
||||
verify_oop(value);
|
||||
b(done);
|
||||
|
||||
bind(not_weak);
|
||||
// Resolve (untagged) jobject.
|
||||
access_load_at(T_OBJECT, IN_NATIVE, value, Address(value, 0), tmp, thread);
|
||||
access_load_at(T_OBJECT, IN_NATIVE, value, Address(value, 0), tmp1, tmp2);
|
||||
verify_oop(value);
|
||||
bind(done);
|
||||
}
|
||||
@@ -2587,7 +2598,7 @@ void MacroAssembler::reinit_heapbase()
|
||||
if (Universe::is_fully_initialized()) {
|
||||
mov(rheapbase, CompressedOops::ptrs_base());
|
||||
} else {
|
||||
lea(rheapbase, ExternalAddress((address)CompressedOops::ptrs_base_addr()));
|
||||
lea(rheapbase, ExternalAddress(CompressedOops::ptrs_base_addr()));
|
||||
ldr(rheapbase, Address(rheapbase));
|
||||
}
|
||||
}
|
||||
@@ -2910,8 +2921,8 @@ void MacroAssembler::push_CPU_state(bool save_vectors, bool use_sve,
|
||||
int sve_vector_size_in_bytes, int total_predicate_in_bytes) {
|
||||
push(RegSet::range(r0, r29), sp); // integer registers except lr & sp
|
||||
if (save_vectors && use_sve && sve_vector_size_in_bytes > 16) {
|
||||
sub(sp, sp, sve_vector_size_in_bytes * FloatRegisterImpl::number_of_registers);
|
||||
for (int i = 0; i < FloatRegisterImpl::number_of_registers; i++) {
|
||||
sub(sp, sp, sve_vector_size_in_bytes * FloatRegister::number_of_registers);
|
||||
for (int i = 0; i < FloatRegister::number_of_registers; i++) {
|
||||
sve_str(as_FloatRegister(i), Address(sp, i));
|
||||
}
|
||||
} else {
|
||||
@@ -2926,7 +2937,7 @@ void MacroAssembler::push_CPU_state(bool save_vectors, bool use_sve,
|
||||
}
|
||||
if (save_vectors && use_sve && total_predicate_in_bytes > 0) {
|
||||
sub(sp, sp, total_predicate_in_bytes);
|
||||
for (int i = 0; i < PRegisterImpl::number_of_saved_registers; i++) {
|
||||
for (int i = 0; i < PRegister::number_of_registers; i++) {
|
||||
sve_str(as_PRegister(i), Address(sp, i));
|
||||
}
|
||||
}
|
||||
@@ -2935,16 +2946,16 @@ void MacroAssembler::push_CPU_state(bool save_vectors, bool use_sve,
|
||||
void MacroAssembler::pop_CPU_state(bool restore_vectors, bool use_sve,
|
||||
int sve_vector_size_in_bytes, int total_predicate_in_bytes) {
|
||||
if (restore_vectors && use_sve && total_predicate_in_bytes > 0) {
|
||||
for (int i = PRegisterImpl::number_of_saved_registers - 1; i >= 0; i--) {
|
||||
for (int i = PRegister::number_of_registers - 1; i >= 0; i--) {
|
||||
sve_ldr(as_PRegister(i), Address(sp, i));
|
||||
}
|
||||
add(sp, sp, total_predicate_in_bytes);
|
||||
}
|
||||
if (restore_vectors && use_sve && sve_vector_size_in_bytes > 16) {
|
||||
for (int i = FloatRegisterImpl::number_of_registers - 1; i >= 0; i--) {
|
||||
for (int i = FloatRegister::number_of_registers - 1; i >= 0; i--) {
|
||||
sve_ldr(as_FloatRegister(i), Address(sp, i));
|
||||
}
|
||||
add(sp, sp, sve_vector_size_in_bytes * FloatRegisterImpl::number_of_registers);
|
||||
add(sp, sp, sve_vector_size_in_bytes * FloatRegister::number_of_registers);
|
||||
} else {
|
||||
int step = (restore_vectors ? 8 : 4) * wordSize;
|
||||
for (int i = 0; i <= 28; i += 4)
|
||||
@@ -4040,34 +4051,33 @@ void MacroAssembler::load_klass(Register dst, Register src) {
|
||||
}
|
||||
|
||||
// ((OopHandle)result).resolve();
|
||||
void MacroAssembler::resolve_oop_handle(Register result, Register tmp) {
|
||||
void MacroAssembler::resolve_oop_handle(Register result, Register tmp1, Register tmp2) {
|
||||
// OopHandle::resolve is an indirection.
|
||||
access_load_at(T_OBJECT, IN_NATIVE, result, Address(result, 0), tmp, noreg);
|
||||
access_load_at(T_OBJECT, IN_NATIVE, result, Address(result, 0), tmp1, tmp2);
|
||||
}
|
||||
|
||||
// ((WeakHandle)result).resolve();
|
||||
void MacroAssembler::resolve_weak_handle(Register rresult, Register rtmp) {
|
||||
assert_different_registers(rresult, rtmp);
|
||||
void MacroAssembler::resolve_weak_handle(Register result, Register tmp1, Register tmp2) {
|
||||
assert_different_registers(result, tmp1, tmp2);
|
||||
Label resolved;
|
||||
|
||||
// A null weak handle resolves to null.
|
||||
cbz(rresult, resolved);
|
||||
cbz(result, resolved);
|
||||
|
||||
// Only 64 bit platforms support GCs that require a tmp register
|
||||
// Only IN_HEAP loads require a thread_tmp register
|
||||
// WeakHandle::resolve is an indirection like jweak.
|
||||
access_load_at(T_OBJECT, IN_NATIVE | ON_PHANTOM_OOP_REF,
|
||||
rresult, Address(rresult), rtmp, /*tmp_thread*/noreg);
|
||||
result, Address(result), tmp1, tmp2);
|
||||
bind(resolved);
|
||||
}
|
||||
|
||||
void MacroAssembler::load_mirror(Register dst, Register method, Register tmp) {
|
||||
void MacroAssembler::load_mirror(Register dst, Register method, Register tmp1, Register tmp2) {
|
||||
const int mirror_offset = in_bytes(Klass::java_mirror_offset());
|
||||
ldr(dst, Address(rmethod, Method::const_offset()));
|
||||
ldr(dst, Address(dst, ConstMethod::constants_offset()));
|
||||
ldr(dst, Address(dst, ConstantPool::pool_holder_offset_in_bytes()));
|
||||
ldr(dst, Address(dst, mirror_offset));
|
||||
resolve_oop_handle(dst, tmp);
|
||||
resolve_oop_handle(dst, tmp1, tmp2);
|
||||
}
|
||||
|
||||
void MacroAssembler::cmp_klass(Register oop, Register trial_klass, Register tmp) {
|
||||
@@ -4389,48 +4399,48 @@ void MacroAssembler::set_narrow_klass(Register dst, Klass* k) {
|
||||
|
||||
void MacroAssembler::access_load_at(BasicType type, DecoratorSet decorators,
|
||||
Register dst, Address src,
|
||||
Register tmp1, Register thread_tmp) {
|
||||
Register tmp1, Register tmp2) {
|
||||
BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
|
||||
decorators = AccessInternal::decorator_fixup(decorators);
|
||||
bool as_raw = (decorators & AS_RAW) != 0;
|
||||
if (as_raw) {
|
||||
bs->BarrierSetAssembler::load_at(this, decorators, type, dst, src, tmp1, thread_tmp);
|
||||
bs->BarrierSetAssembler::load_at(this, decorators, type, dst, src, tmp1, tmp2);
|
||||
} else {
|
||||
bs->load_at(this, decorators, type, dst, src, tmp1, thread_tmp);
|
||||
bs->load_at(this, decorators, type, dst, src, tmp1, tmp2);
|
||||
}
|
||||
}
|
||||
|
||||
void MacroAssembler::access_store_at(BasicType type, DecoratorSet decorators,
|
||||
Address dst, Register src,
|
||||
Register tmp1, Register thread_tmp) {
|
||||
Register tmp1, Register tmp2, Register tmp3) {
|
||||
BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
|
||||
decorators = AccessInternal::decorator_fixup(decorators);
|
||||
bool as_raw = (decorators & AS_RAW) != 0;
|
||||
if (as_raw) {
|
||||
bs->BarrierSetAssembler::store_at(this, decorators, type, dst, src, tmp1, thread_tmp);
|
||||
bs->BarrierSetAssembler::store_at(this, decorators, type, dst, src, tmp1, tmp2, tmp3);
|
||||
} else {
|
||||
bs->store_at(this, decorators, type, dst, src, tmp1, thread_tmp);
|
||||
bs->store_at(this, decorators, type, dst, src, tmp1, tmp2, tmp3);
|
||||
}
|
||||
}
|
||||
|
||||
void MacroAssembler::load_heap_oop(Register dst, Address src, Register tmp1,
|
||||
Register thread_tmp, DecoratorSet decorators) {
|
||||
access_load_at(T_OBJECT, IN_HEAP | decorators, dst, src, tmp1, thread_tmp);
|
||||
Register tmp2, DecoratorSet decorators) {
|
||||
access_load_at(T_OBJECT, IN_HEAP | decorators, dst, src, tmp1, tmp2);
|
||||
}
|
||||
|
||||
void MacroAssembler::load_heap_oop_not_null(Register dst, Address src, Register tmp1,
|
||||
Register thread_tmp, DecoratorSet decorators) {
|
||||
access_load_at(T_OBJECT, IN_HEAP | IS_NOT_NULL | decorators, dst, src, tmp1, thread_tmp);
|
||||
Register tmp2, DecoratorSet decorators) {
|
||||
access_load_at(T_OBJECT, IN_HEAP | IS_NOT_NULL | decorators, dst, src, tmp1, tmp2);
|
||||
}
|
||||
|
||||
void MacroAssembler::store_heap_oop(Address dst, Register src, Register tmp1,
|
||||
Register thread_tmp, DecoratorSet decorators) {
|
||||
access_store_at(T_OBJECT, IN_HEAP | decorators, dst, src, tmp1, thread_tmp);
|
||||
Register tmp2, Register tmp3, DecoratorSet decorators) {
|
||||
access_store_at(T_OBJECT, IN_HEAP | decorators, dst, src, tmp1, tmp2, tmp3);
|
||||
}
|
||||
|
||||
// Used for storing NULLs.
|
||||
void MacroAssembler::store_heap_oop_null(Address dst) {
|
||||
access_store_at(T_OBJECT, IN_HEAP, dst, noreg, noreg, noreg);
|
||||
access_store_at(T_OBJECT, IN_HEAP, dst, noreg, noreg, noreg, noreg);
|
||||
}
|
||||
|
||||
Address MacroAssembler::allocate_metadata_address(Metadata* obj) {
|
||||
@@ -4440,11 +4450,8 @@ Address MacroAssembler::allocate_metadata_address(Metadata* obj) {
|
||||
return Address((address)obj, rspec);
|
||||
}
|
||||
|
||||
// Move an oop into a register. immediate is true if we want
|
||||
// immediate instructions and nmethod entry barriers are not enabled.
|
||||
// i.e. we are not going to patch this instruction while the code is being
|
||||
// executed by another thread.
|
||||
void MacroAssembler::movoop(Register dst, jobject obj, bool immediate) {
|
||||
// Move an oop into a register.
|
||||
void MacroAssembler::movoop(Register dst, jobject obj) {
|
||||
int oop_index;
|
||||
if (obj == NULL) {
|
||||
oop_index = oop_recorder()->allocate_oop_index(obj);
|
||||
@@ -4459,15 +4466,12 @@ void MacroAssembler::movoop(Register dst, jobject obj, bool immediate) {
|
||||
}
|
||||
RelocationHolder rspec = oop_Relocation::spec(oop_index);
|
||||
|
||||
// nmethod entry barrier necessitate using the constant pool. They have to be
|
||||
// ordered with respected to oop accesses.
|
||||
// Using immediate literals would necessitate ISBs.
|
||||
BarrierSet* bs = BarrierSet::barrier_set();
|
||||
if ((bs->barrier_set_nmethod() != NULL && bs->barrier_set_assembler()->nmethod_patching_type() == NMethodPatchingType::conc_data_patch) || !immediate) {
|
||||
if (BarrierSet::barrier_set()->barrier_set_assembler()->supports_instruction_patching()) {
|
||||
mov(dst, Address((address)obj, rspec));
|
||||
} else {
|
||||
address dummy = address(uintptr_t(pc()) & -wordSize); // A nearby aligned address
|
||||
ldr_constant(dst, Address(dummy, rspec));
|
||||
} else
|
||||
mov(dst, Address((address)obj, rspec));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -830,7 +830,7 @@ public:
|
||||
void store_check(Register obj); // store check for obj - register is destroyed afterwards
|
||||
void store_check(Register obj, Address dst); // same as above, dst is exact store location (reg. is destroyed)
|
||||
|
||||
void resolve_jobject(Register value, Register thread, Register tmp);
|
||||
void resolve_jobject(Register value, Register tmp1, Register tmp2);
|
||||
|
||||
// C 'boolean' to Java boolean: x == 0 ? 0 : 1
|
||||
void c2bool(Register x);
|
||||
@@ -843,23 +843,23 @@ public:
|
||||
void store_klass(Register dst, Register src);
|
||||
void cmp_klass(Register oop, Register trial_klass, Register tmp);
|
||||
|
||||
void resolve_weak_handle(Register result, Register tmp);
|
||||
void resolve_oop_handle(Register result, Register tmp = r5);
|
||||
void load_mirror(Register dst, Register method, Register tmp = r5);
|
||||
void resolve_weak_handle(Register result, Register tmp1, Register tmp2);
|
||||
void resolve_oop_handle(Register result, Register tmp1, Register tmp2);
|
||||
void load_mirror(Register dst, Register method, Register tmp1, Register tmp2);
|
||||
|
||||
void access_load_at(BasicType type, DecoratorSet decorators, Register dst, Address src,
|
||||
Register tmp1, Register tmp_thread);
|
||||
Register tmp1, Register tmp2);
|
||||
|
||||
void access_store_at(BasicType type, DecoratorSet decorators, Address dst, Register src,
|
||||
Register tmp1, Register tmp_thread);
|
||||
Register tmp1, Register tmp2, Register tmp3);
|
||||
|
||||
void load_heap_oop(Register dst, Address src, Register tmp1 = noreg,
|
||||
Register thread_tmp = noreg, DecoratorSet decorators = 0);
|
||||
Register tmp2 = noreg, DecoratorSet decorators = 0);
|
||||
|
||||
void load_heap_oop_not_null(Register dst, Address src, Register tmp1 = noreg,
|
||||
Register thread_tmp = noreg, DecoratorSet decorators = 0);
|
||||
Register tmp2 = noreg, DecoratorSet decorators = 0);
|
||||
void store_heap_oop(Address dst, Register src, Register tmp1 = noreg,
|
||||
Register tmp_thread = noreg, DecoratorSet decorators = 0);
|
||||
Register tmp2 = noreg, Register tmp3 = noreg, DecoratorSet decorators = 0);
|
||||
|
||||
// currently unimplemented
|
||||
// Used for storing NULL. All other oop constants should be
|
||||
@@ -1178,8 +1178,8 @@ public:
|
||||
// - relocInfo::static_call_type
|
||||
// - relocInfo::virtual_call_type
|
||||
//
|
||||
// Return: NULL if CodeCache is full.
|
||||
address trampoline_call(Address entry, CodeBuffer* cbuf = NULL);
|
||||
// Return: the call PC or NULL if CodeCache is full.
|
||||
address trampoline_call(Address entry);
|
||||
|
||||
static bool far_branches() {
|
||||
return ReservedCodeCacheSize > branch_range;
|
||||
@@ -1201,8 +1201,8 @@ public:
|
||||
// The tmp register is invalidated.
|
||||
//
|
||||
// Far_jump returns the amount of the emitted code.
|
||||
void far_call(Address entry, CodeBuffer *cbuf = NULL, Register tmp = rscratch1);
|
||||
int far_jump(Address entry, CodeBuffer *cbuf = NULL, Register tmp = rscratch1);
|
||||
void far_call(Address entry, Register tmp = rscratch1);
|
||||
int far_jump(Address entry, Register tmp = rscratch1);
|
||||
|
||||
static int far_codestub_branch_size() {
|
||||
if (codestub_branch_needs_far_jump()) {
|
||||
@@ -1223,7 +1223,7 @@ public:
|
||||
Address allocate_metadata_address(Metadata* obj);
|
||||
Address constant_oop_address(jobject obj);
|
||||
|
||||
void movoop(Register dst, jobject obj, bool immediate = false);
|
||||
void movoop(Register dst, jobject obj);
|
||||
|
||||
// CRC32 code for java.util.zip.CRC32::updateBytes() intrinsic.
|
||||
void kernel_crc32(Register crc, Register buf, Register len,
|
||||
|
||||
@@ -231,27 +231,27 @@ public:
|
||||
br(Assembler::EQ, _rounds_52);
|
||||
}
|
||||
break;
|
||||
case 2: aes_round(_data, _subkeys + 0); break;
|
||||
case 3: aes_round(_data, _subkeys + 1); break;
|
||||
case 2: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 0)); break;
|
||||
case 3: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 1)); break;
|
||||
case 4:
|
||||
if (_once) bind(_rounds_52);
|
||||
break;
|
||||
case 5: aes_round(_data, _subkeys + 2); break;
|
||||
case 6: aes_round(_data, _subkeys + 3); break;
|
||||
case 5: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 2)); break;
|
||||
case 6: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 3)); break;
|
||||
case 7:
|
||||
if (_once) bind(_rounds_44);
|
||||
break;
|
||||
case 8: aes_round(_data, _subkeys + 4); break;
|
||||
case 9: aes_round(_data, _subkeys + 5); break;
|
||||
case 10: aes_round(_data, _subkeys + 6); break;
|
||||
case 11: aes_round(_data, _subkeys + 7); break;
|
||||
case 12: aes_round(_data, _subkeys + 8); break;
|
||||
case 13: aes_round(_data, _subkeys + 9); break;
|
||||
case 14: aes_round(_data, _subkeys + 10); break;
|
||||
case 15: aes_round(_data, _subkeys + 11); break;
|
||||
case 16: aes_round(_data, _subkeys + 12); break;
|
||||
case 17: aese(_data, _subkeys + 13); break;
|
||||
case 18: eor(_data, T16B, _data, _subkeys + 14); break;
|
||||
case 8: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 4)); break;
|
||||
case 9: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 5)); break;
|
||||
case 10: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 6)); break;
|
||||
case 11: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 7)); break;
|
||||
case 12: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 8)); break;
|
||||
case 13: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 9)); break;
|
||||
case 14: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 10)); break;
|
||||
case 15: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 11)); break;
|
||||
case 16: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 12)); break;
|
||||
case 17: aese(_data, as_FloatRegister(_subkeys->encoding() + 13)); break;
|
||||
case 18: eor(_data, T16B, _data, as_FloatRegister(_subkeys->encoding() + 14)); break;
|
||||
case 19:
|
||||
if (_to != noreg) {
|
||||
st1(_data, T16B, _to);
|
||||
@@ -264,7 +264,7 @@ public:
|
||||
virtual KernelGenerator *next() {
|
||||
return new AESKernelGenerator(this, _unrolls,
|
||||
_from, _to, _keylen,
|
||||
_data + 1, _subkeys, /*once*/false);
|
||||
_data->successor(), _subkeys, /*once*/false);
|
||||
}
|
||||
|
||||
virtual int length() { return 20; }
|
||||
@@ -409,14 +409,14 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual KernelGenerator *next() {
|
||||
GHASHMultiplyGenerator *result = new GHASHMultiplyGenerator(*this);
|
||||
result->_result_lo += register_stride;
|
||||
result->_result_hi += register_stride;
|
||||
result->_b += register_stride;
|
||||
result->_tmp1 += register_stride;
|
||||
result->_tmp2 += register_stride;
|
||||
result->_tmp3 += register_stride;
|
||||
virtual KernelGenerator* next() {
|
||||
GHASHMultiplyGenerator* result = new GHASHMultiplyGenerator(*this);
|
||||
result->_result_lo = as_FloatRegister(result->_result_lo->encoding() + register_stride);
|
||||
result->_result_hi = as_FloatRegister(result->_result_hi->encoding() + register_stride);
|
||||
result->_b = as_FloatRegister(result->_b ->encoding() + register_stride);
|
||||
result->_tmp1 = as_FloatRegister(result->_tmp1 ->encoding() + register_stride);
|
||||
result->_tmp2 = as_FloatRegister(result->_tmp2 ->encoding() + register_stride);
|
||||
result->_tmp3 = as_FloatRegister(result->_tmp3 ->encoding() + register_stride);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -477,17 +477,17 @@ public:
|
||||
if (_data->is_valid() && _once) {
|
||||
assert(length() >= unrolls(), "not enough room for inteleaved loads");
|
||||
if (index < unrolls()) {
|
||||
ld1((_data + index*register_stride), T16B, post(r2, 0x10));
|
||||
ld1(as_FloatRegister(_data->encoding() + index*register_stride), T16B, post(r2, 0x10));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual KernelGenerator *next() {
|
||||
GHASHReduceGenerator *result = new GHASHReduceGenerator(*this);
|
||||
result->_result += register_stride;
|
||||
result->_hi += register_stride;
|
||||
result->_lo += register_stride;
|
||||
result->_t1 += register_stride;
|
||||
result->_result = as_FloatRegister(result->_result->encoding() + register_stride);
|
||||
result->_hi = as_FloatRegister(result->_hi ->encoding() + register_stride);
|
||||
result->_lo = as_FloatRegister(result->_lo ->encoding() + register_stride);
|
||||
result->_t1 = as_FloatRegister(result->_t1 ->encoding() + register_stride);
|
||||
result->_once = false;
|
||||
return result;
|
||||
}
|
||||
@@ -582,7 +582,8 @@ void MacroAssembler::ghash_processBlocks_wide(address field_polynomial, Register
|
||||
// v0 contains the initial state. Clear the others.
|
||||
for (int i = 1; i < unrolls; i++) {
|
||||
int ofs = register_stride * i;
|
||||
eor(ofs+v0, T16B, ofs+v0, ofs+v0); // zero each state register
|
||||
FloatRegister v0_ofs = as_FloatRegister(v0->encoding() + ofs);
|
||||
eor(v0_ofs, T16B, v0_ofs, v0_ofs); // zero each state register
|
||||
}
|
||||
|
||||
ext(a1_xor_a0, T16B, Hprime, Hprime, 0x08); // long-swap subkeyH into a1_xor_a0
|
||||
@@ -590,7 +591,8 @@ void MacroAssembler::ghash_processBlocks_wide(address field_polynomial, Register
|
||||
|
||||
// Load #unrolls blocks of data
|
||||
for (int ofs = 0; ofs < unrolls * register_stride; ofs += register_stride) {
|
||||
ld1(v2+ofs, T16B, post(data, 0x10));
|
||||
FloatRegister v2_ofs = as_FloatRegister(v2->encoding() + ofs);
|
||||
ld1(v2_ofs, T16B, post(data, 0x10));
|
||||
}
|
||||
|
||||
// Register assignments, replicated across 4 clones, v0 ... v23
|
||||
@@ -623,8 +625,10 @@ void MacroAssembler::ghash_processBlocks_wide(address field_polynomial, Register
|
||||
|
||||
// Xor data into current state
|
||||
for (int ofs = 0; ofs < unrolls * register_stride; ofs += register_stride) {
|
||||
rbit((v2+ofs), T16B, (v2+ofs));
|
||||
eor((v2+ofs), T16B, v0+ofs, (v2+ofs)); // bit-swapped data ^ bit-swapped state
|
||||
FloatRegister v0_ofs = as_FloatRegister(v0->encoding() + ofs);
|
||||
FloatRegister v2_ofs = as_FloatRegister(v2->encoding() + ofs);
|
||||
rbit(v2_ofs, T16B, v2_ofs);
|
||||
eor(v2_ofs, T16B, v0_ofs, v2_ofs); // bit-swapped data ^ bit-swapped state
|
||||
}
|
||||
|
||||
// Generate fully-unrolled multiply-reduce in two stages.
|
||||
@@ -651,24 +655,31 @@ void MacroAssembler::ghash_processBlocks_wide(address field_polynomial, Register
|
||||
// First, we multiply/reduce each clone by the appropriate power of H.
|
||||
for (int i = 0; i < unrolls; i++) {
|
||||
int ofs = register_stride * i;
|
||||
FloatRegister v0_ofs = as_FloatRegister(v0->encoding() + ofs);
|
||||
FloatRegister v1_ofs = as_FloatRegister(v1->encoding() + ofs);
|
||||
FloatRegister v2_ofs = as_FloatRegister(v2->encoding() + ofs);
|
||||
FloatRegister v3_ofs = as_FloatRegister(v3->encoding() + ofs);
|
||||
FloatRegister v4_ofs = as_FloatRegister(v4->encoding() + ofs);
|
||||
FloatRegister v5_ofs = as_FloatRegister(v5->encoding() + ofs);
|
||||
|
||||
ldrq(Hprime, Address(subkeyH, 16 * (unrolls - i - 1)));
|
||||
|
||||
rbit(v2+ofs, T16B, v2+ofs);
|
||||
eor(v2+ofs, T16B, ofs+v0, v2+ofs); // bit-swapped data ^ bit-swapped state
|
||||
rbit(v2_ofs, T16B, v2_ofs);
|
||||
eor(v2_ofs, T16B, v0_ofs, v2_ofs); // bit-swapped data ^ bit-swapped state
|
||||
|
||||
rev64(Hprime, T16B, Hprime);
|
||||
rbit(Hprime, T16B, Hprime);
|
||||
ext(a1_xor_a0, T16B, Hprime, Hprime, 0x08); // long-swap subkeyH into a1_xor_a0
|
||||
eor(a1_xor_a0, T16B, a1_xor_a0, Hprime); // xor subkeyH into subkeyL (Karatsuba: (A1+A0))
|
||||
ghash_modmul(/*result*/v0+ofs, /*result_lo*/v5+ofs, /*result_hi*/v4+ofs, /*b*/v2+ofs,
|
||||
ghash_modmul(/*result*/v0_ofs, /*result_lo*/v5_ofs, /*result_hi*/v4_ofs, /*b*/v2_ofs,
|
||||
Hprime, vzr, a1_xor_a0, p,
|
||||
/*temps*/v1+ofs, v3+ofs, /* reuse b*/v2+ofs);
|
||||
/*temps*/v1_ofs, v3_ofs, /* reuse b*/v2_ofs);
|
||||
}
|
||||
|
||||
// Then we sum the results.
|
||||
for (int i = 0; i < unrolls - 1; i++) {
|
||||
int ofs = register_stride * i;
|
||||
eor(v0, T16B, v0, v0 + register_stride + ofs);
|
||||
for (int i = 1; i < unrolls; i++) {
|
||||
FloatRegister v0_ofs = as_FloatRegister(v0->encoding() + register_stride * i);
|
||||
eor(v0, T16B, v0, v0_ofs);
|
||||
}
|
||||
|
||||
sub(blocks, blocks, (unsigned char)unrolls);
|
||||
|
||||
@@ -160,7 +160,7 @@ address NativeCall::destination() const {
|
||||
address destination = instruction_address() + displacement();
|
||||
|
||||
// Do we use a trampoline stub for this call?
|
||||
CodeBlob* cb = CodeCache::find_blob_unsafe(addr); // Else we get assertion if nmethod is zombie.
|
||||
CodeBlob* cb = CodeCache::find_blob(addr);
|
||||
assert(cb && cb->is_nmethod(), "sanity");
|
||||
nmethod *nm = (nmethod *)cb;
|
||||
if (nm->stub_contains(destination) && is_NativeCallTrampolineStub_at(destination)) {
|
||||
@@ -456,7 +456,7 @@ bool NativeInstruction::is_movk() {
|
||||
return Instruction_aarch64::extract(int_at(0), 30, 23) == 0b11100101;
|
||||
}
|
||||
|
||||
bool NativeInstruction::is_sigill_zombie_not_entrant() {
|
||||
bool NativeInstruction::is_sigill_not_entrant() {
|
||||
return uint_at(0) == 0xd4bbd5a1; // dcps1 #0xdead
|
||||
}
|
||||
|
||||
@@ -471,13 +471,13 @@ bool NativeInstruction::is_stop() {
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
// MT-safe inserting of a jump over a jump or a nop (used by
|
||||
// nmethod::make_not_entrant_or_zombie)
|
||||
// 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_zombie_not_entrant(),
|
||||
|| nativeInstruction_at(verified_entry)->is_sigill_not_entrant(),
|
||||
"Aarch64 cannot replace non-jump with jump");
|
||||
|
||||
// Patch this nmethod atomically.
|
||||
@@ -488,8 +488,7 @@ void NativeJump::patch_verified_entry(address entry, address verified_entry, add
|
||||
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 or zombie.
|
||||
// We use an illegal instruction for marking a method as not_entrant.
|
||||
NativeIllegalInstruction::insert(verified_entry);
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
bool is_safepoint_poll();
|
||||
bool is_movz();
|
||||
bool is_movk();
|
||||
bool is_sigill_zombie_not_entrant();
|
||||
bool is_sigill_not_entrant();
|
||||
bool is_stop();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -34,7 +34,7 @@ address RegisterMap::pd_location(VMReg base_reg, int slot_idx) const {
|
||||
// the upper slots by offsetting from the base address.
|
||||
assert(base_reg->is_concrete(), "must pass base reg");
|
||||
int base_reg_enc = (base_reg->value() - ConcreteRegisterImpl::max_gpr) /
|
||||
FloatRegisterImpl::max_slots_per_register;
|
||||
FloatRegister::max_slots_per_register;
|
||||
intptr_t offset_in_bytes = slot_idx * VMRegImpl::stack_slot_size;
|
||||
address base_location = location(base_reg, nullptr);
|
||||
if (base_location != NULL) {
|
||||
|
||||
@@ -26,45 +26,36 @@
|
||||
#include "precompiled.hpp"
|
||||
#include "register_aarch64.hpp"
|
||||
|
||||
REGISTER_IMPL_DEFINITION(Register, RegisterImpl, RegisterImpl::number_of_declared_registers);
|
||||
REGISTER_IMPL_DEFINITION(FloatRegister, FloatRegisterImpl, FloatRegisterImpl::number_of_registers);
|
||||
REGISTER_IMPL_DEFINITION(PRegister, PRegisterImpl, PRegisterImpl::number_of_registers);
|
||||
Register::RegisterImpl all_RegisterImpls [Register::number_of_declared_registers + 1];
|
||||
FloatRegister::FloatRegisterImpl all_FloatRegisterImpls[FloatRegister::number_of_registers + 1];
|
||||
PRegister::PRegisterImpl all_PRegisterImpls [PRegister::number_of_registers + 1];
|
||||
|
||||
const int ConcreteRegisterImpl::max_gpr = RegisterImpl::number_of_registers *
|
||||
RegisterImpl::max_slots_per_register;
|
||||
|
||||
const int ConcreteRegisterImpl::max_fpr
|
||||
= ConcreteRegisterImpl::max_gpr +
|
||||
FloatRegisterImpl::number_of_registers * FloatRegisterImpl::max_slots_per_register;
|
||||
|
||||
const int ConcreteRegisterImpl::max_pr
|
||||
= ConcreteRegisterImpl::max_fpr +
|
||||
PRegisterImpl::number_of_registers * PRegisterImpl::max_slots_per_register;
|
||||
|
||||
const char* RegisterImpl::name() const {
|
||||
static const char *const names[number_of_registers] = {
|
||||
const char* Register::RegisterImpl::name() const {
|
||||
static const char *const names[number_of_declared_registers + 1] = {
|
||||
"noreg",
|
||||
"c_rarg0", "c_rarg1", "c_rarg2", "c_rarg3", "c_rarg4", "c_rarg5", "c_rarg6", "c_rarg7",
|
||||
"rscratch1", "rscratch2", "r10", "r11", "r12", "r13", "r14", "r15",
|
||||
"r16", "r17", "r18_tls", "r19", "resp", "rdispatch", "rbcp", "r23",
|
||||
"rlocals", "r25", "rcpool", "rheapbase", "rthread", "rfp", "lr", "sp"
|
||||
"rlocals", "r25", "rcpool", "rheapbase", "rthread", "rfp", "lr", "r31_sp",
|
||||
"zp", "sp"
|
||||
};
|
||||
return is_valid() ? names[encoding()] : "noreg";
|
||||
return names[raw_encoding() + 1];
|
||||
}
|
||||
|
||||
const char* FloatRegisterImpl::name() const {
|
||||
const char* FloatRegister::FloatRegisterImpl::name() const {
|
||||
static const char *const names[number_of_registers] = {
|
||||
"v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7",
|
||||
"v8", "v9", "v10", "v11", "v12", "v13", "v14", "v15",
|
||||
"v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23",
|
||||
"v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31"
|
||||
};
|
||||
return is_valid() ? names[encoding()] : "noreg";
|
||||
return is_valid() ? names[encoding()] : "fnoreg";
|
||||
}
|
||||
|
||||
const char* PRegisterImpl::name() const {
|
||||
const char* PRegister::PRegisterImpl::name() const {
|
||||
static const char *const names[number_of_registers] = {
|
||||
"p0", "p1", "p2", "p3", "p4", "p5", "p6", "p7",
|
||||
"p8", "p9", "p10", "p11", "p12", "p13", "p14", "p15"
|
||||
};
|
||||
return is_valid() ? names[encoding()] : "noreg";
|
||||
return is_valid() ? names[encoding()] : "pnoreg";
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user