test/compiler/intrinsics/bmi/Expr.java

Mon, 28 Jul 2014 15:06:38 -0700

author
fzhinkin
date
Mon, 28 Jul 2014 15:06:38 -0700
changeset 6997
dbb05f6d93c4
parent 0
f90c822e73f8
permissions
-rw-r--r--

8051344: JVM crashed in Compile::start() during method parsing w/ UseRTMDeopt turned on
Summary: call rtm_deopt() only if there were no compilation bailouts before.
Reviewed-by: kvn

     1 /*
     2  * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     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  */
    25 /**
    26  * Expression that should be replaced by particular instrinsic
    27  * or intruction during compilation.
    28  */
    30 public abstract class Expr {
    32     public static class MemI {
    33         public MemI(int i) {
    34             this.value = i;
    35         }
    37         public int value;
    38     }
    40     public static class MemL {
    41         public MemL(long l) {
    42             this.value = l;
    43         }
    45         public long value;
    46     }
    48     public boolean isUnaryArgumentSupported() {
    49         return false;
    50     }
    52     public boolean isIntExprSupported() {
    53         return false;
    54     }
    56     public boolean isBinaryArgumentSupported() {
    57         return false;
    58     }
    60     public boolean isLongExprSupported() {
    61         return false;
    62     }
    64     public boolean isMemExprSupported() {
    65         return false;
    66     }
    68     public int intExpr(int reg) {
    69         throw new UnsupportedOperationException();
    70     }
    72     public int intExpr(MemI mem) {
    73         throw new UnsupportedOperationException();
    74     }
    76     public int intExpr(int a, int b) {
    77         throw new UnsupportedOperationException();
    78     }
    80     public int intExpr(int a, MemI b) {
    81         throw new UnsupportedOperationException();
    82     }
    84     public int intExpr(MemI a, int b) {
    85         throw new UnsupportedOperationException();
    86     }
    88     public int intExpr(MemI a, MemI b) {
    89         throw new UnsupportedOperationException();
    90     }
    92     public long longExpr(long reg) {
    93         throw new UnsupportedOperationException();
    94     }
    96     public long longExpr(MemL mem) {
    97         throw new UnsupportedOperationException();
    98     }
   100     public long longExpr(long a, long b) {
   101         throw new UnsupportedOperationException();
   102     }
   104     public long longExpr(long a, MemL b) {
   105         throw new UnsupportedOperationException();
   106     }
   108     public long longExpr(MemL a, long b) {
   109         throw new UnsupportedOperationException();
   110     }
   112     public long longExpr(MemL a, MemL b) {
   113         throw new UnsupportedOperationException();
   114     }
   116     public static class BMIExpr extends Expr {
   118         public boolean isMemExprSupported() {
   119             return true;
   120         }
   121     }
   123     public static class BMIBinaryExpr extends BMIExpr {
   125         public boolean isBinaryArgumentSupported() {
   126             return true;
   127         }
   129     }
   131     public static class BMIUnaryExpr extends BMIExpr {
   132         public boolean isUnaryArgumentSupported() {
   133             return true;
   134         }
   135     }
   137     public static class BMIBinaryIntExpr extends BMIBinaryExpr {
   138         public boolean isIntExprSupported() {
   139             return true;
   140         }
   141     }
   143     public static class BMIBinaryLongExpr extends BMIBinaryExpr {
   144         public boolean isLongExprSupported() {
   145             return true;
   146         }
   147     }
   149     public static class BMIUnaryIntExpr extends BMIUnaryExpr {
   150         public boolean isIntExprSupported() {
   151             return true;
   152         }
   153     }
   155     public static class BMIUnaryLongExpr extends BMIUnaryExpr {
   156         public boolean isLongExprSupported() {
   157             return true;
   158         }
   159     }
   161     public static class BitCountingExpr extends Expr {
   162         public boolean isUnaryArgumentSupported() {
   163             return true;
   164         }
   165     }
   167     public static class BitCountingIntExpr extends BitCountingExpr {
   168         public boolean isIntExprSupported() {
   169             return true;
   170         }
   171     }
   173     public static class BitCountingLongExpr extends BitCountingExpr {
   174         public boolean isLongExprSupported() {
   175             return true;
   176         }
   177     }
   178 }

mercurial