diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2013-02-19 19:10:22 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2013-02-19 19:10:22 +0000 |
commit | 0acbbfdf635dbec05e6064246f07528b182b9974 (patch) | |
tree | fbdf7806648059033a922a1302955b22bd0ae842 /gas/testsuite | |
parent | 45dec86255e1f8d8fb5cb6cf344050c4ca702273 (diff) | |
download | binutils-redhat-0acbbfdf635dbec05e6064246f07528b182b9974.tar.gz |
Implement Intel SMAP instructions
gas/
PR gas/15159
* config/tc-i386.c (cpu_arch): Add ".smap".
* doc/c-i386.texi: Document smap.
gas/testsuite/
PR gas/15159
* gas/i386/i386.exp: Run smap and x86-64-smap.
* gas/i386/smap.d: New file.
* gas/i386/smap.s: likewise.
* gas/i386/x86-64-smap.d: likewise.
opcodes/
PR gas/15159
* i386-dis.c (rm_table): Add clac and stac to RM_0F01_REG_1.
* i386-gen.c (cpu_flag_init): Add CPU_SMAP_FLAGS.
(cpu_flags): Add CpuSMAP.
* i386-opc.h (CpuSMAP): New.
(i386_cpu_flags): Add cpusmap.
* i386-opc.tbl: Add clac and stac.
* i386-init.h: Regenerated.
* i386-tbl.h: Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 17 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/smap.d | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/smap.s | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-smap.d | 12 |
5 files changed, 44 insertions, 4 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 80274289cb..45080429ce 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2013-02-19 H.J. Lu <hongjiu.lu@intel.com> + + PR gas/15159 + * gas/i386/i386.exp: Run smap and x86-64-smap. + + * gas/i386/smap.d: New file. + * gas/i386/smap.s: likewise. + * gas/i386/x86-64-smap.d: likewise. + 2013-02-15 Markos Chandras <markos.chandras@imgtec.com> * gas/metag/labelarithmetic.d: Fix the expected disassembler @@ -13,9 +22,9 @@ 2013-02-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com> - * gas/arm/neon-vmov-bad.d: New file. - * gas/arm/neon-vmov-bad.s: Likewise. - * gas/arm/neon-vmov-bad.l: Likewise. + * gas/arm/neon-vmov-bad.d: New file. + * gas/arm/neon-vmov-bad.s: Likewise. + * gas/arm/neon-vmov-bad.l: Likewise. 2013-02-14 Yufeng Zhang <yufeng.zhang@arm.com> @@ -47,7 +56,7 @@ (run_list_test): Delete. Adjust callers to use standard version. 2013-02-06 Sandra Loosemore <sandra@codesourcery.com> - Andrew Jenner <andrew@codesourcery.com> + Andrew Jenner <andrew@codesourcery.com> Based on patches from Altera Corporation. diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 6daf5598ed..f03dcf3346 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -243,6 +243,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] run_dump_test "rdseed-intel" run_dump_test "prefetch" run_dump_test "prefetch-intel" + run_dump_test "smap" # These tests require support for 8 and 16 bit relocs, # so we only run them for ELF and COFF targets. @@ -502,6 +503,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t run_dump_test "x86-64-rdseed-intel" run_dump_test "x86-64-prefetch" run_dump_test "x86-64-prefetch-intel" + run_dump_test "x86-64-smap" if { ![istarget "*-*-aix*"] && ![istarget "*-*-beos*"] diff --git a/gas/testsuite/gas/i386/smap.d b/gas/testsuite/gas/i386/smap.d new file mode 100644 index 0000000000..16ae63a8f9 --- /dev/null +++ b/gas/testsuite/gas/i386/smap.d @@ -0,0 +1,11 @@ +#objdump: -dw +#name: i386 SMAP + +.*: +file format .* + +Disassembly of section .text: + +0+ <foo>: +[ ]*[a-f0-9]+: 0f 01 ca clac +[ ]*[a-f0-9]+: 0f 01 cb stac +#pass diff --git a/gas/testsuite/gas/i386/smap.s b/gas/testsuite/gas/i386/smap.s new file mode 100644 index 0000000000..1864ceee2d --- /dev/null +++ b/gas/testsuite/gas/i386/smap.s @@ -0,0 +1,6 @@ +# SMAP Instructions + + .text +foo: + clac + stac diff --git a/gas/testsuite/gas/i386/x86-64-smap.d b/gas/testsuite/gas/i386/x86-64-smap.d new file mode 100644 index 0000000000..639bc3136c --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-smap.d @@ -0,0 +1,12 @@ +#source: smap.s +#objdump: -dw +#name: 64bit SMAP + +.*: +file format .* + +Disassembly of section .text: + +0+ <foo>: +[ ]*[a-f0-9]+: 0f 01 ca clac +[ ]*[a-f0-9]+: 0f 01 cb stac +#pass |