Mercurial > hg > openjdk > jdk9 > hotspot
changeset 12721:28e7bb59323e
8178033: C1 crashes with -XX:UseAVX = 3: "not a mov [reg+offs], reg instruction"
Summary: Skip the EVEX prefix such that the instruction address points to the prefixed opcode.
Reviewed-by: kvn, mcberg
author | thartmann |
---|---|
date | Thu, 06 Apr 2017 08:19:42 +0200 |
parents | 2eef1000e07f |
children | 83f1f2fad2a5 |
files | src/cpu/x86/vm/assembler_x86.cpp src/cpu/x86/vm/nativeInst_x86.cpp src/cpu/x86/vm/nativeInst_x86.hpp |
diffstat | 3 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cpu/x86/vm/assembler_x86.cpp Mon Apr 03 14:58:17 2017 -0700 +++ b/src/cpu/x86/vm/assembler_x86.cpp Thu Apr 06 08:19:42 2017 +0200 @@ -917,7 +917,7 @@ break; case 0x62: // EVEX_4bytes - assert((UseAVX > 0), "shouldn't have EVEX prefix"); + assert(VM_Version::supports_evex(), "shouldn't have EVEX prefix"); assert(ip == inst+1, "no prefixes allowed"); // no EVEX collisions, all instructions that have 0x62 opcodes // have EVEX versions and are subopcodes of 0x66
--- a/src/cpu/x86/vm/nativeInst_x86.cpp Mon Apr 03 14:58:17 2017 -0700 +++ b/src/cpu/x86/vm/nativeInst_x86.cpp Thu Apr 06 08:19:42 2017 +0200 @@ -365,6 +365,10 @@ NOT_LP64(assert((0xC0 & ubyte_at(1)) == 0xC0, "shouldn't have LDS and LES instructions")); return 3; } + if (instr_0 == instruction_EVEX_prefix_4bytes) { + assert(VM_Version::supports_evex(), "shouldn't have EVEX prefix"); + return 4; + } // First check to see if we have a (prefixed or not) xor if (instr_0 >= instruction_prefix_wide_lo && // 0x40
--- a/src/cpu/x86/vm/nativeInst_x86.hpp Mon Apr 03 14:58:17 2017 -0700 +++ b/src/cpu/x86/vm/nativeInst_x86.hpp Thu Apr 06 08:19:42 2017 +0200 @@ -356,6 +356,7 @@ instruction_VEX_prefix_2bytes = Assembler::VEX_2bytes, instruction_VEX_prefix_3bytes = Assembler::VEX_3bytes, + instruction_EVEX_prefix_4bytes = Assembler::EVEX_4bytes, instruction_size = 4, instruction_offset = 0,