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(); | 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 /test/lib / 28 * @modules java.base/jdk.internal.misc 29 * java.management 30 * 31 * @build sun.hotspot.WhiteBox 32 * @run driver ClassFileInstaller sun.hotspot.WhiteBox 33 * sun.hotspot.WhiteBox$WhiteBoxPermission 34 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions 35 * -XX:+WhiteBoxAPI -Xbatch 36 * compiler.cpuflags.TestAESIntrinsicsOnUnsupportedConfig 37 */ 38 39 package compiler.cpuflags; 40 41 import jdk.test.lib.process.OutputAnalyzer; 42 import jdk.test.lib.process.ProcessTools; 43 import jdk.test.lib.cli.predicate.NotPredicate; 44 45 public class TestAESIntrinsicsOnUnsupportedConfig extends AESIntrinsicsBase { 46 47 private static final String INTRINSICS_NOT_AVAILABLE_MSG = "warning: AES " 48 + "intrinsics are not available on this CPU"; 49 private static final String AES_NOT_AVAILABLE_MSG = "warning: AES " 50 + "instructions are not available on this CPU"; 51 52 /** 53 * Constructs new TestAESIntrinsicsOnUnsupportedConfig that will be 54 * executed only if AESSupportPredicate returns false 55 */ 56 private TestAESIntrinsicsOnUnsupportedConfig() { 57 super(new NotPredicate(AESIntrinsicsBase.AES_SUPPORTED_PREDICATE)); 58 } 59 60 @Override 61 protected void runTestCases() throws Throwable { 62 testUseAES(); |