Mercurial > hg > graal-compiler
annotate test/compiler/intrinsics/mathexact/sanity/MathIntrinsic.java @ 20426:17d3ee6e9d3c
8056091: Move compiler/intrinsics/mathexact/sanity/Verifier to compiler/testlibrary and extend its functionality
Reviewed-by: kvn, iignatyev
author | fzhinkin |
---|---|
date | Mon, 08 Sep 2014 20:32:10 +0400 |
parents | d1760952ebdd |
children |
rev | line source |
---|---|
17616
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
1 /* |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
4 * |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
8 * |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
13 * accompanied this code). |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
14 * |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
18 * |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
21 * questions. |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
22 */ |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
23 |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
24 import java.lang.reflect.Executable; |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
25 import java.util.concurrent.Callable; |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
26 |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
27 public class MathIntrinsic { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
28 |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
29 enum IntIntrinsic implements CompilerWhiteBoxTest.TestCase { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
30 Add { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
31 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
32 Object execMathMethod() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
33 return intR = Math.addExact(int1, int2); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
34 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
35 }, |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
36 Subtract { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
37 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
38 Object execMathMethod() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
39 return intR = Math.subtractExact(int1, int2); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
40 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
41 }, |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
42 Multiply { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
43 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
44 Object execMathMethod() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
45 return intR = Math.multiplyExact(int1, int2); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
46 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
47 }, |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
48 Increment { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
49 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
50 Object execMathMethod() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
51 return intR = Math.incrementExact(int1); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
52 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
53 }, |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
54 Decrement { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
55 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
56 Object execMathMethod() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
57 return intR = Math.decrementExact(int1); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
58 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
59 }, |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
60 Negate { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
61 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
62 Object execMathMethod() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
63 return intR = Math.negateExact(int1); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
64 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
65 }; |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
66 protected int int1; |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
67 protected int int2; |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
68 protected int intR; |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
69 |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
70 abstract Object execMathMethod(); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
71 |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
72 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
73 public Executable getExecutable() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
74 try { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
75 return getClass().getDeclaredMethod("execMathMethod"); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
76 } catch (NoSuchMethodException e) { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
77 throw new RuntimeException("Test bug, no such method: " + e); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
78 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
79 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
80 |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
81 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
82 public Callable<Integer> getCallable() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
83 return null; |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
84 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
85 |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
86 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
87 public boolean isOsr() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
88 return false; |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
89 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
90 |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
91 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
92 |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
93 enum LongIntrinsic implements CompilerWhiteBoxTest.TestCase { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
94 Add { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
95 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
96 Object execMathMethod() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
97 return longR = Math.addExact(long1, long2); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
98 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
99 }, |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
100 Subtract { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
101 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
102 Object execMathMethod() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
103 return longR = Math.subtractExact(long1, long2); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
104 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
105 }, |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
106 Multiply { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
107 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
108 Object execMathMethod() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
109 return longR = Math.multiplyExact(long1, long2); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
110 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
111 }, |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
112 Increment { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
113 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
114 Object execMathMethod() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
115 return longR = Math.incrementExact(long1); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
116 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
117 }, |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
118 Decrement { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
119 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
120 Object execMathMethod() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
121 return longR = Math.decrementExact(long1); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
122 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
123 }, |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
124 Negate { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
125 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
126 Object execMathMethod() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
127 return longR = Math.negateExact(long1); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
128 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
129 }; |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
130 protected long long1; |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
131 protected long long2; |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
132 protected long longR; |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
133 |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
134 abstract Object execMathMethod(); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
135 |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
136 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
137 public Executable getExecutable() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
138 try { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
139 return getClass().getDeclaredMethod("execMathMethod"); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
140 } catch (NoSuchMethodException e) { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
141 throw new RuntimeException("Test bug, no such method: " + e); |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
142 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
143 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
144 |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
145 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
146 public Callable<Integer> getCallable() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
147 return null; |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
148 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
149 |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
150 @Override |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
151 public boolean isOsr() { |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
152 return false; |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
153 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
154 } |
d1760952ebdd
8028587: New tests development for intrisics for basic operators - add, neg, inc, dec, sub, mul
iignatyev
parents:
diff
changeset
|
155 } |