< prev index next >

test/compiler/testlibrary/sha/predicate/IntrinsicPredicates.java

Print this page




  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      */
  51     private static final BooleanSupplier COMPILABLE_BY_C2 = () -> {
  52         boolean isTiered = IntrinsicPredicates.WHITE_BOX.getBooleanVMFlag(
  53                 "TieredCompilation");
  54         long tieredMaxLevel = IntrinsicPredicates.WHITE_BOX.getIntxVMFlag(
  55                 "TieredStopAtLevel");
  56         boolean maxLevelIsReachable = (tieredMaxLevel
  57                 == IntrinsicPredicates.TIERED_MAX_LEVEL);
  58         return Platform.isServer() && (!isTiered || maxLevelIsReachable);
  59     };
  60 
  61     public static final BooleanSupplier SHA1_INSTRUCTION_AVAILABLE
  62             = new CPUSpecificPredicate("sparc.*", new String[] { "sha1" },
  63                     null);



  64 
  65     public static final BooleanSupplier SHA256_INSTRUCTION_AVAILABLE
  66             = new OrPredicate(new CPUSpecificPredicate("sparc.*",   new String[] { "sha256" },


  67                                                        null),
  68               new OrPredicate(new CPUSpecificPredicate("ppc64.*",   new String[] { "sha"    },
  69                                                        null),
  70                               new CPUSpecificPredicate("ppc64le.*", new String[] { "sha"    },
  71                                                        null)));
  72 
  73     public static final BooleanSupplier SHA512_INSTRUCTION_AVAILABLE
  74             = new OrPredicate(new CPUSpecificPredicate("sparc.*",   new String[] { "sha512" },



  75                                                        null),
  76               new OrPredicate(new CPUSpecificPredicate("ppc64.*",   new String[] { "sha"    },
  77                                                        null),
  78                               new CPUSpecificPredicate("ppc64le.*", new String[] { "sha"    },
  79                                                        null)));
  80 
  81     public static final BooleanSupplier ANY_SHA_INSTRUCTION_AVAILABLE
  82             = new OrPredicate(IntrinsicPredicates.SHA1_INSTRUCTION_AVAILABLE,
  83                     new OrPredicate(
  84                             IntrinsicPredicates.SHA256_INSTRUCTION_AVAILABLE,
  85                             IntrinsicPredicates.SHA512_INSTRUCTION_AVAILABLE));
  86 
  87     public static final BooleanSupplier SHA1_INTRINSICS_AVAILABLE
  88             = new AndPredicate(new AndPredicate(
  89                     IntrinsicPredicates.SHA1_INSTRUCTION_AVAILABLE,
  90                     IntrinsicPredicates.COMPILABLE_BY_C2),
  91                 IntrinsicPredicates.booleanOptionValue("UseSHA1Intrinsics"));
  92 
  93     public static final BooleanSupplier SHA256_INTRINSICS_AVAILABLE
  94             = new AndPredicate(new AndPredicate(
  95                     IntrinsicPredicates.SHA256_INSTRUCTION_AVAILABLE,
  96                     IntrinsicPredicates.COMPILABLE_BY_C2),
  97                 IntrinsicPredicates.booleanOptionValue("UseSHA256Intrinsics"));
  98 
  99     public static final BooleanSupplier SHA512_INTRINSICS_AVAILABLE


  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      */
  51     private static final BooleanSupplier COMPILABLE_BY_C2 = () -> {
  52         boolean isTiered = IntrinsicPredicates.WHITE_BOX.getBooleanVMFlag(
  53                 "TieredCompilation");
  54         long tieredMaxLevel = IntrinsicPredicates.WHITE_BOX.getIntxVMFlag(
  55                 "TieredStopAtLevel");
  56         boolean maxLevelIsReachable = (tieredMaxLevel
  57                 == IntrinsicPredicates.TIERED_MAX_LEVEL);
  58         return Platform.isServer() && (!isTiered || maxLevelIsReachable);
  59     };
  60 
  61     public static final BooleanSupplier SHA1_INSTRUCTION_AVAILABLE
  62             = new OrPredicate(
  63                     new CPUSpecificPredicate("sparc.*", new String[] { "sha1" },
  64                             null),
  65                     new CPUSpecificPredicate("aarch64", new String[] { "sha1" },
  66                             null));
  67 
  68     public static final BooleanSupplier SHA256_INSTRUCTION_AVAILABLE
  69             = new OrPredicate(new CPUSpecificPredicate("aarch64", new String[] { "sha256" },
  70                                                        null),
  71               new OrPredicate(new CPUSpecificPredicate("sparc.*",   new String[] { "sha256" },
  72                                                        null),
  73               new OrPredicate(new CPUSpecificPredicate("ppc64.*",   new String[] { "sha"    },
  74                                                        null),
  75                               new CPUSpecificPredicate("ppc64le.*", new String[] { "sha"    },
  76                                                        null))));
  77 
  78     public static final BooleanSupplier SHA512_INSTRUCTION_AVAILABLE
  79             = new OrPredicate(
  80                     new CPUSpecificPredicate("aarch64", new String[] { "sha512" },
  81                                              null),
  82                     new OrPredicate(new CPUSpecificPredicate("sparc.*",   new String[] { "sha512" },
  83                                                              null),
  84                     new OrPredicate(new CPUSpecificPredicate("ppc64.*",   new String[] { "sha"    },
  85                                                        null),
  86                     new CPUSpecificPredicate("ppc64le.*", new String[] { "sha"    },
  87                                              null))));
  88 
  89     public static final BooleanSupplier ANY_SHA_INSTRUCTION_AVAILABLE
  90             = new OrPredicate(IntrinsicPredicates.SHA1_INSTRUCTION_AVAILABLE,
  91                     new OrPredicate(
  92                             IntrinsicPredicates.SHA256_INSTRUCTION_AVAILABLE,
  93                             IntrinsicPredicates.SHA512_INSTRUCTION_AVAILABLE));
  94 
  95     public static final BooleanSupplier SHA1_INTRINSICS_AVAILABLE
  96             = new AndPredicate(new AndPredicate(
  97                     IntrinsicPredicates.SHA1_INSTRUCTION_AVAILABLE,
  98                     IntrinsicPredicates.COMPILABLE_BY_C2),
  99                 IntrinsicPredicates.booleanOptionValue("UseSHA1Intrinsics"));
 100 
 101     public static final BooleanSupplier SHA256_INTRINSICS_AVAILABLE
 102             = new AndPredicate(new AndPredicate(
 103                     IntrinsicPredicates.SHA256_INSTRUCTION_AVAILABLE,
 104                     IntrinsicPredicates.COMPILABLE_BY_C2),
 105                 IntrinsicPredicates.booleanOptionValue("UseSHA256Intrinsics"));
 106 
 107     public static final BooleanSupplier SHA512_INTRINSICS_AVAILABLE
< prev index next >