Skip to content

Commit 7c944ee

Browse files
committed
8345172: x86: Some CPU feature asserts are declared as 32-bit only
Reviewed-by: dfenacci, kvn
1 parent 67f18cc commit 7c944ee

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

src/hotspot/cpu/x86/assembler_x86.cpp

+15-15
Original file line numberDiff line numberDiff line change
@@ -2968,7 +2968,7 @@ void Assembler::movb(Register dst, Address src) {
29682968
}
29692969

29702970
void Assembler::movddup(XMMRegister dst, XMMRegister src) {
2971-
NOT_LP64(assert(VM_Version::supports_sse3(), ""));
2971+
assert(VM_Version::supports_sse3(), "");
29722972
int vector_len = VM_Version::supports_avx512novl() ? AVX_512bit : AVX_128bit;
29732973
InstructionAttr attributes(vector_len, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
29742974
attributes.set_rex_vex_w_reverted();
@@ -2977,7 +2977,7 @@ void Assembler::movddup(XMMRegister dst, XMMRegister src) {
29772977
}
29782978

29792979
void Assembler::movddup(XMMRegister dst, Address src) {
2980-
NOT_LP64(assert(VM_Version::supports_sse3(), ""));
2980+
assert(VM_Version::supports_sse3(), "");
29812981
InstructionMark im(this);
29822982
InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
29832983
attributes.set_address_attributes(/* tuple_type */ EVEX_DUP, /* input_size_in_bits */ EVEX_64bit);
@@ -4614,7 +4614,7 @@ void Assembler::vpacksswb(XMMRegister dst, XMMRegister nds, XMMRegister src, int
46144614
}
46154615

46164616
void Assembler::packssdw(XMMRegister dst, XMMRegister src) {
4617-
assert(VM_Version::supports_sse2(), "");
4617+
NOT_LP64(assert(VM_Version::supports_sse2(), "");)
46184618
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ true);
46194619
int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
46204620
emit_int16(0x6B, (0xC0 | encode));
@@ -4820,7 +4820,7 @@ void Assembler::pcmpestri(XMMRegister dst, XMMRegister src, int imm8) {
48204820

48214821
// In this context, the dst vector contains the components that are equal, non equal components are zeroed in dst
48224822
void Assembler::pcmpeqb(XMMRegister dst, XMMRegister src) {
4823-
assert(VM_Version::supports_sse2(), "");
4823+
NOT_LP64(assert(VM_Version::supports_sse2(), "");)
48244824
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ false);
48254825
int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
48264826
emit_int16(0x74, (0xC0 | encode));
@@ -4968,7 +4968,7 @@ void Assembler::evpcmpeqb(KRegister kdst, KRegister mask, XMMRegister nds, Addre
49684968

49694969
// In this context, the dst vector contains the components that are equal, non equal components are zeroed in dst
49704970
void Assembler::pcmpeqw(XMMRegister dst, XMMRegister src) {
4971-
assert(VM_Version::supports_sse2(), "");
4971+
NOT_LP64(assert(VM_Version::supports_sse2(), "");)
49724972
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ false);
49734973
int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
49744974
emit_int16(0x75, (0xC0 | encode));
@@ -5017,7 +5017,7 @@ void Assembler::evpcmpeqw(KRegister kdst, XMMRegister nds, Address src, int vect
50175017

50185018
// In this context, the dst vector contains the components that are equal, non equal components are zeroed in dst
50195019
void Assembler::pcmpeqd(XMMRegister dst, XMMRegister src) {
5020-
assert(VM_Version::supports_sse2(), "");
5020+
NOT_LP64(assert(VM_Version::supports_sse2(), "");)
50215021
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ false);
50225022
int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
50235023
emit_int16(0x76, (0xC0 | encode));
@@ -5122,7 +5122,7 @@ void Assembler::pcmpgtq(XMMRegister dst, XMMRegister src) {
51225122
}
51235123

51245124
void Assembler::pmovmskb(Register dst, XMMRegister src) {
5125-
assert(VM_Version::supports_sse2(), "");
5125+
NOT_LP64(assert(VM_Version::supports_sse2(), "");)
51265126
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ false);
51275127
int encode = simd_prefix_and_encode(as_XMMRegister(dst->encoding()), xnoreg, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
51285128
emit_int16((unsigned char)0xD7, (0xC0 | encode));
@@ -5188,7 +5188,7 @@ void Assembler::pextrq(Address dst, XMMRegister src, int imm8) {
51885188
}
51895189

51905190
void Assembler::pextrw(Register dst, XMMRegister src, int imm8) {
5191-
assert(VM_Version::supports_sse2(), "");
5191+
NOT_LP64(assert(VM_Version::supports_sse2(), "");)
51925192
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ false);
51935193
int encode = simd_prefix_and_encode(as_XMMRegister(dst->encoding()), xnoreg, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
51945194
emit_int24((unsigned char)0xC5, (0xC0 | encode), imm8);
@@ -5274,14 +5274,14 @@ void Assembler::vpinsrq(XMMRegister dst, XMMRegister nds, Register src, int imm8
52745274
}
52755275

52765276
void Assembler::pinsrw(XMMRegister dst, Register src, int imm8) {
5277-
assert(VM_Version::supports_sse2(), "");
5277+
NOT_LP64(assert(VM_Version::supports_sse2(), "");)
52785278
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ false);
52795279
int encode = simd_prefix_and_encode(dst, dst, as_XMMRegister(src->encoding()), VEX_SIMD_66, VEX_OPCODE_0F, &attributes, true);
52805280
emit_int24((unsigned char)0xC4, (0xC0 | encode), imm8);
52815281
}
52825282

52835283
void Assembler::pinsrw(XMMRegister dst, Address src, int imm8) {
5284-
assert(VM_Version::supports_sse2(), "");
5284+
NOT_LP64(assert(VM_Version::supports_sse2(), "");)
52855285
InstructionMark im(this);
52865286
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ false);
52875287
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_16bit);
@@ -8712,7 +8712,7 @@ void Assembler::pmulld(XMMRegister dst, XMMRegister src) {
87128712
}
87138713

87148714
void Assembler::pmuludq(XMMRegister dst, XMMRegister src) {
8715-
assert(VM_Version::supports_sse2(), "");
8715+
NOT_LP64(assert(VM_Version::supports_sse2(), "");)
87168716
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
87178717
int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
87188718
emit_int16((unsigned char)0xF4, (0xC0 | encode));
@@ -8813,7 +8813,7 @@ void Assembler::vpminsb(XMMRegister dst, XMMRegister nds, XMMRegister src, int v
88138813
}
88148814

88158815
void Assembler::pminsw(XMMRegister dst, XMMRegister src) {
8816-
assert(VM_Version::supports_sse2(), "");
8816+
NOT_LP64(assert(VM_Version::supports_sse2(), "");)
88178817
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ true);
88188818
int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
88198819
emit_int16((unsigned char)0xEA, (0xC0 | encode));
@@ -8892,7 +8892,7 @@ void Assembler::vpmaxsb(XMMRegister dst, XMMRegister nds, XMMRegister src, int v
88928892
}
88938893

88948894
void Assembler::pmaxsw(XMMRegister dst, XMMRegister src) {
8895-
assert(VM_Version::supports_sse2(), "");
8895+
NOT_LP64(assert(VM_Version::supports_sse2(), "");)
88968896
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ true);
88978897
int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
88988898
emit_int16((unsigned char)0xEE, (0xC0 | encode));
@@ -12401,15 +12401,15 @@ void Assembler::evpternlogq(XMMRegister dst, int imm8, KRegister mask, XMMRegist
1240112401

1240212402
void Assembler::gf2p8affineqb(XMMRegister dst, XMMRegister src, int imm8) {
1240312403
assert(VM_Version::supports_gfni(), "");
12404-
assert(VM_Version::supports_sse(), "");
12404+
NOT_LP64(assert(VM_Version::supports_sse(), "");)
1240512405
InstructionAttr attributes(AVX_128bit, /* rex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
1240612406
int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F_3A, &attributes);
1240712407
emit_int24((unsigned char)0xCE, (unsigned char)(0xC0 | encode), imm8);
1240812408
}
1240912409

1241012410
void Assembler::vgf2p8affineqb(XMMRegister dst, XMMRegister src2, XMMRegister src3, int imm8, int vector_len) {
1241112411
assert(VM_Version::supports_gfni(), "requires GFNI support");
12412-
assert(VM_Version::supports_sse(), "");
12412+
NOT_LP64(assert(VM_Version::supports_sse(), "");)
1241312413
InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
1241412414
int encode = vex_prefix_and_encode(dst->encoding(), src2->encoding(), src3->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_3A, &attributes);
1241512415
emit_int24((unsigned char)0xCE, (unsigned char)(0xC0 | encode), imm8);

src/hotspot/cpu/x86/macroAssembler_x86.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -5445,7 +5445,6 @@ void MacroAssembler::vallones(XMMRegister dst, int vector_len) {
54455445
} else if (VM_Version::supports_avx()) {
54465446
vpcmpeqd(dst, dst, dst, vector_len);
54475447
} else {
5448-
assert(VM_Version::supports_sse2(), "");
54495448
pcmpeqd(dst, dst);
54505449
}
54515450
}

0 commit comments

Comments
 (0)