8032207: C2: assert(VerifyOops || MachNode::size(ra_) <= (3+1)*4) failed: bad fixed size

Fri, 17 Jan 2014 18:09:08 -0800

author
iveresov
date
Fri, 17 Jan 2014 18:09:08 -0800
changeset 6287
f970454708b8
parent 6286
709018897c81
child 6288
984401824c5e

8032207: C2: assert(VerifyOops || MachNode::size(ra_) <= (3+1)*4) failed: bad fixed size
Summary: Fix the sizing of loadUS2L_immI16 and loadI2L_immI
Reviewed-by: kvn, azeemj

src/cpu/sparc/vm/sparc.ad file | annotate | diff | comparison | revisions
test/compiler/codegen/LoadWithMask.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/cpu/sparc/vm/sparc.ad	Thu Jan 23 01:23:23 2014 +0400
     1.2 +++ b/src/cpu/sparc/vm/sparc.ad	Fri Jan 17 18:09:08 2014 -0800
     1.3 @@ -5720,7 +5720,6 @@
     1.4    effect(TEMP dst, TEMP tmp);
     1.5    ins_cost(MEMORY_REF_COST + 2*DEFAULT_COST);
     1.6  
     1.7 -  size((3+1)*4);  // set may use two instructions.
     1.8    format %{ "LDUH   $mem,$dst\t! ushort/char & 16-bit mask -> long\n\t"
     1.9              "SET    $mask,$tmp\n\t"
    1.10              "AND    $dst,$tmp,$dst" %}
    1.11 @@ -5864,7 +5863,6 @@
    1.12    effect(TEMP dst, TEMP tmp);
    1.13    ins_cost(MEMORY_REF_COST + 2*DEFAULT_COST);
    1.14  
    1.15 -  size((3+1)*4);  // set may use two instructions.
    1.16    format %{ "LDUW   $mem,$dst\t! int & 32-bit mask -> long\n\t"
    1.17              "SET    $mask,$tmp\n\t"
    1.18              "AND    $dst,$tmp,$dst" %}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/test/compiler/codegen/LoadWithMask.java	Fri Jan 17 18:09:08 2014 -0800
     2.3 @@ -0,0 +1,44 @@
     2.4 +/*
     2.5 + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
     2.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.7 + *
     2.8 + * This code is free software; you can redistribute it and/or modify it
     2.9 + * under the terms of the GNU General Public License version 2 only, as
    2.10 + * published by the Free Software Foundation.
    2.11 + *
    2.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    2.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    2.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    2.15 + * version 2 for more details (a copy is included in the LICENSE file that
    2.16 + * accompanied this code).
    2.17 + *
    2.18 + * You should have received a copy of the GNU General Public License version
    2.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    2.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    2.21 + *
    2.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    2.23 + * or visit www.oracle.com if you need additional information or have any
    2.24 + * questions.
    2.25 + */
    2.26 +
    2.27 +/*
    2.28 + * @test
    2.29 + * @bug 8032207
    2.30 + * @summary Invalid node sizing for loadUS2L_immI16 and loadI2L_immI
    2.31 + * @run main/othervm -server -Xbatch -XX:-TieredCompilation -XX:CompileCommand=compileonly,LoadWithMask.foo LoadWithMask
    2.32 + *
    2.33 + */
    2.34 +public class LoadWithMask {
    2.35 +  static int x[] = new int[1];
    2.36 +  static long foo() {
    2.37 +    return x[0] & 0xfff0ffff;
    2.38 +  }
    2.39 +
    2.40 +  public static void main(String[] args) {
    2.41 +    x[0] = -1;
    2.42 +    long l = 0;
    2.43 +    for (int i = 0; i < 100000; ++i) {
    2.44 +      l = foo();
    2.45 +    }
    2.46 +  }
    2.47 +}

mercurial