diff options
author | Hu, Lin1 <lin1.hu@intel.com> | 2023-07-24 11:10:03 +0800 |
---|---|---|
committer | Haochen Jiang <haochen.jiang@intel.com> | 2023-07-27 20:52:52 +0800 |
commit | cd2908958ace351831cea7acc87e68a93f395bc6 (patch) | |
tree | 2a7592e7a52f0e5c102ff173daa0791a424e20a5 /gas | |
parent | 2bced1684b3636d4c7607b7ec57e34d2d71b74cb (diff) | |
download | gdb-cd2908958ace351831cea7acc87e68a93f395bc6.zip gdb-cd2908958ace351831cea7acc87e68a93f395bc6.tar.gz gdb-cd2908958ace351831cea7acc87e68a93f395bc6.tar.bz2 |
Support Intel PBNDKB
gas/ChangeLog:
* NEWS: Support Intel PBNDKB.
* config/tc-i386.c: Add pbndkb.
* doc/c-i386.texi: Document .pbndkb.
* testsuite/gas/i386/i386.exp: Add PBNDKB tests.
* testsuite/gas/i386/x86-64.exp: Ditto.
* testsuite/gas/i386/pbndkb-inval.l: New test.
* testsuite/gas/i386/pbndkb-inval.s: Ditto.
* testsuite/gas/i386/x86-64-pbndkb-intel.d: Ditto.
* testsuite/gas/i386/x86-64-pbndkb.d: Ditto.
* testsuite/gas/i386/x86-64-pbndkb.s: Ditto.
opcodes/ChangeLog:
* i386-dis.c (X86_64_0F01_REG_0_MOD_3_RM_7): New.
(X86_64_0F01_REG_0_MOD_3_RM_7_P_0): Ditto.
(prefix_table): Add PREFIX_0F01_REG_0_MOD_3_RM_7.
(x86_64_table): Add X86_64_0F01_REG_0_MOD_3_RM_7_P_0.
(rm_table): New entry for pbndkb.
* i386-gen.c (cpu_flag): Add PBNDKB.
* i386-init.h: Regenerated.
* i386-mnem.h: Ditto.
* i386-opc.h (CpuPBNDKB): New.
(i386_cpu_flags): Add cpupbndkb.
* i386-opc.tbl: Add PBNDKB instructions.
* i386-tbl.h: Regenerated.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/NEWS | 2 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 1 | ||||
-rw-r--r-- | gas/doc/c-i386.texi | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/pbndkb-inval.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/pbndkb-inval.s | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-pbndkb-intel.d | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-pbndkb.d | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-pbndkb.s | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64.exp | 2 |
10 files changed, 45 insertions, 0 deletions
@@ -1,5 +1,7 @@ -*- text -*- +* Add support for Intel PBNDKB instructions. + * Add support for Intel SM4 instructions. * Add support for Intel SM3 instructions. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 686dd4c7..e35e266 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -1155,6 +1155,7 @@ static const arch_entry cpu_arch[] = SUBARCH (sha512, SHA512, ANY_SHA512, false), SUBARCH (sm3, SM3, ANY_SM3, false), SUBARCH (sm4, SM4, ANY_SM4, false), + SUBARCH (pbndkb, PBNDKB, PBNDKB, false), }; #undef SUBARCH diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi index 54b0d7d..dd06282 100644 --- a/gas/doc/c-i386.texi +++ b/gas/doc/c-i386.texi @@ -211,6 +211,7 @@ accept various extension mnemonics. For example, @code{sha512}, @code{sm3}, @code{sm4}, +@code{pbndkb}, @code{amx_int8}, @code{amx_bf16}, @code{amx_fp16}, @@ -1641,6 +1642,7 @@ supported on the CPU specified. The choices for @var{cpu_type} are: @item @samp{.cmpccxadd} @tab @samp{.wrmsrns} @tab @samp{.msrlist} @item @samp{.avx_ne_convert} @tab @samp{.rao_int} @tab @samp{.fred} @tab @samp{.lkgs} @item @samp{.avx_vnni_int16} @tab @samp{.sha512} @tab @samp{.sm3} @tab @samp{.sm4} +@item @samp{.pbndkb} @item @samp{.wbnoinvd} @tab @samp{.pconfig} @tab @samp{.waitpkg} @tab @samp{.cldemote} @item @samp{.shstk} @tab @samp{.gfni} @tab @samp{.vaes} @tab @samp{.vpclmulqdq} @item @samp{.movdiri} @tab @samp{.movdir64b} @tab @samp{.enqcmd} @tab @samp{.tsxldtrk} diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index e862d41..90819d8 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -505,6 +505,7 @@ if [gas_32_check] then { run_dump_test "sm3-intel" run_dump_test "sm4" run_dump_test "sm4-intel" + run_list_test "pbndkb-inval" run_list_test "sg" run_dump_test "clzero" run_dump_test "invlpgb" diff --git a/gas/testsuite/gas/i386/pbndkb-inval.l b/gas/testsuite/gas/i386/pbndkb-inval.l new file mode 100644 index 0000000..d2995cf --- /dev/null +++ b/gas/testsuite/gas/i386/pbndkb-inval.l @@ -0,0 +1,2 @@ +.* Assembler messages: +.*:5: Error: `pbndkb' is only supported in 64-bit mode diff --git a/gas/testsuite/gas/i386/pbndkb-inval.s b/gas/testsuite/gas/i386/pbndkb-inval.s new file mode 100644 index 0000000..108360c --- /dev/null +++ b/gas/testsuite/gas/i386/pbndkb-inval.s @@ -0,0 +1,5 @@ +# Check Illegal PBNDKB instructions + + .text +_start: + pbndkb #PBNDKB diff --git a/gas/testsuite/gas/i386/x86-64-pbndkb-intel.d b/gas/testsuite/gas/i386/x86-64-pbndkb-intel.d new file mode 100644 index 0000000..edc7502 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-pbndkb-intel.d @@ -0,0 +1,11 @@ +#objdump: -dw -Mintel +#name: x86_64 PBNDKB insns (Intel disassembly) +#source: x86-64-pbndkb.s + +.*: +file format .* + +Disassembly of section \.text: + +0+ <_start>: +\s*[a-f0-9]+:\s*0f 01 c7\s+pbndkb +\s*[a-f0-9]+:\s*0f 01 c7\s+pbndkb diff --git a/gas/testsuite/gas/i386/x86-64-pbndkb.d b/gas/testsuite/gas/i386/x86-64-pbndkb.d new file mode 100644 index 0000000..94dfe7c --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-pbndkb.d @@ -0,0 +1,11 @@ +#objdump: -dw +#name: x86_64 PBNDKB insns +#source: x86-64-pbndkb.s + +.*: +file format .* + +Disassembly of section \.text: + +0+ <_start>: +\s*[a-f0-9]+:\s*0f 01 c7\s+pbndkb +\s*[a-f0-9]+:\s*0f 01 c7\s+pbndkb diff --git a/gas/testsuite/gas/i386/x86-64-pbndkb.s b/gas/testsuite/gas/i386/x86-64-pbndkb.s new file mode 100644 index 0000000..7702c2a --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-pbndkb.s @@ -0,0 +1,8 @@ +# Check 64bit PBNDKB instructions + + .text +_start: + pbndkb #PBNDKB + + .intel_syntax noprefix + pbndkb #PBNDKB diff --git a/gas/testsuite/gas/i386/x86-64.exp b/gas/testsuite/gas/i386/x86-64.exp index eb6a369..52711cd 100644 --- a/gas/testsuite/gas/i386/x86-64.exp +++ b/gas/testsuite/gas/i386/x86-64.exp @@ -448,6 +448,8 @@ run_dump_test "x86-64-sm3" run_dump_test "x86-64-sm3-intel" run_dump_test "x86-64-sm4" run_dump_test "x86-64-sm4-intel" +run_dump_test "x86-64-pbndkb" +run_dump_test "x86-64-pbndkb-intel" run_dump_test "x86-64-clzero" run_dump_test "x86-64-mwaitx-bdver4" run_list_test "x86-64-mwaitx-reg" |