Skip to content

Commit 0c34bf0

Browse files
Volodymyr PaprotskiSandhya Viswanathan
authored andcommitted
8354471: Assertion failure with -XX:-EnableX86ECoreOpts
Reviewed-by: sviswanathan, jbhateja
1 parent 98dac46 commit 0c34bf0

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/hotspot/cpu/x86/stubGenerator_x86_64_poly_mont.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,16 @@ address StubGenerator::generate_intpoly_montgomeryMult_P256() {
564564
address start = __ pc();
565565
__ enter();
566566

567-
if (EnableX86ECoreOpts && UseAVX > 1) {
567+
if (VM_Version::supports_avx512ifma() && VM_Version::supports_avx512vlbw()) {
568+
// Register Map
569+
const Register aLimbs = c_rarg0; // rdi | rcx
570+
const Register bLimbs = c_rarg1; // rsi | rdx
571+
const Register rLimbs = c_rarg2; // rdx | r8
572+
const Register tmp = r9;
573+
574+
montgomeryMultiply(aLimbs, bLimbs, rLimbs, tmp, _masm);
575+
} else {
576+
assert(VM_Version::supports_avxifma(), "Require AVX_IFMA support");
568577
__ push(r12);
569578
__ push(r13);
570579
__ push(r14);
@@ -607,14 +616,6 @@ address StubGenerator::generate_intpoly_montgomeryMult_P256() {
607616
__ pop(r14);
608617
__ pop(r13);
609618
__ pop(r12);
610-
} else {
611-
// Register Map
612-
const Register aLimbs = c_rarg0; // rdi | rcx
613-
const Register bLimbs = c_rarg1; // rsi | rdx
614-
const Register rLimbs = c_rarg2; // rdx | r8
615-
const Register tmp = r9;
616-
617-
montgomeryMultiply(aLimbs, bLimbs, rLimbs, tmp, _masm);
618619
}
619620

620621
__ leave();

0 commit comments

Comments
 (0)