Skip to content

Commit 78f48a2

Browse files
author
Fei Yang
committed
Merge branch 'master' into riscv-port
2 parents 65cf0ef + 6a42fba commit 78f48a2

File tree

101 files changed

+3826
-438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+3826
-438
lines changed

.github/workflows/submit.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ jobs:
341341
run: >
342342
if ! grep --include=test-summary.txt -lqr build/*/test-results -e "TEST SUCCESS" ; then
343343
cat build/*/test-results/*/text/newfailures.txt ;
344+
cat build/*/test-results/*/text/other_errors.txt ;
344345
exit 1 ;
345346
fi
346347
@@ -807,6 +808,7 @@ jobs:
807808
run: >
808809
if ! grep --include=test-summary.txt -lqr build/*/test-results -e "TEST SUCCESS" ; then
809810
cat build/*/test-results/*/text/newfailures.txt ;
811+
cat build/*/test-results/*/text/other_errors.txt ;
810812
exit 1 ;
811813
fi
812814
@@ -1218,6 +1220,7 @@ jobs:
12181220
run: >
12191221
if ((Get-ChildItem -Path build\*\test-results\test-summary.txt -Recurse | Select-String -Pattern "TEST SUCCESS" ).Count -eq 0) {
12201222
Get-Content -Path build\*\test-results\*\*\newfailures.txt ;
1223+
Get-Content -Path build\*\test-results\*\*\other_errors.txt ;
12211224
exit 1
12221225
}
12231226
@@ -1611,6 +1614,7 @@ jobs:
16111614
run: >
16121615
if ! grep --include=test-summary.txt -lqr build/*/test-results -e "TEST SUCCESS" ; then
16131616
cat build/*/test-results/*/text/newfailures.txt ;
1617+
cat build/*/test-results/*/text/other_errors.txt ;
16141618
exit 1 ;
16151619
fi
16161620

doc/testing.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ <h4 id="launcher_options">LAUNCHER_OPTIONS</h4>
193193
<h4 id="aot_modules-1">AOT_MODULES</h4>
194194
<p>Generate AOT modules before testing for the specified module, or set of modules. If multiple modules are specified, they should be separated by space (or, to help avoid quoting issues, the special value <code>%20</code>).</p>
195195
<h4 id="retry_count">RETRY_COUNT</h4>
196-
<p>Retry failed tests up to a set number of times. Defaults to 0.</p>
196+
<p>Retry failed tests up to a set number of times, until they pass. This allows to pass the tests with intermittent failures. Defaults to 0.</p>
197197
<h4 id="repeat_count">REPEAT_COUNT</h4>
198-
<p>Repeat the tests for a set number of times. Defaults to 0.</p>
198+
<p>Repeat the tests up to a set number of times, stopping at first failure. This helps to reproduce intermittent test failures. Defaults to 0.</p>
199199
<h3 id="gtest-keywords">Gtest keywords</h3>
200200
<h4 id="repeat">REPEAT</h4>
201201
<p>The number of times to repeat the tests (<code>--gtest_repeat</code>).</p>

doc/testing.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,11 +419,15 @@ modules. If multiple modules are specified, they should be separated by space
419419

420420
#### RETRY_COUNT
421421

422-
Retry failed tests up to a set number of times. Defaults to 0.
422+
Retry failed tests up to a set number of times, until they pass.
423+
This allows to pass the tests with intermittent failures.
424+
Defaults to 0.
423425

424426
#### REPEAT_COUNT
425427

426-
Repeat the tests for a set number of times. Defaults to 0.
428+
Repeat the tests up to a set number of times, stopping at first failure.
429+
This helps to reproduce intermittent test failures.
430+
Defaults to 0.
427431

428432
### Gtest keywords
429433

make/data/symbols/java.base-I.sym.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -284,6 +284,10 @@ innerclass innerClass java/security/KeyStore$Entry outerClass java/security/KeyS
284284
innerclass innerClass java/security/KeyStore$Entry$Attribute outerClass java/security/KeyStore$Entry innerClassName Attribute flags 609
285285
method name engineGetAttributes descriptor (Ljava/lang/String;)Ljava/util/Set; flags 1 signature (Ljava/lang/String;)Ljava/util/Set<Ljava/security/KeyStore$Entry$Attribute;>;
286286

287+
class name java/security/Provider
288+
-method name getServices descriptor ()Ljava/util/Set;
289+
method name getServices descriptor ()Ljava/util/Set; flags 1 signature ()Ljava/util/Set<Ljava/security/Provider$Service;>;
290+
287291
class name java/security/SecureRandomParameters
288292
header extends java/lang/Object flags 601
289293

make/devkit/createJMHBundle.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# Create a bundle in the build directory, containing what's needed to
2727
# build and run JMH microbenchmarks from the OpenJDK build.
2828

29-
JMH_VERSION=1.33
29+
JMH_VERSION=1.34
3030
COMMONS_MATH3_VERSION=3.2
3131
JOPT_SIMPLE_VERSION=4.6
3232

src/hotspot/cpu/x86/assembler_x86.cpp

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -9725,6 +9725,68 @@ void Assembler::evpmaxsq(XMMRegister dst, KRegister mask, XMMRegister nds, Addre
97259725
emit_operand(dst, src);
97269726
}
97279727

9728+
void Assembler::evpternlogd(XMMRegister dst, int imm8, KRegister mask, XMMRegister src2, XMMRegister src3, bool merge, int vector_len) {
9729+
assert(VM_Version::supports_evex(), "requires EVEX support");
9730+
assert(vector_len == Assembler::AVX_512bit || VM_Version::supports_avx512vl(), "requires VL support");
9731+
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
9732+
attributes.set_is_evex_instruction();
9733+
attributes.set_embedded_opmask_register_specifier(mask);
9734+
if (merge) {
9735+
attributes.reset_is_clear_context();
9736+
}
9737+
int encode = vex_prefix_and_encode(dst->encoding(), src2->encoding(), src3->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_3A, &attributes);
9738+
emit_int24(0x25, (unsigned char)(0xC0 | encode), imm8);
9739+
}
9740+
9741+
void Assembler::evpternlogd(XMMRegister dst, int imm8, KRegister mask, XMMRegister src2, Address src3, bool merge, int vector_len) {
9742+
assert(VM_Version::supports_evex(), "requires EVEX support");
9743+
assert(vector_len == Assembler::AVX_512bit || VM_Version::supports_avx512vl(), "requires VL support");
9744+
assert(dst != xnoreg, "sanity");
9745+
InstructionMark im(this);
9746+
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
9747+
attributes.set_is_evex_instruction();
9748+
attributes.set_embedded_opmask_register_specifier(mask);
9749+
attributes.set_address_attributes(/* tuple_type */ EVEX_FV, /* input_size_in_bits */ EVEX_64bit);
9750+
if (merge) {
9751+
attributes.reset_is_clear_context();
9752+
}
9753+
vex_prefix(src3, src2->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_3A, &attributes);
9754+
emit_int8(0x25);
9755+
emit_operand(dst, src3);
9756+
emit_int8(imm8);
9757+
}
9758+
9759+
void Assembler::evpternlogq(XMMRegister dst, int imm8, KRegister mask, XMMRegister src2, XMMRegister src3, bool merge, int vector_len) {
9760+
assert(VM_Version::supports_evex(), "requires EVEX support");
9761+
assert(vector_len == Assembler::AVX_512bit || VM_Version::supports_avx512vl(), "requires VL support");
9762+
InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
9763+
attributes.set_is_evex_instruction();
9764+
attributes.set_embedded_opmask_register_specifier(mask);
9765+
if (merge) {
9766+
attributes.reset_is_clear_context();
9767+
}
9768+
int encode = vex_prefix_and_encode(dst->encoding(), src2->encoding(), src3->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_3A, &attributes);
9769+
emit_int24(0x25, (unsigned char)(0xC0 | encode), imm8);
9770+
}
9771+
9772+
void Assembler::evpternlogq(XMMRegister dst, int imm8, KRegister mask, XMMRegister src2, Address src3, bool merge, int vector_len) {
9773+
assert(VM_Version::supports_evex(), "requires EVEX support");
9774+
assert(vector_len == Assembler::AVX_512bit || VM_Version::supports_avx512vl(), "requires VL support");
9775+
assert(dst != xnoreg, "sanity");
9776+
InstructionMark im(this);
9777+
InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
9778+
attributes.set_is_evex_instruction();
9779+
attributes.set_embedded_opmask_register_specifier(mask);
9780+
attributes.set_address_attributes(/* tuple_type */ EVEX_FV, /* input_size_in_bits */ EVEX_64bit);
9781+
if (merge) {
9782+
attributes.reset_is_clear_context();
9783+
}
9784+
vex_prefix(src3, src2->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_3A, &attributes);
9785+
emit_int8(0x25);
9786+
emit_operand(dst, src3);
9787+
emit_int8(imm8);
9788+
}
9789+
97289790
// duplicate 4-byte integer data from src into programmed locations in dest : requires AVX512VL
97299791
void Assembler::vpbroadcastd(XMMRegister dst, XMMRegister src, int vector_len) {
97309792
assert(UseAVX >= 2, "");

src/hotspot/cpu/x86/assembler_x86.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -2413,6 +2413,12 @@ class Assembler : public AbstractAssembler {
24132413
void evprorvd(XMMRegister dst, KRegister mask, XMMRegister nds, XMMRegister src, bool merge, int vector_len);
24142414
void evprorvq(XMMRegister dst, KRegister mask, XMMRegister nds, XMMRegister src, bool merge, int vector_len);
24152415

2416+
void evpternlogd(XMMRegister dst, int imm8, KRegister mask, XMMRegister src2, XMMRegister src3, bool merge, int vector_len);
2417+
void evpternlogd(XMMRegister dst, int imm8, KRegister mask, XMMRegister src2, Address src3, bool merge, int vector_len);
2418+
void evpternlogq(XMMRegister dst, int imm8, KRegister mask, XMMRegister src2, XMMRegister src3, bool merge, int vector_len);
2419+
void evpternlogq(XMMRegister dst, int imm8, KRegister mask, XMMRegister src2, Address src3, bool merge, int vector_len);
2420+
2421+
24162422
// Sub packed integers
24172423
void psubb(XMMRegister dst, XMMRegister src);
24182424
void psubw(XMMRegister dst, XMMRegister src);

src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -4152,6 +4152,26 @@ void C2_MacroAssembler::vector_castF2I_evex(XMMRegister dst, XMMRegister src, XM
41524152
bind(done);
41534153
}
41544154

4155+
void C2_MacroAssembler::evpternlog(XMMRegister dst, int func, KRegister mask, XMMRegister src2, XMMRegister src3,
4156+
bool merge, BasicType bt, int vlen_enc) {
4157+
if (bt == T_INT) {
4158+
evpternlogd(dst, func, mask, src2, src3, merge, vlen_enc);
4159+
} else {
4160+
assert(bt == T_LONG, "");
4161+
evpternlogq(dst, func, mask, src2, src3, merge, vlen_enc);
4162+
}
4163+
}
4164+
4165+
void C2_MacroAssembler::evpternlog(XMMRegister dst, int func, KRegister mask, XMMRegister src2, Address src3,
4166+
bool merge, BasicType bt, int vlen_enc) {
4167+
if (bt == T_INT) {
4168+
evpternlogd(dst, func, mask, src2, src3, merge, vlen_enc);
4169+
} else {
4170+
assert(bt == T_LONG, "");
4171+
evpternlogq(dst, func, mask, src2, src3, merge, vlen_enc);
4172+
}
4173+
}
4174+
41554175
#ifdef _LP64
41564176
void C2_MacroAssembler::vector_long_to_maskvec(XMMRegister dst, Register src, Register rtmp1,
41574177
Register rtmp2, XMMRegister xtmp, int mask_len,

src/hotspot/cpu/x86/c2_MacroAssembler_x86.hpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -311,4 +311,11 @@
311311
void vector_castD2L_evex(XMMRegister dst, XMMRegister src, XMMRegister xtmp1, XMMRegister xtmp2,
312312
KRegister ktmp1, KRegister ktmp2, AddressLiteral double_sign_flip,
313313
Register scratch, int vec_enc);
314+
315+
void evpternlog(XMMRegister dst, int func, KRegister mask, XMMRegister src2, XMMRegister src3,
316+
bool merge, BasicType bt, int vlen_enc);
317+
318+
void evpternlog(XMMRegister dst, int func, KRegister mask, XMMRegister src2, Address src3,
319+
bool merge, BasicType bt, int vlen_enc);
320+
314321
#endif // CPU_X86_C2_MACROASSEMBLER_X86_HPP

src/hotspot/cpu/x86/x86.ad

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
2+
// Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
33
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
//
55
// This code is free software; you can redistribute it and/or modify it
@@ -1783,17 +1783,9 @@ const bool Matcher::match_rule_supported_vector(int opcode, int vlen, BasicType
17831783
}
17841784
break;
17851785
case Op_VectorCastB2X:
1786-
if (size_in_bits == 256 && UseAVX < 2) {
1787-
return false; // Implementation limitation
1788-
}
1789-
break;
17901786
case Op_VectorCastS2X:
1791-
if (is_integral_type(bt) && size_in_bits == 256 && UseAVX < 2) {
1792-
return false;
1793-
}
1794-
break;
17951787
case Op_VectorCastI2X:
1796-
if (is_integral_type(bt) && size_in_bits == 256 && UseAVX < 2) {
1788+
if (bt != T_DOUBLE && size_in_bits == 256 && UseAVX < 2) {
17971789
return false;
17981790
}
17991791
break;
@@ -1896,6 +1888,12 @@ const bool Matcher::match_rule_supported_vector_masked(int opcode, int vlen, Bas
18961888
case Op_FmaVD:
18971889
return true;
18981890

1891+
case Op_MacroLogicV:
1892+
if(bt != T_INT && bt != T_LONG) {
1893+
return false;
1894+
}
1895+
return true;
1896+
18991897
// Binary masked operations
19001898
case Op_AddVB:
19011899
case Op_AddVS:
@@ -6914,11 +6912,12 @@ instruct vcastBtoX(vec dst, vec src) %{
69146912
case T_LONG:
69156913
__ vpmovsxbq($dst$$XMMRegister, $src$$XMMRegister, vlen_enc);
69166914
break;
6917-
case T_DOUBLE:
6918-
__ vpmovsxbd($dst$$XMMRegister, $src$$XMMRegister, vlen_enc);
6915+
case T_DOUBLE: {
6916+
int mid_vlen_enc = (vlen_enc == Assembler::AVX_512bit) ? Assembler::AVX_256bit : Assembler::AVX_128bit;
6917+
__ vpmovsxbd($dst$$XMMRegister, $src$$XMMRegister, mid_vlen_enc);
69196918
__ vcvtdq2pd($dst$$XMMRegister, $dst$$XMMRegister, vlen_enc);
69206919
break;
6921-
6920+
}
69226921
default: assert(false, "%s", type2name(to_elem_bt));
69236922
}
69246923
%}
@@ -6985,10 +6984,12 @@ instruct vcastStoX_evex(vec dst, vec src) %{
69856984
case T_LONG:
69866985
__ vpmovsxwq($dst$$XMMRegister, $src$$XMMRegister, vlen_enc);
69876986
break;
6988-
case T_DOUBLE:
6989-
__ vpmovsxwd($dst$$XMMRegister, $src$$XMMRegister, vlen_enc);
6987+
case T_DOUBLE: {
6988+
int mid_vlen_enc = (vlen_enc == Assembler::AVX_512bit) ? Assembler::AVX_256bit : Assembler::AVX_128bit;
6989+
__ vpmovsxwd($dst$$XMMRegister, $src$$XMMRegister, mid_vlen_enc);
69906990
__ vcvtdq2pd($dst$$XMMRegister, $dst$$XMMRegister, vlen_enc);
69916991
break;
6992+
}
69926993
default:
69936994
ShouldNotReachHere();
69946995
}
@@ -9565,6 +9566,29 @@ instruct mask_opers_evex(kReg dst, kReg src1, kReg src2, kReg kscratch) %{
95659566
ins_pipe( pipe_slow );
95669567
%}
95679568

9569+
instruct vternlog_reg_masked(vec dst, vec src2, vec src3, immU8 func, kReg mask) %{
9570+
match(Set dst (MacroLogicV dst (Binary src2 (Binary src3 (Binary func mask)))));
9571+
format %{ "vternlog_masked $dst,$src2,$src3,$func,$mask\t! vternlog masked operation" %}
9572+
ins_encode %{
9573+
int vlen_enc = vector_length_encoding(this);
9574+
BasicType bt = Matcher::vector_element_basic_type(this);
9575+
__ evpternlog($dst$$XMMRegister, $func$$constant, $mask$$KRegister,
9576+
$src2$$XMMRegister, $src3$$XMMRegister, true, bt, vlen_enc);
9577+
%}
9578+
ins_pipe( pipe_slow );
9579+
%}
9580+
9581+
instruct vternlogd_mem_masked(vec dst, vec src2, memory src3, immU8 func, kReg mask) %{
9582+
match(Set dst (MacroLogicV dst (Binary src2 (Binary src3 (Binary func mask)))));
9583+
format %{ "vternlog_masked $dst,$src2,$src3,$func,$mask\t! vternlog masked operation" %}
9584+
ins_encode %{
9585+
int vlen_enc = vector_length_encoding(this);
9586+
BasicType bt = Matcher::vector_element_basic_type(this);
9587+
__ evpternlog($dst$$XMMRegister, $func$$constant, $mask$$KRegister,
9588+
$src2$$XMMRegister, $src3$$Address, true, bt, vlen_enc);
9589+
%}
9590+
ins_pipe( pipe_slow );
9591+
%}
95689592

95699593
instruct castMM(kReg dst)
95709594
%{

0 commit comments

Comments
 (0)