Skip to content

Commit

Permalink
conditionally allow EEVEX encoding when UseAVX=0
Browse files Browse the repository at this point in the history
  • Loading branch information
steveatgh committed May 10, 2024
1 parent aee89e7 commit 826fa2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/cpu/x86/assembler_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11921,7 +11921,7 @@ int Assembler::vex_prefix_and_encode(int dst_enc, int nds_enc, int src_enc, VexS

void Assembler::simd_prefix(XMMRegister xreg, XMMRegister nds, Address adr, VexSimdPrefix pre,
VexOpcode opc, InstructionAttr *attributes) {
if (UseAVX > 0) {
if (UseAVX > 0 || (UseAPX && needs_eevex(adr.base(), adr.index()))) {
int xreg_enc = xreg->encoding();
int nds_enc = nds->is_valid() ? nds->encoding() : 0;
vex_prefix(adr, nds_enc, xreg_enc, pre, opc, attributes);
Expand All @@ -11935,7 +11935,7 @@ int Assembler::simd_prefix_and_encode(XMMRegister dst, XMMRegister nds, XMMRegis
VexOpcode opc, InstructionAttr *attributes, bool src_is_gpr) {
int dst_enc = dst->encoding();
int src_enc = src->encoding();
if (UseAVX > 0) {
if (UseAVX > 0 || (UseAPX && needs_eevex(dst_enc, src_enc))) {
int nds_enc = nds->is_valid() ? nds->encoding() : 0;
return vex_prefix_and_encode(dst_enc, nds_enc, src_enc, pre, opc, attributes, src_is_gpr);
} else {
Expand Down

0 comments on commit 826fa2b

Please sign in to comment.