Skip to content
Permalink
Browse files
Automatic merge of jdk:master into master
  • Loading branch information
duke committed Mar 23, 2021
2 parents 802a2e8 + 7b6efd3 commit caca3540342dd4ccfe2e71d6979f32a2daec2cb1
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 caca354

Please sign in to comment.