Skip to content

Commit edef2e8

Browse files
authored
Merge pull request #2205 from SAP/pr-jdk-27+14
Merge to tag jdk-27+14
2 parents 9555fc2 + 743dc2d commit edef2e8

545 files changed

Lines changed: 12879 additions & 7708 deletions

File tree

Some content is hidden

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

make/autoconf/basic_tools.m4

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2026, 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
@@ -369,6 +369,10 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
369369
IS_GNU_DATE=yes
370370
else
371371
AC_MSG_RESULT([no])
372+
# Likely at the AIX provided version of the date utility here, which is not compatible
373+
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
374+
AC_MSG_ERROR([gnu date from AIX toolbox is required])
375+
fi
372376
IS_GNU_DATE=no
373377
fi
374378
AC_SUBST(IS_GNU_DATE)

make/common/modules/LauncherCommon.gmk

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2026, 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
@@ -35,8 +35,14 @@ include ProcessMarkdown.gmk
3535
include $(TOPDIR)/make/ToolsJdk.gmk
3636

3737
LAUNCHER_SRC := $(TOPDIR)/src/java.base/share/native/launcher
38+
39+
ifeq ($(call isTargetOs, aix), true)
40+
ADD_PLATFORM_INCLUDE_DIR := -I$(TOPDIR)/src/java.base/aix/native/include
41+
endif
42+
3843
LAUNCHER_CFLAGS += -I$(TOPDIR)/src/java.base/share/native/launcher \
3944
-I$(TOPDIR)/src/java.base/share/native/libjli \
45+
$(ADD_PLATFORM_INCLUDE_DIR) \
4046
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjli \
4147
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli \
4248
#

make/hotspot/lib/JvmFlags.gmk

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2013, 2026, 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
@@ -43,10 +43,15 @@ JVM_SRC_DIRS += $(call uniq, $(wildcard $(foreach d, $(JVM_SRC_ROOTS), \
4343
$(JVM_VARIANT_OUTPUTDIR)/gensrc
4444
#
4545

46+
ifeq ($(call isTargetOs, aix), true)
47+
ADD_PLATFORM_INCLUDE_DIR := -I$(TOPDIR)/src/java.base/aix/native/include
48+
endif
49+
4650
JVM_CFLAGS_INCLUDES += \
4751
$(patsubst %,-I%,$(JVM_SRC_DIRS)) \
4852
-I$(TOPDIR)/src/hotspot/share/include \
4953
-I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
54+
$(ADD_PLATFORM_INCLUDE_DIR) \
5055
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
5156
-I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
5257
-I$(TOPDIR)/src/java.base/share/native/libjimage \

make/jdk/src/classes/build/tools/intpoly/FieldGen.java

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2026, 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
@@ -34,36 +34,6 @@
3434

3535
public class FieldGen {
3636

37-
static FieldParams Curve25519 = new FieldParams(
38-
"IntegerPolynomial25519", 26, 10, 1, 255,
39-
Arrays.asList(
40-
new Term(0, -19)
41-
),
42-
Curve25519CrSequence(), simpleSmallCrSequence(10)
43-
);
44-
45-
private static List<CarryReduce> Curve25519CrSequence() {
46-
List<CarryReduce> result = new ArrayList<CarryReduce>();
47-
48-
// reduce(7,2)
49-
result.add(new Reduce(17));
50-
result.add(new Reduce(18));
51-
52-
// carry(8,2)
53-
result.add(new Carry(8));
54-
result.add(new Carry(9));
55-
56-
// reduce(0,7)
57-
for (int i = 10; i < 17; i++) {
58-
result.add(new Reduce(i));
59-
}
60-
61-
// carry(0,9)
62-
result.addAll(fullCarry(10));
63-
64-
return result;
65-
}
66-
6737
static FieldParams Curve448 = new FieldParams(
6838
"IntegerPolynomial448", 28, 16, 1, 448,
6939
Arrays.asList(
@@ -224,8 +194,7 @@ private static List<CarryReduce> orderFieldSmallCrSequence(int numLimbs) {
224194
}
225195

226196
static final FieldParams[] ALL_FIELDS = {
227-
Curve25519, Curve448,
228-
P256, P384, P521, O256, O384, O521, O25519, O448
197+
Curve448, P256, P384, P521, O256, O384, O521, O25519, O448
229198
};
230199

231200
public static class Term {

make/modules/java.base/Launcher.gmk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ ifeq ($(call isTargetOsType, unix), true)
9595
CFLAGS := $(VERSION_CFLAGS), \
9696
EXTRA_HEADER_DIRS := libjava, \
9797
EXTRA_OBJECT_FILES := \
98-
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc$(OBJ_SUFFIX), \
98+
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc$(OBJ_SUFFIX) \
99+
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc_errorcodes$(OBJ_SUFFIX), \
99100
LD_SET_ORIGIN := false, \
100101
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
101102
))

make/modules/java.desktop/lib/AwtLibraries.gmk

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,16 @@ ifeq ($(call isTargetOs, windows), true)
9999
$(TOPDIR)/src/$(MODULE)/windows/native/libawt/windows/awt.rc
100100
endif
101101

102-
# This is the object file to provide the dladdr API, which is not
103-
# part of AIX. It occurs several times in the jdk code base.
104-
# Do not include it. When statically linking the java
105-
# launcher with all JDK and VM static libraries, we use the
106-
# --whole-archive linker option. The duplicate objects in different
107-
# static libraries cause linking errors due to duplicate symbols.
108102
ifeq ($(call isTargetOs, aix), true)
103+
# This is the object file to provide the dladdr API, which is not
104+
# part of AIX. It occurs several times in the jdk code base.
105+
# Do not include it. When statically linking the java
106+
# launcher with all JDK and VM static libraries, we use the
107+
# --whole-archive linker option. The duplicate objects in different
108+
# static libraries cause linking errors due to duplicate symbols.
109109
LIBAWT_STATIC_EXCLUDE_OBJS := porting_aix.o
110+
111+
LIBAWT_CFLAGS += -I$(TOPDIR)/src/java.base/aix/native/include
110112
endif
111113

112114
# -fgcse-after-reload improves performance of MaskFill in Java2D by 20% for

src/hotspot/cpu/aarch64/aarch64.ad

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8024,6 +8024,21 @@ instruct membar_release_lock() %{
80248024
ins_pipe(pipe_serial);
80258025
%}
80268026

8027+
instruct membar_storeload() %{
8028+
match(MemBarStoreLoad);
8029+
ins_cost(VOLATILE_REF_COST*100);
8030+
8031+
format %{ "MEMBAR-store-load\n\t"
8032+
"dmb ish" %}
8033+
8034+
ins_encode %{
8035+
__ block_comment("membar_storeload");
8036+
__ membar(Assembler::StoreLoad);
8037+
%}
8038+
8039+
ins_pipe(pipe_serial);
8040+
%}
8041+
80278042
instruct unnecessary_membar_volatile() %{
80288043
predicate(unnecessary_volatile(n));
80298044
match(MemBarVolatile);
@@ -8053,6 +8068,20 @@ instruct membar_volatile() %{
80538068
ins_pipe(pipe_serial);
80548069
%}
80558070

8071+
instruct membar_full() %{
8072+
match(MemBarFull);
8073+
ins_cost(VOLATILE_REF_COST*100);
8074+
8075+
format %{ "membar_full\n\t"
8076+
"dmb ish" %}
8077+
ins_encode %{
8078+
__ block_comment("membar_full");
8079+
__ membar(Assembler::AnyAny);
8080+
%}
8081+
8082+
ins_pipe(pipe_serial);
8083+
%}
8084+
80568085
// ============================================================================
80578086
// Cast/Convert Instructions
80588087

src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ define_pd_global(bool, ProfileInterpreter, false);
5151
define_pd_global(size_t, CodeCacheExpansionSize, 32*K );
5252
define_pd_global(size_t, CodeCacheMinBlockLength, 1);
5353
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);
54-
define_pd_global(bool, NeverActAsServerClassMachine, true );
5554
define_pd_global(bool, CICompileOSR, true );
5655
#endif // !COMPILER2
5756
define_pd_global(bool, UseTypeProfile, false);

src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M );
7474
define_pd_global(size_t, CodeCacheMinBlockLength, 6);
7575
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);
7676

77-
// Ergonomics related flags
78-
define_pd_global(bool, NeverActAsServerClassMachine, false);
79-
8077
define_pd_global(bool, TrapBasedRangeChecks, false); // Not needed.
8178

8279
#endif // CPU_AARCH64_C2_GLOBALS_AARCH64_HPP

src/hotspot/cpu/aarch64/downcallLinker_aarch64.cpp

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2026, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2019, Arm Limited. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -146,10 +146,10 @@ void DowncallLinker::StubGenerator::generate() {
146146

147147
bool should_save_return_value = !_needs_return_buffer;
148148
RegSpiller out_reg_spiller(_output_registers);
149-
int spill_offset = -1;
149+
int out_spill_offset = -1;
150150

151151
if (should_save_return_value) {
152-
spill_offset = 0;
152+
out_spill_offset = 0;
153153
// spill area can be shared with shadow space and out args,
154154
// since they are only used before the call,
155155
// and spill area is only used after.
@@ -174,6 +174,9 @@ void DowncallLinker::StubGenerator::generate() {
174174
// FP-> | |
175175
// |---------------------| = frame_bottom_offset = frame_size
176176
// | (optional) |
177+
// | in_reg_spiller area |
178+
// |---------------------|
179+
// | (optional) |
177180
// | capture state buf |
178181
// |---------------------| = StubLocations::CAPTURED_STATE_BUFFER
179182
// | (optional) |
@@ -187,6 +190,19 @@ void DowncallLinker::StubGenerator::generate() {
187190
GrowableArray<VMStorage> out_regs = ForeignGlobals::replace_place_holders(_input_registers, locs);
188191
ArgumentShuffle arg_shuffle(filtered_java_regs, out_regs, shuffle_reg);
189192

193+
// Need to spill for state capturing runtime call.
194+
// The area spilled into is distinct from the capture state buffer.
195+
RegSpiller in_reg_spiller(out_regs);
196+
int in_spill_offset = -1;
197+
if (_captured_state_mask != 0) {
198+
// The spill area cannot be shared with the out_spill since
199+
// spilling needs to happen before the call. Allocate a new
200+
// region in the stack for this spill space.
201+
in_spill_offset = allocated_frame_size;
202+
allocated_frame_size += in_reg_spiller.spill_size_bytes();
203+
}
204+
205+
190206
#ifndef PRODUCT
191207
LogTarget(Trace, foreign, downcall) lt;
192208
if (lt.is_enabled()) {
@@ -228,6 +244,20 @@ void DowncallLinker::StubGenerator::generate() {
228244
arg_shuffle.generate(_masm, shuffle_reg, 0, _abi._shadow_space_bytes);
229245
__ block_comment("} argument shuffle");
230246

247+
if (_captured_state_mask != 0) {
248+
assert(in_spill_offset != -1, "must be");
249+
__ block_comment("{ load initial thread local");
250+
in_reg_spiller.generate_spill(_masm, in_spill_offset);
251+
252+
// Copy the contents of the capture state buffer into thread local
253+
__ ldr(c_rarg0, Address(sp, locs.data_offset(StubLocations::CAPTURED_STATE_BUFFER)));
254+
__ movw(c_rarg1, _captured_state_mask);
255+
__ rt_call(CAST_FROM_FN_PTR(address, DowncallLinker::capture_state_pre), tmp1);
256+
257+
in_reg_spiller.generate_fill(_masm, in_spill_offset);
258+
__ block_comment("} load initial thread local");
259+
}
260+
231261
__ blr(as_Register(locs.get(StubLocations::TARGET_ADDRESS)));
232262
// this call is assumed not to have killed rthread
233263

@@ -254,15 +284,15 @@ void DowncallLinker::StubGenerator::generate() {
254284
__ block_comment("{ save thread local");
255285

256286
if (should_save_return_value) {
257-
out_reg_spiller.generate_spill(_masm, spill_offset);
287+
out_reg_spiller.generate_spill(_masm, out_spill_offset);
258288
}
259289

260290
__ ldr(c_rarg0, Address(sp, locs.data_offset(StubLocations::CAPTURED_STATE_BUFFER)));
261291
__ movw(c_rarg1, _captured_state_mask);
262-
__ rt_call(CAST_FROM_FN_PTR(address, DowncallLinker::capture_state), tmp1);
292+
__ rt_call(CAST_FROM_FN_PTR(address, DowncallLinker::capture_state_post), tmp1);
263293

264294
if (should_save_return_value) {
265-
out_reg_spiller.generate_fill(_masm, spill_offset);
295+
out_reg_spiller.generate_fill(_masm, out_spill_offset);
266296
}
267297

268298
__ block_comment("} save thread local");
@@ -321,7 +351,7 @@ void DowncallLinker::StubGenerator::generate() {
321351

322352
if (should_save_return_value) {
323353
// Need to save the native result registers around any runtime calls.
324-
out_reg_spiller.generate_spill(_masm, spill_offset);
354+
out_reg_spiller.generate_spill(_masm, out_spill_offset);
325355
}
326356

327357
__ mov(c_rarg0, rthread);
@@ -330,7 +360,7 @@ void DowncallLinker::StubGenerator::generate() {
330360
__ blr(tmp1);
331361

332362
if (should_save_return_value) {
333-
out_reg_spiller.generate_fill(_masm, spill_offset);
363+
out_reg_spiller.generate_fill(_masm, out_spill_offset);
334364
}
335365

336366
__ b(L_after_safepoint_poll);
@@ -342,13 +372,13 @@ void DowncallLinker::StubGenerator::generate() {
342372
__ bind(L_reguard);
343373

344374
if (should_save_return_value) {
345-
out_reg_spiller.generate_spill(_masm, spill_offset);
375+
out_reg_spiller.generate_spill(_masm, out_spill_offset);
346376
}
347377

348378
__ rt_call(CAST_FROM_FN_PTR(address, SharedRuntime::reguard_yellow_pages), tmp1);
349379

350380
if (should_save_return_value) {
351-
out_reg_spiller.generate_fill(_masm, spill_offset);
381+
out_reg_spiller.generate_fill(_masm, out_spill_offset);
352382
}
353383

354384
__ b(L_after_reguard);

0 commit comments

Comments
 (0)