Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge to tag jdk-25+5 #1895

Merged
merged 58 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
e769b53
8346193: CrashGCForDumpingJavaThread do not trigger expected crash bu…
Jan 2, 2025
a77ed30
8336412: sun.net.www.MimeTable has a few unused methods
vy Jan 2, 2025
84e6432
8346288: WB_IsIntrinsicAvailable fails if called with wrong compilati…
Jan 2, 2025
07c9f71
8346921: Remove unused arg in markWord::must_be_preserved
albertnetymk Jan 3, 2025
ca5390c
8346924: TestVectorizationNegativeScale.java fails without the rvv ex…
zifeihan Jan 6, 2025
e98f412
8346922: TestVectorReinterpret.java fails without the rvv extension o…
zifeihan Jan 6, 2025
9393897
8346260: Test "javax/swing/JOptionPane/bug4174551.java" failed becaus…
prsadhuk Jan 6, 2025
f1d85ab
8346773: Fix unmatched brackets in some misc files
MaxXSoft Jan 6, 2025
dfaa891
8346569: Shenandoah: Worker initializes ShenandoahThreadLocalData twi…
zhengyu123 Jan 6, 2025
e0695e0
8346981: Remove obsolete java.base exports of jdk.internal.objectweb.…
asotona Jan 6, 2025
c027f2e
8346983: Remove ASM-based transforms from Class-File API tests
asotona Jan 6, 2025
594e519
8346984: Remove ASM-based benchmarks from Class-File API benchmarks
asotona Jan 6, 2025
ccf3d57
8346985: Convert test/jdk/com/sun/jdi/ClassUnloadEventTest.java to Cl…
asotona Jan 6, 2025
dd81f8d
8344079: Minor fixes and cleanups to compiler lint-related code
archiecobbs Jan 6, 2025
12700cb
8346264: "Total compile time" counter should include time spent in fa…
shipilev Jan 6, 2025
9a60f44
8345668: ZoneOffset.ofTotalSeconds performance regression
naotoj Jan 6, 2025
9c393a2
8346953: Remove unnecessary @SuppressWarnings annotations (client, #2)
archiecobbs Jan 6, 2025
d723597
8345432: (ch, fs) Replace anonymous Thread with InnocuousThread
Jan 6, 2025
8d388cc
8346457: AOT cache creation crashes with "assert(pair_at(i).match() <…
calvinccheung Jan 6, 2025
27646e5
8344148: Add an explicit compiler phase for warning generation
archiecobbs Jan 6, 2025
de02503
8346832: runtime/CompressedOops/CompressedCPUSpecificClassSpaceReserv…
RealFYang Jan 7, 2025
08debd3
8346993: C2 SuperWord: refactor to make more vector nodes available i…
eme64 Jan 7, 2025
0a81676
8346881: [ubsan] logSelection.cpp:154:24 / logSelectionList.cpp:72:9…
MBaesken Jan 7, 2025
0285020
8345676: [ubsan] ProcessImpl_md.c:561:40: runtime error: applying zer…
MBaesken Jan 7, 2025
379ac34
8346838: RISC-V: runtime/CommandLine/OptionsValidation/TestOptionsWit…
RealFYang Jan 7, 2025
f119663
8346573: Can't use custom default file system provider with custom sy…
Jan 7, 2025
3f7052e
8346868: RISC-V: compiler/sharedstubs tests fail after JDK-8332689
RealFYang Jan 7, 2025
5e6cda4
8347000: Bug in com/sun/net/httpserver/bugs/B6361557.java test
jaikiran Jan 7, 2025
8b22517
8211851: (ch) java/nio/channels/AsynchronousSocketChannel/StressLoopb…
Jan 7, 2025
e5f0c19
8345041: IGV: Free Placement Mode in IGV Layout
tobiasholenstein Jan 7, 2025
cf3e48e
8346965: Multiple compiler/ciReplay test fails with -XX:+SegmentedCod…
Jan 7, 2025
4d8fb80
8347038: [JMH] jdk.incubator.vector.SpiltReplicate fails NoClassDefFo…
Jan 7, 2025
c8a9dd3
8346609: Improve MemorySegment.toString
minborg Jan 7, 2025
030149f
8334644: Automate javax/print/attribute/PageRangesException.java
Renjithkannath Jan 7, 2025
9702acc
8175709: DateTimeFormatterBuilder.appendZoneId() has misleading JavaDoc
naotoj Jan 7, 2025
e413fc6
8347127: CTW fails to build after JDK-8334733
shipilev Jan 7, 2025
098afc8
8339113: AccessFlags can be u2 in metadata
coleenp Jan 7, 2025
ddb5881
8329549: Remove FORMAT64_MODIFIER
coleenp Jan 7, 2025
021c476
8347148: [BACKOUT] AccessFlags can be u2 in metadata
Jan 8, 2025
40f0a39
8343342: java/io/File/GetXSpace.java fails on Windows with CD-ROM drive
kurashige23 Jan 8, 2025
bcefab5
8342468: Improve API documentation for java.lang.classfile.constantpool
liach Jan 8, 2025
b0c935c
8347047: Cleanup action passed to MemorySegment::reinterpret keeps ol…
minborg Jan 8, 2025
b741f3f
8343629: More MergeStore benchmark
wenshao Jan 8, 2025
9872421
8347094: Inline CollectedHeap::increment_total_full_collections
albertnetymk Jan 8, 2025
cbabc04
8332506: SIGFPE In ObjectSynchronizer::is_async_deflation_needed()
Jan 8, 2025
f696d9c
8346239: Improve memory efficiency of JimageDiffGenerator
jerboaa Jan 8, 2025
afe5434
8347163: Javadoc error in ConstantPoolBuilder after JDK-8342468
liach Jan 8, 2025
672c413
8345337: JFR: jfr view should display all direct subfields for an eve…
egahlin Jan 8, 2025
92ad8a1
8346052: JFR: Incorrect average value in 'jfr view'
egahlin Jan 8, 2025
4d18e5a
8346872: tools/jpackage/windows/WinLongPathTest.java fails
Jan 8, 2025
ae3fc46
8345580: Remove const from Node::_idx which is modified
nelanbu Jan 8, 2025
55bcf4c
8346047: JFR: Incorrect percentile value in 'jfr view'
egahlin Jan 8, 2025
3fe0818
8346099: JFR: Query for 'jfr view' can't handle wildcard with multipl…
egahlin Jan 8, 2025
49ee4df
8166983: Remove old/legacy unused tzdata files
naotoj Jan 8, 2025
a641932
8346310: Duplicate !HAS_PENDING_EXCEPTION check in DynamicArchive::du…
calvinccheung Jan 8, 2025
6ee2bd2
8347147: [REDO] AccessFlags can be u2 in metadata
coleenp Jan 8, 2025
88fa3b2
8346998: Test nsk/jvmti/ResourceExhausted/resexhausted003 fails with …
lmesnik Jan 8, 2025
2e00816
8346671: java/nio/file/Files/probeContentType/Basic.java fails on Win…
Jan 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/hotspot-unit-tests.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ <h3 id="error-messages">Error messages</h3>
<p>All GoogleTest asserts print compared expressions and their values,
so there is no need to have them in error messages. Asserts print only
compared values, they do not print any of interim variables, e.g.
<code>ASSERT_TRUE((val1 == val2 &amp;&amp; isFail(foo(8)) || i == 18)</code>
<code>ASSERT_TRUE((val1 == val2 &amp;&amp; isFail(foo(8))) || i == 18)</code>
prints only one value. If you use some complex predicates, please
consider <code>EXPECT_PRED*</code> or <code>EXPECT_FORMAT_PRED</code>
assertions family, they check that a predicate returns true/success and
Expand Down
2 changes: 1 addition & 1 deletion doc/hotspot-unit-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Provide informative, but not too verbose error messages.
All GoogleTest asserts print compared expressions and their values, so
there is no need to have them in error messages. Asserts print only
compared values, they do not print any of interim variables, e.g.
`ASSERT_TRUE((val1 == val2 && isFail(foo(8)) || i == 18)` prints only
`ASSERT_TRUE((val1 == val2 && isFail(foo(8))) || i == 18)` prints only
one value. If you use some complex predicates, please consider
`EXPECT_PRED*` or `EXPECT_FORMAT_PRED` assertions family, they check that
a predicate returns true/success and print out all parameters values.
Expand Down
4 changes: 1 addition & 3 deletions make/test/BuildMicrobenchmark.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, 2025, 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 @@ -96,8 +96,6 @@ $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
--add-exports java.base/jdk.internal.foreign=ALL-UNNAMED \
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
--add-exports java.base/jdk.internal.util=ALL-UNNAMED \
--add-exports java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED \
--add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
--add-exports java.base/jdk.internal.vm=ALL-UNNAMED \
--add-exports java.base/sun.invoke.util=ALL-UNNAMED \
--add-exports java.base/sun.security.util=ALL-UNNAMED \
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -503,7 +503,7 @@ void InterpreterMacroAssembler::remove_activation(

// get method access flags
ldr(r1, Address(rfp, frame::interpreter_frame_method_offset * wordSize));
ldr(r2, Address(r1, Method::access_flags_offset()));
ldrh(r2, Address(r1, Method::access_flags_offset()));
tbz(r2, exact_log2(JVM_ACC_SYNCHRONIZED), unlocked);

// Don't unlock anything if the _do_not_unlock_if_synchronized flag
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
* Copyright (c) 2021, Azul Systems, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
Expand Down Expand Up @@ -760,7 +760,7 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
Label L_skip_barrier;

{ // Bypass the barrier for non-static methods
__ ldrw(rscratch1, Address(rmethod, Method::access_flags_offset()));
__ ldrh(rscratch1, Address(rmethod, Method::access_flags_offset()));
__ andsw(zr, rscratch1, JVM_ACC_STATIC);
__ br(Assembler::EQ, L_skip_barrier); // non-static
}
Expand Down
18 changes: 9 additions & 9 deletions src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -809,7 +809,7 @@ void TemplateInterpreterGenerator::lock_method() {
#ifdef ASSERT
{
Label L;
__ ldrw(r0, access_flags);
__ ldrh(r0, access_flags);
__ tst(r0, JVM_ACC_SYNCHRONIZED);
__ br(Assembler::NE, L);
__ stop("method doesn't need synchronization");
Expand All @@ -820,7 +820,7 @@ void TemplateInterpreterGenerator::lock_method() {
// get synchronization object
{
Label done;
__ ldrw(r0, access_flags);
__ ldrh(r0, access_flags);
__ tst(r0, JVM_ACC_STATIC);
// get receiver (assume this is frequent case)
__ ldr(r0, Address(rlocals, Interpreter::local_offset_in_bytes(0)));
Expand Down Expand Up @@ -1225,7 +1225,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {

// make sure method is native & not abstract
#ifdef ASSERT
__ ldrw(r0, access_flags);
__ ldrh(r0, access_flags);
{
Label L;
__ tst(r0, JVM_ACC_NATIVE);
Expand Down Expand Up @@ -1277,7 +1277,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
#ifdef ASSERT
{
Label L;
__ ldrw(r0, access_flags);
__ ldrh(r0, access_flags);
__ tst(r0, JVM_ACC_SYNCHRONIZED);
__ br(Assembler::EQ, L);
__ stop("method needs synchronization");
Expand Down Expand Up @@ -1354,7 +1354,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// pass mirror handle if static call
{
Label L;
__ ldrw(t, Address(rmethod, Method::access_flags_offset()));
__ ldrh(t, Address(rmethod, Method::access_flags_offset()));
__ tbz(t, exact_log2(JVM_ACC_STATIC), L);
// get mirror
__ load_mirror(t, rmethod, r10, rscratch2);
Expand Down Expand Up @@ -1564,7 +1564,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// do unlocking if necessary
{
Label L;
__ ldrw(t, Address(rmethod, Method::access_flags_offset()));
__ ldrh(t, Address(rmethod, Method::access_flags_offset()));
__ tbz(t, exact_log2(JVM_ACC_SYNCHRONIZED), L);
// the code below should be shared with interpreter macro
// assembler implementation
Expand Down Expand Up @@ -1695,7 +1695,7 @@ address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {

// make sure method is not native & not abstract
#ifdef ASSERT
__ ldrw(r0, access_flags);
__ ldrh(r0, access_flags);
{
Label L;
__ tst(r0, JVM_ACC_NATIVE);
Expand Down Expand Up @@ -1751,7 +1751,7 @@ address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
#ifdef ASSERT
{
Label L;
__ ldrw(r0, access_flags);
__ ldrh(r0, access_flags);
__ tst(r0, JVM_ACC_SYNCHRONIZED);
__ br(Assembler::EQ, L);
__ stop("method needs synchronization");
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/arm/interp_masm_arm.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2025, 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 @@ -736,7 +736,7 @@ void InterpreterMacroAssembler::remove_activation(TosState state, Register ret_a
ldrb(Rflag, do_not_unlock_if_synchronized);

// get method access flags
ldr_u32(Raccess_flags, Address(Rmethod, Method::access_flags_offset()));
ldrh(Raccess_flags, Address(Rmethod, Method::access_flags_offset()));

strb(zero_register(Rtemp), do_not_unlock_if_synchronized); // reset the flag

Expand Down
16 changes: 8 additions & 8 deletions src/hotspot/cpu/arm/templateInterpreterGenerator_arm.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2025, 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 @@ -579,7 +579,7 @@ void TemplateInterpreterGenerator::lock_method() {

#ifdef ASSERT
{ Label L;
__ ldr_u32(Rtemp, Address(Rmethod, Method::access_flags_offset()));
__ ldrh(Rtemp, Address(Rmethod, Method::access_flags_offset()));
__ tbnz(Rtemp, JVM_ACC_SYNCHRONIZED_BIT, L);
__ stop("method doesn't need synchronization");
__ bind(L);
Expand All @@ -588,7 +588,7 @@ void TemplateInterpreterGenerator::lock_method() {

// get synchronization object
{ Label done;
__ ldr_u32(Rtemp, Address(Rmethod, Method::access_flags_offset()));
__ ldrh(Rtemp, Address(Rmethod, Method::access_flags_offset()));
__ tst(Rtemp, JVM_ACC_STATIC);
__ ldr(R0, Address(Rlocals, Interpreter::local_offset_in_bytes(0)), eq); // get receiver (assume this is frequent case)
__ b(done, eq);
Expand Down Expand Up @@ -851,7 +851,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {

// make sure method is native & not abstract
#ifdef ASSERT
__ ldr_u32(Rtemp, Address(Rmethod, Method::access_flags_offset()));
__ ldrh(Rtemp, Address(Rmethod, Method::access_flags_offset()));
{
Label L;
__ tbnz(Rtemp, JVM_ACC_NATIVE_BIT, L);
Expand Down Expand Up @@ -893,7 +893,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// no synchronization necessary
#ifdef ASSERT
{ Label L;
__ ldr_u32(Rtemp, Address(Rmethod, Method::access_flags_offset()));
__ ldrh(Rtemp, Address(Rmethod, Method::access_flags_offset()));
__ tbz(Rtemp, JVM_ACC_SYNCHRONIZED_BIT, L);
__ stop("method needs synchronization");
__ bind(L);
Expand Down Expand Up @@ -975,7 +975,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// Pass JNIEnv and mirror for static methods
{
Label L;
__ ldr_u32(Rtemp, Address(Rmethod, Method::access_flags_offset()));
__ ldrh(Rtemp, Address(Rmethod, Method::access_flags_offset()));
__ add(R0, Rthread, in_bytes(JavaThread::jni_environment_offset()));
__ tbz(Rtemp, JVM_ACC_STATIC_BIT, L);
__ load_mirror(Rtemp, Rmethod, Rtemp);
Expand Down Expand Up @@ -1204,7 +1204,7 @@ address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {

// make sure method is not native & not abstract
#ifdef ASSERT
__ ldr_u32(Rtemp, Address(Rmethod, Method::access_flags_offset()));
__ ldrh(Rtemp, Address(Rmethod, Method::access_flags_offset()));
{
Label L;
__ tbz(Rtemp, JVM_ACC_NATIVE_BIT, L);
Expand Down Expand Up @@ -1249,7 +1249,7 @@ address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
// no synchronization necessary
#ifdef ASSERT
{ Label L;
__ ldr_u32(Rtemp, Address(Rmethod, Method::access_flags_offset()));
__ ldrh(Rtemp, Address(Rmethod, Method::access_flags_offset()));
__ tbz(Rtemp, JVM_ACC_SYNCHRONIZED_BIT, L);
__ stop("method needs synchronization");
__ bind(L);
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2024 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -681,14 +681,14 @@ void InterpreterMacroAssembler::unlock_if_synchronized_method(TosState state,
// Check if synchronized method or unlocking prevented by
// JavaThread::do_not_unlock_if_synchronized flag.
lbz(Rdo_not_unlock_flag, in_bytes(JavaThread::do_not_unlock_if_synchronized_offset()), R16_thread);
lwz(Raccess_flags, in_bytes(Method::access_flags_offset()), R19_method);
lhz(Raccess_flags, in_bytes(Method::access_flags_offset()), R19_method);
li(R0, 0);
stb(R0, in_bytes(JavaThread::do_not_unlock_if_synchronized_offset()), R16_thread); // reset flag

push(state);

// Skip if we don't have to unlock.
rldicl_(R0, Raccess_flags, 64-JVM_ACC_SYNCHRONIZED_BIT, 63); // Extract bit and compare to 0.
testbitdi(CCR0, R0, Raccess_flags, JVM_ACC_SYNCHRONIZED_BIT);
beq(CCR0, Lunlocked);

cmpwi(CCR0, Rdo_not_unlock_flag, 0);
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2024 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -1202,7 +1202,7 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
Label L_skip_barrier;

{ // Bypass the barrier for non-static methods
__ lwz(R0, in_bytes(Method::access_flags_offset()), R19_method);
__ lhz(R0, in_bytes(Method::access_flags_offset()), R19_method);
__ andi_(R0, R0, JVM_ACC_STATIC);
__ beq(CCR0, L_skip_barrier); // non-static
}
Expand Down
16 changes: 8 additions & 8 deletions src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2024 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -144,9 +144,9 @@ address TemplateInterpreterGenerator::generate_slow_signature_handler() {
// TODO PPC port: requires change in shared code.
//assert(in_bytes(AccessFlags::flags_offset()) == 0,
// "MethodDesc._access_flags == MethodDesc._access_flags._flags");
// _access_flags must be a 32 bit value.
assert(sizeof(AccessFlags) == 4, "wrong size");
__ lwa(R11_scratch1/*access_flags*/, method_(access_flags));
// _access_flags must be a 16 bit value.
assert(sizeof(AccessFlags) == 2, "wrong size");
__ lhz(R11_scratch1/*access_flags*/, method_(access_flags));
// testbit with condition register.
__ testbitdi(CCR0, R0, R11_scratch1/*access_flags*/, JVM_ACC_STATIC_BIT);
__ btrue(CCR0, L);
Expand Down Expand Up @@ -823,7 +823,7 @@ void TemplateInterpreterGenerator::lock_method(Register Rflags, Register Rscratc

{
if (!flags_preloaded) {
__ lwz(Rflags, method_(access_flags));
__ lhz(Rflags, method_(access_flags));
}

#ifdef ASSERT
Expand Down Expand Up @@ -1301,8 +1301,8 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
assert(__ nonvolatile_accross_vthread_preemtion(access_flags),
"access_flags not preserved");
// Type check.
assert(4 == sizeof(AccessFlags), "unexpected field size");
__ lwz(access_flags, method_(access_flags));
assert(2 == sizeof(AccessFlags), "unexpected field size");
__ lhz(access_flags, method_(access_flags));

// We don't want to reload R19_method and access_flags after calls
// to some helper functions.
Expand Down Expand Up @@ -1769,7 +1769,7 @@ address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
#ifdef ASSERT
else {
Label Lok;
__ lwz(R0, in_bytes(Method::access_flags_offset()), R19_method);
__ lhz(R0, in_bytes(Method::access_flags_offset()), R19_method);
__ andi_(R0, R0, JVM_ACC_SYNCHRONIZED);
__ asm_assert_eq("method needs synchronization");
__ bind(Lok);
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/riscv/codeBuffer_riscv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@

public:
void flush_bundle(bool start_new_bundle) {}
static bool supports_shared_stubs() { return false; }
static bool supports_shared_stubs() { return true; }

#endif // CPU_RISCV_CODEBUFFER_RISCV_HPP
7 changes: 1 addition & 6 deletions src/hotspot/cpu/riscv/compressedKlass_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ char* CompressedKlassPointers::reserve_address_space_for_compressed_classes(size

char* result = nullptr;

// RiscV loads a 64-bit immediate in up to four separate steps, splitting it into four different sections
// RISC-V loads a 64-bit immediate in up to four separate steps, splitting it into four different sections
// (two 32-bit sections, each split into two subsections of 20/12 bits).
//
// 63 ....... 44 43 ... 32 31 ....... 12 11 ... 0
Expand All @@ -51,11 +51,6 @@ char* CompressedKlassPointers::reserve_address_space_for_compressed_classes(size
// with one instruction (2)
result = reserve_address_space_for_unscaled_encoding(size, aslr);

// Failing that, attempt to reserve for base=zero shift>0
if (result == nullptr && optimize_for_zero_base) {
result = reserve_address_space_for_zerobased_encoding(size, aslr);
}

// Failing that, optimize for case (3) - a base with only bits set between [32-44)
if (result == nullptr) {
const uintptr_t from = nth_bit(32);
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/riscv/interp_masm_riscv.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
* Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
Expand Down Expand Up @@ -544,7 +544,7 @@ void InterpreterMacroAssembler::remove_activation(

// get method access flags
ld(x11, Address(fp, frame::interpreter_frame_method_offset * wordSize));
ld(x12, Address(x11, Method::access_flags_offset()));
load_unsigned_short(x12, Address(x11, Method::access_flags_offset()));
test_bit(t0, x12, exact_log2(JVM_ACC_SYNCHRONIZED));
beqz(t0, unlocked);

Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
* Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
Expand Down Expand Up @@ -641,7 +641,7 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
Label L_skip_barrier;

{ // Bypass the barrier for non-static methods
__ lwu(t0, Address(xmethod, Method::access_flags_offset()));
__ load_unsigned_short(t0, Address(xmethod, Method::access_flags_offset()));
__ test_bit(t1, t0, exact_log2(JVM_ACC_STATIC));
__ beqz(t1, L_skip_barrier); // non-static
}
Expand Down
Loading
Loading