Support x86 Intel MSR_IMM
commitd7d71afa6aa2db0e7d598af480ed7f14157104d1
authorHu, Lin1 <lin1.hu@intel.com>
Tue, 19 Nov 2024 02:31:44 +0000 (19 10:31 +0800)
committerHaochen Jiang <haochen.jiang@intel.com>
Tue, 19 Nov 2024 02:45:56 +0000 (19 10:45 +0800)
treee403a6c346e8d49d7d67ea275c50d936e08a66a1
parent77bcfb741cbec8cadec7a0d450a32c8a5b161f23
Support x86 Intel MSR_IMM

gas/ChangeLog:

* NEWS: Support x86 Intel MSR_IMM.
* config/tc-i386.c (cpu_arch): Add MSR_IMM.
(cpu_flags_match): Add MSR_IMM to APX_F related processing.
(i386_assemble): WRMSRNS's first operand is imm32, so add
MN_wrmsrns like MN_uwrmsr.
* doc/c-i386.texi: Document .msr_imm.
* testsuite/gas/i386/i386.exp: Run MSR_IMM tests.
* testsuite/gas/i386/x86-64.exp: Ditto.
* testsuite/gas/i386/msr_imm-inval.l: New test.
* testsuite/gas/i386/msr_imm-inval.s: Ditto.
* testsuite/gas/i386/x86-64-msr_imm-intel.d: Ditto.
* testsuite/gas/i386/x86-64-msr_imm.d: Ditto.
* testsuite/gas/i386/x86-64-msr_imm.s: Ditto.

opcodes/ChangeLog:

* i386-dis.c: Add REG_VEX_MAP7_F6_L_0_W_0,
PREFIX_VEX_MAP7_F6_L_0_W_0_R_0_X86_64,
X86_64_VEX_MAP7_F6_L_0_W_0_R_0,
VEX_LEN_MAP7_F6,
VEX_W_MAP7_F6_L_0.
(reg_table): New entry for MSR_IMM.
(prefix_table): Ditto.
(x86_64_table): Ditto.
(vex_len_table): Ditto.
(vex_w_table): Ditto.
(map7_f6_opcode): New variable for MAP7.
(get_valid_dis386): Support MAP7.
* i386-gen.c (cpu_flags): Add MSR_IMM.
* i386-init.h: Regenerated.
* i386-mnem.h: Ditto.
* i386-opc.h (i386_cpu_flags): Add cpumsr_imm.
* i386-opc.tbl: Add MSR_IMM instructions.
* i386-tbl.h: Regenerated.
18 files changed:
gas/NEWS
gas/config/tc-i386.c
gas/doc/c-i386.texi
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/msr_imm-inval.l [new file with mode: 0644]
gas/testsuite/gas/i386/msr_imm-inval.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-msr_imm-intel.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-msr_imm-inval.l [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-msr_imm-inval.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-msr_imm.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-msr_imm.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64.exp
opcodes/i386-dis.c
opcodes/i386-gen.c
opcodes/i386-init.h
opcodes/i386-opc.h
opcodes/i386-opc.tbl
opcodes/i386-tbl.h