#7215 UseCountLeadingZerosInstruction/UseCountTrailingZerosInstruction renamed UseCountLeadingZerosInstructionMIPS64/UseCountTrailingZerosInstructionMIPS64

Tue, 03 Jul 2018 15:57:58 +0800

author
huangxuguang
date
Tue, 03 Jul 2018 15:57:58 +0800
changeset 9155
30adb9fd9663
parent 9154
ee18c1ec86c5
child 9156
7319742f34f3

#7215 UseCountLeadingZerosInstruction/UseCountTrailingZerosInstruction renamed UseCountLeadingZerosInstructionMIPS64/UseCountTrailingZerosInstructionMIPS64
Summary: compiler/arguments/TestUseCountLeadingZerosInstructionOnUnsupportedCPU.java and compiler/arguments/TestUseCountTrailingZerosInstructionOnUnsupportedCPU.java passed.
Reviewed-by: aoqi

src/cpu/mips/vm/globals_mips.hpp file | annotate | diff | comparison | revisions
src/cpu/mips/vm/mips_64.ad file | annotate | diff | comparison | revisions
src/cpu/mips/vm/vm_version_mips.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/cpu/mips/vm/globals_mips.hpp	Thu Jun 21 17:30:45 2018 +0800
     1.2 +++ b/src/cpu/mips/vm/globals_mips.hpp	Tue Jul 03 15:57:58 2018 +0800
     1.3 @@ -153,10 +153,10 @@
     1.4    product(bool, Use486InstrsOnly, false,                                    \
     1.5            "Use 80486 Compliant instruction subset")                         \
     1.6                                                                              \
     1.7 -  product(bool, UseCountLeadingZerosInstruction, true,                      \
     1.8 +  product(bool, UseCountLeadingZerosInstructionMIPS64, true,                \
     1.9            "Use count leading zeros instruction")                            \
    1.10                                                                              \
    1.11 -  product(bool, UseCountTrailingZerosInstruction, false,                    \
    1.12 +  product(bool, UseCountTrailingZerosInstructionMIPS64, false,              \
    1.13            "Use count trailing zeros instruction")                           \
    1.14                                                                              \
    1.15    product(bool, UseBMI1Instructions, false,                                 \
     2.1 --- a/src/cpu/mips/vm/mips_64.ad	Thu Jun 21 17:30:45 2018 +0800
     2.2 +++ b/src/cpu/mips/vm/mips_64.ad	Tue Jul 03 15:57:58 2018 +0800
     2.3 @@ -590,12 +590,12 @@
     2.4      //Op_CountLeadingZerosI Op_CountLeadingZerosL can be deleted, all MIPS CPUs support clz & dclz.
     2.5      case Op_CountLeadingZerosI:
     2.6      case Op_CountLeadingZerosL:
     2.7 -      if (!UseCountLeadingZerosInstruction)
     2.8 +      if (!UseCountLeadingZerosInstructionMIPS64)
     2.9          return false;
    2.10        break;
    2.11      case Op_CountTrailingZerosI:
    2.12      case Op_CountTrailingZerosL:
    2.13 -      if (!UseCountTrailingZerosInstruction)
    2.14 +      if (!UseCountTrailingZerosInstructionMIPS64)
    2.15          return false;
    2.16        break;
    2.17    }
    2.18 @@ -14363,7 +14363,7 @@
    2.19  //---------- Zeros Count Instructions ------------------------------------------
    2.20  // CountLeadingZerosINode CountTrailingZerosINode
    2.21  instruct countLeadingZerosI(mRegI dst, mRegI src) %{
    2.22 -  predicate(UseCountLeadingZerosInstruction);
    2.23 +  predicate(UseCountLeadingZerosInstructionMIPS64);
    2.24    match(Set dst (CountLeadingZerosI src));
    2.25  
    2.26    format %{ "clz  $dst, $src\t# count leading zeros (int)" %}
    2.27 @@ -14374,7 +14374,7 @@
    2.28  %}
    2.29  
    2.30  instruct countLeadingZerosL(mRegI dst, mRegL src) %{
    2.31 -  predicate(UseCountLeadingZerosInstruction);
    2.32 +  predicate(UseCountLeadingZerosInstructionMIPS64);
    2.33    match(Set dst (CountLeadingZerosL src));
    2.34  
    2.35    format %{ "dclz  $dst, $src\t# count leading zeros (long)" %}
    2.36 @@ -14385,7 +14385,7 @@
    2.37  %}
    2.38  
    2.39  instruct countTrailingZerosI(mRegI dst, mRegI src) %{
    2.40 -  predicate(UseCountTrailingZerosInstruction);
    2.41 +  predicate(UseCountTrailingZerosInstructionMIPS64);
    2.42    match(Set dst (CountTrailingZerosI src));
    2.43  
    2.44    format %{ "ctz    $dst, $src\t# count trailing zeros (int)" %}
    2.45 @@ -14397,7 +14397,7 @@
    2.46  %}
    2.47  
    2.48  instruct countTrailingZerosL(mRegI dst, mRegL src) %{
    2.49 -  predicate(UseCountTrailingZerosInstruction);
    2.50 +  predicate(UseCountTrailingZerosInstructionMIPS64);
    2.51    match(Set dst (CountTrailingZerosL src));
    2.52  
    2.53    format %{ "dcto    $dst, $src\t# count trailing zeros (long)" %}
     3.1 --- a/src/cpu/mips/vm/vm_version_mips.cpp	Thu Jun 21 17:30:45 2018 +0800
     3.2 +++ b/src/cpu/mips/vm/vm_version_mips.cpp	Tue Jul 03 15:57:58 2018 +0800
     3.3 @@ -110,13 +110,13 @@
     3.4    }
     3.5  
     3.6    if (is_gs464e()) {
     3.7 -    if (FLAG_IS_DEFAULT(UseCountTrailingZerosInstruction)) {
     3.8 -      FLAG_SET_DEFAULT(UseCountTrailingZerosInstruction, 1);
     3.9 +    if (FLAG_IS_DEFAULT(UseCountTrailingZerosInstructionMIPS64)) {
    3.10 +      FLAG_SET_DEFAULT(UseCountTrailingZerosInstructionMIPS64, 1);
    3.11      }
    3.12 -  } else if (UseCountTrailingZerosInstruction) {
    3.13 -    if (!FLAG_IS_DEFAULT(UseCountTrailingZerosInstruction))
    3.14 -      warning("Only 3A2000/3000 CPUs support UseCountTrailingZerosInstruction");
    3.15 -    FLAG_SET_DEFAULT(UseCountTrailingZerosInstruction, 0);
    3.16 +  } else if (UseCountTrailingZerosInstructionMIPS64) {
    3.17 +    if (!FLAG_IS_DEFAULT(UseCountTrailingZerosInstructionMIPS64))
    3.18 +      warning("Only 3A2000/3000 CPUs support UseCountTrailingZerosInstructionMIPS64");
    3.19 +    FLAG_SET_DEFAULT(UseCountTrailingZerosInstructionMIPS64, 0);
    3.20    }
    3.21  #endif
    3.22    UseSSE = 0; // Only on x86 and x64
    3.23 @@ -168,7 +168,7 @@
    3.24                (is_gs464e() ? ", 3A2000/3A3000/3B2000/3B3000" : ""),
    3.25                (is_gs264() ?  ", 2K1000" : ""),
    3.26                (UseLoongsonISA ? ", UseLoongsonISA" : ""),
    3.27 -              (UseCountTrailingZerosInstruction ? ", UseCountTrailingZerosInstruction" : ""),
    3.28 +              (UseCountTrailingZerosInstructionMIPS64 ? ", UseCountTrailingZerosInstructionMIPS64" : ""),
    3.29                (Use3A2000 ? ", Use3A2000" : ""));
    3.30  
    3.31    // buf is started with ", " or is empty

mercurial