Skip to content
Permalink
Browse files
8263904: compiler/intrinsics/bmi/verifycode/BzhiTestI2L.java fails on…
… x86_32

Reviewed-by: kvn, thartmann
  • Loading branch information
mgkwill authored and TobiHartmann committed Mar 23, 2021
1 parent 036ae0e commit 7b6efd3b86ebf2f448d676c7b96a1c759382a4b0
Showing 2 changed files with 6 additions and 1 deletion.
@@ -37,11 +37,16 @@

package compiler.intrinsics.bmi;

import jdk.test.lib.Platform;
import sun.hotspot.cpuinfo.CPUInfo;

public class TestBzhiI2L {

public static void main(String args[]) throws Throwable {
if (Platform.isX86()) {
System.out.println("INFO: Bzhiq not implemented for x86_32, test SKIPPED" );
return;
}
if (!CPUInfo.hasFeature("bmi2")) {
System.out.println("INFO: CPU does not support bmi2 feature, test SKIPPED" );
return;
@@ -110,7 +110,7 @@ protected void checkCompilation(Executable executable, int level) {

protected void checkEmittedCode(Executable executable) {
final byte[] nativeCode = NMethod.get(executable, false).insts;
final byte[] matchInstrPattern = (((BmiTestCase) testCase).getTestCaseX64()) ? ((BmiTestCase_x64) testCase).getInstrPattern_x64() : ((BmiTestCase) testCase).getInstrPattern();
final byte[] matchInstrPattern = (((BmiTestCase) testCase).getTestCaseX64() && Platform.isX64()) ? ((BmiTestCase_x64) testCase).getInstrPattern_x64() : ((BmiTestCase) testCase).getInstrPattern();
if (!((BmiTestCase) testCase).verifyPositive(nativeCode)) {
throw new AssertionError(testCase.name() + " " + "CPU instructions expected not found in nativeCode: " + Utils.toHexString(nativeCode) + " ---- Expected instrPattern: " +
Utils.toHexString(matchInstrPattern));

0 comments on commit 7b6efd3

Please sign in to comment.