From 21050a715f883f15a0a46ba03f129156214953d5 Mon Sep 17 00:00:00 2001 From: Ilya Tocar Date: Mon, 17 Nov 2014 14:49:47 +0300 Subject: Add pcommit instruction gas/ * config/tc-i386.c (cpu_arch): Add .pcommit. * doc/c-i386.texi: Document it. /opcodes * i386-dis.c (PREFIX enum): Add PREFIX_RM_0_0FAE_REG_7. (prefix_table): Add pcommit. * i386-gen.c (cpu_flag_init): Add CPU_PCOMMIT_FLAGS. (cpu_flags): Add CpuPCOMMIT. * i386-opc.h (enum): Add CpuPCOMMIT. (i386_cpu_flags): Add cpupcommit. * i386-opc.tbl: Add pcommit. * i386-init.h: Regenerated. * i386-tbl.h: Likewise. /gas/testsuite/ * gas/i386/i386.exp: Run new tests. * gas/i386/pcommit-intel.d: New file. * gas/i386/pcommit.d: Likewise. * gas/i386/pcommit.s: Likewise. * gas/i386/x86-64-pcommit-intel.d: Likewise. * gas/i386/x86-64-pcommit.d: Likewise. * gas/i386/x86-64-pcommit.s: Likewise. --- gas/ChangeLog | 5 +++++ gas/config/tc-i386.c | 2 ++ gas/doc/c-i386.texi | 3 ++- gas/testsuite/ChangeLog | 10 ++++++++++ gas/testsuite/gas/i386/i386.exp | 4 ++++ gas/testsuite/gas/i386/pcommit-intel.d | 14 ++++++++++++++ gas/testsuite/gas/i386/pcommit.d | 14 ++++++++++++++ gas/testsuite/gas/i386/pcommit.s | 10 ++++++++++ gas/testsuite/gas/i386/x86-64-pcommit-intel.d | 14 ++++++++++++++ gas/testsuite/gas/i386/x86-64-pcommit.d | 14 ++++++++++++++ gas/testsuite/gas/i386/x86-64-pcommit.s | 10 ++++++++++ 11 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 gas/testsuite/gas/i386/pcommit-intel.d create mode 100644 gas/testsuite/gas/i386/pcommit.d create mode 100644 gas/testsuite/gas/i386/pcommit.s create mode 100644 gas/testsuite/gas/i386/x86-64-pcommit-intel.d create mode 100644 gas/testsuite/gas/i386/x86-64-pcommit.d create mode 100644 gas/testsuite/gas/i386/x86-64-pcommit.s (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index 75d41666e84..52218703572 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2014-11-17 Ilya Tocar + + * config/tc-i386.c (cpu_arch): Add .pcommit. + * doc/c-i386.texi: Document it. + 2014-11-17 Ilya Tocar * config/tc-i386.c (cpu_arch): Add .clwb. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 61b6e4ea1fa..b88add97619 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -931,6 +931,8 @@ static const arch_entry cpu_arch[] = CPU_SE1_FLAGS, 0, 0 }, { STRING_COMMA_LEN (".clwb"), PROCESSOR_UNKNOWN, CPU_CLWB_FLAGS, 0, 0 }, + { STRING_COMMA_LEN (".pcommit"), PROCESSOR_UNKNOWN, + CPU_PCOMMIT_FLAGS, 0, 0 }, }; #ifdef I386COFF diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi index f3a1eecb774..df7ece4408c 100644 --- a/gas/doc/c-i386.texi +++ b/gas/doc/c-i386.texi @@ -155,6 +155,7 @@ accept various extension mnemonics. For example, @code{clflushopt}, @code{se1}, @code{clwb}, +@code{pcommit}, @code{avx512f}, @code{avx512cd}, @code{avx512er}, @@ -1104,7 +1105,7 @@ supported on the CPU specified. The choices for @var{cpu_type} are: @item @samp{.clflushopt} @tab @samp{.xsavec} @tab @samp{.xsaves} @tab @samp{.se1} @item @samp{.avx512f} @tab @samp{.avx512cd} @tab @samp{.avx512er} @tab @samp{.avx512pf} @item @samp{.avx512vl} @tab @samp{.avx512bw} @tab @samp{.avx512dq} -@item @samp{.clwb} +@item @samp{.clwb} @tab @samp{.pcommit} @item @samp{.3dnow} @tab @samp{.3dnowa} @tab @samp{.sse4a} @tab @samp{.sse5} @item @samp{.syscall} @tab @samp{.rdtscp} @tab @samp{.svme} @tab @samp{.abm} @item @samp{.lwp} @tab @samp{.fma4} @tab @samp{.xop} @tab @samp{.cx16} diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 524e51c794b..f510412778d 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2014-11-17 Ilya Tocar + + * gas/i386/i386.exp: Run new tests. + * gas/i386/pcommit-intel.d: New file. + * gas/i386/pcommit.d: Likewise. + * gas/i386/pcommit.s: Likewise. + * gas/i386/x86-64-pcommit-intel.d: Likewise. + * gas/i386/x86-64-pcommit.d: Likewise. + * gas/i386/x86-64-pcommit.s: Likewise. + 2014-11-17 Ilya Tocar * gas/i386/i386.exp: Run new tests. diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 4d851056c59..5914e5c1f9d 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -332,6 +332,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] run_dump_test "avx512f-rcigrz" run_dump_test "clwb" run_dump_test "clwb-intel" + run_dump_test "pcommit" + run_dump_test "pcommit-intel" run_dump_test "disassem" # These tests require support for 8 and 16 bit relocs, @@ -685,6 +687,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t run_dump_test "x86-64-avx512f-rcigrz" run_dump_test "x86-64-clwb" run_dump_test "x86-64-clwb-intel" + run_dump_test "x86-64-pcommit" + run_dump_test "x86-64-pcommit-intel" if { ![istarget "*-*-aix*"] && ![istarget "*-*-beos*"] diff --git a/gas/testsuite/gas/i386/pcommit-intel.d b/gas/testsuite/gas/i386/pcommit-intel.d new file mode 100644 index 00000000000..ff34d10931a --- /dev/null +++ b/gas/testsuite/gas/i386/pcommit-intel.d @@ -0,0 +1,14 @@ +#as: +#objdump: -dw -Mintel +#name: i386 PCOMMIT insns (Intel disassembly) +#source: pcommit.s + +.*: +file format .* + + +Disassembly of section \.text: + +00000000 <_start>: +[ ]*[a-f0-9]+:[ ]*66 0f ae f8[ ]*pcommit +[ ]*[a-f0-9]+:[ ]*66 0f ae f8[ ]*pcommit +#pass diff --git a/gas/testsuite/gas/i386/pcommit.d b/gas/testsuite/gas/i386/pcommit.d new file mode 100644 index 00000000000..2af4576bd8d --- /dev/null +++ b/gas/testsuite/gas/i386/pcommit.d @@ -0,0 +1,14 @@ +#as: +#objdump: -dw +#name: i386 PCOMMIT insns +#source: pcommit.s + +.*: +file format .* + + +Disassembly of section \.text: + +00000000 <_start>: +[ ]*[a-f0-9]+:[ ]*66 0f ae f8[ ]*pcommit +[ ]*[a-f0-9]+:[ ]*66 0f ae f8[ ]*pcommit +#pass diff --git a/gas/testsuite/gas/i386/pcommit.s b/gas/testsuite/gas/i386/pcommit.s new file mode 100644 index 00000000000..b7913762f98 --- /dev/null +++ b/gas/testsuite/gas/i386/pcommit.s @@ -0,0 +1,10 @@ +# Check 32bit PCOMMIT instructions + + .allow_index_reg + .text +_start: + + pcommit # PCOMMIT + + .intel_syntax noprefix + pcommit # PCOMMIT diff --git a/gas/testsuite/gas/i386/x86-64-pcommit-intel.d b/gas/testsuite/gas/i386/x86-64-pcommit-intel.d new file mode 100644 index 00000000000..ec9c1a6c26b --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-pcommit-intel.d @@ -0,0 +1,14 @@ +#as: +#objdump: -dw -Mintel +#name: x86_64 PCOMMIT insns (Intel disassembly) +#source: x86-64-pcommit.s + +.*: +file format .* + + +Disassembly of section \.text: + +0+ <_start>: +[ ]*[a-f0-9]+:[ ]*66 0f ae f8[ ]*pcommit +[ ]*[a-f0-9]+:[ ]*66 0f ae f8[ ]*pcommit +#pass diff --git a/gas/testsuite/gas/i386/x86-64-pcommit.d b/gas/testsuite/gas/i386/x86-64-pcommit.d new file mode 100644 index 00000000000..1a378cf4f68 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-pcommit.d @@ -0,0 +1,14 @@ +#as: +#objdump: -dw +#name: x86_64 PCOMMIT insns +#source: x86-64-pcommit.s + +.*: +file format .* + + +Disassembly of section \.text: + +0+ <_start>: +[ ]*[a-f0-9]+:[ ]*66 0f ae f8[ ]*pcommit +[ ]*[a-f0-9]+:[ ]*66 0f ae f8[ ]*pcommit +#pass diff --git a/gas/testsuite/gas/i386/x86-64-pcommit.s b/gas/testsuite/gas/i386/x86-64-pcommit.s new file mode 100644 index 00000000000..b7913762f98 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-pcommit.s @@ -0,0 +1,10 @@ +# Check 32bit PCOMMIT instructions + + .allow_index_reg + .text +_start: + + pcommit # PCOMMIT + + .intel_syntax noprefix + pcommit # PCOMMIT -- cgit v1.2.3