< prev index next >

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

Print this page




  77               // x86 variants
  78               new OrPredicate(new CPUSpecificPredicate("amd64.*",   new String[] { "sha"          }, null),
  79               new OrPredicate(new CPUSpecificPredicate("i386.*",    new String[] { "sha"          }, null),
  80               new OrPredicate(new CPUSpecificPredicate("x86.*",     new String[] { "sha"          }, null),
  81               new OrPredicate(new CPUSpecificPredicate("amd64.*",   new String[] { "avx2", "bmi2" }, null),
  82                               new CPUSpecificPredicate("x86_64",    new String[] { "avx2", "bmi2" }, null))))))))));
  83 
  84     public static final BooleanSupplier SHA512_INSTRUCTION_AVAILABLE
  85             = new OrPredicate(new CPUSpecificPredicate("aarch64.*", new String[] { "sha512"       }, null),
  86               new OrPredicate(new CPUSpecificPredicate("s390.*",    new String[] { "sha512"       }, null),
  87               new OrPredicate(new CPUSpecificPredicate("sparc.*",   new String[] { "sha512"       }, null),
  88               new OrPredicate(new CPUSpecificPredicate("ppc64.*",   new String[] { "sha"          }, null),
  89               new OrPredicate(new CPUSpecificPredicate("ppc64le.*", new String[] { "sha"          }, null),
  90               // x86 variants
  91               new OrPredicate(new CPUSpecificPredicate("amd64.*",   new String[] { "sha"          }, null),
  92               new OrPredicate(new CPUSpecificPredicate("i386.*",    new String[] { "sha"          }, null),
  93               new OrPredicate(new CPUSpecificPredicate("x86.*",     new String[] { "sha"          }, null),
  94               new OrPredicate(new CPUSpecificPredicate("amd64.*",   new String[] { "avx2", "bmi2" }, null),
  95                               new CPUSpecificPredicate("x86_64",    new String[] { "avx2", "bmi2" }, null))))))))));
  96 



  97     public static final BooleanSupplier ANY_SHA_INSTRUCTION_AVAILABLE
  98             = new OrPredicate(IntrinsicPredicates.SHA1_INSTRUCTION_AVAILABLE,
  99                     new OrPredicate(
 100                             IntrinsicPredicates.SHA256_INSTRUCTION_AVAILABLE,
 101                             IntrinsicPredicates.SHA512_INSTRUCTION_AVAILABLE));
 102 
 103     public static final BooleanSupplier SHA1_INTRINSICS_AVAILABLE
 104             = new AndPredicate(IntrinsicPredicates.COMPILABLE_BY_C2,
 105                                IntrinsicPredicates.isIntrinsicAvailable("sun.security.provider.SHA", "implCompress0"));
 106 
 107     public static final BooleanSupplier SHA256_INTRINSICS_AVAILABLE
 108             = new AndPredicate(IntrinsicPredicates.COMPILABLE_BY_C2,
 109                                IntrinsicPredicates.isIntrinsicAvailable("sun.security.provider.SHA2", "implCompress0"));
 110 
 111     public static final BooleanSupplier SHA512_INTRINSICS_AVAILABLE
 112             = new AndPredicate(IntrinsicPredicates.COMPILABLE_BY_C2,
 113                                IntrinsicPredicates.isIntrinsicAvailable("sun.security.provider.SHA5", "implCompress0"));
 114 
 115     private static BooleanSupplier isIntrinsicAvailable(String klass, String method) {
 116         try {


  77               // x86 variants
  78               new OrPredicate(new CPUSpecificPredicate("amd64.*",   new String[] { "sha"          }, null),
  79               new OrPredicate(new CPUSpecificPredicate("i386.*",    new String[] { "sha"          }, null),
  80               new OrPredicate(new CPUSpecificPredicate("x86.*",     new String[] { "sha"          }, null),
  81               new OrPredicate(new CPUSpecificPredicate("amd64.*",   new String[] { "avx2", "bmi2" }, null),
  82                               new CPUSpecificPredicate("x86_64",    new String[] { "avx2", "bmi2" }, null))))))))));
  83 
  84     public static final BooleanSupplier SHA512_INSTRUCTION_AVAILABLE
  85             = new OrPredicate(new CPUSpecificPredicate("aarch64.*", new String[] { "sha512"       }, null),
  86               new OrPredicate(new CPUSpecificPredicate("s390.*",    new String[] { "sha512"       }, null),
  87               new OrPredicate(new CPUSpecificPredicate("sparc.*",   new String[] { "sha512"       }, null),
  88               new OrPredicate(new CPUSpecificPredicate("ppc64.*",   new String[] { "sha"          }, null),
  89               new OrPredicate(new CPUSpecificPredicate("ppc64le.*", new String[] { "sha"          }, null),
  90               // x86 variants
  91               new OrPredicate(new CPUSpecificPredicate("amd64.*",   new String[] { "sha"          }, null),
  92               new OrPredicate(new CPUSpecificPredicate("i386.*",    new String[] { "sha"          }, null),
  93               new OrPredicate(new CPUSpecificPredicate("x86.*",     new String[] { "sha"          }, null),
  94               new OrPredicate(new CPUSpecificPredicate("amd64.*",   new String[] { "avx2", "bmi2" }, null),
  95                               new CPUSpecificPredicate("x86_64",    new String[] { "avx2", "bmi2" }, null))))))))));
  96 
  97     public static final BooleanSupplier AARCH32_NEON_AVAILABLE
  98             =                 new CPUSpecificPredicate("arm.*",     new String[] { "neon" },         null);
  99 
 100     public static final BooleanSupplier ANY_SHA_INSTRUCTION_AVAILABLE
 101             = new OrPredicate(IntrinsicPredicates.SHA1_INSTRUCTION_AVAILABLE,
 102                     new OrPredicate(
 103                             IntrinsicPredicates.SHA256_INSTRUCTION_AVAILABLE,
 104                             IntrinsicPredicates.SHA512_INSTRUCTION_AVAILABLE));
 105 
 106     public static final BooleanSupplier SHA1_INTRINSICS_AVAILABLE
 107             = new AndPredicate(IntrinsicPredicates.COMPILABLE_BY_C2,
 108                                IntrinsicPredicates.isIntrinsicAvailable("sun.security.provider.SHA", "implCompress0"));
 109 
 110     public static final BooleanSupplier SHA256_INTRINSICS_AVAILABLE
 111             = new AndPredicate(IntrinsicPredicates.COMPILABLE_BY_C2,
 112                                IntrinsicPredicates.isIntrinsicAvailable("sun.security.provider.SHA2", "implCompress0"));
 113 
 114     public static final BooleanSupplier SHA512_INTRINSICS_AVAILABLE
 115             = new AndPredicate(IntrinsicPredicates.COMPILABLE_BY_C2,
 116                                IntrinsicPredicates.isIntrinsicAvailable("sun.security.provider.SHA5", "implCompress0"));
 117 
 118     private static BooleanSupplier isIntrinsicAvailable(String klass, String method) {
 119         try {
< prev index next >