< prev index next >

test/compiler/codegen/Test6797305.java

Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke


   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 6797305
  27  * @summary Add LoadUB and LoadUI opcode class
  28  *
  29  * @run main/othervm -Xcomp -XX:CompileOnly=Test6797305.loadB,Test6797305.loadB2L,Test6797305.loadUB,Test6797305.loadUBmask,Test6797305.loadUB2L,Test6797305.loadS,Test6797305.loadS2L,Test6797305.loadUS,Test6797305.loadUSmask,Test6797305.loadUS2L,Test6797305.loadI,Test6797305.loadI2L,Test6797305.loadUI2L,Test6797305.loadL Test6797305


  30  */
  31 


  32 public class Test6797305 {
  33     static final byte[]  ba = new byte[]  { -1 };
  34     static final short[] sa = new short[] { -1 };
  35     static final int[]   ia = new int[]   { -1 };
  36     static final long[]  la = new long[]  { -1 };
  37 
  38     public static void main(String[] args)
  39     {
  40         long b = loadB(ba);
  41         if (b != -1)
  42             throw new InternalError("loadB failed: " + b + " != " + -1);
  43 
  44         long b2l = loadB2L(ba);
  45         if (b2l != -1L)
  46             throw new InternalError("loadB2L failed: " + b2l + " != " + -1L);
  47 
  48         int ub = loadUB(ba);
  49         if (ub != 0xFF)
  50             throw new InternalError("loadUB failed: " + ub + " != " + 0xFF);
  51 




   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 6797305
  27  * @summary Add LoadUB and LoadUI opcode class
  28  *
  29  * @run main/othervm -Xcomp
  30  *      -XX:CompileCommand=compileonly,compiler.codegen.Test6797305::load*
  31  *      compiler.codegen.Test6797305
  32  */
  33 
  34 package compiler.codegen;
  35 
  36 public class Test6797305 {
  37     static final byte[]  ba = new byte[]  { -1 };
  38     static final short[] sa = new short[] { -1 };
  39     static final int[]   ia = new int[]   { -1 };
  40     static final long[]  la = new long[]  { -1 };
  41 
  42     public static void main(String[] args)
  43     {
  44         long b = loadB(ba);
  45         if (b != -1)
  46             throw new InternalError("loadB failed: " + b + " != " + -1);
  47 
  48         long b2l = loadB2L(ba);
  49         if (b2l != -1L)
  50             throw new InternalError("loadB2L failed: " + b2l + " != " + -1L);
  51 
  52         int ub = loadUB(ba);
  53         if (ub != 0xFF)
  54             throw new InternalError("loadUB failed: " + ub + " != " + 0xFF);
  55 


< prev index next >