33 * @run main/othervm -Xbootclasspath/a:. -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
34 * -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCountTrailingZerosInstruction TZcntTestI
35 */
36
37 import java.lang.reflect.Method;
38
39 public class TZcntTestI extends BmiIntrinsicBase.BmiTestCase_x64 {
40
41 protected TZcntTestI(Method method) {
42 super(method);
43 instrMask = new byte[]{(byte) 0xFF, (byte) 0xFF, (byte) 0xFF};
44 instrPattern = new byte[]{(byte) 0xF3, (byte) 0x0F, (byte) 0xBC};
45
46 instrMask_x64 = new byte[]{(byte) 0xFF, (byte) 0x00, (byte) 0xFF, (byte) 0xFF};
47 instrPattern_x64 = new byte[]{(byte) 0xF3, (byte) 0x00, (byte) 0x0F, (byte) 0xBC};
48 }
49
50 public static void main(String[] args) throws Exception {
51 // j.l.Integer and Long should be loaded to allow a compilation of the methods that use their methods
52 System.out.println("class java.lang.Integer should be loaded. Proof: " + Integer.class);
53 BmiIntrinsicBase.verifyTestCase(TZcntTestI::new, TestTzcntI.TzcntIExpr.class.getDeclaredMethods());
54 }
55
56 @Override
57 protected String getVMFlag() {
58 return "UseCountTrailingZerosInstruction";
59 }
60 }
|
33 * @run main/othervm -Xbootclasspath/a:. -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
34 * -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCountTrailingZerosInstruction TZcntTestI
35 */
36
37 import java.lang.reflect.Method;
38
39 public class TZcntTestI extends BmiIntrinsicBase.BmiTestCase_x64 {
40
41 protected TZcntTestI(Method method) {
42 super(method);
43 instrMask = new byte[]{(byte) 0xFF, (byte) 0xFF, (byte) 0xFF};
44 instrPattern = new byte[]{(byte) 0xF3, (byte) 0x0F, (byte) 0xBC};
45
46 instrMask_x64 = new byte[]{(byte) 0xFF, (byte) 0x00, (byte) 0xFF, (byte) 0xFF};
47 instrPattern_x64 = new byte[]{(byte) 0xF3, (byte) 0x00, (byte) 0x0F, (byte) 0xBC};
48 }
49
50 public static void main(String[] args) throws Exception {
51 // j.l.Integer and Long should be loaded to allow a compilation of the methods that use their methods
52 System.out.println("class java.lang.Integer should be loaded. Proof: " + Integer.class);
53 // Avoid uncommon traps.
54 System.out.println("Num trailing zeroes: " + new TestTzcntI.TzcntIExpr().intExpr(12341341));
55 BmiIntrinsicBase.verifyTestCase(TZcntTestI::new, TestTzcntI.TzcntIExpr.class.getDeclaredMethods());
56 }
57
58 @Override
59 protected String getVMFlag() {
60 return "UseCountTrailingZerosInstruction";
61 }
62 }
|