120 } else {
121 test(32 * G - 128 * M, false, 128 * M, 0, 3);
122 }
123
124 // Test ccs starting *below* 4G, but extending upwards beyond 4G. All platforms except aarch64 should pick
125 // zero based encoding. On aarch64, this test is excluded since the only valid mode would be XOR, but bit
126 // pattern for base and bit pattern would overlap.
127 if (!Platform.isAArch64()) {
128 test(4 * G - 128 * M, false, 2 * 128 * M, 0, 3);
129 }
130 // add more...
131
132 // Compact Object Header Mode:
133 // On aarch64 and x64 we expect the VM to chose the smallest possible shift value needed to cover
134 // the encoding range. We expect the encoding Base to start at the class space start - but to enforce that,
135 // we choose a high address.
136 if (Platform.isAArch64() || Platform.isX64() || Platform.isRISCV64()) {
137 long forceAddress = 32 * G;
138
139 long ccsSize = 128 * M;
140 int expectedShift = 6;
141 test(forceAddress, true, ccsSize, forceAddress, expectedShift);
142
143 ccsSize = 512 * M;
144 expectedShift = 8;
145 test(forceAddress, true, ccsSize, forceAddress, expectedShift);
146
147 ccsSize = G;
148 expectedShift = 9;
149 test(forceAddress, true, ccsSize, forceAddress, expectedShift);
150
151 ccsSize = 3 * G;
152 expectedShift = 10;
153 test(forceAddress, true, ccsSize, forceAddress, expectedShift);
154 }
155
156 // Test failure for -XX:CompressedClassBaseAddress and -Xshare:off
157 testFailure("0x0000040001000000");
158
159 }
160 }
|
120 } else {
121 test(32 * G - 128 * M, false, 128 * M, 0, 3);
122 }
123
124 // Test ccs starting *below* 4G, but extending upwards beyond 4G. All platforms except aarch64 should pick
125 // zero based encoding. On aarch64, this test is excluded since the only valid mode would be XOR, but bit
126 // pattern for base and bit pattern would overlap.
127 if (!Platform.isAArch64()) {
128 test(4 * G - 128 * M, false, 2 * 128 * M, 0, 3);
129 }
130 // add more...
131
132 // Compact Object Header Mode:
133 // On aarch64 and x64 we expect the VM to chose the smallest possible shift value needed to cover
134 // the encoding range. We expect the encoding Base to start at the class space start - but to enforce that,
135 // we choose a high address.
136 if (Platform.isAArch64() || Platform.isX64() || Platform.isRISCV64()) {
137 long forceAddress = 32 * G;
138
139 long ccsSize = 128 * M;
140 int expectedShift = 9;
141 test(forceAddress, true, ccsSize, forceAddress, expectedShift);
142
143 ccsSize = 512 * M;
144 expectedShift = 10;
145 test(forceAddress, true, ccsSize, forceAddress, expectedShift);
146
147 ccsSize = G;
148 expectedShift = 10;
149 test(forceAddress, true, ccsSize, forceAddress, expectedShift);
150
151 ccsSize = 3 * G;
152 expectedShift = 10;
153 test(forceAddress, true, ccsSize, forceAddress, expectedShift);
154 }
155
156 // Test failure for -XX:CompressedClassBaseAddress and -Xshare:off
157 testFailure("0x0000040001000000");
158
159 }
160 }
|