Skip to content

Commit b1ad1fa

Browse files
committed
fix
1 parent 9a26b4a commit b1ad1fa

3 files changed

Lines changed: 12 additions & 7 deletions

File tree

src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ void BarrierSetAssembler::nmethod_entry_barrier(MacroAssembler* masm) {
191191
__ block_comment("} nmethod_entry_barrier (nmethod_entry_barrier)");
192192
}
193193

194+
void BarrierSetAssembler::try_resolve_weak_handle(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path) {
195+
// Load the oop from the weak handle.
196+
__ z_lg(obj, Address(obj));
197+
}
198+
194199
#ifdef COMPILER2
195200

196201
OptoReg::Name BarrierSetAssembler::refine_register(const Node* node, OptoReg::Name opto_reg) const {
@@ -206,11 +211,6 @@ OptoReg::Name BarrierSetAssembler::refine_register(const Node* node, OptoReg::Na
206211
return opto_reg;
207212
}
208213

209-
void BarrierSetAssembler::try_resolve_weak_handle_in_c2(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path) {
210-
// Load the oop from the weak handle.
211-
__ z_lg(obj, Address(obj));
212-
}
213-
214214
#undef __
215215
#define __ _masm->
216216

src/hotspot/cpu/s390/gc/shared/barrierSetAssembler_s390.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ class BarrierSetAssembler: public CHeapObj<mtGC> {
5858
virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register jni_env,
5959
Register obj, Register tmp, Label& slowpath);
6060

61+
// Can be used in nmethods including native wrappers.
62+
// Attention: obj will only be valid until next safepoint (no SATB barrier).
63+
// (other platforms currently use it for C2 only: try_resolve_weak_handle_in_c2)
64+
virtual void try_resolve_weak_handle(MacroAssembler* masm, Register obj, Register tmp, Label& slow_path);
65+
6166
virtual void nmethod_entry_barrier(MacroAssembler* masm);
6267

6368
virtual void barrier_stubs_init() {}

src/hotspot/cpu/s390/macroAssembler_s390.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2016, 2024 SAP SE. All rights reserved.
4-
* Copyright 2024 IBM Corporation. All rights reserved.
4+
* Copyright 2024, 2026 IBM Corporation. All rights reserved.
55
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
66
*
77
* This code is free software; you can redistribute it and/or modify it
@@ -6413,7 +6413,7 @@ void MacroAssembler::compiler_fast_lock_object(Register obj, Register box, Regis
64136413
// Check if object matches.
64146414
z_lg(tmp2, Address(tmp1_monitor, ObjectMonitor::object_offset()));
64156415
BarrierSetAssembler* bs_asm = BarrierSet::barrier_set()->barrier_set_assembler();
6416-
bs_asm->try_resolve_weak_handle_in_c2(this, tmp2, Z_R0_scratch, slow_path);
6416+
bs_asm->try_resolve_weak_handle(this, tmp2, Z_R0_scratch, slow_path);
64176417
z_cgr(obj, tmp2);
64186418
z_brne(slow_path);
64196419

0 commit comments

Comments
 (0)