8209511: C2 asserts with UseSSE < 4 and AVX enabled: "Label was never bound to a location, but it was used as a jmp target'

Make sure label is bound even if SSE is disabled.

Reviewed-by: kvn
This commit is contained in:
Tobias Hartmann 2018-08-16 09:09:18 +02:00
parent bd57506f87
commit 5b0774ea01

View File

@ -10567,7 +10567,7 @@ void MacroAssembler::char_array_compress(Register src, Register dst, Register le
XMMRegister tmp1Reg, XMMRegister tmp2Reg, XMMRegister tmp1Reg, XMMRegister tmp2Reg,
XMMRegister tmp3Reg, XMMRegister tmp4Reg, XMMRegister tmp3Reg, XMMRegister tmp4Reg,
Register tmp5, Register result) { Register tmp5, Register result) {
Label copy_chars_loop, return_length, return_zero, done, below_threshold; Label copy_chars_loop, return_length, return_zero, done;
// rsi: src // rsi: src
// rdi: dst // rdi: dst
@ -10590,13 +10590,12 @@ void MacroAssembler::char_array_compress(Register src, Register dst, Register le
set_vector_masking(); // opening of the stub context for programming mask registers set_vector_masking(); // opening of the stub context for programming mask registers
Label copy_32_loop, copy_loop_tail, restore_k1_return_zero; Label copy_32_loop, copy_loop_tail, restore_k1_return_zero, below_threshold;
// alignement // alignment
Label post_alignement; Label post_alignment;
// if length of the string is less than 16, handle it in an old fashioned // if length of the string is less than 16, handle it in an old fashioned way
// way
testl(len, -32); testl(len, -32);
jcc(Assembler::zero, below_threshold); jcc(Assembler::zero, below_threshold);
@ -10609,7 +10608,7 @@ void MacroAssembler::char_array_compress(Register src, Register dst, Register le
kmovql(k3, k1); kmovql(k3, k1);
testl(len, -64); testl(len, -64);
jcc(Assembler::zero, post_alignement); jcc(Assembler::zero, post_alignment);
movl(tmp5, dst); movl(tmp5, dst);
andl(tmp5, (32 - 1)); andl(tmp5, (32 - 1));
@ -10618,7 +10617,7 @@ void MacroAssembler::char_array_compress(Register src, Register dst, Register le
// bail out when there is nothing to be done // bail out when there is nothing to be done
testl(tmp5, 0xFFFFFFFF); testl(tmp5, 0xFFFFFFFF);
jcc(Assembler::zero, post_alignement); jcc(Assembler::zero, post_alignment);
// ~(~0 << len), where len is the # of remaining elements to process // ~(~0 << len), where len is the # of remaining elements to process
movl(result, 0xFFFFFFFF); movl(result, 0xFFFFFFFF);
@ -10638,8 +10637,8 @@ void MacroAssembler::char_array_compress(Register src, Register dst, Register le
addptr(dst, tmp5); addptr(dst, tmp5);
subl(len, tmp5); subl(len, tmp5);
bind(post_alignement); bind(post_alignment);
// end of alignement // end of alignment
movl(tmp5, len); movl(tmp5, len);
andl(tmp5, (32 - 1)); // tail count (in chars) andl(tmp5, (32 - 1)); // tail count (in chars)
@ -10694,11 +10693,12 @@ void MacroAssembler::char_array_compress(Register src, Register dst, Register le
jmp(return_zero); jmp(return_zero);
clear_vector_masking(); // closing of the stub context for programming mask registers clear_vector_masking(); // closing of the stub context for programming mask registers
}
if (UseSSE42Intrinsics) {
Label copy_32_loop, copy_16, copy_tail;
bind(below_threshold); bind(below_threshold);
}
if (UseSSE42Intrinsics) {
Label copy_32_loop, copy_16, copy_tail;
movl(result, len); movl(result, len);
@ -10812,8 +10812,7 @@ void MacroAssembler::byte_array_inflate(Register src, Register dst, Register len
Label copy_32_loop, copy_tail; Label copy_32_loop, copy_tail;
Register tmp3_aliased = len; Register tmp3_aliased = len;
// if length of the string is less than 16, handle it in an old fashioned // if length of the string is less than 16, handle it in an old fashioned way
// way
testl(len, -16); testl(len, -16);
jcc(Assembler::zero, below_threshold); jcc(Assembler::zero, below_threshold);
@ -10927,7 +10926,10 @@ void MacroAssembler::byte_array_inflate(Register src, Register dst, Register len
addptr(dst, 8); addptr(dst, 8);
bind(copy_bytes); bind(copy_bytes);
} else {
bind(below_threshold);
} }
testl(len, len); testl(len, len);
jccb(Assembler::zero, done); jccb(Assembler::zero, done);
lea(src, Address(src, len, Address::times_1)); lea(src, Address(src, len, Address::times_1));