Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions src/hotspot/cpu/x86/stubGenerator_x86_64_poly_mont.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,16 @@ address StubGenerator::generate_intpoly_montgomeryMult_P256() {
address start = __ pc();
__ enter();

if (EnableX86ECoreOpts && UseAVX > 1) {
if (VM_Version::supports_avx512ifma() && VM_Version::supports_avx512vlbw()) {
// Register Map
const Register aLimbs = c_rarg0; // rdi | rcx
const Register bLimbs = c_rarg1; // rsi | rdx
const Register rLimbs = c_rarg2; // rdx | r8
const Register tmp = r9;

montgomeryMultiply(aLimbs, bLimbs, rLimbs, tmp, _masm);
} else {
assert(VM_Version::supports_avxifma(), "Require AVX_IFMA support");
__ push(r12);
__ push(r13);
__ push(r14);
Expand Down Expand Up @@ -607,14 +616,6 @@ address StubGenerator::generate_intpoly_montgomeryMult_P256() {
__ pop(r14);
__ pop(r13);
__ pop(r12);
} else {
// Register Map
const Register aLimbs = c_rarg0; // rdi | rcx
const Register bLimbs = c_rarg1; // rsi | rdx
const Register rLimbs = c_rarg2; // rdx | r8
const Register tmp = r9;

montgomeryMultiply(aLimbs, bLimbs, rLimbs, tmp, _masm);
}

__ leave();
Expand Down