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 package sha.predicate;
25
26 import com.oracle.java.testlibrary.Platform;
27 import com.oracle.java.testlibrary.cli.predicate.AndPredicate;
28 import com.oracle.java.testlibrary.cli.predicate.CPUSpecificPredicate;
29 import com.oracle.java.testlibrary.cli.predicate.OrPredicate;
30 import sun.hotspot.WhiteBox;
31
32 import java.util.function.BooleanSupplier;
33
34 /**
35 * Helper class aimed to provide predicates on availability of SHA-related
36 * CPU instructions and intrinsics.
37 */
38 public class IntrinsicPredicates {
39 private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
40 private static final long TIERED_MAX_LEVEL = 4L;
41 /**
42 * Boolean supplier that check if any method could be compiled by C2.
43 * Method potentially could be compiled by C2 if Server VM is used and
44 * either tiered compilation is disabled or TIERED_MAX_LEVEL tier is
45 * reachable.
46 *
47 * Please don't place this definition after SHA*_INTRINSICS_AVAILABLE
48 * definitions. Otherwise its value will be {@code null} at the time when
49 * all dependent fields will be initialized.
50 */
|
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 package sha.predicate;
25
26 import com.oracle.java.testlibrary.Platform;
27 import com.oracle.java.testlibrary.cli.predicate.AndPredicate;
28 import com.oracle.java.testlibrary.cli.predicate.CPUSpecificPredicate;
29 import com.oracle.java.testlibrary.cli.predicate.OrPredicate;
30 import jdk.testlib.WhiteBox;
31
32 import java.util.function.BooleanSupplier;
33
34 /**
35 * Helper class aimed to provide predicates on availability of SHA-related
36 * CPU instructions and intrinsics.
37 */
38 public class IntrinsicPredicates {
39 private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
40 private static final long TIERED_MAX_LEVEL = 4L;
41 /**
42 * Boolean supplier that check if any method could be compiled by C2.
43 * Method potentially could be compiled by C2 if Server VM is used and
44 * either tiered compilation is disabled or TIERED_MAX_LEVEL tier is
45 * reachable.
46 *
47 * Please don't place this definition after SHA*_INTRINSICS_AVAILABLE
48 * definitions. Otherwise its value will be {@code null} at the time when
49 * all dependent fields will be initialized.
50 */
|