7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 /*
26 * @test
27 * @library /testlibrary /test/lib /compiler/codegen/7184394 /
28 * @modules java.base/jdk.internal.misc
29 * java.management
30 * @build TestAESIntrinsicsOnUnsupportedConfig TestAESMain
31 * @run driver ClassFileInstaller sun.hotspot.WhiteBox
32 * sun.hotspot.WhiteBox$WhiteBoxPermission
33 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
34 * -XX:+WhiteBoxAPI -Xbatch TestAESIntrinsicsOnUnsupportedConfig
35 */
36
37 import jdk.test.lib.cli.predicate.NotPredicate;
38 import jdk.test.lib.OutputAnalyzer;
39 import jdk.test.lib.ProcessTools;
40
41 public class TestAESIntrinsicsOnUnsupportedConfig extends AESIntrinsicsBase {
42
43 private static final String INTRINSICS_NOT_AVAILABLE_MSG = "warning: AES "
44 + "intrinsics are not available on this CPU";
45 private static final String AES_NOT_AVAILABLE_MSG = "warning: AES "
46 + "instructions are not available on this CPU";
47
48 /**
49 * Constructs new TestAESIntrinsicsOnUnsupportedConfig that will be
50 * executed only if AESSupportPredicate returns false
51 */
52 private TestAESIntrinsicsOnUnsupportedConfig() {
53 super(new NotPredicate(AESIntrinsicsBase.AES_SUPPORTED_PREDICATE));
54 }
55
56 @Override
57 protected void runTestCases() throws Throwable {
58 testUseAES();
59 testUseAESIntrinsics();
|
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 /*
26 * @test
27 * @library /testlibrary /test/lib /
28 * @modules java.base/jdk.internal.misc
29 * java.management
30 *
31 * @build compiler.cpuflags.TestAESIntrinsicsOnUnsupportedConfig
32 * compiler.codegen.aes.TestAESMain
33 * @run driver ClassFileInstaller sun.hotspot.WhiteBox
34 * sun.hotspot.WhiteBox$WhiteBoxPermission
35 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
36 * -XX:+WhiteBoxAPI -Xbatch
37 * compiler.cpuflags.TestAESIntrinsicsOnUnsupportedConfig
38 */
39
40 package compiler.cpuflags;
41
42 import jdk.test.lib.OutputAnalyzer;
43 import jdk.test.lib.ProcessTools;
44 import jdk.test.lib.cli.predicate.NotPredicate;
45
46 public class TestAESIntrinsicsOnUnsupportedConfig extends AESIntrinsicsBase {
47
48 private static final String INTRINSICS_NOT_AVAILABLE_MSG = "warning: AES "
49 + "intrinsics are not available on this CPU";
50 private static final String AES_NOT_AVAILABLE_MSG = "warning: AES "
51 + "instructions are not available on this CPU";
52
53 /**
54 * Constructs new TestAESIntrinsicsOnUnsupportedConfig that will be
55 * executed only if AESSupportPredicate returns false
56 */
57 private TestAESIntrinsicsOnUnsupportedConfig() {
58 super(new NotPredicate(AESIntrinsicsBase.AES_SUPPORTED_PREDICATE));
59 }
60
61 @Override
62 protected void runTestCases() throws Throwable {
63 testUseAES();
64 testUseAESIntrinsics();
|