This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH V2 5/9] gas: new SPARC architectures: sparc5, v9m and v8plusm.
- From: "Jose E. Marchesi" <jose dot marchesi at oracle dot com>
- To: binutils at sourceware dot org
- Cc: davem at davemloft dot net
- Date: Tue, 7 Oct 2014 16:48:29 +0200
- Subject: [PATCH V2 5/9] gas: new SPARC architectures: sparc5, v9m and v8plusm.
- Authentication-results: sourceware.org; auth=none
- References: <1412693313-3546-1-git-send-email-jose dot marchesi at oracle dot com>
This patch adds support for the new SPARC architectures sparc5, v9m
and v8plusm to the GNU assembler. These architectures are equivalent
and correspond to the Oracle SPARC Architecture 2015 and the M7 cpu.
Texinfo manual updated to cover the new -A* and -xarch* command line
options.
Tested in sparc64-unknown-linux-gnu.
gas/ChangeLog:
2014-10-07 Jose E. Marchesi <jose.marchesi@oracle.com>
* doc/c-sparc.texi (Sparc-Opts): Document the -Av9m, -Av8plusm,
-Asparc5, -xarch=v9m and -xarch=sparc5 command line options.
* config/tc-sparc.c (HWS_VM): New define.
(HWS2_VM): Likewise.
(sparc_arch): New architectures `sparc5', `v9m' and `v8plusm'.
---
gas/ChangeLog | 9 +++++++++
gas/config/tc-sparc.c | 9 +++++++++
gas/doc/c-sparc.texi | 25 ++++++++++++++++---------
3 files changed, 34 insertions(+), 9 deletions(-)
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index 36127da..d23b07e 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -234,6 +234,11 @@ enum sparc_arch_types {v6, v7, v8, leon, sparclet, sparclite, sparc86x, v8plus,
| HWCAP_MD5 | HWCAP_SHA1 | HWCAP_SHA256 |HWCAP_SHA512 | HWCAP_MPMUL \
| HWCAP_MONT | HWCAP_CRC32C | HWCAP_CBCOND | HWCAP_PAUSE
#define HWS_VV HWS_VE | HWCAP_FJFMAU | HWCAP_IMA
+#define HWS_VM HWS_VV
+
+#define HWS2_VM \
+ HWCAP2_VIS3B | HWCAP2_ADP | HWCAP2_SPARC5 | HWCAP2_MWAIT \
+ | HWCAP2_XMPMUL | HWCAP2_XMONT
static struct sparc_arch {
char *name;
@@ -258,7 +263,9 @@ static struct sparc_arch {
{ "sparcima", "v9b", v9, 0, 1, HWS_VB|HWCAP_FMAF|HWCAP_IMA, 0 },
{ "sparcvis3", "v9b", v9, 0, 1, HWS_VB|HWCAP_FMAF|HWCAP_VIS3|HWCAP_HPC, 0 },
{ "sparcvis3r", "v9b", v9, 0, 1, HWS_VB|HWCAP_FMAF|HWCAP_VIS3|HWCAP_HPC|HWCAP_FJFMAU, 0 },
+
{ "sparc4", "v9b", v9, 0, 1, HWS_VV, 0 },
+ { "sparc5", "v9b", v9, 0, 1, HWS_VM, HWS2_VM },
{ "leon", "leon", leon, 32, 1, HWS_V8, 0 },
{ "sparclet", "sparclet", sparclet, 32, 1, HWS_V8, 0 },
@@ -272,6 +279,7 @@ static struct sparc_arch {
{ "v8plusd", "v9b", v9, 0, 1, HWCAP_V8PLUS|HWS_VD, 0 },
{ "v8pluse", "v9b", v9, 0, 1, HWCAP_V8PLUS|HWS_VE, 0 },
{ "v8plusv", "v9b", v9, 0, 1, HWCAP_V8PLUS|HWS_VV, 0 },
+ { "v8plusm", "v9b", v9, 0, 1, HWCAP_V8PLUS|HWS_VM, 0 },
{ "v9", "v9", v9, 0, 1, HWS_V9, 0 },
{ "v9a", "v9a", v9, 0, 1, HWS_VA, 0 },
@@ -280,6 +288,7 @@ static struct sparc_arch {
{ "v9d", "v9b", v9, 0, 1, HWS_VD, 0 },
{ "v9e", "v9b", v9, 0, 1, HWS_VE, 0 },
{ "v9v", "v9b", v9, 0, 1, HWS_VV, 0 },
+ { "v9m", "v9b", v9, 0, 1, HWS_VM, HWS2_VM },
/* This exists to allow configure.tgt to pass one
value to specify both the default machine and default word size. */
diff --git a/gas/doc/c-sparc.texi b/gas/doc/c-sparc.texi
index 37a4c1a..6036766 100644
--- a/gas/doc/c-sparc.texi
+++ b/gas/doc/c-sparc.texi
@@ -62,6 +62,7 @@ is explicitly requested. SPARC v9 is always incompatible with sparclite.
@kindex -Av9d
@kindex -Av9e
@kindex -Av9v
+@kindex -Av9m
@kindex -Asparc
@kindex -Asparcvis
@kindex -Asparcvis2
@@ -71,7 +72,7 @@ is explicitly requested. SPARC v9 is always incompatible with sparclite.
@kindex -Asparcvis3r
@item -Av6 | -Av7 | -Av8 | -Aleon | -Asparclet | -Asparclite
@itemx -Av8plus | -Av8plusa | -Av8plusb | -Av8plusc | -Av8plusd | -Av8plusv
-@itemx -Av9 | -Av9a | -Av9b | -Av9c | -Av9d | -Av9e | -Av9v
+@itemx -Av9 | -Av9a | -Av9b | -Av9c | -Av9d | -Av9e | -Av9v | -Av9m
@itemx -Asparc | -Asparcvis | -Asparcvis2 | -Asparcfmaf | -Asparcima
@itemx -Asparcvis3 | -Asparcvis3r
Use one of the @samp{-A} options to select one of the SPARC
@@ -83,9 +84,9 @@ or feature requiring an incompatible or higher level.
@samp{-Av8plusd}, and @samp{-Av8plusv} select a 32 bit environment.
@samp{-Av9}, @samp{-Av9a}, @samp{-Av9b}, @samp{-Av9c}, @samp{-Av9d},
-@samp{-Av9e} and @samp{-Av9v} select a 64 bit environment and are not
-available unless GAS is explicitly configured with 64 bit environment
-support.
+@samp{-Av9e}, @samp{-Av9v} and @samp{-Av9m} select a 64 bit
+environment and are not available unless GAS is explicitly configured
+with 64 bit environment support.
@samp{-Av8plusa} and @samp{-Av9a} enable the SPARC V9 instruction set with
UltraSPARC VIS 1.0 extensions.
@@ -108,6 +109,10 @@ and @samp{-Av9d}.
multiply-add, and integer multiply-add, as well as the instructions
enabled by @samp{-Av8pluse} and @samp{-Av9e}.
+@samp{-Av8plusm} and @samp{-Av9m} enable the VIS 4.0, subtract extended,
+xmpmul, xmontmul and xmontsqr instructions, as well as the instructions
+enabled by @samp{-Av8plusv} and @samp{-Av9v}.
+
@samp{-Asparc} specifies a v9 environment. It is equivalent to
@samp{-Av9} if the word size is 64-bit, and @samp{-Av8plus} otherwise.
@@ -129,17 +134,19 @@ HPC , and floating point fused multiply-add instructions enabled.
@samp{-Asparcvis3r} specifies a v9b environment with the VIS 3.0, HPC,
and floating point unfused multiply-add instructions enabled.
+@samp{-Asparc5} is equivalent to @samp{-Av9m}.
+
@item -xarch=v8plus | -xarch=v8plusa | -xarch=v8plusb | -xarch=v8plusc
@itemx -xarch=v8plusd | -xarch=v8plusv | -xarch=v9 | -xarch=v9a
-@itemx -xarch=v9b | -xarch=v9c | -xarch=v9d | -xarch=v9e | -xarch=v9v
+@itemx -xarch=v9b | -xarch=v9c | -xarch=v9d | -xarch=v9e | -xarch=v9v | -xarch=v9m
@itemx -xarch=sparc | -xarch=sparcvis | -xarch=sparcvis2
@itemx -xarch=sparcfmaf | -xarch=sparcima | -xarch=sparcvis3
-@itemx -xarch=sparcvis3r
+@itemx -xarch=sparcvis3r | -xarch=sparc5
For compatibility with the SunOS v9 assembler. These options are
equivalent to -Av8plus, -Av8plusa, -Av8plusb, -Av8plusc, -Av8plusd,
--Av8plusv, -Av9, -Av9a, -Av9b, -Av9c, -Av9d, -Av9e, -Av9v, -Asparc,
--Asparcvis, -Asparcvis2, -Asparcfmaf, -Asparcima, -Asparcvis3, and
--Asparcvis3r, respectively.
+-Av8plusv, -Av9, -Av9a, -Av9b, -Av9c, -Av9d, -Av9e, -Av9v, -Av9m,
+-Asparc, -Asparcvis, -Asparcvis2, -Asparcfmaf, -Asparcima,
+-Asparcvis3, and -Asparcvis3r, respectively.
@item -bump
Warn whenever it is necessary to switch to another level.
--
1.7.10.4