Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8069580

String intrinsic related cleanups

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P5 P5
    • 9
    • 9
    • hotspot
    • None
    • b50

        While working on JDK-8054307 I did some small string intrinsic related cleanups:

        diff -r b0ce179e4a01 src/cpu/sparc/vm/sparc.ad
        --- a/src/cpu/sparc/vm/sparc.ad Mon Jan 19 12:29:50 2015 -0800
        +++ b/src/cpu/sparc/vm/sparc.ad Wed Jan 21 12:24:05 2015 +0100
        @@ -1,5 +1,5 @@
         //
        -// Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
        +// Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
         // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
         //
         // This code is free software; you can redistribute it and/or modify it
        @@ -2996,7 +2996,7 @@
           %}
         
         enc_class enc_String_Equals(o0RegP str1, o1RegP str2, g3RegI cnt, notemp_iRegI result) %{
        - Label Lword_loop, Lpost_word, Lchar, Lchar_loop, Ldone;
        + Label Lchar, Lchar_loop, Ldone;
             MacroAssembler _masm(&cbuf);
         
             Register str1_reg = reg_to_register_object($str1$$reg);
        diff -r b0ce179e4a01 src/cpu/x86/vm/macroAssembler_x86.cpp
        --- a/src/cpu/x86/vm/macroAssembler_x86.cpp Mon Jan 19 12:29:50 2015 -0800
        +++ b/src/cpu/x86/vm/macroAssembler_x86.cpp Wed Jan 21 12:24:05 2015 +0100
        @@ -1,5 +1,5 @@
         /*
        - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
        + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
          * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
          *
          * This code is free software; you can redistribute it and/or modify it
        @@ -6194,7 +6194,7 @@
           ShortBranchVerifier sbv(this);
           assert(UseSSE42Intrinsics, "SSE4.2 is required");
         
        - // This method uses pcmpestri inxtruction with bound registers
        + // This method uses pcmpestri instruction with bound registers
           // inputs:
           // xmm - substring
           // rax - substring length (elements count)
        @@ -6355,7 +6355,7 @@
           //
           assert(int_cnt2 == -1 || (0 < int_cnt2 && int_cnt2 < 8), "should be != 0");
         
        - // This method uses pcmpestri inxtruction with bound registers
        + // This method uses pcmpestri instruction with bound registers
           // inputs:
           // xmm - substring
           // rax - substring length (elements count)
        @@ -6644,7 +6644,6 @@
             // start from first character again because it has aligned address.
             int stride2 = 16;
             int adr_stride = stride << scale;
        - int adr_stride2 = stride2 << scale;
         
             assert(result == rax && cnt2 == rdx && cnt1 == rcx, "pcmpestri");
             // rax and rdx are used by pcmpestri as elements counters
        @@ -6743,7 +6742,7 @@
             // inputs:
             // vec1- substring
             // rax - negative string length (elements count)
        - // mem - scaned string
        + // mem - scanned string
             // rdx - string length (elements count)
             // pcmpmask - cmp mode: 11000 (string compare with negated result)
             // + 00 (unsigned bytes) or + 01 (unsigned shorts)
        diff -r b0ce179e4a01 src/share/vm/opto/library_call.cpp
        --- a/src/share/vm/opto/library_call.cpp Mon Jan 19 12:29:50 2015 -0800
        +++ b/src/share/vm/opto/library_call.cpp Wed Jan 21 12:24:05 2015 +0100
        @@ -1,5 +1,5 @@
         /*
        - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
        + * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
          * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
          *
          * This code is free software; you can redistribute it and/or modify it
        @@ -1351,7 +1351,6 @@
           Node* cache = __ ConI(cache_i);
           Node* md2 = __ ConI(md2_i);
           Node* lastChar = __ ConI(target_array->char_at(target_length - 1));
        - Node* targetCount = __ ConI(target_length);
           Node* targetCountLess1 = __ ConI(target_length - 1);
           Node* targetOffset = __ ConI(targetOffset_i);
           Node* sourceEnd = __ SubI(__ AddI(sourceOffset, sourceCount), targetCountLess1);
        @@ -1408,8 +1407,6 @@
           Node* arg = argument(1);
         
           Node* result;
        - // Disable the use of pcmpestri until it can be guaranteed that
        - // the load doesn't cross into the uncommited space.
           if (Matcher::has_match_rule(Op_StrIndexOf) &&
               UseSSE42Intrinsics) {
             // Generate SSE4.2 version of indexOf
        @@ -1421,9 +1418,6 @@
               return true;
             }
         
        - ciInstanceKlass* str_klass = env()->String_klass();
        - const TypeOopPtr* string_type = TypeOopPtr::make_from_klass(str_klass);
        -
             // Make the merge point
             RegionNode* result_rgn = new RegionNode(4);
             Node* result_phi = new PhiNode(result_rgn, TypeInt::INT);

              thartmann Tobias Hartmann
              thartmann Tobias Hartmann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: