aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2013-02-19 19:10:31 +0000
committerH.J. Lu <hjl.tools@gmail.com>2013-02-19 19:10:31 +0000
commit5c111e376966558968049df5839776067729d3c8 (patch)
treea0e18c370e0232d55afb89716916338e8b7d6a36 /gas
parentf698ca8e12472fe919b1ab2b81961b9771d3cd70 (diff)
downloadgdb-5c111e376966558968049df5839776067729d3c8.zip
gdb-5c111e376966558968049df5839776067729d3c8.tar.gz
gdb-5c111e376966558968049df5839776067729d3c8.tar.bz2
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')
-rw-r--r--gas/ChangeLog11
-rw-r--r--gas/config/tc-i386.c2
-rw-r--r--gas/doc/c-i386.texi2
-rw-r--r--gas/testsuite/ChangeLog17
-rw-r--r--gas/testsuite/gas/i386/i386.exp2
-rw-r--r--gas/testsuite/gas/i386/smap.d11
-rw-r--r--gas/testsuite/gas/i386/smap.s6
-rw-r--r--gas/testsuite/gas/i386/x86-64-smap.d12
8 files changed, 57 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 1a3ec06..49c3b35 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2013-02-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/15159
+ * config/tc-i386.c (cpu_arch): Add ".smap".
+
+ * doc/c-i386.texi: Document smap.
+
2013-02-18 Maciej W. Rozycki <macro@codesourcery.com>
* config/tc-mips.c (s_cpload): Call mips_mark_labels and set
@@ -11,7 +18,7 @@
2013-02-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
- * config/tc-arm.c (do_neon_mov): Break on NS_NULL.
+ * config/tc-arm.c (do_neon_mov): Break on NS_NULL.
2013-02-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
@@ -33,7 +40,7 @@
core.
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/config/tc-i386.c b/gas/config/tc-i386.c
index c8ec0c0..737cc2e 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -782,6 +782,8 @@ static const arch_entry cpu_arch[] =
CPU_RDSEED_FLAGS, 0, 0 },
{ STRING_COMMA_LEN (".prfchw"), PROCESSOR_UNKNOWN,
CPU_PRFCHW_FLAGS, 0, 0 },
+ { STRING_COMMA_LEN (".smap"), PROCESSOR_UNKNOWN,
+ CPU_SMAP_FLAGS, 0, 0 },
};
#ifdef I386COFF
diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi
index f68cca2..9aae847 100644
--- a/gas/doc/c-i386.texi
+++ b/gas/doc/c-i386.texi
@@ -149,6 +149,7 @@ accept various extension mnemonics. For example,
@code{adx},
@code{rdseed},
@code{prfchw},
+@code{smap},
@code{noavx},
@code{vmx},
@code{vmfunc},
@@ -1027,6 +1028,7 @@ supported on the CPU specified. The choices for @var{cpu_type} are:
@item @samp{.rdrnd} @tab @samp{.f16c} @tab @samp{.avx2} @tab @samp{.bmi2}
@item @samp{.lzcnt} @tab @samp{.invpcid} @tab @samp{.vmfunc} @tab @samp{.hle}
@item @samp{.rtm} @tab @samp{.adx} @tab @samp{.rdseed} @tab @samp{.prfchw}
+@item @samp{.smap}
@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 8027428..4508042 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 6daf559..f03dcf3 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 0000000..16ae63a
--- /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 0000000..1864cee
--- /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 0000000..639bc31
--- /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