Skip to content

Commit

Permalink
Merge branch 'upstream-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Datadog Syncup Service committed Nov 6, 2024
2 parents b1ce536 + 83f3d42 commit 580a95d
Show file tree
Hide file tree
Showing 115 changed files with 5,137 additions and 1,220 deletions.
2 changes: 1 addition & 1 deletion make/modules/java.sql.rowset/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# questions.
#

DISABLED_WARNINGS_java += dangling-doc-comments this-escape
DISABLED_WARNINGS_java += dangling-doc-comments

DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
Expand Down
2 changes: 1 addition & 1 deletion make/modules/jdk.httpserver/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
# questions.
#

DISABLED_WARNINGS_java += missing-explicit-ctor this-escape
DISABLED_WARNINGS_java += this-escape

COPY += .ico
3 changes: 1 addition & 2 deletions make/modules/jdk.jartool/Java.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2020, 2024, 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
Expand All @@ -23,5 +23,4 @@
# questions.
#

DISABLED_WARNINGS_java += missing-explicit-ctor
JAVAC_FLAGS += -XDstringConcat=inline
2 changes: 1 addition & 1 deletion make/modules/jdk.jdi/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# questions.
#

DISABLED_WARNINGS_java += dangling-doc-comments this-escape
DISABLED_WARNINGS_java += dangling-doc-comments

EXCLUDES += \
com/sun/tools/example/debug/bdi \
Expand Down
26 changes: 0 additions & 26 deletions make/modules/jdk.jlink/Java.gmk

This file was deleted.

26 changes: 0 additions & 26 deletions make/modules/jdk.jstatd/Java.gmk

This file was deleted.

26 changes: 0 additions & 26 deletions make/modules/jdk.unsupported/Java.gmk

This file was deleted.

27 changes: 0 additions & 27 deletions make/modules/jdk.zipfs/Java.gmk

This file was deleted.

59 changes: 37 additions & 22 deletions src/hotspot/cpu/aarch64/aarch64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -16281,9 +16281,10 @@ instruct ShouldNotReachHere() %{
instruct partialSubtypeCheck(iRegP_R4 sub, iRegP_R0 super, iRegP_R2 temp, iRegP_R5 result, rFlagsReg cr)
%{
match(Set result (PartialSubtypeCheck sub super));
predicate(!UseSecondarySupersTable);
effect(KILL cr, KILL temp);

ins_cost(1100); // slightly larger than the next version
ins_cost(20 * INSN_COST); // slightly larger than the next version
format %{ "partialSubtypeCheck $result, $sub, $super" %}

ins_encode(aarch64_enc_partial_subtype_check(sub, super, temp, result));
Expand All @@ -16293,6 +16294,34 @@ instruct partialSubtypeCheck(iRegP_R4 sub, iRegP_R0 super, iRegP_R2 temp, iRegP_
ins_pipe(pipe_class_memory);
%}

// Two versions of partialSubtypeCheck, both used when we need to
// search for a super class in the secondary supers array. The first
// is used when we don't know _a priori_ the class being searched
// for. The second, far more common, is used when we do know: this is
// used for instanceof, checkcast, and any case where C2 can determine
// it by constant propagation.

instruct partialSubtypeCheckVarSuper(iRegP_R4 sub, iRegP_R0 super, vRegD_V0 vtemp, iRegP_R5 result,
iRegP_R1 tempR1, iRegP_R2 tempR2, iRegP_R3 tempR3,
rFlagsReg cr)
%{
match(Set result (PartialSubtypeCheck sub super));
predicate(UseSecondarySupersTable);
effect(KILL cr, TEMP tempR1, TEMP tempR2, TEMP tempR3, TEMP vtemp);

ins_cost(10 * INSN_COST); // slightly larger than the next version
format %{ "partialSubtypeCheck $result, $sub, $super" %}

ins_encode %{
__ lookup_secondary_supers_table_var($sub$$Register, $super$$Register,
$tempR1$$Register, $tempR2$$Register, $tempR3$$Register,
$vtemp$$FloatRegister,
$result$$Register, /*L_success*/nullptr);
%}

ins_pipe(pipe_class_memory);
%}

instruct partialSubtypeCheckConstSuper(iRegP_R4 sub, iRegP_R0 super_reg, immP super_con, vRegD_V0 vtemp, iRegP_R5 result,
iRegP_R1 tempR1, iRegP_R2 tempR2, iRegP_R3 tempR3,
rFlagsReg cr)
Expand All @@ -16301,18 +16330,19 @@ instruct partialSubtypeCheckConstSuper(iRegP_R4 sub, iRegP_R0 super_reg, immP su
predicate(UseSecondarySupersTable);
effect(KILL cr, TEMP tempR1, TEMP tempR2, TEMP tempR3, TEMP vtemp);

ins_cost(700); // smaller than the next version
ins_cost(5 * INSN_COST); // smaller than the next version
format %{ "partialSubtypeCheck $result, $sub, $super_reg, $super_con" %}

ins_encode %{
bool success = false;
u1 super_klass_slot = ((Klass*)$super_con$$constant)->hash_slot();
if (InlineSecondarySupersTest) {
success = __ lookup_secondary_supers_table($sub$$Register, $super_reg$$Register,
$tempR1$$Register, $tempR2$$Register, $tempR3$$Register,
$vtemp$$FloatRegister,
$result$$Register,
super_klass_slot);
success =
__ lookup_secondary_supers_table_const($sub$$Register, $super_reg$$Register,
$tempR1$$Register, $tempR2$$Register, $tempR3$$Register,
$vtemp$$FloatRegister,
$result$$Register,
super_klass_slot);
} else {
address call = __ trampoline_call(RuntimeAddress(StubRoutines::lookup_secondary_supers_table_stub(super_klass_slot)));
success = (call != nullptr);
Expand All @@ -16326,21 +16356,6 @@ instruct partialSubtypeCheckConstSuper(iRegP_R4 sub, iRegP_R0 super_reg, immP su
ins_pipe(pipe_class_memory);
%}

instruct partialSubtypeCheckVsZero(iRegP_R4 sub, iRegP_R0 super, iRegP_R2 temp, iRegP_R5 result, immP0 zero, rFlagsReg cr)
%{
match(Set cr (CmpP (PartialSubtypeCheck sub super) zero));
effect(KILL temp, KILL result);

ins_cost(1100); // slightly larger than the next version
format %{ "partialSubtypeCheck $result, $sub, $super == 0" %}

ins_encode(aarch64_enc_partial_subtype_check(sub, super, temp, result));

opcode(0x0); // Don't zero result reg on hit

ins_pipe(pipe_class_memory);
%}

// Intrisics for String.compareTo()

instruct string_compareU(iRegP_R1 str1, iRegI_R2 cnt1, iRegP_R3 str2, iRegI_R4 cnt2,
Expand Down
8 changes: 7 additions & 1 deletion src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,13 @@ OopMapSet* Runtime1::generate_code_for(C1StubId id, StubAssembler* sasm) {
__ ldp(r4, r0, Address(sp, (sup_k_off) * VMRegImpl::stack_slot_size));

Label miss;
__ check_klass_subtype_slow_path(r4, r0, r2, r5, nullptr, &miss);
__ check_klass_subtype_slow_path(/*sub_klass*/r4,
/*super_klass*/r0,
/*temp_reg*/r2,
/*temp2_reg*/r5,
/*L_success*/nullptr,
/*L_failure*/&miss);
// Need extras for table lookup: r1, r3, vtemp

// fallthrough on success:
__ mov(rscratch1, 1);
Expand Down
Loading

0 comments on commit 580a95d

Please sign in to comment.