提交 28ec26ce 编写于 作者: K kvn

8041957: -XX:UseAVX=0 cause assert(UseAVX) failed

Summary: temporary set UseAVX=1 and UseSSE=2 in generate_get_cpu_info()
Reviewed-by: twisti
上级 d958ddef
......@@ -1766,7 +1766,7 @@ void Assembler::movdqu(Address dst, XMMRegister src) {
// Move Unaligned 256bit Vector
void Assembler::vmovdqu(XMMRegister dst, XMMRegister src) {
assert(UseAVX, "");
assert(UseAVX > 0, "");
bool vector256 = true;
int encode = vex_prefix_and_encode(dst, xnoreg, src, VEX_SIMD_F3, vector256);
emit_int8(0x6F);
......@@ -1774,7 +1774,7 @@ void Assembler::vmovdqu(XMMRegister dst, XMMRegister src) {
}
void Assembler::vmovdqu(XMMRegister dst, Address src) {
assert(UseAVX, "");
assert(UseAVX > 0, "");
InstructionMark im(this);
bool vector256 = true;
vex_prefix(dst, xnoreg, src, VEX_SIMD_F3, vector256);
......@@ -1783,7 +1783,7 @@ void Assembler::vmovdqu(XMMRegister dst, Address src) {
}
void Assembler::vmovdqu(Address dst, XMMRegister src) {
assert(UseAVX, "");
assert(UseAVX > 0, "");
InstructionMark im(this);
bool vector256 = true;
// swap src<->dst for encoding
......
......@@ -263,6 +263,10 @@ class VM_Version_StubGenerator: public StubCodeGenerator {
// and check upper YMM bits after it.
//
VM_Version::set_avx_cpuFeatures(); // Enable temporary to pass asserts
intx saved_useavx = UseAVX;
intx saved_usesse = UseSSE;
UseAVX = 1;
UseSSE = 2;
// load value into all 32 bytes of ymm7 register
__ movl(rcx, VM_Version::ymm_test_value());
......@@ -292,6 +296,8 @@ class VM_Version_StubGenerator: public StubCodeGenerator {
#endif
VM_Version::clean_cpuFeatures();
UseAVX = saved_useavx;
UseSSE = saved_usesse;
//
// cpuid(0x7) Structured Extended Features
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册