Skip to content
Permalink
Browse files

8235288: AVX 512 instructions inadvertently used on Xeon for small ve…

…ctor width operations

Reviewed-by: kvn, vlivanov
  • Loading branch information
Sandhya Viswanathan
Sandhya Viswanathan committed Dec 4, 2019
1 parent 8b029e2 commit e8c10bc9cd032027c6b26bde1bb4ae2f19087b7d
Showing with 12 additions and 12 deletions.
  1. +12 −12 src/hotspot/cpu/x86/macroAssembler_x86.hpp
@@ -1356,7 +1356,7 @@ class MacroAssembler: public Assembler {
void vpxor(XMMRegister dst, Address src) { Assembler::vpxor(dst, dst, src, true); }

void vinserti128(XMMRegister dst, XMMRegister nds, XMMRegister src, uint8_t imm8) {
if (UseAVX > 2) {
if (UseAVX > 2 && VM_Version::supports_avx512novl()) {
Assembler::vinserti32x4(dst, dst, src, imm8);
} else if (UseAVX > 1) {
// vinserti128 is available only in AVX2
@@ -1367,7 +1367,7 @@ class MacroAssembler: public Assembler {
}

void vinserti128(XMMRegister dst, XMMRegister nds, Address src, uint8_t imm8) {
if (UseAVX > 2) {
if (UseAVX > 2 && VM_Version::supports_avx512novl()) {
Assembler::vinserti32x4(dst, dst, src, imm8);
} else if (UseAVX > 1) {
// vinserti128 is available only in AVX2
@@ -1378,7 +1378,7 @@ class MacroAssembler: public Assembler {
}

void vextracti128(XMMRegister dst, XMMRegister src, uint8_t imm8) {
if (UseAVX > 2) {
if (UseAVX > 2 && VM_Version::supports_avx512novl()) {
Assembler::vextracti32x4(dst, src, imm8);
} else if (UseAVX > 1) {
// vextracti128 is available only in AVX2
@@ -1389,7 +1389,7 @@ class MacroAssembler: public Assembler {
}

void vextracti128(Address dst, XMMRegister src, uint8_t imm8) {
if (UseAVX > 2) {
if (UseAVX > 2 && VM_Version::supports_avx512novl()) {
Assembler::vextracti32x4(dst, src, imm8);
} else if (UseAVX > 1) {
// vextracti128 is available only in AVX2
@@ -1414,31 +1414,31 @@ class MacroAssembler: public Assembler {
}

void vinsertf128_high(XMMRegister dst, XMMRegister src) {
if (UseAVX > 2) {
if (UseAVX > 2 && VM_Version::supports_avx512novl()) {
Assembler::vinsertf32x4(dst, dst, src, 1);
} else {
Assembler::vinsertf128(dst, dst, src, 1);
}
}

void vinsertf128_high(XMMRegister dst, Address src) {
if (UseAVX > 2) {
if (UseAVX > 2 && VM_Version::supports_avx512novl()) {
Assembler::vinsertf32x4(dst, dst, src, 1);
} else {
Assembler::vinsertf128(dst, dst, src, 1);
}
}

void vextractf128_high(XMMRegister dst, XMMRegister src) {
if (UseAVX > 2) {
if (UseAVX > 2 && VM_Version::supports_avx512novl()) {
Assembler::vextractf32x4(dst, src, 1);
} else {
Assembler::vextractf128(dst, src, 1);
}
}

void vextractf128_high(Address dst, XMMRegister src) {
if (UseAVX > 2) {
if (UseAVX > 2 && VM_Version::supports_avx512novl()) {
Assembler::vextractf32x4(dst, src, 1);
} else {
Assembler::vextractf128(dst, src, 1);
@@ -1480,31 +1480,31 @@ class MacroAssembler: public Assembler {
}

void vinsertf128_low(XMMRegister dst, XMMRegister src) {
if (UseAVX > 2) {
if (UseAVX > 2 && VM_Version::supports_avx512novl()) {
Assembler::vinsertf32x4(dst, dst, src, 0);
} else {
Assembler::vinsertf128(dst, dst, src, 0);
}
}

void vinsertf128_low(XMMRegister dst, Address src) {
if (UseAVX > 2) {
if (UseAVX > 2 && VM_Version::supports_avx512novl()) {
Assembler::vinsertf32x4(dst, dst, src, 0);
} else {
Assembler::vinsertf128(dst, dst, src, 0);
}
}

void vextractf128_low(XMMRegister dst, XMMRegister src) {
if (UseAVX > 2) {
if (UseAVX > 2 && VM_Version::supports_avx512novl()) {
Assembler::vextractf32x4(dst, src, 0);
} else {
Assembler::vextractf128(dst, src, 0);
}
}

void vextractf128_low(Address dst, XMMRegister src) {
if (UseAVX > 2) {
if (UseAVX > 2 && VM_Version::supports_avx512novl()) {
Assembler::vextractf32x4(dst, src, 0);
} else {
Assembler::vextractf128(dst, src, 0);

0 comments on commit e8c10bc

Please sign in to comment.
You can’t perform that action at this time.