From e292c275038791704f6691404f0a3c08615e8edd Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Mon, 29 May 2023 01:04:55 +0300 Subject: [PATCH] ppc: decouple SFFS and SVP64 extensions --- gas/config/tc-ppc.c | 6 +++++- include/opcode/ppc.h | 7 +++++-- opcodes/ppc-dis.c | 13 ++++++++++++- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 974404b668e..47ed37132e7 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -1392,7 +1392,11 @@ PowerPC options:\n")); fprintf (stream, _("\ -mpower10, -mpwr10 generate code for Power10 architecture\n")); fprintf (stream, _("\ --mlibresoc generate code for Libre-SOC architecture\n")); +-mdraft-sffs generate code for Scalar Fixed-point and Floating-point subset\n")); + fprintf (stream, _("\ +-mdraft-svp64 generate code for SVP64 architecture\n")); + fprintf (stream, _("\ +-mlibresoc generate code for Libre-SOC architecture (SVP64 + SFFS)\n")); fprintf (stream, _("\ -mfuture generate code for 'future' architecture\n")); fprintf (stream, _("\ diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h index aea7d6c2864..e71aa1e86d1 100644 --- a/include/opcode/ppc.h +++ b/include/opcode/ppc.h @@ -239,11 +239,14 @@ extern const unsigned int spe2_num_opcodes; /* Opcode is only supported by power10 architecture. */ #define PPC_OPCODE_POWER10 0x400000000000ull -/* Opcode is only supported by SVP64 extensions (LibreSOC architecture). */ +/* Opcode is only supported by SVP64 extensions. */ #define PPC_OPCODE_SVP64 0x800000000000ull +/* Opcode is only supported by Scalar Fixed-point + Floating-point subset. */ +#define PPC_OPCODE_SFFS 0x1000000000000ull + /* Opcode is only supported by 'future' architecture. */ -#define PPC_OPCODE_FUTURE 0x1000000000000ull +#define PPC_OPCODE_FUTURE 0x2000000000000ull /* A macro to extract the major opcode from an instruction. */ #define PPC_OP(i) (((i) >> 26) & 0x3f) diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c index d97137d8b71..ea1a7ff5539 100644 --- a/opcodes/ppc-dis.c +++ b/opcodes/ppc-dis.c @@ -208,11 +208,22 @@ struct ppc_mopt ppc_opts[] = { | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9 | PPC_OPCODE_POWER10 | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX), 0 }, - { "libresoc",(PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_64 + { "draft-sffs",(PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_64 + | PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 + | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9 + | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX | PPC_OPCODE_SFFS), + 0 }, + { "draft-svp64",(PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_64 | PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9 | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX | PPC_OPCODE_SVP64), 0 }, + { "libresoc",(PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_64 + | PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 + | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9 + | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX | PPC_OPCODE_SFFS + | PPC_OPCODE_SVP64), + 0 }, { "future", (PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_64 | PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9 -- 2.30.2