diff options
author | Craig Topper <craig.topper@intel.com> | 2018-04-03 06:37:01 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-04-03 06:37:01 +0000 |
commit | 7d522b6eee0cac4427ee36f770284ec23ed690b5 (patch) | |
tree | d5fdb3c7ba3f8d272d1b81b7c98d025a019a3663 /llvm/utils/TableGen/X86RecognizableInstr.cpp | |
parent | c01e47b43f46a1fe2ad95245fad71b21341abe64 (diff) | |
download | bcm5719-llvm-7d522b6eee0cac4427ee36f770284ec23ed690b5.tar.gz bcm5719-llvm-7d522b6eee0cac4427ee36f770284ec23ed690b5.zip |
[X86][TableGen] Add a missing error check to make sure EVEX instructions use one PS/PD/XS/XD prefixes.
llvm-svn: 329048
Diffstat (limited to 'llvm/utils/TableGen/X86RecognizableInstr.cpp')
-rw-r--r-- | llvm/utils/TableGen/X86RecognizableInstr.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/X86RecognizableInstr.cpp b/llvm/utils/TableGen/X86RecognizableInstr.cpp index a387efb7ebc..5811528f186 100644 --- a/llvm/utils/TableGen/X86RecognizableInstr.cpp +++ b/llvm/utils/TableGen/X86RecognizableInstr.cpp @@ -243,8 +243,12 @@ InstructionContext RecognizableInstr::insnContext() const { insnContext = EVEX_KB(IC_EVEX_XD); else if (OpPrefix == X86Local::XS) insnContext = EVEX_KB(IC_EVEX_XS); - else + else if (OpPrefix == X86Local::PS) insnContext = EVEX_KB(IC_EVEX); + else { + errs() << "Instruction does not use a prefix: " << Name << "\n"; + llvm_unreachable("Invalid prefix"); + } /// eof EVEX } else if (Encoding == X86Local::VEX || Encoding == X86Local::XOP) { if (HasVEX_LPrefix && VEX_WPrefix == X86Local::VEX_W1) { |