On Wed, 28 Aug 2024 13:14:22 GMT, Yudi Zheng <yzh...@openjdk.org> wrote:
>> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add stub initialization and extra tanh tests > > src/hotspot/share/jvmci/jvmciCompilerToVM.hpp line 114: > >> 112: static address dcos; >> 113: static address dtan; >> 114: static address dtanh; > > Could you please add the following initializing code? > > diff --git a/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp > b/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp > index 9752d7edf99..1db9be70db0 100644 > --- a/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp > +++ b/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp > @@ -259,6 +259,17 @@ void CompilerToVM::Data::initialize(JVMCI_TRAPS) { > SET_TRIGFUNC(dpow); > > #undef SET_TRIGFUNC > + > +#define SET_TRIGFUNC_OR_NULL(name) \ > + if (StubRoutines::name() != nullptr) { \ > + name = StubRoutines::name(); \ > + } else { \ > + name = nullptr; \ > + } > + > + SET_TRIGFUNC_OR_NULL(dtanh); > + > +#undef SET_TRIGFUNC_OR_NULL > } > > static jboolean is_c1_supported(vmIntrinsics::ID id){ > diff --git a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp > b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp > index fea308503cf..189c1465589 100644 > --- a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp > +++ b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp > @@ -126,6 +126,7 @@ > static_field(CompilerToVM::Data, dsin, > address) \ > static_field(CompilerToVM::Data, dcos, > address) \ > static_field(CompilerToVM::Data, dtan, > address) \ > + static_field(CompilerToVM::Data, dtanh, > address) \ > static_field(CompilerToVM::Data, dexp, > address) \ > static_field(CompilerToVM::Data, dlog, > address) \ > static_field(CompilerToVM::Data, dlog10, > address) \ Thank You Yudi! Please see the code updated with your suggestion. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20657#discussion_r1739390171