< prev index next >

test/compiler/intrinsics/montgomerymultiply/MontgomeryMultiplyTest.java

Print this page
rev 9959 : 8148012: get rid of slash-dot-dot in @library directives
Reviewed-by:
rev 9213 : 8139907: compiler/intrinsics/montgomerymultiply/MontgomeryMultiplyTest.java fails with timeout
Summary: Change MontgomeryMultiplyTest.java test to execute only on platforms on which the tested intrinsics are available.
Reviewed-by: kvn, neliasso
rev 8619 : 8130150: Implement BigInteger.montgomeryMultiply intrinsic
Summary: Add montgomeryMultiply intrinsics
Reviewed-by: kvn


  25 
  26 import java.lang.invoke.MethodHandle;
  27 import java.lang.invoke.MethodHandles;
  28 import java.lang.invoke.MethodType;
  29 import java.lang.reflect.Constructor;
  30 import java.lang.reflect.Executable;
  31 import java.lang.reflect.Field;
  32 import java.lang.reflect.Method;
  33 import java.math.BigInteger;
  34 import java.util.Arrays;
  35 import java.util.Random;
  36 
  37 import sun.hotspot.WhiteBox;
  38 
  39 import jdk.test.lib.Platform;
  40 
  41 /**
  42  * @test
  43  * @bug 8130150 8131779 8139907
  44  * @summary Verify that the Montgomery multiply and square intrinsic works and correctly checks their arguments.
  45  * @library /testlibrary /../../test/lib
  46  * @library /testlibrary
  47  * @build MontgomeryMultiplyTest
  48  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  49  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  50  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI MontgomeryMultiplyTest
  51  */
  52 
  53 public class MontgomeryMultiplyTest {
  54 
  55     private static final WhiteBox wb = WhiteBox.getWhiteBox();
  56 
  57     /* Compilation level corresponding to C2. */
  58     private static final int COMP_LEVEL_FULL_OPTIMIZATION = 4;
  59 
  60     static final MethodHandles.Lookup lookup = MethodHandles.lookup();
  61 
  62     static final MethodHandle montgomeryMultiplyHandle, montgomerySquareHandle;
  63     static final MethodHandle bigIntegerConstructorHandle;
  64     static final Field bigIntegerMagField;
  65 




  25 
  26 import java.lang.invoke.MethodHandle;
  27 import java.lang.invoke.MethodHandles;
  28 import java.lang.invoke.MethodType;
  29 import java.lang.reflect.Constructor;
  30 import java.lang.reflect.Executable;
  31 import java.lang.reflect.Field;
  32 import java.lang.reflect.Method;
  33 import java.math.BigInteger;
  34 import java.util.Arrays;
  35 import java.util.Random;
  36 
  37 import sun.hotspot.WhiteBox;
  38 
  39 import jdk.test.lib.Platform;
  40 
  41 /**
  42  * @test
  43  * @bug 8130150 8131779 8139907
  44  * @summary Verify that the Montgomery multiply and square intrinsic works and correctly checks their arguments.
  45  * @library /testlibrary /test/lib
  46  * @library /testlibrary
  47  * @build MontgomeryMultiplyTest
  48  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  49  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  50  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI MontgomeryMultiplyTest
  51  */
  52 
  53 public class MontgomeryMultiplyTest {
  54 
  55     private static final WhiteBox wb = WhiteBox.getWhiteBox();
  56 
  57     /* Compilation level corresponding to C2. */
  58     private static final int COMP_LEVEL_FULL_OPTIMIZATION = 4;
  59 
  60     static final MethodHandles.Lookup lookup = MethodHandles.lookup();
  61 
  62     static final MethodHandle montgomeryMultiplyHandle, montgomerySquareHandle;
  63     static final MethodHandle bigIntegerConstructorHandle;
  64     static final Field bigIntegerMagField;
  65 


< prev index next >