diff options
author | Quentin Neill <quentin.neill@amd.com> | 2011-01-17 18:40:36 +0000 |
---|---|---|
committer | Quentin Neill <quentin.neill@amd.com> | 2011-01-17 18:40:36 +0000 |
commit | 2a2a0f38e7051fae47a0cae9e9cfd46180974949 (patch) | |
tree | f75fc16f9072d585ede3c589abba620a8c95a798 /gas | |
parent | dc92e16124ca764e536f2457635749e5431c4765 (diff) | |
download | fsf-binutils-gdb-2a2a0f38e7051fae47a0cae9e9cfd46180974949.zip fsf-binutils-gdb-2a2a0f38e7051fae47a0cae9e9cfd46180974949.tar.gz fsf-binutils-gdb-2a2a0f38e7051fae47a0cae9e9cfd46180974949.tar.bz2 |
Add support for TBM instructions.
gas/
2011-01-17 Quentin Neill <quentin.neill@amd.com>
* config/tc-i386.c (cpu_arch): Add CPU_TBM_FLAGS.
* doc/c-i386.texi (i386-TBM): New section.
opcodes/
2011-01-17 Quentin Neill <quentin.neill@amd.com>
* i386-dis.c (REG_XOP_TBM_01): New.
(REG_XOP_TBM_02): New.
(reg_table): Add REG_XOP_TBM_01 and REG_XOP_TBM_02 tables.
(xop_table): Redirect to REG_XOP_TBM_01 and REG_XOP_TBM_02
entries, and add bextr instruction.
* i386-gen.c (cpu_flag_init): Add CPU_TBM_FLAGS, CpuTBM.
(cpu_flags): Add CpuTBM.
* i386-opc.h (CpuTBM) New.
(i386_cpu_flags): Add bit cputbm.
* i386-opc.tbl: Add bextr, blcfill, blci, blcic, blcmsk,
blcs, blsfill, blsic, t1mskc, and tzmsk.
* i386-init.h: Regenerated.
* i386-tbl.h: Regenerated
gas/testsuite
2011-01-17 Quentin Neill <quentin.neill@amd.com>
* gas/i386/tbm.s: New.
* gas/i386/tbm.d: New.
* gas/i386/tbm-intel.d: New.
* gas/i386/x86-64-tbm.s: New.
* gas/i386/x86-64-tbm.d: New.
* gas/i386/x86-64-tbm-intel.d: New.
* gas/i386/arch-10.d: Add tbm flag and TBM instruction pattern.
* gas/i386/arch-10.s: Add a TBM instruction.
* gas/i386/arch-10-1.l: Add TBM instruction pattern.
* gas/i386/arch-10-2.l: Likewise.
* gas/i386/arch-10-3.l: Likewise.
* gas/i386/arch-10-4.l: Likewise.
* gas/i386/x86-64-arch-2.s: Likewise.
* gas/i386/x86-64-arch-2.d: Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 2 | ||||
-rw-r--r-- | gas/doc/c-i386.texi | 16 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 17 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/arch-10-1.l | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/arch-10-2.l | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/arch-10-3.l | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/arch-10-4.l | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/arch-10.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/arch-10.s | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-arch-2.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-arch-2.s | 2 |
13 files changed, 65 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index eb0c003..6d2768b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2011-01-17 Quentin Neill <quentin.neill@amd.com> + + * config/tc-i386.c (cpu_arch): Add CPU_TBM_FLAGS. + + * doc/c-i386.texi (i386-TBM): New section. + 2011-01-16 H.J. Lu <hongjiu.lu@intel.com> * config/tc-i386.c (disallow_64bit_disp): Renamed to ... diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 74ceaca..ac15e81 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -733,6 +733,8 @@ static const arch_entry cpu_arch[] = CPU_ABM_FLAGS, 0, 0 }, { STRING_COMMA_LEN (".bmi"), PROCESSOR_UNKNOWN, CPU_BMI_FLAGS, 0, 0 }, + { STRING_COMMA_LEN (".tbm"), PROCESSOR_UNKNOWN, + CPU_TBM_FLAGS, 0, 0 }, }; #ifdef I386COFF diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi index d330f86..be4de8a 100644 --- a/gas/doc/c-i386.texi +++ b/gas/doc/c-i386.texi @@ -36,6 +36,7 @@ extending the Intel architecture to 64-bits. * i386-SIMD:: Intel's MMX and AMD's 3DNow! SIMD Operations * i386-LWP:: AMD's Lightweight Profiling Instructions * i386-BMI:: Bit Manipulation Instruction +* i386-TBM:: AMD's Trailing Bit Manipulation Instructions * i386-16bit:: Writing 16-bit Code * i386-Arch:: Specifying an x86 CPU architecture * i386-Bugs:: AT&T Syntax bugs @@ -860,6 +861,21 @@ resetting. @c Need to add a specification citation here when available. +@node i386-TBM +@section AMD's Trailing Bit Manipulation Instructions + +@cindex TBM, i386 +@cindex TBM, x86-64 + +@code{@value{AS}} supports AMD's Trailing Bit Manipulation (TBM) +instruction set, available on AMD's BDVER2 processors (Trinity and +Viperfish). + +TBM instructions provide instructions implementing individual bit +manipulation operations such as isolating, masking, setting, resetting, +complementing, and operations on trailing zeros and ones. + +@c Need to add a specification citation here when available. @node i386-16bit @section Writing 16-bit Code diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 4be5d0d..c463b63 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,20 @@ +2011-01-17 Quentin Neill <quentin.neill@amd.com> + + * gas/i386/tbm.s: New. + * gas/i386/tbm.d: New. + * gas/i386/tbm-intel.d: New. + * gas/i386/x86-64-tbm.s: New. + * gas/i386/x86-64-tbm.d: New. + * gas/i386/x86-64-tbm-intel.d: New. + * gas/i386/arch-10.d: Add tbm flag and TBM instruction pattern. + * gas/i386/arch-10.s: Add a TBM instruction. + * gas/i386/arch-10-1.l: Add TBM instruction pattern. + * gas/i386/arch-10-2.l: Likewise. + * gas/i386/arch-10-3.l: Likewise. + * gas/i386/arch-10-4.l: Likewise. + * gas/i386/x86-64-arch-2.s: Likewise. + * gas/i386/x86-64-arch-2.d: Likewise. + 2011-01-16 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/ilp32/immed64.s: New. diff --git a/gas/testsuite/gas/i386/arch-10-1.l b/gas/testsuite/gas/i386/arch-10-1.l index ee1e316..578252d 100644 --- a/gas/testsuite/gas/i386/arch-10-1.l +++ b/gas/testsuite/gas/i386/arch-10-1.l @@ -30,6 +30,7 @@ .*:60: Error: .* .*:62: Error: .* .*:64: Error: .* +.*:66: Error: .* GAS LISTING .* @@ -101,3 +102,5 @@ GAS LISTING .* [ ]*62[ ]+nopl \(%eax\) [ ]*63[ ]+\# BMI [ ]*64[ ]+blsr %ecx,%ebx +[ ]*65[ ]+\# TBM +[ ]*66[ ]+blcfill %ecx,%ebx diff --git a/gas/testsuite/gas/i386/arch-10-2.l b/gas/testsuite/gas/i386/arch-10-2.l index f1abcea..ae91ef1 100644 --- a/gas/testsuite/gas/i386/arch-10-2.l +++ b/gas/testsuite/gas/i386/arch-10-2.l @@ -29,6 +29,7 @@ .*:60: Error: .* .*:62: Error: .* .*:64: Error: .* +.*:66: Error: .* GAS LISTING .* @@ -100,3 +101,5 @@ GAS LISTING .* [ ]*62[ ]+nopl \(%eax\) [ ]*63[ ]+\# BMI [ ]*64[ ]+blsr %ecx,%ebx +[ ]*65[ ]+\# TBM +[ ]*66[ ]+blcfill %ecx,%ebx diff --git a/gas/testsuite/gas/i386/arch-10-3.l b/gas/testsuite/gas/i386/arch-10-3.l index 0b5d362..b15788e 100644 --- a/gas/testsuite/gas/i386/arch-10-3.l +++ b/gas/testsuite/gas/i386/arch-10-3.l @@ -22,6 +22,7 @@ .*:60: Error: .* .*:62: Error: .* .*:64: Error: .* +.*:66: Error: .* GAS LISTING .* @@ -96,3 +97,5 @@ GAS LISTING .* [ ]*62[ ]+nopl \(%eax\) [ ]*63[ ]+\# BMI [ ]*64[ ]+blsr %ecx,%ebx +[ ]*65[ ]+\# TBM +[ ]*66[ ]+blcfill %ecx,%ebx diff --git a/gas/testsuite/gas/i386/arch-10-4.l b/gas/testsuite/gas/i386/arch-10-4.l index 8cca603..f59185d 100644 --- a/gas/testsuite/gas/i386/arch-10-4.l +++ b/gas/testsuite/gas/i386/arch-10-4.l @@ -20,6 +20,7 @@ .*:60: Error: .* .*:62: Error: .* .*:64: Error: .* +.*:66: Error: .* GAS LISTING .* @@ -94,3 +95,5 @@ GAS LISTING .* [ ]*62[ ]+nopl \(%eax\) [ ]*63[ ]+\# BMI [ ]*64[ ]+blsr %ecx,%ebx +[ ]*65[ ]+\# TBM +[ ]*66[ ]+blcfill %ecx,%ebx diff --git a/gas/testsuite/gas/i386/arch-10.d b/gas/testsuite/gas/i386/arch-10.d index 2225fe0..65a58c5 100644 --- a/gas/testsuite/gas/i386/arch-10.d +++ b/gas/testsuite/gas/i386/arch-10.d @@ -1,4 +1,4 @@ -#as: -march=i686+avx+vmx+smx+xsave+xsaveopt+aes+pclmul+fma+movbe+ept+clflush+nop+syscall+rdtscp+3dnowa+sse4a+svme+abm+padlock+bmi +#as: -march=i686+avx+vmx+smx+xsave+xsaveopt+aes+pclmul+fma+movbe+ept+clflush+nop+syscall+rdtscp+3dnowa+sse4a+svme+abm+padlock+bmi+tbm #objdump: -dw #name: i386 arch 10 @@ -38,4 +38,5 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 0f a7 c0 xstore-rng [ ]*[a-f0-9]+: 0f 1f 00 nopl \(%eax\) [ ]*[a-f0-9]+: c4 e2 60 f3 c9 blsr %ecx,%ebx +[ ]*[a-f0-9]+: 8f e9 60 01 c9 blcfill %ecx,%ebx #pass diff --git a/gas/testsuite/gas/i386/arch-10.s b/gas/testsuite/gas/i386/arch-10.s index f39f70b..0e72a76 100644 --- a/gas/testsuite/gas/i386/arch-10.s +++ b/gas/testsuite/gas/i386/arch-10.s @@ -62,3 +62,5 @@ xstorerng nopl (%eax) # BMI blsr %ecx,%ebx +# TBM +blcfill %ecx,%ebx diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 2d36fae..a0abf28 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -175,6 +175,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] run_dump_test "xop" run_dump_test "bmi" run_dump_test "bmi-intel" + run_dump_test "tbm" + run_dump_test "tbm-intel" run_dump_test "f16c" run_dump_test "f16c-intel" run_dump_test "fsgs" @@ -376,6 +378,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t run_dump_test "x86-64-xop" run_dump_test "x86-64-bmi" run_dump_test "x86-64-bmi-intel" + run_dump_test "x86-64-tbm" + run_dump_test "x86-64-tbm-intel" run_dump_test "x86-64-f16c" run_dump_test "x86-64-f16c-intel" run_dump_test "x86-64-fsgs" diff --git a/gas/testsuite/gas/i386/x86-64-arch-2.d b/gas/testsuite/gas/i386/x86-64-arch-2.d index ac09453..824badd 100644 --- a/gas/testsuite/gas/i386/x86-64-arch-2.d +++ b/gas/testsuite/gas/i386/x86-64-arch-2.d @@ -1,4 +1,4 @@ -#as: -march=generic64+avx+vmx+smx+xsave+xsaveopt+aes+pclmul+fma+movbe+ept+clflush+syscall+rdtscp+3dnowa+sse4a+svme+abm+padlock+bmi +#as: -march=generic64+avx+vmx+smx+xsave+xsaveopt+aes+pclmul+fma+movbe+ept+clflush+syscall+rdtscp+3dnowa+sse4a+svme+abm+padlock+bmi+tbm #objdump: -dw #name: x86-64 arch 2 @@ -37,4 +37,5 @@ Disassembly of section .text: [ ]*[a-f0-9]+: f3 0f bd d9 lzcnt %ecx,%ebx [ ]*[a-f0-9]+: 0f a7 c0 xstore-rng [ ]*[a-f0-9]+: c4 e2 60 f3 c9 blsr %ecx,%ebx +[ ]*[a-f0-9]+: 8f e9 60 01 c9 blcfill %ecx,%ebx #pass diff --git a/gas/testsuite/gas/i386/x86-64-arch-2.s b/gas/testsuite/gas/i386/x86-64-arch-2.s index 962f15e..5da17f6 100644 --- a/gas/testsuite/gas/i386/x86-64-arch-2.s +++ b/gas/testsuite/gas/i386/x86-64-arch-2.s @@ -60,3 +60,5 @@ lzcnt %ecx,%ebx xstorerng # BMI blsr %ecx,%ebx +# TBM +blcfill %ecx,%ebx |