diff options
author | Cui, Lili <lili.cui@intel.com> | 2024-04-22 09:25:56 +0800 |
---|---|---|
committer | Cui, Lili <lili.cui@intel.com> | 2024-04-22 09:25:56 +0800 |
commit | b5247082c4a71f69ba53e5b076409f25918d953f (patch) | |
tree | 76dca7f272f991bdb0cdff387b6773b3128a73f2 /opcodes | |
parent | 80fa407f9fb8df8b4d4ac3d5db8cc7bdc07eab7f (diff) | |
download | binutils-b5247082c4a71f69ba53e5b076409f25918d953f.zip binutils-b5247082c4a71f69ba53e5b076409f25918d953f.tar.gz binutils-b5247082c4a71f69ba53e5b076409f25918d953f.tar.bz2 |
x86/APX: Add invalid check for APX EVEX.X4.
gas/ChangeLog:
* config/tc-i386.c (build_apx_evex_prefix): Added invalid check for APX
X4.
* testsuite/gas/i386/x86-64-apx-evex-promoted-bad.d: Added invalid
testcase.
* testsuite/gas/i386/x86-64-apx-evex-promoted-bad.s: Ditto.
opcodes/ChangeLog:
* i386-dis.c (get_valid_dis386): Added invalid check for APX X4.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/i386-dis.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index b9fdda1..53f2d6c 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -9192,6 +9192,9 @@ get_valid_dis386 (const struct dis386 *dp, instr_info *ins) if (!fetch_modrm (ins)) return &err_opcode; + if (ins->modrm.mod == 3 && (ins->rex2 & REX_X)) + return &bad_opcode; + /* Set vector length. For EVEX-promoted instructions, evex.ll == 0b00, which has the same encoding as vex.length == 128 and they can share the same processing with vex.length in OP_VEX. */ |