avoid segfault when decoding incorrectly encoded kmask op

This commit is contained in:
Stanislav Shwartsman 2013-09-17 21:01:24 +00:00
parent d169860f6c
commit da0e2baf22

View File

@ -2371,20 +2371,20 @@ bx_define_opcode(BX_IA_RDSEED_Eq, NULL, &BX_CPU_C::RDSEED_Ew, BX_ISA_RDSEED, BX_
#endif
#if BX_SUPPORT_AVX
bx_define_opcode(BX_IA_KANDW_KGwKHwKEw, NULL, &BX_CPU_C::KANDW_KGwKHwKEwR, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_KMASK_VVV, BX_SRC_RM, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KANDNW_KGwKHwKEw, NULL, &BX_CPU_C::KANDNW_KGwKHwKEwR, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_KMASK_VVV, BX_SRC_RM, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KANDW_KGwKHwKEw, &BX_CPU_C::BxError, &BX_CPU_C::KANDW_KGwKHwKEwR, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_KMASK_VVV, BX_SRC_RM, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KANDNW_KGwKHwKEw, &BX_CPU_C::BxError, &BX_CPU_C::KANDNW_KGwKHwKEwR, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_KMASK_VVV, BX_SRC_RM, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KMOVW_KGwKEw, &BX_CPU_C::KMOVW_KGwKEwM, &BX_CPU_C::KMOVW_KGwKEwR, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_RM, BX_SRC_NONE, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KMOVW_KEwKGw, &BX_CPU_C::KMOVW_KEwKGwM, NULL, BX_ISA_AVX512, BX_SRC_RM, BX_SRC_NNN, BX_SRC_NONE, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KMOVW_KGwEw, NULL, &BX_CPU_C::KMOVW_KGwEwR, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_RM, BX_SRC_NONE, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KMOVW_GdKEw, NULL, &BX_CPU_C::KMOVW_GdKEwR, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_RM, BX_SRC_NONE, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KUNPCKBW_KGwKHwKEw, NULL, &BX_CPU_C::KUNPCKBW_KGwKHwKEwR, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_KMASK_VVV, BX_SRC_RM, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KNOTW_KGwKEw, NULL, &BX_CPU_C::KNOTW_KGwKEwR, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_RM, BX_SRC_NONE, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KORW_KGwKHwKEw, NULL, &BX_CPU_C::KORW_KGwKHwKEwR, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_KMASK_VVV, BX_SRC_RM, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KORTESTW_KGwKEw, NULL, &BX_CPU_C::KORTESTW_KGwKEw, BX_ISA_AVX512, BX_SRC_NONE, BX_SRC_NNN, BX_SRC_RM, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KSHIFTLW_KGwKEw, NULL, &BX_CPU_C::KSHIFTLW_KGwKEw, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_RM, BX_SRC_NONE, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KSHIFTRW_KGwKEw, NULL, &BX_CPU_C::KSHIFTRW_KGwKEw, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_RM, BX_SRC_NONE, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KXNORW_KGwKHwKEw, NULL, &BX_CPU_C::KXNORW_KGwKHwKEw, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_KMASK_VVV, BX_SRC_RM, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KXORW_KGwKHwKEw, NULL, &BX_CPU_C::KXORW_KGwKHwKEw, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_KMASK_VVV, BX_SRC_RM, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KMOVW_KEwKGw, &BX_CPU_C::KMOVW_KEwKGwM, &BX_CPU_C::BxError, BX_ISA_AVX512, BX_SRC_RM, BX_SRC_NNN, BX_SRC_NONE, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KMOVW_KGwEw, &BX_CPU_C::BxError, &BX_CPU_C::KMOVW_KGwEwR, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_RM, BX_SRC_NONE, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KMOVW_GdKEw, &BX_CPU_C::BxError, &BX_CPU_C::KMOVW_GdKEwR, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_RM, BX_SRC_NONE, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KUNPCKBW_KGwKHwKEw, &BX_CPU_C::BxError, &BX_CPU_C::KUNPCKBW_KGwKHwKEwR, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_KMASK_VVV, BX_SRC_RM, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KNOTW_KGwKEw, &BX_CPU_C::BxError, &BX_CPU_C::KNOTW_KGwKEwR, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_RM, BX_SRC_NONE, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KORW_KGwKHwKEw, &BX_CPU_C::BxError, &BX_CPU_C::KORW_KGwKHwKEwR, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_KMASK_VVV, BX_SRC_RM, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KORTESTW_KGwKEw, &BX_CPU_C::BxError, &BX_CPU_C::KORTESTW_KGwKEw, BX_ISA_AVX512, BX_SRC_NONE, BX_SRC_NNN, BX_SRC_RM, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KSHIFTLW_KGwKEw, &BX_CPU_C::BxError, &BX_CPU_C::KSHIFTLW_KGwKEw, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_RM, BX_SRC_NONE, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KSHIFTRW_KGwKEw, &BX_CPU_C::BxError, &BX_CPU_C::KSHIFTRW_KGwKEw, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_RM, BX_SRC_NONE, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KXNORW_KGwKHwKEw, &BX_CPU_C::BxError, &BX_CPU_C::KXNORW_KGwKHwKEw, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_KMASK_VVV, BX_SRC_RM, BX_SRC_NONE, BX_PREPARE_AVX)
bx_define_opcode(BX_IA_KXORW_KGwKHwKEw, &BX_CPU_C::BxError, &BX_CPU_C::KXORW_KGwKHwKEw, BX_ISA_AVX512, BX_SRC_NNN, BX_SRC_KMASK_VVV, BX_SRC_RM, BX_SRC_NONE, BX_PREPARE_AVX)
#endif
#if BX_SUPPORT_EVEX