Merge

Tue, 04 Feb 2014 22:44:06 -0800

author
asaha
date
Tue, 04 Feb 2014 22:44:06 -0800
changeset 6751
5ef63a79aedf
parent 6750
584e4016c810
parent 6582
d3b9c107366b
child 6752
85ae37107003

Merge

THIRD_PARTY_README file | annotate | diff | comparison | revisions
     1.1 --- a/.hgtags	Fri Jan 31 16:40:58 2014 +0000
     1.2 +++ b/.hgtags	Tue Feb 04 22:44:06 2014 -0800
     1.3 @@ -413,9 +413,14 @@
     1.4  3585183c191aa6b4d0375ea659515335e1804417 hs25-b67
     1.5  df333ee12bba67e2e928f8ce1da37afd9bf95b48 jdk8-b125
     1.6  c8218f1072a0370f3ce4714469ced0613ee543ab jdk8-b126
     1.7 +d45454002494d147c0761e6b37d8a73064f3cf92 hs25-b68
     1.8 +32f017489ba5dd1bedabb9fa1d26bcc74d0a72b6 hs25-b69
     1.9 +35038da7bb9ddd367a0a6bf926dfb281aee1d554 jdk8-b127
    1.10 +874c0b4a946c362bbf20d37c2a564b39093152e6 jdk8-b128
    1.11  4a35ef38e2a7bc64df20c7700ba69b37e3ddb8b5 jdk8u5-b01
    1.12  e5561d89fe8bfc79cd6c8fcc36d270cc6a49ec6e jdk8u5-b02
    1.13  2f9eb9fcab6c42c8c84ddb44170ea33235116d84 jdk8u5-b03
    1.14  5ac720d47ab83f8eb2f5fe3641667823a0298f41 jdk8u5-b04
    1.15  b90de55aca30678ab0fec05d6a61bb3468b783d2 jdk8u5-b05
    1.16  956c0e048ef29ee9a8026fb05858abe64b4e0ceb jdk8u5-b06
    1.17 +46fa2940e6861df18a107b6b83a2df85239e5ec7 jdk8u5-b07
     2.1 --- a/src/cpu/sparc/vm/sparc.ad	Fri Jan 31 16:40:58 2014 +0000
     2.2 +++ b/src/cpu/sparc/vm/sparc.ad	Tue Feb 04 22:44:06 2014 -0800
     2.3 @@ -3355,8 +3355,8 @@
     2.4    interface(CONST_INTER);
     2.5  %}
     2.6  
     2.7 -// Unsigned (positive) Integer Immediate: 13-bit
     2.8 -operand immU13() %{
     2.9 +// Unsigned Integer Immediate: 12-bit (non-negative that fits in simm13)
    2.10 +operand immU12() %{
    2.11    predicate((0 <= n->get_int()) && Assembler::is_simm13(n->get_int()));
    2.12    match(ConI);
    2.13    op_cost(0);
    2.14 @@ -3392,6 +3392,17 @@
    2.15    interface(CONST_INTER);
    2.16  %}
    2.17  
    2.18 +// Int Immediate non-negative
    2.19 +operand immU31()
    2.20 +%{
    2.21 +  predicate(n->get_int() >= 0);
    2.22 +  match(ConI);
    2.23 +
    2.24 +  op_cost(0);
    2.25 +  format %{ %}
    2.26 +  interface(CONST_INTER);
    2.27 +%}
    2.28 +
    2.29  // Integer Immediate: 0-bit
    2.30  operand immI0() %{
    2.31    predicate(n->get_int() == 0);
    2.32 @@ -5720,7 +5731,6 @@
    2.33    effect(TEMP dst, TEMP tmp);
    2.34    ins_cost(MEMORY_REF_COST + 2*DEFAULT_COST);
    2.35  
    2.36 -  size((3+1)*4);  // set may use two instructions.
    2.37    format %{ "LDUH   $mem,$dst\t! ushort/char & 16-bit mask -> long\n\t"
    2.38              "SET    $mask,$tmp\n\t"
    2.39              "AND    $dst,$tmp,$dst" %}
    2.40 @@ -5842,13 +5852,13 @@
    2.41    ins_pipe(iload_mem);
    2.42  %}
    2.43  
    2.44 -// Load Integer with a 13-bit mask into a Long Register
    2.45 -instruct loadI2L_immI13(iRegL dst, memory mem, immI13 mask) %{
    2.46 +// Load Integer with a 12-bit mask into a Long Register
    2.47 +instruct loadI2L_immU12(iRegL dst, memory mem, immU12 mask) %{
    2.48    match(Set dst (ConvI2L (AndI (LoadI mem) mask)));
    2.49    ins_cost(MEMORY_REF_COST + DEFAULT_COST);
    2.50  
    2.51    size(2*4);
    2.52 -  format %{ "LDUW   $mem,$dst\t! int & 13-bit mask -> long\n\t"
    2.53 +  format %{ "LDUW   $mem,$dst\t! int & 12-bit mask -> long\n\t"
    2.54              "AND    $dst,$mask,$dst" %}
    2.55    ins_encode %{
    2.56      Register Rdst = $dst$$Register;
    2.57 @@ -5858,14 +5868,13 @@
    2.58    ins_pipe(iload_mem);
    2.59  %}
    2.60  
    2.61 -// Load Integer with a 32-bit mask into a Long Register
    2.62 -instruct loadI2L_immI(iRegL dst, memory mem, immI mask, iRegL tmp) %{
    2.63 +// Load Integer with a 31-bit mask into a Long Register
    2.64 +instruct loadI2L_immU31(iRegL dst, memory mem, immU31 mask, iRegL tmp) %{
    2.65    match(Set dst (ConvI2L (AndI (LoadI mem) mask)));
    2.66    effect(TEMP dst, TEMP tmp);
    2.67    ins_cost(MEMORY_REF_COST + 2*DEFAULT_COST);
    2.68  
    2.69 -  size((3+1)*4);  // set may use two instructions.
    2.70 -  format %{ "LDUW   $mem,$dst\t! int & 32-bit mask -> long\n\t"
    2.71 +  format %{ "LDUW   $mem,$dst\t! int & 31-bit mask -> long\n\t"
    2.72              "SET    $mask,$tmp\n\t"
    2.73              "AND    $dst,$tmp,$dst" %}
    2.74    ins_encode %{
    2.75 @@ -8960,7 +8969,7 @@
    2.76    ins_pipe(ialu_cconly_reg_reg);
    2.77  %}
    2.78  
    2.79 -instruct compU_iReg_imm13(flagsRegU icc, iRegI op1, immU13 op2 ) %{
    2.80 +instruct compU_iReg_imm13(flagsRegU icc, iRegI op1, immU12 op2 ) %{
    2.81    match(Set icc (CmpU op1 op2));
    2.82  
    2.83    size(4);
     3.1 --- a/src/cpu/x86/vm/x86_32.ad	Fri Jan 31 16:40:58 2014 +0000
     3.2 +++ b/src/cpu/x86/vm/x86_32.ad	Tue Feb 04 22:44:06 2014 -0800
     3.3 @@ -3889,6 +3889,17 @@
     3.4    interface(CONST_INTER);
     3.5  %}
     3.6  
     3.7 +// Int Immediate non-negative
     3.8 +operand immU31()
     3.9 +%{
    3.10 +  predicate(n->get_int() >= 0);
    3.11 +  match(ConI);
    3.12 +
    3.13 +  op_cost(0);
    3.14 +  format %{ %}
    3.15 +  interface(CONST_INTER);
    3.16 +%}
    3.17 +
    3.18  // Constant for long shifts
    3.19  operand immI_32() %{
    3.20    predicate( n->get_int() == 32 );
    3.21 @@ -6119,12 +6130,12 @@
    3.22    ins_pipe(ialu_reg_mem);
    3.23  %}
    3.24  
    3.25 -// Load Integer with 32-bit mask into Long Register
    3.26 -instruct loadI2L_immI(eRegL dst, memory mem, immI mask, eFlagsReg cr) %{
    3.27 +// Load Integer with 31-bit mask into Long Register
    3.28 +instruct loadI2L_immU31(eRegL dst, memory mem, immU31 mask, eFlagsReg cr) %{
    3.29    match(Set dst (ConvI2L (AndI (LoadI mem) mask)));
    3.30    effect(KILL cr);
    3.31  
    3.32 -  format %{ "MOV    $dst.lo,$mem\t# int & 32-bit mask -> long\n\t"
    3.33 +  format %{ "MOV    $dst.lo,$mem\t# int & 31-bit mask -> long\n\t"
    3.34              "XOR    $dst.hi,$dst.hi\n\t"
    3.35              "AND    $dst.lo,$mask" %}
    3.36    ins_encode %{
     4.1 --- a/src/cpu/x86/vm/x86_64.ad	Fri Jan 31 16:40:58 2014 +0000
     4.2 +++ b/src/cpu/x86/vm/x86_64.ad	Tue Feb 04 22:44:06 2014 -0800
     4.3 @@ -3086,6 +3086,17 @@
     4.4    interface(CONST_INTER);
     4.5  %}
     4.6  
     4.7 +// Int Immediate non-negative
     4.8 +operand immU31()
     4.9 +%{
    4.10 +  predicate(n->get_int() >= 0);
    4.11 +  match(ConI);
    4.12 +
    4.13 +  op_cost(0);
    4.14 +  format %{ %}
    4.15 +  interface(CONST_INTER);
    4.16 +%}
    4.17 +
    4.18  // Constant for long shifts
    4.19  operand immI_32()
    4.20  %{
    4.21 @@ -5042,12 +5053,12 @@
    4.22    ins_pipe(ialu_reg_mem);
    4.23  %}
    4.24  
    4.25 -// Load Integer with a 32-bit mask into Long Register
    4.26 -instruct loadI2L_immI(rRegL dst, memory mem, immI mask, rFlagsReg cr) %{
    4.27 +// Load Integer with a 31-bit mask into Long Register
    4.28 +instruct loadI2L_immU31(rRegL dst, memory mem, immU31 mask, rFlagsReg cr) %{
    4.29    match(Set dst (ConvI2L (AndI (LoadI mem) mask)));
    4.30    effect(KILL cr);
    4.31  
    4.32 -  format %{ "movl    $dst, $mem\t# int & 32-bit mask -> long\n\t"
    4.33 +  format %{ "movl    $dst, $mem\t# int & 31-bit mask -> long\n\t"
    4.34              "andl    $dst, $mask" %}
    4.35    ins_encode %{
    4.36      Register Rdst = $dst$$Register;
     5.1 --- a/src/share/vm/code/dependencies.cpp	Fri Jan 31 16:40:58 2014 +0000
     5.2 +++ b/src/share/vm/code/dependencies.cpp	Tue Feb 04 22:44:06 2014 -0800
     5.3 @@ -1161,11 +1161,9 @@
     5.4  
     5.5    // We could also return false if m does not yet appear to be
     5.6    // executed, if the VM version supports this distinction also.
     5.7 +  // Default methods are considered "concrete" as well.
     5.8    return !m->is_abstract() &&
     5.9 -         !InstanceKlass::cast(m->method_holder())->is_interface();
    5.10 -         // TODO: investigate whether default methods should be
    5.11 -         // considered as "concrete" in this situation.  For now they
    5.12 -         // are not.
    5.13 +         !m->is_overpass(); // error functions aren't concrete
    5.14  }
    5.15  
    5.16  
     6.1 --- a/src/share/vm/opto/c2_globals.hpp	Fri Jan 31 16:40:58 2014 +0000
     6.2 +++ b/src/share/vm/opto/c2_globals.hpp	Tue Feb 04 22:44:06 2014 -0800
     6.3 @@ -445,7 +445,7 @@
     6.4    notproduct(bool, PrintEliminateLocks, false,                              \
     6.5            "Print out when locks are eliminated")                            \
     6.6                                                                              \
     6.7 -  product(bool, EliminateAutoBox, true,                                     \
     6.8 +  product(bool, EliminateAutoBox, false,                                    \
     6.9            "Control optimizations for autobox elimination")                  \
    6.10                                                                              \
    6.11    experimental(bool, UseImplicitStableValues, false,                        \
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/test/compiler/codegen/LoadWithMask.java	Tue Feb 04 22:44:06 2014 -0800
     7.3 @@ -0,0 +1,44 @@
     7.4 +/*
     7.5 + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
     7.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     7.7 + *
     7.8 + * This code is free software; you can redistribute it and/or modify it
     7.9 + * under the terms of the GNU General Public License version 2 only, as
    7.10 + * published by the Free Software Foundation.
    7.11 + *
    7.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    7.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    7.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    7.15 + * version 2 for more details (a copy is included in the LICENSE file that
    7.16 + * accompanied this code).
    7.17 + *
    7.18 + * You should have received a copy of the GNU General Public License version
    7.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    7.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    7.21 + *
    7.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    7.23 + * or visit www.oracle.com if you need additional information or have any
    7.24 + * questions.
    7.25 + */
    7.26 +
    7.27 +/*
    7.28 + * @test
    7.29 + * @bug 8032207
    7.30 + * @summary Invalid node sizing for loadUS2L_immI16 and loadI2L_immI
    7.31 + * @run main/othervm -server -Xbatch -XX:-TieredCompilation -XX:CompileCommand=compileonly,LoadWithMask.foo LoadWithMask
    7.32 + *
    7.33 + */
    7.34 +public class LoadWithMask {
    7.35 +  static int x[] = new int[1];
    7.36 +  static long foo() {
    7.37 +    return x[0] & 0xfff0ffff;
    7.38 +  }
    7.39 +
    7.40 +  public static void main(String[] args) {
    7.41 +    x[0] = -1;
    7.42 +    long l = 0;
    7.43 +    for (int i = 0; i < 100000; ++i) {
    7.44 +      l = foo();
    7.45 +    }
    7.46 +  }
    7.47 +}
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/test/compiler/codegen/LoadWithMask2.java	Tue Feb 04 22:44:06 2014 -0800
     8.3 @@ -0,0 +1,55 @@
     8.4 +/*
     8.5 + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
     8.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     8.7 + *
     8.8 + * This code is free software; you can redistribute it and/or modify it
     8.9 + * under the terms of the GNU General Public License version 2 only, as
    8.10 + * published by the Free Software Foundation.
    8.11 + *
    8.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    8.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    8.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    8.15 + * version 2 for more details (a copy is included in the LICENSE file that
    8.16 + * accompanied this code).
    8.17 + *
    8.18 + * You should have received a copy of the GNU General Public License version
    8.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    8.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    8.21 + *
    8.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    8.23 + * or visit www.oracle.com if you need additional information or have any
    8.24 + * questions.
    8.25 + */
    8.26 +
    8.27 +/*
    8.28 + * @test
    8.29 + * @bug 8031743
    8.30 + * @summary loadI2L_immI broken for negative memory values
    8.31 + * @run main/othervm -server -Xbatch -XX:-TieredCompilation -XX:CompileCommand=compileonly,*.foo* LoadWithMask2
    8.32 + *
    8.33 + */
    8.34 +public class LoadWithMask2 {
    8.35 +  static int x;
    8.36 +  static long foo1() {
    8.37 +    return x & 0xfffffffe;
    8.38 +  }
    8.39 +  static long foo2() {
    8.40 +    return x & 0xff000000;
    8.41 +  }
    8.42 +  static long foo3() {
    8.43 +    return x & 0x8abcdef1;
    8.44 +  }
    8.45 +
    8.46 +  public static void main(String[] args) {
    8.47 +    x = -1;
    8.48 +    long l = 0;
    8.49 +    for (int i = 0; i < 100000; ++i) {
    8.50 +      l = foo1() & foo2() & foo3();
    8.51 +    }
    8.52 +    if (l > 0) {
    8.53 +      System.out.println("FAILED");
    8.54 +      System.exit(97);
    8.55 +    }
    8.56 +    System.out.println("PASSED");
    8.57 +  }
    8.58 +}
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/test/compiler/inlining/DefaultAndConcreteMethodsCHA.java	Tue Feb 04 22:44:06 2014 -0800
     9.3 @@ -0,0 +1,58 @@
     9.4 +/*
     9.5 + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
     9.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     9.7 + *
     9.8 + * This code is free software; you can redistribute it and/or modify it
     9.9 + * under the terms of the GNU General Public License version 2 only, as
    9.10 + * published by the Free Software Foundation.
    9.11 + *
    9.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    9.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    9.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    9.15 + * version 2 for more details (a copy is included in the LICENSE file that
    9.16 + * accompanied this code).
    9.17 + *
    9.18 + * You should have received a copy of the GNU General Public License version
    9.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    9.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    9.21 + *
    9.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    9.23 + * or visit www.oracle.com if you need additional information or have any
    9.24 + * questions.
    9.25 + */
    9.26 +
    9.27 +/**
    9.28 + * @test
    9.29 + * @bug 8031695
    9.30 + * @summary CHA ignores default methods during analysis leading to incorrect code generation
    9.31 + *
    9.32 + * @run main/othervm -Xbatch DefaultAndConcreteMethodsCHA
    9.33 + */
    9.34 +interface I {
    9.35 +    default int m() { return 0; }
    9.36 +}
    9.37 +
    9.38 +class A implements I {}
    9.39 +
    9.40 +class C extends A { }
    9.41 +class D extends A { public int m() { return 1; } }
    9.42 +
    9.43 +public class DefaultAndConcreteMethodsCHA {
    9.44 +    public static int test(A obj) {
    9.45 +        return obj.m();
    9.46 +    }
    9.47 +    public static void main(String[] args) {
    9.48 +        for (int i = 0; i < 10000; i++) {
    9.49 +            int idC = test(new C());
    9.50 +            if (idC != 0) {
    9.51 +                throw new Error("C.m didn't invoke I.m: id "+idC);
    9.52 +            }
    9.53 +
    9.54 +            int idD = test(new D());
    9.55 +            if (idD != 1) {
    9.56 +                throw new Error("D.m didn't invoke D.m: id "+idD);
    9.57 +            }
    9.58 +        }
    9.59 +
    9.60 +    }
    9.61 +}

mercurial