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