< prev index next >

test/compiler/intrinsics/mathexact/sanity/IntrinsicBase.java

Print this page




 112                 throw new RuntimeException("Test bug, expected compilation (level): " + level + ", but level: " + compilationLevel);
 113             }
 114         }
 115     }
 116 
 117     protected abstract boolean isIntrinsicSupported();
 118 
 119     protected abstract String getIntrinsicId();
 120 
 121     protected boolean isServerVM() {
 122         return javaVmName.toLowerCase().contains("server");
 123     }
 124 
 125     static class IntTest extends IntrinsicBase {
 126         protected IntTest(MathIntrinsic.IntIntrinsic testCase) {
 127             super(testCase);
 128         }
 129 
 130         @Override
 131         protected boolean isIntrinsicSupported() {
 132             return isServerVM() && Boolean.valueOf(useMathExactIntrinsics) && (Platform.isX86() || Platform.isX64());
 133         }
 134 
 135         @Override
 136         protected String getIntrinsicId() {
 137             return "_" + testCase.name().toLowerCase() + "ExactI";
 138         }
 139     }
 140 
 141     static class LongTest extends IntrinsicBase {
 142         protected LongTest(MathIntrinsic.LongIntrinsic testCase) {
 143             super(testCase);
 144         }
 145 
 146         @Override
 147         protected boolean isIntrinsicSupported() {
 148             return isServerVM() && Boolean.valueOf(useMathExactIntrinsics) && Platform.isX64();
 149         }
 150 
 151         @Override
 152         protected String getIntrinsicId() {
 153             return "_" + testCase.name().toLowerCase() + "ExactL";
 154         }
 155     }
 156 }


 112                 throw new RuntimeException("Test bug, expected compilation (level): " + level + ", but level: " + compilationLevel);
 113             }
 114         }
 115     }
 116 
 117     protected abstract boolean isIntrinsicSupported();
 118 
 119     protected abstract String getIntrinsicId();
 120 
 121     protected boolean isServerVM() {
 122         return javaVmName.toLowerCase().contains("server");
 123     }
 124 
 125     static class IntTest extends IntrinsicBase {
 126         protected IntTest(MathIntrinsic.IntIntrinsic testCase) {
 127             super(testCase);
 128         }
 129 
 130         @Override
 131         protected boolean isIntrinsicSupported() {
 132             return isServerVM() && Boolean.valueOf(useMathExactIntrinsics) && (Platform.isX86() || Platform.isX64() ||  Platform.isAArch64());
 133         }
 134 
 135         @Override
 136         protected String getIntrinsicId() {
 137             return "_" + testCase.name().toLowerCase() + "ExactI";
 138         }
 139     }
 140 
 141     static class LongTest extends IntrinsicBase {
 142         protected LongTest(MathIntrinsic.LongIntrinsic testCase) {
 143             super(testCase);
 144         }
 145 
 146         @Override
 147         protected boolean isIntrinsicSupported() {
 148             return isServerVM() && Boolean.valueOf(useMathExactIntrinsics) && (Platform.isX64() || Platform.isAArch64());
 149         }
 150 
 151         @Override
 152         protected String getIntrinsicId() {
 153             return "_" + testCase.name().toLowerCase() + "ExactL";
 154         }
 155     }
 156 }
< prev index next >