8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8066900
27 * @summary FP registers are not properly restored by C1 when handling exceptions
28 * @run main/othervm -Xbatch SumTest
29 *
30 */
31 public class SumTest {
32 private static class Sum {
33
34 double[] sums;
35
36 /**
37 * Construct empty Sum
38 */
39 public Sum() {
40 sums = new double[0];
41 }
42
43 /**
44 * Return the sum of all numbers added to this Sum
45 *
46 * @return the sum
47 */
48 final public double getSum() {
49 double sum = 0;
50 for (final double s : sums) {
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8066900
27 * @summary FP registers are not properly restored by C1 when handling exceptions
28 *
29 * @run main/othervm -Xbatch compiler.exceptions.SumTest
30 */
31
32 package compiler.exceptions;
33
34 public class SumTest {
35 private static class Sum {
36
37 double[] sums;
38
39 /**
40 * Construct empty Sum
41 */
42 public Sum() {
43 sums = new double[0];
44 }
45
46 /**
47 * Return the sum of all numbers added to this Sum
48 *
49 * @return the sum
50 */
51 final public double getSum() {
52 double sum = 0;
53 for (final double s : sums) {
|