Skip to content

Commit

Permalink
Merge openjdk/master into JDK-8315487
Browse files Browse the repository at this point in the history
Fix conflict caused by de3a218, due to
a change in the imports context:
  src/java.base/share/classes/jdk/internal/access/SharedSecrets.java
  • Loading branch information
franferrax committed Dec 5, 2024
2 parents bfa9507 + bf0debc commit f3c5e58
Show file tree
Hide file tree
Showing 522 changed files with 13,197 additions and 5,447 deletions.
2 changes: 1 addition & 1 deletion .jcheck/conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[general]
project=jdk
jbs=JDK
version=24
version=25

[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
Expand Down
2 changes: 1 addition & 1 deletion make/ModuleWrapper.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ ifeq ($(MAKEFILE_PREFIX), Lib)
# which static library files to include. The variable $(MODULE)_INCLUDED_LIBS is
# added to for each call to SetupJdkLibrary. The file module-included-libs.txt is then
# read in StaticLibs.gmk.
ifneq ($($(MODULE)_JDK_LIBS), )
ifneq ($($(MODULE)_INCLUDED_LIBS), )
LIBLIST := $(SUPPORT_OUTPUTDIR)/modules_static-libs/$(MODULE)/module-included-libs.txt

$(LIBLIST): $(TARGETS)
Expand Down
4 changes: 2 additions & 2 deletions make/autoconf/boot-jdk.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2024, 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 @@ -470,7 +470,7 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
# Maximum amount of heap memory.
JVM_HEAP_LIMIT_32="768"
# Running a 64 bit JVM allows for and requires a bigger heap
JVM_HEAP_LIMIT_64="1600"
JVM_HEAP_LIMIT_64="2048"
JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
Expand Down
2 changes: 1 addition & 1 deletion make/autoconf/util.m4
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ AC_DEFUN([UTIL_CHECK_TYPE_directory],
if test "[x]ARG_CHECK_FOR_FILES" != "x:"; then
for file in ARG_CHECK_FOR_FILES; do
found_files=$($ECHO $(ls $1/$file 2> /dev/null))
found_files=$($ECHO $($LS -d $1/$file 2> /dev/null))
if test "x$found_files" = x; then
FAILURE="Directory $1 does not contain $file"
break
Expand Down
10 changes: 5 additions & 5 deletions make/conf/version-numbers.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@
# Default version, product, and vendor information to use,
# unless overridden by configure

DEFAULT_VERSION_FEATURE=24
DEFAULT_VERSION_FEATURE=25
DEFAULT_VERSION_INTERIM=0
DEFAULT_VERSION_UPDATE=0
DEFAULT_VERSION_PATCH=0
DEFAULT_VERSION_EXTRA1=0
DEFAULT_VERSION_EXTRA2=0
DEFAULT_VERSION_EXTRA3=0
DEFAULT_VERSION_DATE=2025-03-18
DEFAULT_VERSION_CLASSFILE_MAJOR=68 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_DATE=2025-09-16
DEFAULT_VERSION_CLASSFILE_MAJOR=69 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_VERSION_DOCS_API_SINCE=11
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="23 24"
DEFAULT_JDK_SOURCE_TARGET_VERSION=24
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="23 24 25"
DEFAULT_JDK_SOURCE_TARGET_VERSION=25
DEFAULT_PROMOTED_VERSION_PRE=ea
6 changes: 6 additions & 0 deletions make/hotspot/lib/JvmFeatures.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ ifeq ($(call check-jvm-feature, link-time-opt), true)
-fno-fat-lto-objects
JVM_LDFLAGS_FEATURES += $(CXX_O_FLAG_HIGHEST_JVM) -flto=auto \
-fuse-linker-plugin -fno-strict-aliasing
else ifeq ($(call isCompiler, clang), true)
JVM_CFLAGS_FEATURES += -flto -fno-strict-aliasing
ifeq ($(call isBuildOs, aix), true)
JVM_CFLAGS_FEATURES += -ffat-lto-objects
endif
JVM_LDFLAGS_FEATURES += $(CXX_O_FLAG_HIGHEST_JVM) -flto -fno-strict-aliasing
else ifeq ($(call isCompiler, microsoft), true)
JVM_CFLAGS_FEATURES += -GL
JVM_LDFLAGS_FEATURES += -LTCG:INCREMENTAL
Expand Down
1 change: 1 addition & 0 deletions make/test/BuildMicrobenchmark.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
SRC := $(MICROBENCHMARK_SRC), \
BIN := $(MICROBENCHMARK_CLASSES), \
JAVAC_FLAGS := \
--add-exports java.base/jdk.internal.classfile.components=ALL-UNNAMED \
--add-exports java.base/jdk.internal.classfile.impl=ALL-UNNAMED \
--add-exports java.base/jdk.internal.event=ALL-UNNAMED \
--add-exports java.base/jdk.internal.foreign=ALL-UNNAMED \
Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ void C2_MacroAssembler::fast_lock(Register objectReg, Register boxReg, Register
// Handle existing monitor.
bind(object_has_monitor);

// Try to CAS owner (no owner => current thread's _lock_id).
ldr(rscratch2, Address(rthread, JavaThread::lock_id_offset()));
// Try to CAS owner (no owner => current thread's _monitor_owner_id).
ldr(rscratch2, Address(rthread, JavaThread::monitor_owner_id_offset()));
add(tmp, disp_hdr, (in_bytes(ObjectMonitor::owner_offset())-markWord::monitor_value));
cmpxchg(tmp, zr, rscratch2, Assembler::xword, /*acquire*/ true,
/*release*/ true, /*weak*/ false, tmp3Reg); // Sets flags for result
Expand Down Expand Up @@ -469,8 +469,8 @@ void C2_MacroAssembler::fast_lock_lightweight(Register obj, Register box, Regist
// Compute owner address.
lea(t2_owner_addr, owner_address);

// Try to CAS owner (no owner => current thread's _lock_id).
ldr(rscratch2, Address(rthread, JavaThread::lock_id_offset()));
// Try to CAS owner (no owner => current thread's _monitor_owner_id).
ldr(rscratch2, Address(rthread, JavaThread::monitor_owner_id_offset()));
cmpxchg(t2_owner_addr, zr, rscratch2, Assembler::xword, /*acquire*/ true,
/*release*/ false, /*weak*/ false, t3_owner);
br(Assembler::EQ, monitor_locked);
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5305,7 +5305,7 @@ MacroAssembler::KlassDecodeMode MacroAssembler::klass_decode_mode() {
if (operand_valid_for_logical_immediate(
/*is32*/false, (uint64_t)CompressedKlassPointers::base())) {
const size_t range = CompressedKlassPointers::klass_range_end() - CompressedKlassPointers::base();
const uint64_t range_mask = (1ULL << log2i(range)) - 1;
const uint64_t range_mask = right_n_bits(log2i_ceil(range));
if (((uint64_t)CompressedKlassPointers::base() & range_mask) == 0) {
return (_klass_decode_mode = KlassDecodeXor);
}
Expand Down
21 changes: 21 additions & 0 deletions src/hotspot/cpu/ppc/assembler_ppc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,13 +506,18 @@ class Assembler : public AbstractAssembler {
LFSU_OPCODE = (49u << OPCODE_SHIFT | 00u << 1),
LFSX_OPCODE = (31u << OPCODE_SHIFT | 535u << 1),

LFIWAX_OPCODE = (31u << OPCODE_SHIFT | 855u << 1),
LFIWZX_OPCODE = (31u << OPCODE_SHIFT | 887u << 1),

STFD_OPCODE = (54u << OPCODE_SHIFT | 00u << 1),
STFDU_OPCODE = (55u << OPCODE_SHIFT | 00u << 1),
STFDX_OPCODE = (31u << OPCODE_SHIFT | 727u << 1),
STFS_OPCODE = (52u << OPCODE_SHIFT | 00u << 1),
STFSU_OPCODE = (53u << OPCODE_SHIFT | 00u << 1),
STFSX_OPCODE = (31u << OPCODE_SHIFT | 663u << 1),

STFIWX_OPCODE = (31u << OPCODE_SHIFT | 983u << 1),

FSQRT_OPCODE = (63u << OPCODE_SHIFT | 22u << 1), // A-FORM
FSQRTS_OPCODE = (59u << OPCODE_SHIFT | 22u << 1), // A-FORM

Expand Down Expand Up @@ -555,6 +560,10 @@ class Assembler : public AbstractAssembler {
XVDIVSP_OPCODE = (60u << OPCODE_SHIFT | 88u << 3),
XXBRD_OPCODE = (60u << OPCODE_SHIFT | 475u << 2 | 23u << 16), // XX2-FORM
XXBRW_OPCODE = (60u << OPCODE_SHIFT | 475u << 2 | 15u << 16), // XX2-FORM
XVCVHPSP_OPCODE= (60u << OPCODE_SHIFT | 475u << 2 | 24u << 16), // XX2-FORM
XVCVSPHP_OPCODE= (60u << OPCODE_SHIFT | 475u << 2 | 25u << 16), // XX2-FORM
XSCVHPDP_OPCODE= (60u << OPCODE_SHIFT | 347u << 2 | 16u << 16), // XX2-FORM
XSCVDPHP_OPCODE= (60u << OPCODE_SHIFT | 347u << 2 | 17u << 16), // XX2-FORM
XXPERM_OPCODE = (60u << OPCODE_SHIFT | 26u << 3),
XXSEL_OPCODE = (60u << OPCODE_SHIFT | 3u << 4),
XXSPLTIB_OPCODE= (60u << OPCODE_SHIFT | 360u << 1),
Expand Down Expand Up @@ -2076,6 +2085,9 @@ class Assembler : public AbstractAssembler {
inline void lfdu( FloatRegister d, int si16, Register a);
inline void lfdx( FloatRegister d, Register a, Register b);

inline void lfiwax(FloatRegister d, Register a, Register b);
inline void lfiwzx(FloatRegister d, Register a, Register b);

// PPC 1, section 4.6.3 Floating-Point Store Instructions
inline void stfs( FloatRegister s, int si16, Register a);
inline void stfsu( FloatRegister s, int si16, Register a);
Expand All @@ -2084,6 +2096,8 @@ class Assembler : public AbstractAssembler {
inline void stfdu( FloatRegister s, int si16, Register a);
inline void stfdx( FloatRegister s, Register a, Register b);

inline void stfiwx(FloatRegister s, Register a, Register b);

// PPC 1, section 4.6.4 Floating-Point Move Instructions
inline void fmr( FloatRegister d, FloatRegister b);
inline void fmr_( FloatRegister d, FloatRegister b);
Expand Down Expand Up @@ -2348,6 +2362,10 @@ class Assembler : public AbstractAssembler {
inline void xxleqv( VectorSRegister d, VectorSRegister a, VectorSRegister b);
inline void xxbrd( VectorSRegister d, VectorSRegister b);
inline void xxbrw( VectorSRegister d, VectorSRegister b);
inline void xvcvhpsp( VectorSRegister d, VectorSRegister b);
inline void xvcvsphp( VectorSRegister d, VectorSRegister b);
inline void xscvhpdp( VectorSRegister d, VectorSRegister b);
inline void xscvdphp( VectorSRegister d, VectorSRegister b);
inline void xxland( VectorSRegister d, VectorSRegister a, VectorSRegister b);
inline void xxsel( VectorSRegister d, VectorSRegister a, VectorSRegister b, VectorSRegister c);
inline void xxspltib( VectorSRegister d, int ui8);
Expand Down Expand Up @@ -2474,10 +2492,13 @@ class Assembler : public AbstractAssembler {
inline void lfsx( FloatRegister d, Register b);
inline void lfd( FloatRegister d, int si16);
inline void lfdx( FloatRegister d, Register b);
inline void lfiwax(FloatRegister d, Register b);
inline void lfiwzx(FloatRegister d, Register b);
inline void stfs( FloatRegister s, int si16);
inline void stfsx( FloatRegister s, Register b);
inline void stfd( FloatRegister s, int si16);
inline void stfdx( FloatRegister s, Register b);
inline void stfiwx(FloatRegister s, Register b);
inline void lvebx( VectorRegister d, Register s2);
inline void lvehx( VectorRegister d, Register s2);
inline void lvewx( VectorRegister d, Register s2);
Expand Down
14 changes: 14 additions & 0 deletions src/hotspot/cpu/ppc/assembler_ppc.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,9 @@ inline void Assembler::lfd( FloatRegister d, int si16, Register a) { emit_int3
inline void Assembler::lfdu(FloatRegister d, int si16, Register a) { emit_int32( LFDU_OPCODE | frt(d) | ra(a) | simm(si16,16)); }
inline void Assembler::lfdx(FloatRegister d, Register a, Register b) { emit_int32( LFDX_OPCODE | frt(d) | ra0mem(a) | rb(b)); }

inline void Assembler::lfiwax(FloatRegister d, Register a, Register b) { emit_int32( LFIWAX_OPCODE | frt(d) | ra0mem(a) |rb(b)); }
inline void Assembler::lfiwzx(FloatRegister d, Register a, Register b) { emit_int32( LFIWZX_OPCODE | frt(d) | ra0mem(a) |rb(b)); }

// PPC 1, section 4.6.3 Floating-Point Store Instructions
// Use ra0mem instead of ra in some instructions below.
inline void Assembler::stfs( FloatRegister s, int si16, Register a) { emit_int32( STFS_OPCODE | frs(s) | ra0mem(a) | simm(si16,16)); }
Expand All @@ -750,6 +753,8 @@ inline void Assembler::stfd( FloatRegister s, int si16, Register a) { emit_int3
inline void Assembler::stfdu(FloatRegister s, int si16, Register a) { emit_int32( STFDU_OPCODE | frs(s) | ra(a) | simm(si16,16)); }
inline void Assembler::stfdx(FloatRegister s, Register a, Register b){ emit_int32( STFDX_OPCODE | frs(s) | ra0mem(a) | rb(b)); }

inline void Assembler::stfiwx(FloatRegister s, Register a, Register b) { emit_int32( STFIWX_OPCODE | frs(s) | ra0mem(a) |rb(b)); }

// PPC 1, section 4.6.4 Floating-Point Move Instructions
inline void Assembler::fmr( FloatRegister d, FloatRegister b) { emit_int32( FMR_OPCODE | frt(d) | frb(b) | rc(0)); }
inline void Assembler::fmr_(FloatRegister d, FloatRegister b) { emit_int32( FMR_OPCODE | frt(d) | frb(b) | rc(1)); }
Expand Down Expand Up @@ -871,6 +876,10 @@ inline void Assembler::xxlxor( VectorSRegister d, VectorSRegister a, VectorSReg
inline void Assembler::xxleqv( VectorSRegister d, VectorSRegister a, VectorSRegister b) { emit_int32( XXLEQV_OPCODE | vsrt(d) | vsra(a) | vsrb(b)); }
inline void Assembler::xxbrd( VectorSRegister d, VectorSRegister b) { emit_int32( XXBRD_OPCODE | vsrt(d) | vsrb(b) ); }
inline void Assembler::xxbrw( VectorSRegister d, VectorSRegister b) { emit_int32( XXBRW_OPCODE | vsrt(d) | vsrb(b) ); }
inline void Assembler::xvcvhpsp(VectorSRegister d, VectorSRegister b) { emit_int32( XVCVHPSP_OPCODE | vsrt(d) | vsrb(b) ); }
inline void Assembler::xvcvsphp(VectorSRegister d, VectorSRegister b) { emit_int32( XVCVSPHP_OPCODE | vsrt(d) | vsrb(b) ); }
inline void Assembler::xscvhpdp(VectorSRegister d, VectorSRegister b) { emit_int32( XSCVHPDP_OPCODE | vsrt(d) | vsrb(b) ); }
inline void Assembler::xscvdphp(VectorSRegister d, VectorSRegister b) { emit_int32( XSCVDPHP_OPCODE | vsrt(d) | vsrb(b) ); }
inline void Assembler::xvdivsp( VectorSRegister d, VectorSRegister a, VectorSRegister b) { emit_int32( XVDIVSP_OPCODE | vsrt(d) | vsra(a) | vsrb(b)); }
inline void Assembler::xvdivdp( VectorSRegister d, VectorSRegister a, VectorSRegister b) { emit_int32( XVDIVDP_OPCODE | vsrt(d) | vsra(a) | vsrb(b)); }
inline void Assembler::xvabssp( VectorSRegister d, VectorSRegister b) { emit_int32( XVABSSP_OPCODE | vsrt(d) | vsrb(b)); }
Expand Down Expand Up @@ -1150,12 +1159,17 @@ inline void Assembler::lfsx(FloatRegister d, Register b) { emit_int32( LFSX_OPCO
inline void Assembler::lfd( FloatRegister d, int si16) { emit_int32( LFD_OPCODE | frt(d) | simm(si16,16)); }
inline void Assembler::lfdx(FloatRegister d, Register b) { emit_int32( LFDX_OPCODE | frt(d) | rb(b)); }

inline void Assembler::lfiwax(FloatRegister d, Register b) { emit_int32( LFIWAX_OPCODE | frt(d) | rb(b)); }
inline void Assembler::lfiwzx(FloatRegister d, Register b) { emit_int32( LFIWZX_OPCODE | frt(d) | rb(b)); }

// ra0 version
inline void Assembler::stfs( FloatRegister s, int si16) { emit_int32( STFS_OPCODE | frs(s) | simm(si16, 16)); }
inline void Assembler::stfsx(FloatRegister s, Register b) { emit_int32( STFSX_OPCODE | frs(s) | rb(b)); }
inline void Assembler::stfd( FloatRegister s, int si16) { emit_int32( STFD_OPCODE | frs(s) | simm(si16, 16)); }
inline void Assembler::stfdx(FloatRegister s, Register b) { emit_int32( STFDX_OPCODE | frs(s) | rb(b)); }

inline void Assembler::stfiwx(FloatRegister s, Register b) { emit_int32( STFIWX_OPCODE | frs(s) |rb(b)); }

// ra0 version
inline void Assembler::lvebx( VectorRegister d, Register s2) { emit_int32( LVEBX_OPCODE | vrt(d) | rb(s2)); }
inline void Assembler::lvehx( VectorRegister d, Register s2) { emit_int32( LVEHX_OPCODE | vrt(d) | rb(s2)); }
Expand Down
10 changes: 9 additions & 1 deletion src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,7 @@ void LIR_Assembler::arith_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr
}


void LIR_Assembler::intrinsic_op(LIR_Code code, LIR_Opr value, LIR_Opr thread, LIR_Opr dest, LIR_Op* op) {
void LIR_Assembler::intrinsic_op(LIR_Code code, LIR_Opr value, LIR_Opr tmp, LIR_Opr dest, LIR_Op* op) {
switch (code) {
case lir_sqrt: {
__ fsqrt(dest->as_double_reg(), value->as_double_reg());
Expand All @@ -1723,6 +1723,14 @@ void LIR_Assembler::intrinsic_op(LIR_Code code, LIR_Opr value, LIR_Opr thread, L
__ fabs(dest->as_double_reg(), value->as_double_reg());
break;
}
case lir_f2hf: {
__ f2hf(dest.as_register(), value.as_float_reg(), tmp.as_float_reg());
break;
}
case lir_hf2f: {
__ hf2f(dest->as_float_reg(), value.as_register());
break;
}
default: {
ShouldNotReachHere();
break;
Expand Down
19 changes: 19 additions & 0 deletions src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,25 @@ void LIRGenerator::do_MathIntrinsic(Intrinsic* x) {
__ abs(value.result(), dst, LIR_OprFact::illegalOpr);
break;
}
case vmIntrinsics::_floatToFloat16: {
assert(x->number_of_arguments() == 1, "wrong type");
LIRItem value(x->argument_at(0), this);
value.load_item();
LIR_Opr dst = rlock_result(x);
LIR_Opr tmp = new_register(T_FLOAT);
// f2hf treats tmp as live_in. Workaround: initialize to some value.
__ move(LIR_OprFact::floatConst(-0.0), tmp); // just to satisfy LinearScan
__ f2hf(value.result(), dst, tmp);
break;
}
case vmIntrinsics::_float16ToFloat: {
assert(x->number_of_arguments() == 1, "wrong type");
LIRItem value(x->argument_at(0), this);
value.load_item();
LIR_Opr dst = rlock_result(x);
__ hf2f(value.result(), dst, LIR_OprFact::illegalOpr);
break;
}
case vmIntrinsics::_dsqrt:
case vmIntrinsics::_dsqrt_strict: {
if (VM_Version::has_fsqrt()) {
Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/cpu/ppc/macroAssembler_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2664,10 +2664,10 @@ void MacroAssembler::compiler_fast_lock_object(ConditionRegister flag, Register
// Handle existing monitor.
bind(object_has_monitor);

// Try to CAS owner (no owner => current thread's _lock_id).
// Try to CAS owner (no owner => current thread's _monitor_owner_id).
addi(temp, displaced_header, in_bytes(ObjectMonitor::owner_offset()) - markWord::monitor_value);
Register thread_id = displaced_header;
ld(thread_id, in_bytes(JavaThread::lock_id_offset()), R16_thread);
ld(thread_id, in_bytes(JavaThread::monitor_owner_id_offset()), R16_thread);
cmpxchgd(/*flag=*/flag,
/*current_value=*/current_header,
/*compare_value=*/(intptr_t)0,
Expand Down Expand Up @@ -2944,9 +2944,9 @@ void MacroAssembler::compiler_fast_lock_lightweight_object(ConditionRegister fla
addi(owner_addr, monitor, in_bytes(ObjectMonitor::owner_offset()));
}

// Try to CAS owner (no owner => current thread's _lock_id).
// Try to CAS owner (no owner => current thread's _monitor_owner_id).
assert_different_registers(thread_id, monitor, owner_addr, box, R0);
ld(thread_id, in_bytes(JavaThread::lock_id_offset()), R16_thread);
ld(thread_id, in_bytes(JavaThread::monitor_owner_id_offset()), R16_thread);
cmpxchgd(/*flag=*/CCR0,
/*current_value=*/R0,
/*compare_value=*/(intptr_t)0,
Expand Down
3 changes: 3 additions & 0 deletions src/hotspot/cpu/ppc/macroAssembler_ppc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ class MacroAssembler: public Assembler {
void inline set_cmpu3(Register dst, bool treat_unordered_like_less);
// Branch-free implementation to convert !=0 to 1.
void inline normalize_bool(Register dst, Register temp = R0, bool is_64bit = false);
// Convert between half precision float encoded into a short and a float in a FloatRegister.
void inline f2hf(Register dst, FloatRegister src, FloatRegister tmp);
void inline hf2f(FloatRegister dst, Register src);

inline void pd_patch_instruction(address branch, address target, const char* file, int line);
NOT_PRODUCT(static void pd_print_patched_instruction(address branch);)
Expand Down
14 changes: 14 additions & 0 deletions src/hotspot/cpu/ppc/macroAssembler_ppc.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,20 @@ inline void MacroAssembler::normalize_bool(Register dst, Register temp, bool is_
}
}

inline void MacroAssembler::f2hf(Register dst, FloatRegister src, FloatRegister tmp) {
// Single precision values in FloatRegisters use double precision format on PPC64.
xscvdphp(tmp->to_vsr(), src->to_vsr());
mffprd(dst, tmp);
// Make it a proper short (sign-extended).
extsh(dst, dst);
}

inline void MacroAssembler::hf2f(FloatRegister dst, Register src) {
mtfprd(dst, src);
// Single precision values in FloatRegisters use double precision format on PPC64.
xscvhpdp(dst->to_vsr(), dst->to_vsr());
}

// Convenience bc_far versions
inline void MacroAssembler::blt_far(ConditionRegister crx, Label& L, int optimize) { MacroAssembler::bc_far(bcondCRbiIs1, bi0(crx, less), L, optimize); }
inline void MacroAssembler::bgt_far(ConditionRegister crx, Label& L, int optimize) { MacroAssembler::bc_far(bcondCRbiIs1, bi0(crx, greater), L, optimize); }
Expand Down
Loading

0 comments on commit f3c5e58

Please sign in to comment.