diff --git a/LoongArch64-support.patch b/LoongArch64-support.patch index 2cae223112565eb05abdf8228a19f1ee005a2c5b..d8d2b57c485805b822951c2055f32e37f9df3591 100644 --- a/LoongArch64-support.patch +++ b/LoongArch64-support.patch @@ -14688,7 +14688,7 @@ index 00000000000..d1c01ee42f0 +#endif // CPU_LOONGARCH_CONTINUATIONENTRY_LOONGARCH_INLINE_HPP diff --git a/src/hotspot/cpu/loongarch/continuationFreezeThaw_loongarch.inline.hpp b/src/hotspot/cpu/loongarch/continuationFreezeThaw_loongarch.inline.hpp new file mode 100644 -index 00000000000..c4c49842464 +index 00000000000..dc61283c128 --- /dev/null +++ b/src/hotspot/cpu/loongarch/continuationFreezeThaw_loongarch.inline.hpp @@ -0,0 +1,284 @@ @@ -14904,7 +14904,7 @@ index 00000000000..c4c49842464 + intptr_t* heap_sp = hf.unextended_sp(); + // If caller is interpreted it already made room for the callee arguments + int overlap = caller.is_interpreted_frame() ? ContinuationHelper::InterpretedFrame::stack_argsize(hf) : 0; -+ const int fsize = ContinuationHelper::InterpretedFrame::frame_bottom(hf) - hf.unextended_sp() - overlap; ++ const int fsize = (int)(ContinuationHelper::InterpretedFrame::frame_bottom(hf) - hf.unextended_sp() - overlap); + const int locals = hf.interpreter_frame_method()->max_locals(); + intptr_t* frame_sp = caller.unextended_sp() - fsize; + intptr_t* fp = frame_sp + (hf.fp() - heap_sp); @@ -16869,7 +16869,7 @@ index 00000000000..36dd89ff08f +#endif // CPU_LOONGARCH_FRAME_LOONGARCH_HPP diff --git a/src/hotspot/cpu/loongarch/frame_loongarch.inline.hpp b/src/hotspot/cpu/loongarch/frame_loongarch.inline.hpp new file mode 100644 -index 00000000000..a740b3b1df3 +index 00000000000..02f7eb198b0 --- /dev/null +++ b/src/hotspot/cpu/loongarch/frame_loongarch.inline.hpp @@ -0,0 +1,472 @@ @@ -17099,13 +17099,13 @@ index 00000000000..a740b3b1df3 + +inline int frame::frame_size() const { + return is_interpreted_frame() -+ ? sender_sp() - sp() ++ ? pointer_delta_as_int(sender_sp(), sp()) + : cb()->frame_size(); +} + +inline int frame::compiled_frame_stack_argsize() const { + assert(cb()->is_compiled(), ""); -+ return (cb()->as_compiled_method()->method()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord; ++ return (cb()->as_nmethod()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord; +} + +inline void frame::interpreted_frame_oop_map(InterpreterOopMap* mask) const { @@ -26998,10 +26998,10 @@ index 00000000000..80dff0c7626 + diff --git a/src/hotspot/cpu/loongarch/loongarch_64.ad b/src/hotspot/cpu/loongarch/loongarch_64.ad new file mode 100644 -index 00000000000..366df18eb9c +index 00000000000..aeb924b2cb6 --- /dev/null +++ b/src/hotspot/cpu/loongarch/loongarch_64.ad -@@ -0,0 +1,15833 @@ +@@ -0,0 +1,15855 @@ +// +// Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. +// Copyright (c) 2015, 2023, Loongson Technology. All rights reserved. @@ -27596,6 +27596,10 @@ index 00000000000..366df18eb9c + return _NO_CR_REG_mask; +%} + ++reg_class no_FP_reg %{ ++ return _NO_FP_REG_mask; ++%} ++ +reg_class p_has_s6_reg %{ + return _PTR_HAS_S6_REG_mask; +%} @@ -27803,6 +27807,7 @@ index 00000000000..366df18eb9c +extern RegMask _ANY_REG_mask; +extern RegMask _PTR_REG_mask; +extern RegMask _NO_CR_REG_mask; ++extern RegMask _NO_FP_REG_mask; +extern RegMask _PTR_HAS_S6_REG_mask; + +class CallStubImpl { @@ -27882,6 +27887,7 @@ index 00000000000..366df18eb9c +RegMask _ANY_REG_mask; +RegMask _PTR_REG_mask; +RegMask _NO_CR_REG_mask; ++RegMask _NO_FP_REG_mask; +RegMask _PTR_HAS_S6_REG_mask; + +void reg_mask_init() { @@ -27914,6 +27920,9 @@ index 00000000000..366df18eb9c + _NO_CR_REG_mask = _PTR_REG_mask; + _NO_CR_REG_mask.SUBTRACT(_T0_LONG_REG_mask); + ++ _NO_FP_REG_mask = _PTR_REG_mask; ++ _NO_FP_REG_mask.Remove(OptoReg::as_OptoReg(r22->as_VMReg())); ++ + _PTR_HAS_S6_REG_mask.OR(_S6_LONG_REG_mask); +} + @@ -30652,6 +30661,17 @@ index 00000000000..366df18eb9c + interface(REG_INTER); +%} + ++// This operand is not allowed to use FP even if ++// FP is not used to hold the frame pointer. ++operand no_FP_mRegP() %{ ++ constraint(ALLOC_IN_RC(no_FP_reg)); ++ match(RegP); ++ match(mRegP); ++ ++ format %{ %} ++ interface(REG_INTER); ++%} ++ +operand p_has_s6_mRegP() %{ + constraint(ALLOC_IN_RC(p_has_s6_reg)); + match(RegP); @@ -32388,7 +32408,9 @@ index 00000000000..366df18eb9c +// Also known as an 'interprocedural jump'. +// Target of jump will eventually return to caller. +// TailJump below removes the return address. -+instruct TailCalljmpInd(mRegP jump_target, s3_RegP method_ptr) %{ ++// Don't use FP for 'jump_target' because a MachEpilogNode has already been ++// emitted just above the TailCall which has reset FP to the caller state. ++instruct TailCalljmpInd(no_FP_mRegP jump_target, s3_RegP method_ptr) %{ + match(TailCall jump_target method_ptr); + + format %{ "JMP $jump_target \t# @TailCalljmpInd" %} @@ -38224,7 +38246,7 @@ index 00000000000..366df18eb9c +// "restore" before this instruction (in Epilogue), we need to materialize it +// in %i0. +//FIXME -+instruct tailjmpInd(mRegP jump_target, a0_RegP ex_oop, mA1RegI exception_pc) %{ ++instruct tailjmpInd(no_FP_mRegP jump_target, a0_RegP ex_oop, mA1RegI exception_pc) %{ + match( TailJump jump_target ex_oop ); + ins_cost(200); + format %{ "Jmp $jump_target ; ex_oop = $ex_oop #@tailjmpInd" %} @@ -52675,7 +52697,7 @@ index 00000000000..5378fce5cd2 +} diff --git a/src/hotspot/cpu/loongarch/register_loongarch.hpp b/src/hotspot/cpu/loongarch/register_loongarch.hpp new file mode 100644 -index 00000000000..25f7abfe75e +index 00000000000..6ffdd41a5e7 --- /dev/null +++ b/src/hotspot/cpu/loongarch/register_loongarch.hpp @@ -0,0 +1,479 @@ @@ -52736,7 +52758,7 @@ index 00000000000..25f7abfe75e + + public: + // accessors -+ constexpr int raw_encoding() const { return this - first(); } ++ constexpr int raw_encoding() const { return checked_cast(this - first()); } + constexpr int encoding() const { assert(is_valid(), "invalid register"); return raw_encoding(); } + constexpr bool is_valid() const { return 0 <= raw_encoding() && raw_encoding() < number_of_registers; } + @@ -52906,7 +52928,7 @@ index 00000000000..25f7abfe75e + + public: + // accessors -+ constexpr int raw_encoding() const { return this - first(); } ++ constexpr int raw_encoding() const { return checked_cast(this - first()); } + constexpr int encoding() const { assert(is_valid(), "invalid register"); return raw_encoding(); } + constexpr bool is_valid() const { return 0 <= raw_encoding() && raw_encoding() < number_of_registers; } + @@ -53067,7 +53089,7 @@ index 00000000000..25f7abfe75e + + public: + // accessors -+ int raw_encoding() const { return this - first(); } ++ int raw_encoding() const { return checked_cast(this - first()); } + int encoding() const { assert(is_valid(), "invalid register"); return raw_encoding(); } + bool is_valid() const { return 0 <= raw_encoding() && raw_encoding() < number_of_registers; } + @@ -56334,13 +56356,13 @@ index 00000000000..834a1e7ffc6 +extern "C" int SpinPause() {return 0;} diff --git a/src/hotspot/cpu/loongarch/smallRegisterMap_loongarch.inline.hpp b/src/hotspot/cpu/loongarch/smallRegisterMap_loongarch.inline.hpp new file mode 100644 -index 00000000000..ebd11807b24 +index 00000000000..7417ece8f8e --- /dev/null +++ b/src/hotspot/cpu/loongarch/smallRegisterMap_loongarch.inline.hpp -@@ -0,0 +1,92 @@ +@@ -0,0 +1,88 @@ +/* + * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2022, Loongson Technology. All rights reserved. ++ * Copyright (c) 2022, 2024, 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 @@ -56371,8 +56393,15 @@ index 00000000000..ebd11807b24 + +// Java frames don't have callee saved registers (except for FP), so we can use a smaller RegisterMap +class SmallRegisterMap { ++ constexpr SmallRegisterMap() = default; ++ ~SmallRegisterMap() = default; ++ NONCOPYABLE(SmallRegisterMap); ++ +public: -+ static constexpr SmallRegisterMap* instance = nullptr; ++ static const SmallRegisterMap* instance() { ++ static constexpr SmallRegisterMap the_instance{}; ++ return &the_instance; ++ } +private: + static void assert_is_fp(VMReg r) NOT_DEBUG_RETURN + DEBUG_ONLY({ assert (r == FP->as_VMReg() || r == FP->as_VMReg()->next(), "Reg: %s", r->name()); }) @@ -56389,17 +56418,6 @@ index 00000000000..ebd11807b24 + return map; + } + -+ SmallRegisterMap() {} -+ -+ SmallRegisterMap(const RegisterMap* map) { -+ #ifdef ASSERT -+ for(int i = 0; i < RegisterMap::reg_count; i++) { -+ VMReg r = VMRegImpl::as_VMReg(i); -+ if (map->location(r, (intptr_t*)nullptr) != nullptr) assert_is_fp(r); -+ } -+ #endif -+ } -+ + inline address location(VMReg reg, intptr_t* sp) const { + assert_is_fp(reg); + return (address)(sp - 2); @@ -56432,7 +56450,7 @@ index 00000000000..ebd11807b24 +#endif // CPU_LOONGARCH_SMALLREGISTERMAP_LOONGARCH_INLINE_HPP diff --git a/src/hotspot/cpu/loongarch/stackChunkFrameStream_loongarch.inline.hpp b/src/hotspot/cpu/loongarch/stackChunkFrameStream_loongarch.inline.hpp new file mode 100644 -index 00000000000..d329c43d661 +index 00000000000..0be80eb3e8a --- /dev/null +++ b/src/hotspot/cpu/loongarch/stackChunkFrameStream_loongarch.inline.hpp @@ -0,0 +1,142 @@ @@ -56473,7 +56491,7 @@ index 00000000000..d329c43d661 +inline bool StackChunkFrameStream::is_in_frame(void* p0) const { + assert(!is_done(), ""); + intptr_t* p = (intptr_t*)p0; -+ int argsize = is_compiled() ? (_cb->as_compiled_method()->method()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord : 0; ++ int argsize = is_compiled() ? (_cb->as_nmethod()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord : 0; + int frame_size = _cb->frame_size() + argsize; + return p == sp() - 2 || ((p - unextended_sp()) >= 0 && (p - unextended_sp()) < frame_size); +} @@ -56553,8 +56571,8 @@ index 00000000000..d329c43d661 + f.interpreted_frame_oop_map(&mask); + return mask.num_oops() + + 1 // for the mirror oop -+ + ((intptr_t*)f.interpreter_frame_monitor_begin() -+ - (intptr_t*)f.interpreter_frame_monitor_end()) / BasicObjectLock::size(); ++ + pointer_delta_as_int((intptr_t*)f.interpreter_frame_monitor_begin(), ++ (intptr_t*)f.interpreter_frame_monitor_end()) / BasicObjectLock::size(); +} + +template<> @@ -70689,7 +70707,7 @@ index 00000000000..ab12021832d + return icache_line_size; +} diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp -index 492300a37d4..b0504aff9c2 100644 +index 7cb862d7c3e..21093e52340 100644 --- a/src/hotspot/os/linux/os_linux.cpp +++ b/src/hotspot/os/linux/os_linux.cpp @@ -23,6 +23,12 @@ @@ -70736,7 +70754,7 @@ index 492300a37d4..b0504aff9c2 100644 const char* search_string = "model name"; #elif defined(M68K) const char* search_string = "CPU"; -@@ -4480,6 +4492,44 @@ void os::Linux::numa_init() { +@@ -4531,6 +4543,44 @@ void os::Linux::numa_init() { // If there's only one node (they start from 0) or if the process // is bound explicitly to a single node using membind, disable NUMA UseNUMA = false; @@ -73537,7 +73555,7 @@ index f3008084254..5780d3f3ad6 100644 #endif // _LP64 diff --git a/src/hotspot/share/oops/stackChunkOop.inline.hpp b/src/hotspot/share/oops/stackChunkOop.inline.hpp -index 9bde7e255d2..8ac313e6b1d 100644 +index eac86b8d0ec..0c5ecb7c6a3 100644 --- a/src/hotspot/share/oops/stackChunkOop.inline.hpp +++ b/src/hotspot/share/oops/stackChunkOop.inline.hpp @@ -22,6 +22,12 @@ @@ -73553,7 +73571,7 @@ index 9bde7e255d2..8ac313e6b1d 100644 #ifndef SHARE_OOPS_STACKCHUNKOOP_INLINE_HPP #define SHARE_OOPS_STACKCHUNKOOP_INLINE_HPP -@@ -336,7 +342,7 @@ inline void stackChunkOopDesc::copy_from_stack_to_chunk(intptr_t* from, intptr_t +@@ -337,7 +343,7 @@ inline void stackChunkOopDesc::copy_from_stack_to_chunk(intptr_t* from, intptr_t assert(to >= start_address(), "Chunk underflow"); assert(to + size <= end_address(), "Chunk overflow"); @@ -73562,7 +73580,7 @@ index 9bde7e255d2..8ac313e6b1d 100644 // Suppress compilation warning-as-error on unimplemented architectures // that stub out arch-specific methods. Some compilers are smart enough // to figure out the argument is always null and then warn about it. -@@ -355,7 +361,7 @@ inline void stackChunkOopDesc::copy_from_chunk_to_stack(intptr_t* from, intptr_t +@@ -356,7 +362,7 @@ inline void stackChunkOopDesc::copy_from_chunk_to_stack(intptr_t* from, intptr_t assert(from >= start_address(), ""); assert(from + size <= end_address(), ""); @@ -73597,7 +73615,7 @@ index 892ccc6b8ab..6c1b9affcbe 100644 macro(MinI) macro(MinL) diff --git a/src/hotspot/share/opto/compile.cpp b/src/hotspot/share/opto/compile.cpp -index 22817951242..ccb24de6741 100644 +index b647a267081..32e0a1dec9b 100644 --- a/src/hotspot/share/opto/compile.cpp +++ b/src/hotspot/share/opto/compile.cpp @@ -22,6 +22,12 @@ @@ -73613,7 +73631,7 @@ index 22817951242..ccb24de6741 100644 #include "precompiled.hpp" #include "asm/macroAssembler.hpp" #include "asm/macroAssembler.inline.hpp" -@@ -3753,6 +3759,7 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f +@@ -3754,6 +3760,7 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f n->set_req(MemBarNode::Precedent, top()); } break; @@ -73622,7 +73640,7 @@ index 22817951242..ccb24de6741 100644 if (n->as_MemBar()->trailing_load() && n->req() > MemBarNode::Precedent) { // At parse time, the trailing MemBarAcquire for a volatile load diff --git a/src/hotspot/share/opto/memnode.cpp b/src/hotspot/share/opto/memnode.cpp -index 89a064a03b7..6746c08498e 100644 +index d5c02b474e3..e0c5fa88fb7 100644 --- a/src/hotspot/share/opto/memnode.cpp +++ b/src/hotspot/share/opto/memnode.cpp @@ -22,6 +22,12 @@ @@ -73638,7 +73656,7 @@ index 89a064a03b7..6746c08498e 100644 #include "precompiled.hpp" #include "classfile/javaClasses.hpp" #include "compiler/compileLog.hpp" -@@ -3281,6 +3287,7 @@ MemBarNode* MemBarNode::make(Compile* C, int opcode, int atp, Node* pn) { +@@ -3318,6 +3324,7 @@ MemBarNode* MemBarNode::make(Compile* C, int opcode, int atp, Node* pn) { case Op_MemBarReleaseLock: return new MemBarReleaseLockNode(C, atp, pn); case Op_MemBarVolatile: return new MemBarVolatileNode(C, atp, pn); case Op_MemBarCPUOrder: return new MemBarCPUOrderNode(C, atp, pn); @@ -73647,7 +73665,7 @@ index 89a064a03b7..6746c08498e 100644 case Op_Initialize: return new InitializeNode(C, atp, pn); default: ShouldNotReachHere(); return nullptr; diff --git a/src/hotspot/share/opto/memnode.hpp b/src/hotspot/share/opto/memnode.hpp -index e511d64ca6f..23bc631434e 100644 +index f12e08f8fd0..d231fddd4b6 100644 --- a/src/hotspot/share/opto/memnode.hpp +++ b/src/hotspot/share/opto/memnode.hpp @@ -22,6 +22,12 @@ @@ -73663,7 +73681,7 @@ index e511d64ca6f..23bc631434e 100644 #ifndef SHARE_OPTO_MEMNODE_HPP #define SHARE_OPTO_MEMNODE_HPP -@@ -1289,6 +1295,14 @@ public: +@@ -1293,6 +1299,14 @@ public: virtual uint ideal_reg() const { return 0; } // not matched in the AD file }; @@ -73679,7 +73697,7 @@ index e511d64ca6f..23bc631434e 100644 public: OnSpinWaitNode(Compile* C, int alias_idx, Node* precedent) diff --git a/src/hotspot/share/opto/output.cpp b/src/hotspot/share/opto/output.cpp -index 998be5e1225..c7c8db1dd4e 100644 +index 988e6e42b8c..3edac67f0ee 100644 --- a/src/hotspot/share/opto/output.cpp +++ b/src/hotspot/share/opto/output.cpp @@ -22,6 +22,12 @@ @@ -73695,7 +73713,7 @@ index 998be5e1225..c7c8db1dd4e 100644 #include "precompiled.hpp" #include "asm/assembler.inline.hpp" #include "asm/macroAssembler.inline.hpp" -@@ -1616,6 +1622,22 @@ void PhaseOutput::fill_buffer(CodeBuffer* cb, uint* blk_starts) { +@@ -1621,6 +1627,22 @@ void PhaseOutput::fill_buffer(CodeBuffer* cb, uint* blk_starts) { DEBUG_ONLY(uint instr_offset = cb->insts_size()); n->emit(*cb, C->regalloc()); current_offset = cb->insts_size(); @@ -73779,7 +73797,7 @@ index 03c0af1a572..7e468def61d 100644 #else frame sender = frame(); diff --git a/src/hotspot/share/runtime/continuationFreezeThaw.cpp b/src/hotspot/share/runtime/continuationFreezeThaw.cpp -index 0882bc933c2..d08380c4ca9 100644 +index 5de00b77366..12c076f64ea 100644 --- a/src/hotspot/share/runtime/continuationFreezeThaw.cpp +++ b/src/hotspot/share/runtime/continuationFreezeThaw.cpp @@ -22,6 +22,12 @@ @@ -73795,7 +73813,7 @@ index 0882bc933c2..d08380c4ca9 100644 #include "precompiled.hpp" #include "classfile/javaClasses.inline.hpp" #include "classfile/vmSymbols.hpp" -@@ -774,7 +780,7 @@ frame FreezeBase::freeze_start_frame_yield_stub(frame f) { +@@ -799,7 +805,7 @@ frame FreezeBase::freeze_start_frame_yield_stub(frame f) { } frame FreezeBase::freeze_start_frame_safepoint_stub(frame f) { @@ -73804,7 +73822,7 @@ index 0882bc933c2..d08380c4ca9 100644 f.set_fp(f.real_fp()); // f.set_fp(*Frame::callee_link_address(f)); // ???? #else Unimplemented(); -@@ -832,7 +838,7 @@ inline freeze_result FreezeBase::recurse_freeze_java_frame(const frame& f, frame +@@ -857,7 +863,7 @@ inline freeze_result FreezeBase::recurse_freeze_java_frame(const frame& f, frame _freeze_size += fsize; NOT_PRODUCT(_frames++;) @@ -73813,7 +73831,7 @@ index 0882bc933c2..d08380c4ca9 100644 // We don't use FKind::frame_bottom(f) == _bottom_address because on x64 there's sometimes an extra word between // enterSpecial and an interpreted frame -@@ -1603,7 +1609,7 @@ static freeze_result is_pinned0(JavaThread* thread, oop cont_scope, bool safepoi +@@ -1630,7 +1636,7 @@ static freeze_result is_pinned0(JavaThread* thread, oop cont_scope, bool safepoi if (!safepoint) { f = f.sender(&map); // this is the yield frame } else { // safepoint yield @@ -73822,7 +73840,7 @@ index 0882bc933c2..d08380c4ca9 100644 f.set_fp(f.real_fp()); // Instead of this, maybe in ContinuationWrapper::set_last_frame always use the real_fp? #else Unimplemented(); -@@ -2234,8 +2240,8 @@ void ThawBase::recurse_thaw_compiled_frame(const frame& hf, frame& caller, int n +@@ -2269,8 +2275,8 @@ void ThawBase::recurse_thaw_compiled_frame(const frame& hf, frame& caller, int n // If we're the bottom-most thawed frame, we're writing to within one word from entrySP // (we might have one padding word for alignment) @@ -73904,7 +73922,7 @@ index ee0f754b865..e29e7164181 100644 assert(owner_raw() != current, "invariant"); assert(_Responsible != current, "invariant"); diff --git a/src/hotspot/share/runtime/os.cpp b/src/hotspot/share/runtime/os.cpp -index d27d34d7a81..6cb80af29e5 100644 +index cd0709a7bca..0c40c27302a 100644 --- a/src/hotspot/share/runtime/os.cpp +++ b/src/hotspot/share/runtime/os.cpp @@ -22,6 +22,12 @@ @@ -73920,7 +73938,7 @@ index d27d34d7a81..6cb80af29e5 100644 #include "precompiled.hpp" #include "classfile/javaClasses.hpp" #include "classfile/moduleEntry.hpp" -@@ -1265,7 +1271,8 @@ bool os::is_first_C_frame(frame* fr) { +@@ -1311,7 +1317,8 @@ bool os::is_first_C_frame(frame* fr) { if ((uintptr_t)fr->sender_sp() == (uintptr_t)-1 || is_pointer_bad(fr->sender_sp())) return true; uintptr_t old_fp = (uintptr_t)fr->link_or_null(); @@ -73931,7 +73949,7 @@ index d27d34d7a81..6cb80af29e5 100644 // stack grows downwards; if old_fp is below current fp or if the stack diff --git a/src/hotspot/share/runtime/sharedRuntime.cpp b/src/hotspot/share/runtime/sharedRuntime.cpp -index 6439a958ccb..622bb9dd8e1 100644 +index f8713f5bb8f..6e75e8f2104 100644 --- a/src/hotspot/share/runtime/sharedRuntime.cpp +++ b/src/hotspot/share/runtime/sharedRuntime.cpp @@ -22,6 +22,12 @@ @@ -73998,7 +74016,7 @@ index fac76262f3c..f41cf843d31 100644 static double __kernel_sin(double x, double y, int iy) { diff --git a/src/hotspot/share/runtime/synchronizer.cpp b/src/hotspot/share/runtime/synchronizer.cpp -index 6cdb95be2e6..44c93897852 100644 +index b5859ed2714..312b68baf42 100644 --- a/src/hotspot/share/runtime/synchronizer.cpp +++ b/src/hotspot/share/runtime/synchronizer.cpp @@ -22,6 +22,12 @@ @@ -74024,7 +74042,7 @@ index 6cdb95be2e6..44c93897852 100644 #else return false; diff --git a/src/hotspot/share/runtime/vmStructs.cpp b/src/hotspot/share/runtime/vmStructs.cpp -index d11af5cb5af..80f7ec0d827 100644 +index 827cb0cdf87..0c1bc904121 100644 --- a/src/hotspot/share/runtime/vmStructs.cpp +++ b/src/hotspot/share/runtime/vmStructs.cpp @@ -22,6 +22,12 @@ @@ -74040,7 +74058,7 @@ index d11af5cb5af..80f7ec0d827 100644 #include "precompiled.hpp" #include "cds/filemap.hpp" #include "ci/ciField.hpp" -@@ -1566,6 +1572,7 @@ +@@ -1567,6 +1573,7 @@ declare_c2_type(StoreFenceNode, MemBarNode) \ declare_c2_type(MemBarVolatileNode, MemBarNode) \ declare_c2_type(MemBarCPUOrderNode, MemBarNode) \ @@ -78392,7 +78410,7 @@ index 5968b7221c7..6bcdf4d189d 100644 * @library /test/lib / * @run driver compiler.c2.irTests.TestVectorizationNotRun diff --git a/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizeTypeConversion.java b/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizeTypeConversion.java -index 67c26ecbddf..ba69c910ce6 100644 +index 899be4bbc9c..3aefead5d13 100644 --- a/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizeTypeConversion.java +++ b/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizeTypeConversion.java @@ -21,6 +21,12 @@ @@ -79755,7 +79773,7 @@ index 00000000000..4c76868453a + +} diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java b/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java -index a555249637b..85cb1cb639b 100644 +index e9d84883f78..f4cd7ec9d03 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java @@ -21,6 +21,12 @@ @@ -79812,10 +79830,10 @@ index b1495d00548..61a9eacdf48 100644 * @run main/othervm -Xbatch -XX:LoopUnrollLimit=250 * -XX:CompileCommand=exclude,compiler.loopopts.superword.ReductionPerf::main diff --git a/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java b/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java -index 390a0dcdd3f..d7baa9bfb75 100644 +index e8759a2bee1..0a22efb6809 100644 --- a/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java +++ b/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java -@@ -21,12 +21,18 @@ +@@ -21,13 +21,19 @@ * questions. */ @@ -79830,6 +79848,7 @@ index 390a0dcdd3f..d7baa9bfb75 100644 * @bug 8289996 * @summary Test range check hoisting for some scaled iv at array index * @library /test/lib / + * @requires vm.flagless - * @requires vm.debug & vm.compiler2.enabled & (os.simpleArch == "x64" | os.arch == "aarch64") + * @requires vm.debug & vm.compiler2.enabled & (os.simpleArch == "x64" | os.arch == "aarch64" | os.arch == "loongarch64") * @modules jdk.incubator.vector @@ -80000,7 +80019,7 @@ index 35f357c22f2..e0643272e83 100644 */ public class TestVectorTest { diff --git a/test/hotspot/jtreg/compiler/vectorapi/VectorLogicalOpIdentityTest.java b/test/hotspot/jtreg/compiler/vectorapi/VectorLogicalOpIdentityTest.java -index b0037973ad1..3ed2735c525 100644 +index 426dec67019..ea25a81a354 100644 --- a/test/hotspot/jtreg/compiler/vectorapi/VectorLogicalOpIdentityTest.java +++ b/test/hotspot/jtreg/compiler/vectorapi/VectorLogicalOpIdentityTest.java @@ -22,6 +22,12 @@ @@ -80306,7 +80325,7 @@ index 2e7302bba05..964c03955d1 100644 */ diff --git a/test/hotspot/jtreg/compiler/vectorization/runner/ArrayShiftOpTest.java b/test/hotspot/jtreg/compiler/vectorization/runner/ArrayShiftOpTest.java -index 74262142247..920f0418e10 100644 +index eea79ac4cd6..526aec56814 100644 --- a/test/hotspot/jtreg/compiler/vectorization/runner/ArrayShiftOpTest.java +++ b/test/hotspot/jtreg/compiler/vectorization/runner/ArrayShiftOpTest.java @@ -21,6 +21,12 @@ @@ -80321,8 +80340,8 @@ index 74262142247..920f0418e10 100644 + /* * @test - * @summary Vectorization test on bug-prone shift operation -@@ -35,7 +41,7 @@ + * @bug 8183390 8332905 +@@ -36,7 +42,7 @@ * -XX:+WhiteBoxAPI * compiler.vectorization.runner.ArrayShiftOpTest * @@ -82661,7 +82680,7 @@ index 5d9c3982fb6..f346e763db5 100644 * @requires vm.flagless * @library /test/lib diff --git a/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestIRMatching.java b/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestIRMatching.java -index 4794a9c8127..cc4e5c0b64f 100644 +index 0fd262bd13a..0fee3041f15 100644 --- a/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestIRMatching.java +++ b/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestIRMatching.java @@ -21,6 +21,12 @@ @@ -83517,6 +83536,28 @@ index 97856075bef..c6d6fa8efb5 100644 + + } } +diff --git a/test/jdk/java/nio/channels/DatagramChannel/Disconnect.java b/test/jdk/java/nio/channels/DatagramChannel/Disconnect.java +index cdc5882fefd..16120f85168 100644 +--- a/test/jdk/java/nio/channels/DatagramChannel/Disconnect.java ++++ b/test/jdk/java/nio/channels/DatagramChannel/Disconnect.java +@@ -52,7 +52,7 @@ public class Disconnect { + if (IPSupport.hasIPv4()) { + // test with IPv4 only + try (DatagramChannel dc = DatagramChannel.open(StandardProtocolFamily.INET)) { +- InetAddress lo4 = InetAddress.ofLiteral("127.0.0.1"); ++ InetAddress lo4 = InetAddress.getByName("127.0.0.1"); + System.out.println("Testing with INET family and " + lo4); + test(dc, lo4); + test(dc, lo4); +@@ -62,7 +62,7 @@ public class Disconnect { + if (IPSupport.hasIPv6()) { + // test with IPv6 only + try (DatagramChannel dc = DatagramChannel.open(StandardProtocolFamily.INET6)) { +- InetAddress lo6 = InetAddress.ofLiteral("::1"); ++ InetAddress lo6 = InetAddress.getByName("::1"); + System.out.println("Testing with INET6 family and " + lo6); + test(dc, lo6); + test(dc, lo6); diff --git a/test/jdk/java/util/concurrent/ConcurrentHashMap/MapLoops.java b/test/jdk/java/util/concurrent/ConcurrentHashMap/MapLoops.java index ca1292afd3a..a8052f06143 100644 --- a/test/jdk/java/util/concurrent/ConcurrentHashMap/MapLoops.java @@ -83606,7 +83647,7 @@ index 37d770b62a5..1c3df61b8a7 100644 test("foo", "10.5.18.22", true, 5); test("theclub", "129.156.220.1", true, 6); diff --git a/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java b/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java -index f8ce856bddd..84b7ecba37f 100644 +index e78e200ac24..0a6abfd088f 100644 --- a/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java +++ b/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java @@ -33,6 +33,12 @@ import java.util.HashSet; @@ -83632,7 +83673,7 @@ index f8ce856bddd..84b7ecba37f 100644 OS("isAix", "isLinux", "isOSX", "isWindows"), VM_TYPE("isClient", "isServer", "isMinimal", "isZero", "isEmbedded"), diff --git a/test/lib/jdk/test/lib/Platform.java b/test/lib/jdk/test/lib/Platform.java -index 92663c65d0f..311facd8ee1 100644 +index e2451fc8366..be0ecfd98aa 100644 --- a/test/lib/jdk/test/lib/Platform.java +++ b/test/lib/jdk/test/lib/Platform.java @@ -21,6 +21,12 @@ diff --git a/openjdk-21.spec b/openjdk-21.spec index e7579222c52e8bdf4ab179e0ca416c3dc4498dbb..91cd6a0fdfb5de974ab61ed4b9a0a82cbdcfc55a 100644 --- a/openjdk-21.spec +++ b/openjdk-21.spec @@ -897,7 +897,7 @@ Name: java-21-%{origin} Version: %{newjavaver}.%{buildver} # This package needs `.rolling` as part of Release so as to not conflict on install with # java-X-openjdk. I.e. when latest rolling release is also an LTS release packaged as -Release: 0 +Release: 1 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # and this change was brought into RHEL-4. java-1.5.0-ibm packages @@ -1872,6 +1872,9 @@ cjc.mainProgram(args) -- the returns from copy_jdk_configs.lua should not affect %changelog +* Wed Nov 6 2024 Pan Xuefeng - 1:21.0.5.11-1 +- update LoongArch64 port to 21.0.5 + * Wed Oct 16 2024 huangjie - 1:21.0.5.11-0 - update to jdk21.0.5-ga - delete Backport-JDK-8333462-Performance-regression-of-new-D.patch