Skip to content

Commit

Permalink
Update (2025.01.09, 4th)
Browse files Browse the repository at this point in the history
35420: LA port of 8340313: Crash due to invalid oop in nmethod after C1 patching
35419: LA port of 8329597: C2: Intrinsify Reference.clear
35418: LA port of 8341784: Refactor TypeVect to use a BasicType instead of a const Type*
35417: LA port of 8341619: C2: remove unused StoreCM node
  • Loading branch information
loongson-jvm authored Jan 9, 2025
1 parent 381d291 commit de0e86e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2024, Loongson Technology. All rights reserved.
* Copyright (c) 2021, 2025, Loongson Technology. 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 @@ -1135,6 +1135,8 @@ void ZBarrierSetAssembler::generate_c2_store_barrier_stub(MacroAssembler* masm,
__ MacroAssembler::call_VM_leaf_base(ZBarrierSetRuntime::store_barrier_on_native_oop_field_without_healing_addr(), 1);
} else if (stub->is_atomic()) {
__ MacroAssembler::call_VM_leaf_base(ZBarrierSetRuntime::store_barrier_on_oop_field_with_healing_addr(), 1);
} else if (stub->is_nokeepalive()) {
__ MacroAssembler::call_VM_leaf_base(ZBarrierSetRuntime::no_keepalive_store_barrier_on_oop_field_without_healing_addr(), 1);
} else {
__ MacroAssembler::call_VM_leaf_base(ZBarrierSetRuntime::store_barrier_on_oop_field_without_healing_addr(), 1);
}
Expand Down
5 changes: 3 additions & 2 deletions src/hotspot/cpu/loongarch/gc/z/z_loongarch_64.ad
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
// Copyright (c) 2021, 2024, Loongson Technology. All rights reserved.
// Copyright (c) 2021, 2025, Loongson Technology. 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 @@ -59,7 +59,8 @@ static void z_store_barrier(MacroAssembler* masm, const MachNode* node, Address
__ z_color(rnew_zpointer, rnew_zaddress, tmp);
} else {
bool is_native = (node->barrier_data() & ZBarrierNative) != 0;
ZStoreBarrierStubC2* const stub = ZStoreBarrierStubC2::create(node, ref_addr, rnew_zaddress, rnew_zpointer, is_native, is_atomic);
bool is_nokeepalive = (node->barrier_data() & ZBarrierNoKeepalive) != 0;
ZStoreBarrierStubC2* const stub = ZStoreBarrierStubC2::create(node, ref_addr, rnew_zaddress, rnew_zpointer, is_native, is_atomic, is_nokeepalive);
ZBarrierSetAssembler* bs_asm = ZBarrierSet::assembler();
bs_asm->store_barrier_fast(masm, ref_addr, rnew_zaddress, rnew_zpointer, tmp, true /* in_nmethod */, is_atomic, *stub->entry(), *stub->continuation());
}
Expand Down
16 changes: 0 additions & 16 deletions src/hotspot/cpu/loongarch/loongarch_64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -1144,10 +1144,6 @@ const RegMask* Matcher::predicate_reg_mask(void) {
return nullptr;
}

const TypeVectMask* Matcher::predicate_reg_type(const Type* elemTy, int length) {
return nullptr;
}

int Matcher::scalable_vector_reg_size(const BasicType bt) {
return -1;
}
Expand Down Expand Up @@ -11136,18 +11132,6 @@ instruct cmpFastUnlockLightweight(FlagsReg cr, no_CR_mRegP object, no_CR_mRegP b
ins_pipe( pipe_slow );
%}

// Store card-mark Immediate 0
instruct storeImmCM(memory mem, immI_0 zero) %{
match(Set mem (StoreCM mem zero));

ins_cost(150);
format %{ "st_b $mem, zero\t! card-mark imm0" %}
ins_encode %{
__ loadstore_enc(R0, $mem$$base, $mem$$index, $mem$$scale, $mem$$disp, C2_MacroAssembler::STORE_BYTE);
%}
ins_pipe( pipe_serial );
%}

// Die now
instruct ShouldNotReachHere( )
%{
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/loongarch/nativeInst_loongarch.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2024, Loongson Technology. All rights reserved.
* Copyright (c) 2015, 2025, Loongson Technology. 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 @@ -126,7 +126,7 @@ address NativeCall::destination() const {
// during code generation, where no patching lock is needed.
void NativeCall::set_destination_mt_safe(address dest, bool assert_lock) {
assert(!assert_lock ||
(Patching_lock->is_locked() || SafepointSynchronize::is_at_safepoint()) ||
(CodeCache_lock->is_locked() || SafepointSynchronize::is_at_safepoint()) ||
CompiledICLocker::is_safe(addr_at(0)),
"concurrent code patching");

Expand Down

0 comments on commit de0e86e

Please sign in to comment.