Skip to content

Commit 1d98834

Browse files
Merge tag 'jdk-22+32' into labsjdk/automation-1-19-2024-1034
Added tag jdk-22+32 for changeset b5ed8cc
2 parents 81546a8 + b5ed8cc commit 1d98834

File tree

242 files changed

+5718
-2329
lines changed

Some content is hidden

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

242 files changed

+5718
-2329
lines changed

make/autoconf/toolchain.m4

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2024, 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
@@ -389,6 +389,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_POST_DETECTION],
389389
# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
390390
CFLAGS="$ORG_CFLAGS"
391391
CXXFLAGS="$ORG_CXXFLAGS"
392+
393+
# filter out some unwanted additions autoconf may add to CXX; we saw this on macOS with autoconf 2.72
394+
UTIL_GET_NON_MATCHING_VALUES(cxx_filtered, $CXX, -std=c++11 -std=gnu++11)
395+
CXX="$cxx_filtered"
392396
])
393397

394398
# Check if a compiler is of the toolchain type we expect, and save the version

make/autoconf/util.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2024, 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
@@ -199,7 +199,7 @@ AC_DEFUN([UTIL_GET_NON_MATCHING_VALUES],
199199
if test -z "$legal_values"; then
200200
$1="$2"
201201
else
202-
result=`$GREP -Fvx "$legal_values" <<< "$values_to_check" | $GREP -v '^$'`
202+
result=`$GREP -Fvx -- "$legal_values" <<< "$values_to_check" | $GREP -v '^$'`
203203
$1=${result//$'\n'/ }
204204
fi
205205
])
@@ -226,7 +226,7 @@ AC_DEFUN([UTIL_GET_MATCHING_VALUES],
226226
if test -z "$illegal_values"; then
227227
$1=""
228228
else
229-
result=`$GREP -Fx "$illegal_values" <<< "$values_to_check" | $GREP -v '^$'`
229+
result=`$GREP -Fx -- "$illegal_values" <<< "$values_to_check" | $GREP -v '^$'`
230230
$1=${result//$'\n'/ }
231231
fi
232232
])

make/data/hotspot-symbols/symbols-unix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ JVM_VirtualThreadEnd
223223
JVM_VirtualThreadMount
224224
JVM_VirtualThreadUnmount
225225
JVM_VirtualThreadHideFrames
226+
JVM_VirtualThreadDisableSuspend
226227

227228
# Scoped values
228229
JVM_EnsureMaterializedForStackWalk_func

make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2024, 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
@@ -1289,25 +1289,58 @@ private static Map<Locale, String> coverageLevelsMap() throws Exception {
12891289
*/
12901290
private static void generateTZDBShortNamesMap() throws IOException {
12911291
Files.walk(Path.of(tzDataDir), 1, FileVisitOption.FOLLOW_LINKS)
1292-
.filter(p -> p.toFile().isFile())
1292+
.filter(p -> p.toFile().isFile() && !p.endsWith("jdk11_backward"))
12931293
.forEach(p -> {
12941294
try {
12951295
String zone = null;
12961296
String rule = null;
12971297
String format = null;
1298+
boolean inVanguard = false;
1299+
boolean inRearguard = false;
12981300
for (var line : Files.readAllLines(p)) {
1299-
if (line.contains("#STDOFF")) continue;
1301+
// Interpret the line in rearguard mode so that STD/DST
1302+
// correctly handles negative DST cases, such as "GMT/IST"
1303+
// vs. "IST/GMT" case for Europe/Dublin
1304+
if (inVanguard) {
1305+
if (line.startsWith("# Rearguard")) {
1306+
inVanguard = false;
1307+
inRearguard = true;
1308+
}
1309+
continue;
1310+
} else if (line.startsWith("# Vanguard")) {
1311+
inVanguard = true;
1312+
continue;
1313+
}
1314+
if (inRearguard) {
1315+
if (line.startsWith("# End of rearguard")) {
1316+
inRearguard = false;
1317+
continue;
1318+
} else {
1319+
if (line.startsWith("#\t")) {
1320+
line = line.substring(1); // omit #
1321+
}
1322+
}
1323+
}
1324+
if (line.isBlank() || line.matches("^[ \t]*#.*")) {
1325+
// ignore blank/comment lines
1326+
continue;
1327+
}
1328+
// remove comments in-line
13001329
line = line.replaceAll("[ \t]*#.*", "");
13011330

13021331
// Zone line
13031332
if (line.startsWith("Zone")) {
1333+
if (zone != null) {
1334+
tzdbShortNamesMap.put(zone, format + NBSP + rule);
1335+
}
13041336
var zl = line.split("[ \t]+", -1);
13051337
zone = zl[1];
13061338
rule = zl[3];
13071339
format = zl[4];
13081340
} else {
13091341
if (zone != null) {
1310-
if (line.isBlank()) {
1342+
if (line.startsWith("Rule") ||
1343+
line.startsWith("Link")) {
13111344
tzdbShortNamesMap.put(zone, format + NBSP + rule);
13121345
zone = null;
13131346
rule = null;

make/jdk/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2001, 2023, 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
@@ -32,6 +32,7 @@
3232
import java.io.FileOutputStream;
3333
import java.io.InputStream;
3434
import java.text.SimpleDateFormat;
35+
import java.util.Arrays;
3536
import java.util.Date;
3637
import java.util.HashMap;
3738
import java.util.Locale;
@@ -339,9 +340,15 @@ private static void buildOtherTables() {
339340
validCurrencyCodes.substring(i * 7 + 3, i * 7 + 6));
340341
checkCurrencyCode(currencyCode);
341342
int tableEntry = mainTable[(currencyCode.charAt(0) - 'A') * A_TO_Z + (currencyCode.charAt(1) - 'A')];
342-
if (tableEntry == INVALID_COUNTRY_ENTRY ||
343-
(tableEntry & SPECIAL_CASE_COUNTRY_MASK) != 0 ||
344-
(tableEntry & SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK) != (currencyCode.charAt(2) - 'A')) {
343+
344+
// Do not allow a future currency to be classified as an otherCurrency,
345+
// otherwise it will leak out into Currency:getAvailableCurrencies
346+
boolean futureCurrency = Arrays.asList(specialCaseNewCurrencies).contains(currencyCode);
347+
boolean simpleCurrency = (tableEntry & SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK) == (currencyCode.charAt(2) - 'A');
348+
349+
// If neither a simple currency, or one defined in the future
350+
// then the current currency is applicable to be added to the otherTable
351+
if (!futureCurrency && !simpleCurrency) {
345352
if (otherCurrenciesCount == maxOtherCurrencies) {
346353
throw new RuntimeException("too many other currencies");
347354
}

src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -282,7 +282,8 @@ void LIR_Assembler::osr_entry() {
282282
__ bind(L);
283283
}
284284
#endif
285-
__ ldp(r19, r20, Address(OSR_buf, slot_offset));
285+
__ ldr(r19, Address(OSR_buf, slot_offset));
286+
__ ldr(r20, Address(OSR_buf, slot_offset + BytesPerWord));
286287
__ str(r19, frame_map()->address_for_monitor_lock(i));
287288
__ str(r20, frame_map()->address_for_monitor_object(i));
288289
}

src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
310310

311311
uint int_args = 0;
312312
uint fp_args = 0;
313-
uint stk_args = 0; // inc by 2 each time
313+
uint stk_args = 0;
314314

315315
for (int i = 0; i < total_args_passed; i++) {
316316
switch (sig_bt[i]) {
@@ -322,8 +322,9 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
322322
if (int_args < Argument::n_int_register_parameters_j) {
323323
regs[i].set1(INT_ArgReg[int_args++]->as_VMReg());
324324
} else {
325+
stk_args = align_up(stk_args, 2);
325326
regs[i].set1(VMRegImpl::stack2reg(stk_args));
326-
stk_args += 2;
327+
stk_args += 1;
327328
}
328329
break;
329330
case T_VOID:
@@ -340,6 +341,7 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
340341
if (int_args < Argument::n_int_register_parameters_j) {
341342
regs[i].set2(INT_ArgReg[int_args++]->as_VMReg());
342343
} else {
344+
stk_args = align_up(stk_args, 2);
343345
regs[i].set2(VMRegImpl::stack2reg(stk_args));
344346
stk_args += 2;
345347
}
@@ -348,15 +350,17 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
348350
if (fp_args < Argument::n_float_register_parameters_j) {
349351
regs[i].set1(FP_ArgReg[fp_args++]->as_VMReg());
350352
} else {
353+
stk_args = align_up(stk_args, 2);
351354
regs[i].set1(VMRegImpl::stack2reg(stk_args));
352-
stk_args += 2;
355+
stk_args += 1;
353356
}
354357
break;
355358
case T_DOUBLE:
356359
assert((i + 1) < total_args_passed && sig_bt[i + 1] == T_VOID, "expecting half");
357360
if (fp_args < Argument::n_float_register_parameters_j) {
358361
regs[i].set2(FP_ArgReg[fp_args++]->as_VMReg());
359362
} else {
363+
stk_args = align_up(stk_args, 2);
360364
regs[i].set2(VMRegImpl::stack2reg(stk_args));
361365
stk_args += 2;
362366
}
@@ -367,7 +371,7 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
367371
}
368372
}
369373

370-
return align_up(stk_args, 2);
374+
return stk_args;
371375
}
372376

373377
// Patch the callers callsite with entry to compiled code if it exists.

src/hotspot/cpu/arm/interp_masm_arm.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,15 +303,19 @@ void InterpreterMacroAssembler::load_field_entry(Register cache, Register index,
303303
}
304304

305305
void InterpreterMacroAssembler::load_method_entry(Register cache, Register index, int bcp_offset) {
306+
assert_different_registers(cache, index);
307+
306308
// Get index out of bytecode pointer
307309
get_index_at_bcp(index, bcp_offset, cache /* as tmp */, sizeof(u2));
310+
311+
// sizeof(ResolvedMethodEntry) is not a power of 2 on Arm, so can't use shift
308312
mov(cache, sizeof(ResolvedMethodEntry));
309313
mul(index, index, cache); // Scale the index to be the entry index * sizeof(ResolvedMethodEntry)
310314

311315
// load constant pool cache pointer
312316
ldr(cache, Address(FP, frame::interpreter_frame_cache_offset * wordSize));
313317
// Get address of method entries array
314-
ldr(cache, Address(cache, ConstantPoolCache::method_entries_offset()));
318+
ldr(cache, Address(cache, in_bytes(ConstantPoolCache::method_entries_offset())));
315319
add(cache, cache, Array<ResolvedMethodEntry>::base_offset_in_bytes());
316320
add(cache, cache, index);
317321
}

src/hotspot/cpu/arm/sharedRuntime_arm.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,6 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
441441
}
442442
}
443443

444-
if (slot & 1) slot++;
445444
return slot;
446445
}
447446

src/hotspot/cpu/arm/templateInterpreterGenerator_arm.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -370,17 +370,16 @@ address TemplateInterpreterGenerator::generate_return_entry_for(TosState state,
370370
if (index_size == sizeof(u4)) {
371371
__ load_resolved_indy_entry(Rcache, Rindex);
372372
__ ldrh(Rcache, Address(Rcache, in_bytes(ResolvedIndyEntry::num_parameters_offset())));
373-
__ check_stack_top();
374-
__ add(Rstack_top, Rstack_top, AsmOperand(Rcache, lsl, Interpreter::logStackElementSize));
375373
} else {
376374
// Pop N words from the stack
377375
assert(index_size == sizeof(u2), "Can only be u2");
378376
__ load_method_entry(Rcache, Rindex);
379-
__ ldrh(Rcache, Address(Rcache, in_bytes(ResolvedIndyEntry::num_parameters_offset())));
380-
__ check_stack_top();
381-
__ add(Rstack_top, Rstack_top, AsmOperand(Rcache, lsl, Interpreter::logStackElementSize));
377+
__ ldrh(Rcache, Address(Rcache, in_bytes(ResolvedMethodEntry::num_parameters_offset())));
382378
}
383379

380+
__ check_stack_top();
381+
__ add(Rstack_top, Rstack_top, AsmOperand(Rcache, lsl, Interpreter::logStackElementSize));
382+
384383
__ convert_retval_to_tos(state);
385384

386385
__ check_and_handle_popframe();

src/hotspot/cpu/arm/templateTable_arm.cpp

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3666,15 +3666,15 @@ void TemplateTable::prepare_invoke(Register Rcache, Register recv) {
36663666
// load receiver if needed (after extra argument is pushed so parameter size is correct)
36673667
if (load_receiver) {
36683668
__ ldrh(recv, Address(Rcache, in_bytes(ResolvedMethodEntry::num_parameters_offset())));
3669-
Address recv_addr = __ receiver_argument_address(Rstack_top, Rtemp, recv);
3670-
__ ldr(recv, recv_addr);
3669+
__ add(recv, Rstack_top, AsmOperand(recv, lsl, Interpreter::logStackElementSize));
3670+
__ ldr(recv, Address(recv, -Interpreter::stackElementSize));
36713671
__ verify_oop(recv);
36723672
}
36733673

36743674
// load return address
36753675
{ const address table = (address) Interpreter::invoke_return_entry_table_for(code);
3676-
__ mov_slow(Rtemp, table);
3677-
__ ldr(LR, Address::indexed_ptr(Rtemp, ret_type));
3676+
__ mov_slow(LR, table);
3677+
__ ldr(LR, Address::indexed_ptr(LR, ret_type));
36783678
}
36793679
}
36803680

@@ -3744,10 +3744,13 @@ void TemplateTable::invokevirtual(int byte_no) {
37443744
void TemplateTable::invokespecial(int byte_no) {
37453745
transition(vtos, vtos);
37463746
assert(byte_no == f1_byte, "use this argument");
3747+
37473748
const Register Rrecv = R2_tmp;
3748-
load_resolved_method_entry_special_or_static(R2_tmp, // ResolvedMethodEntry*
3749+
const Register Rflags = R3_tmp;
3750+
3751+
load_resolved_method_entry_special_or_static(Rrecv, // ResolvedMethodEntry*
37493752
Rmethod, // Method*
3750-
R3_tmp); // Flags
3753+
Rflags); // Flags
37513754
prepare_invoke(Rrecv, Rrecv);
37523755
__ verify_oop(Rrecv);
37533756
__ null_check(Rrecv, Rtemp);
@@ -3760,12 +3763,16 @@ void TemplateTable::invokespecial(int byte_no) {
37603763
void TemplateTable::invokestatic(int byte_no) {
37613764
transition(vtos, vtos);
37623765
assert(byte_no == f1_byte, "use this argument");
3763-
load_resolved_method_entry_special_or_static(R2_tmp, // ResolvedMethodEntry*
3766+
3767+
const Register Rrecv = R2_tmp;
3768+
const Register Rflags = R3_tmp;
3769+
3770+
load_resolved_method_entry_special_or_static(Rrecv, // ResolvedMethodEntry*
37643771
Rmethod, // Method*
3765-
R3_tmp); // Flags
3766-
prepare_invoke(R2_tmp, R2_tmp);
3772+
Rflags); // Flags
3773+
prepare_invoke(Rrecv, Rrecv);
37673774
// do the call
3768-
__ profile_call(R2_tmp);
3775+
__ profile_call(Rrecv);
37693776
__ jump_from_interpreted(Rmethod);
37703777
}
37713778

@@ -3788,10 +3795,10 @@ void TemplateTable::invokeinterface(int byte_no) {
37883795
const Register Rflags = R3_tmp;
37893796
const Register Rklass = R2_tmp; // Note! Same register with Rrecv
37903797

3791-
load_resolved_method_entry_interface(R2_tmp, // ResolvedMethodEntry*
3792-
R1_tmp, // Klass*
3798+
load_resolved_method_entry_interface(Rrecv, // ResolvedMethodEntry*
3799+
Rinterf, // Klass*
37933800
Rmethod, // Method* or itable/vtable index
3794-
R3_tmp); // Flags
3801+
Rflags); // Flags
37953802
prepare_invoke(Rrecv, Rrecv);
37963803

37973804
// First check for Object case, then private interface method,

src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
734734
ShouldNotReachHere();
735735
}
736736
}
737-
return align_up(stk, 2);
737+
return stk;
738738
}
739739

740740
#if defined(COMPILER1) || defined(COMPILER2)

0 commit comments

Comments
 (0)