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 Dec 17, 2024
2 parents 1439384 + fbd76ca commit 88a76ca
Show file tree
Hide file tree
Showing 176 changed files with 5,254 additions and 973 deletions.
7 changes: 6 additions & 1 deletion .jcheck/conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jbs=JDK
version=25

[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists,copyright
warning=issuestitle,binary

[repository]
Expand Down Expand Up @@ -34,3 +34,8 @@ pattern=^([124-8][0-9]{6}): (\S.*)$

[checks "problemlists"]
dirs=test/jdk|test/langtools|test/lib-test|test/hotspot/jtreg|test/jaxp

[checks "copyright"]
files=^(?!LICENSE|license\.txt|.*\.bin|.*\.gif|.*\.jpg|.*\.png|.*\.icon|.*\.tiff|.*\.dat|.*\.patch|.*\.wav|.*\.class|.*-header|.*\.jar|).*
oracle_locator=.*Copyright \(c\)(.*)Oracle and/or its affiliates\. All rights reserved\.
oracle_validator=.*Copyright \(c\) (\d{4})(?:, (\d{4}))?, Oracle and/or its affiliates\. All rights reserved\.
23 changes: 4 additions & 19 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
# Additional warnings that are not activated by -Wall and -Wextra
WARNINGS_ENABLE_ADDITIONAL="-Wpointer-arith -Wreturn-type -Wsign-compare \
-Wtrampolines -Wundef -Wunused-const-variable=1 -Wunused-function \
-Wunused-result -Wunused-value"
-Wunused-result -Wunused-value -Wtype-limits -Wuninitialized"
WARNINGS_ENABLE_ADDITIONAL_CXX="-Woverloaded-virtual -Wreorder"
WARNINGS_ENABLE_ALL_CFLAGS="-Wall -Wextra -Wformat=2 $WARNINGS_ENABLE_ADDITIONAL"
WARNINGS_ENABLE_ALL_CXXFLAGS="$WARNINGS_ENABLE_ALL_CFLAGS $WARNINGS_ENABLE_ADDITIONAL_CXX"
Expand Down Expand Up @@ -754,10 +754,9 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
FLAGS_SETUP_GCC6_COMPILER_FLAGS($1, $3)
$1_TOOLCHAIN_CFLAGS="${$1_GCC6_CFLAGS}"
$1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized"
# This flag is required since GCC 6 as undefined behavior in OpenJDK code
# runs afoul of the more aggressive versions of this optimization.
$1_TOOLCHAIN_CFLAGS="-fno-lifetime-dse"
fi
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
Expand Down Expand Up @@ -919,20 +918,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
AC_SUBST($2SVE_CFLAGS)
])

# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
# Arguments:
# $1 - Prefix for each variable defined.
# $2 - Prefix for compiler variables (either BUILD_ or nothing).
AC_DEFUN([FLAGS_SETUP_GCC6_COMPILER_FLAGS],
[
# This flag is required for GCC 6 builds as undefined behavior in OpenJDK code
# runs afoul of the more aggressive versions of this optimization.
NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_LIFETIME_DSE_CFLAG],
PREFIX: $2, IF_FALSE: [NO_LIFETIME_DSE_CFLAG=""])
$1_GCC6_CFLAGS="${NO_LIFETIME_DSE_CFLAG}"
])

AC_DEFUN_ONCE([FLAGS_SETUP_BRANCH_PROTECTION],
[
# Is branch protection available?
Expand Down
2 changes: 1 addition & 1 deletion make/conf/jib-profiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ var getJibProfilesProfiles = function (input, common, data) {
target_os: input.build_os,
target_cpu: input.build_cpu,
dependencies: [
"boot_jdk", "devkit", "graphviz", "pandoc", buildJdkDep,
"autoconf", "boot_jdk", "devkit", "graphviz", "pandoc", buildJdkDep,
],
configure_args: concat(
"--enable-full-docs",
Expand Down
2 changes: 1 addition & 1 deletion make/hotspot/lib/CompileJvm.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ CFLAGS_VM_VERSION := \
# Disabled warnings

DISABLED_WARNINGS_gcc := array-bounds comment delete-non-virtual-dtor \
empty-body implicit-fallthrough int-in-bool-context \
empty-body format-zero-length implicit-fallthrough int-in-bool-context \
maybe-uninitialized missing-field-initializers \
shift-negative-value unknown-pragmas unused-but-set-variable \
unused-local-typedefs unused-variable
Expand Down
4 changes: 2 additions & 2 deletions make/jdk/src/classes/build/tools/depend/Depend.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 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 Down Expand Up @@ -446,7 +446,7 @@ public Void visitType(TypeElement e, Void p) {
}

@Override
public Void visitRecordComponent(@SuppressWarnings("preview")RecordComponentElement e, Void p) {
public Void visitRecordComponent(RecordComponentElement e, Void p) {
update(e.getSimpleName());
visit(e.asType());
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ public class CreateSymbols {
/**Create sig files for ct.sym reading the classes description from the directory that contains
* {@code ctDescriptionFile}, using the file as a recipe to create the sigfiles.
*/
@SuppressWarnings("unchecked")
public void createSymbols(String ctDescriptionFileExtra, String ctDescriptionFile, String ctSymLocation,
long timestamp, String currentVersion, String preReleaseTag, String moduleClasses,
String includedModulesFile) throws IOException {
Expand Down Expand Up @@ -4634,7 +4633,6 @@ private static AnnotationDescription parseAnnotation(String value, int[] valuePo
/**Create sig files for ct.sym reading the classes description from the directory that contains
* {@code ctDescriptionFile}, using the file as a recipe to create the sigfiles.
*/
@SuppressWarnings("unchecked")
public void createJavadocData(String ctDescriptionFileExtra, String ctDescriptionFile,
String targetDir, int startVersion) throws IOException {
LoadDescriptions data = load(ctDescriptionFileExtra != null ? Paths.get(ctDescriptionFileExtra)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 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 Down Expand Up @@ -82,5 +82,5 @@ suppress.warnings=\
@SuppressWarnings("rawtypes")\n

lint.category=\
LintCategory.get({0})
LintCategory.get({0}).get()

4 changes: 3 additions & 1 deletion make/test/BuildMicrobenchmark.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ MICROBENCHMARK_JAR := $(MICROBENCHMARK_IMAGE_DIR)/benchmarks.jar

MICROBENCHMARK_OUTPUT := $(SUPPORT_OUTPUTDIR)/test/micro
MICROBENCHMARK_CLASSES := $(MICROBENCHMARK_OUTPUT)/classes
MICROBENCHMARK_GENSRC := $(MICROBENCHMARK_OUTPUT)/gensrc
MICROBENCHMARK_JAR_BIN := $(MICROBENCHMARK_OUTPUT)/jar

MICROBENCHMARK_TOOLS_CLASSES := $(MICROBENCHMARK_OUTPUT)/tools-classes
Expand Down Expand Up @@ -104,7 +105,8 @@ $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
--add-exports java.base/sun.security.util.math.intpoly=ALL-UNNAMED \
--enable-preview \
-XDsuppressNotes \
-processor org.openjdk.jmh.generators.BenchmarkProcessor, \
-processor org.openjdk.jmh.generators.BenchmarkProcessor \
-s $(MICROBENCHMARK_GENSRC), \
JAVA_FLAGS := \
--add-exports java.base/jdk.internal.vm=ALL-UNNAMED \
--add-modules jdk.unsupported \
Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/cpu/riscv/c1_LIRAssembler_arith_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void LIR_Assembler::arithmetic_idiv(LIR_Code code, LIR_Opr left, LIR_Opr right,
if (Assembler::is_simm12(c - 1)) {
__ andi(t1, t1, c - 1);
} else {
__ zero_extend(t1, t1, shift);
__ zext(t1, t1, shift);
}
__ subw(dreg, t1, t0);
}
Expand All @@ -78,7 +78,7 @@ void LIR_Assembler::arithmetic_idiv(LIR_Code code, LIR_Opr left, LIR_Opr right,
if (Assembler::is_simm12(c - 1)) {
__ andi(t0, t0, c - 1);
} else {
__ zero_extend(t0, t0, shift);
__ zext(t0, t0, shift);
}
__ addw(dreg, t0, lreg);
__ sraiw(dreg, dreg, shift);
Expand Down Expand Up @@ -205,7 +205,7 @@ void LIR_Assembler::arith_op_double_cpu(LIR_Code code, LIR_Opr left, LIR_Opr rig
if (Assembler::is_simm12(c - 1)) {
__ andi(t0, t0, c - 1);
} else {
__ zero_extend(t0, t0, shift);
__ zext(t0, t0, shift);
}
__ add(dreg, t0, lreg_lo);
__ srai(dreg, dreg, shift);
Expand All @@ -224,7 +224,7 @@ void LIR_Assembler::arith_op_double_cpu(LIR_Code code, LIR_Opr left, LIR_Opr rig
if (Assembler::is_simm12(c - 1)) {
__ andi(t1, t1, c - 1);
} else {
__ zero_extend(t1, t1, shift);
__ zext(t1, t1, shift);
}
__ sub(dreg, t1, t0);
}
Expand Down
14 changes: 7 additions & 7 deletions src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -952,15 +952,15 @@ void LIR_Assembler::emit_opConvert(LIR_OpConvert* op) {
case Bytecodes::_d2f:
__ fcvt_s_d(dest->as_float_reg(), src->as_double_reg()); break;
case Bytecodes::_i2c:
__ zero_extend(dest->as_register(), src->as_register(), 16); break;
__ zext(dest->as_register(), src->as_register(), 16); break;
case Bytecodes::_i2l:
__ sign_extend(dest->as_register_lo(), src->as_register(), 32); break;
__ sext(dest->as_register_lo(), src->as_register(), 32); break;
case Bytecodes::_i2s:
__ sign_extend(dest->as_register(), src->as_register(), 16); break;
__ sext(dest->as_register(), src->as_register(), 16); break;
case Bytecodes::_i2b:
__ sign_extend(dest->as_register(), src->as_register(), 8); break;
__ sext(dest->as_register(), src->as_register(), 8); break;
case Bytecodes::_l2i:
__ sign_extend(dest->as_register(), src->as_register_lo(), 32); break;
__ sext(dest->as_register(), src->as_register_lo(), 32); break;
case Bytecodes::_d2l:
__ fcvt_l_d_safe(dest->as_register_lo(), src->as_double_reg()); break;
case Bytecodes::_f2i:
Expand Down Expand Up @@ -1288,7 +1288,7 @@ void LIR_Assembler::logic_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr
int right_const = right->as_jint();
if (Assembler::is_simm12(right_const)) {
logic_op_imm(Rdst, Rleft, right_const, code);
__ sign_extend(Rdst, Rdst, 32);
__ sext(Rdst, Rdst, 32);
} else {
__ mv(t0, right_const);
logic_op_reg32(Rdst, Rleft, t0, code);
Expand Down Expand Up @@ -1609,7 +1609,7 @@ void LIR_Assembler::emit_updatecrc32(LIR_OpUpdateCRC32* op) {
__ la(res, ExternalAddress(StubRoutines::crc_table_addr()));

__ notr(crc, crc); // ~crc
__ zero_extend(crc, crc, 32);
__ zext(crc, crc, 32);
__ update_byte_crc32(crc, val, res);
__ notr(res, crc); // ~crc
}
Expand Down
10 changes: 5 additions & 5 deletions src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ void C2_MacroAssembler::string_indexof(Register haystack, Register needle,
srli(ch2, ch2, XLEN - 8); // pattern[m-2], 0x0000000b
slli(ch1, tmp6, XLEN - 16);
srli(ch1, ch1, XLEN - 8); // pattern[m-3], 0x0000000c
andi(tmp6, tmp6, 0xff); // pattern[m-4], 0x0000000d
zext(tmp6, tmp6, 8); // pattern[m-4], 0x0000000d
slli(ch2, ch2, 16);
orr(ch2, ch2, ch1); // 0x00000b0c
slli(result, tmp3, 48); // use result as temp register
Expand Down Expand Up @@ -1540,11 +1540,11 @@ void C2_MacroAssembler::string_compare(Register str1, Register str2,
srl(tmp1, tmp1, result);
srl(tmp2, tmp2, result);
if (isLL) {
andi(tmp1, tmp1, 0xFF);
andi(tmp2, tmp2, 0xFF);
zext(tmp1, tmp1, 8);
zext(tmp2, tmp2, 8);
} else {
andi(tmp1, tmp1, 0xFFFF);
andi(tmp2, tmp2, 0xFFFF);
zext(tmp1, tmp1, 16);
zext(tmp2, tmp2, 16);
}
sub(result, tmp1, tmp2);
j(DONE);
Expand Down
10 changes: 5 additions & 5 deletions src/hotspot/cpu/riscv/interp_masm_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,20 @@ void InterpreterMacroAssembler::narrow(Register result) {
bind(notBool);
mv(t1, T_BYTE);
bne(t0, t1, notByte);
sign_extend(result, result, 8);
sext(result, result, 8);
j(done);

bind(notByte);
mv(t1, T_CHAR);
bne(t0, t1, notChar);
zero_extend(result, result, 16);
zext(result, result, 16);
j(done);

bind(notChar);
sign_extend(result, result, 16);
sext(result, result, 16);

bind(done);
sign_extend(result, result, 32);
sext(result, result, 32);
}

void InterpreterMacroAssembler::jump_to_entry(address entry) {
Expand Down Expand Up @@ -276,7 +276,7 @@ void InterpreterMacroAssembler::push_ptr(Register r) {

void InterpreterMacroAssembler::push_i(Register r) {
addi(esp, esp, -wordSize);
sign_extend(r, r, 32);
sext(r, r, 32);
sd(r, Address(esp, 0));
}

Expand Down
Loading

0 comments on commit 88a76ca

Please sign in to comment.