91 } else {
92 test(32 * G - 128 * M, false, 128 * M, 0, 3);
93 }
94
95 // Test ccs starting *below* 4G, but extending upwards beyond 4G. All platforms except aarch64 should pick
96 // zero based encoding. On aarch64, this test is excluded since the only valid mode would be XOR, but bit
97 // pattern for base and bit pattern would overlap.
98 if (!Platform.isAArch64()) {
99 test(4 * G - 128 * M, false, 2 * 128 * M, 0, 3);
100 }
101 // add more...
102
103 // Compact Object Header Mode:
104 // On aarch64 and x64 we expect the VM to chose the smallest possible shift value needed to cover
105 // the encoding range. We expect the encoding Base to start at the class space start - but to enforce that,
106 // we choose a high address.
107 if (Platform.isAArch64() || Platform.isX64() || Platform.isRISCV64()) {
108 long forceAddress = 32 * G;
109
110 long ccsSize = 128 * M;
111 int expectedShift = 6;
112 test(forceAddress, true, ccsSize, forceAddress, expectedShift);
113
114 ccsSize = 512 * M;
115 expectedShift = 8;
116 test(forceAddress, true, ccsSize, forceAddress, expectedShift);
117
118 ccsSize = G;
119 expectedShift = 9;
120 test(forceAddress, true, ccsSize, forceAddress, expectedShift);
121
122 ccsSize = 3 * G;
123 expectedShift = 10;
124 test(forceAddress, true, ccsSize, forceAddress, expectedShift);
125 }
126 }
127 }
|
91 } else {
92 test(32 * G - 128 * M, false, 128 * M, 0, 3);
93 }
94
95 // Test ccs starting *below* 4G, but extending upwards beyond 4G. All platforms except aarch64 should pick
96 // zero based encoding. On aarch64, this test is excluded since the only valid mode would be XOR, but bit
97 // pattern for base and bit pattern would overlap.
98 if (!Platform.isAArch64()) {
99 test(4 * G - 128 * M, false, 2 * 128 * M, 0, 3);
100 }
101 // add more...
102
103 // Compact Object Header Mode:
104 // On aarch64 and x64 we expect the VM to chose the smallest possible shift value needed to cover
105 // the encoding range. We expect the encoding Base to start at the class space start - but to enforce that,
106 // we choose a high address.
107 if (Platform.isAArch64() || Platform.isX64() || Platform.isRISCV64()) {
108 long forceAddress = 32 * G;
109
110 long ccsSize = 128 * M;
111 int expectedShift = 9;
112 test(forceAddress, true, ccsSize, forceAddress, expectedShift);
113
114 ccsSize = 512 * M;
115 expectedShift = 10;
116 test(forceAddress, true, ccsSize, forceAddress, expectedShift);
117
118 ccsSize = G;
119 expectedShift = 10;
120 test(forceAddress, true, ccsSize, forceAddress, expectedShift);
121
122 ccsSize = 3 * G;
123 expectedShift = 10;
124 test(forceAddress, true, ccsSize, forceAddress, expectedShift);
125 }
126 }
127 }
|