# HG changeset patch # User thartmann # Date 1421914061 -3600 # Node ID 5a9aedf87213393099caf0c5f83a8eb75e9f98b6 # Parent 772aaab2582f6a7e0f4ab13a7d9b0d06e435edea 8069580: String intrinsic related cleanups Summary: Small cleanup of string intrinsic related code. Reviewed-by: kvn, roland diff -r 772aaab2582f -r 5a9aedf87213 hotspot/src/cpu/sparc/vm/sparc.ad --- a/hotspot/src/cpu/sparc/vm/sparc.ad Wed Jan 21 10:51:35 2015 +0100 +++ b/hotspot/src/cpu/sparc/vm/sparc.ad Thu Jan 22 09:07:41 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 772aaab2582f -r 5a9aedf87213 hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp --- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp Wed Jan 21 10:51:35 2015 +0100 +++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp Thu Jan 22 09:07:41 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 772aaab2582f -r 5a9aedf87213 hotspot/src/share/vm/opto/library_call.cpp --- a/hotspot/src/share/vm/opto/library_call.cpp Wed Jan 21 10:51:35 2015 +0100 +++ b/hotspot/src/share/vm/opto/library_call.cpp Thu Jan 22 09:07:41 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);