From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by sourceware.org (Postfix) with ESMTPS id 08FED3875A21 for ; Mon, 25 Jul 2022 13:10:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 08FED3875A21 Received: by mail-lj1-x234.google.com with SMTP id e11so13069266ljl.4 for ; Mon, 25 Jul 2022 06:10:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=TLd0Wc5WW2jhOqnYWFuijYevwYtYhtAvuNETf38ecTQ=; b=IkCE5cLKHlBean+t8ayMyl18sDGacOvhD+MO83wGKIFbH56vXgkcfmNN+e+1KsNrV0 6PxsNv2eAkXFiZOuxcwFJt4EU8Fmf/5ZVs5yIGWEKwkB0LGKN9OXnWDUjkXLsg0EyGVR a72+hbYzO83T/E0/OYxjJEuIaq0/7kNcZd9nY6pZoicgkRN6/qOBA6aVrG4PH3UEuRg/ BYqRXMzLKxP3aP6FZuPCzdgaf8mjoBl9FO0jzgQFON+0m/M27jqufrsMA3JBTmIp3fxq VagDCy2JvyI90SWIj8MHdnm90xUfmAGcUQt4JCICWrb+yCn0/FkRXRtyYMr4q2aUncmJ tkXQ== X-Gm-Message-State: AJIora/UFGmUt3bb0evBEn9uDKLhseuApLRAjaC8bAWI5sTDJ9UODHS8 eshW1jofm6KU0OM9RU5GxzGtvER34ZQ= X-Google-Smtp-Source: AGRyM1sjzTrHcQRUCq9PEBCea41aWZRmqPLCylIwb0KM+FUrKuIBW/0mLOtPgiRRGO4Omk+z8WjObA== X-Received: by 2002:a2e:84ca:0:b0:25d:77e0:2566 with SMTP id q10-20020a2e84ca000000b0025d77e02566mr4447313ljh.78.1658754650124; Mon, 25 Jul 2022 06:10:50 -0700 (PDT) Received: from localhost.localdomain (broadband-188-32-220-156.ip.moscow.rt.ru. [188.32.220.156]) by smtp.gmail.com with ESMTPSA id q10-20020a19f20a000000b00489dd78bdacsm2664565lfh.299.2022.07.25.06.10.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 06:10:49 -0700 (PDT) Sender: Dmitry Selyutin From: Dmitry Selyutin To: binutils@sourceware.org Cc: Alan Modra , Luke Kenneth Casson Leighton , Dmitry Selyutin Subject: [PATCH v6 1/7] ppc/svp64: support LibreSOC architecture Date: Mon, 25 Jul 2022 16:10:14 +0300 Message-Id: <20220725131020.128550-2-ghostmansd@gmail.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220725131020.128550-1-ghostmansd@gmail.com> References: <20220626190005.7727-1-ghostmansd@gmail.com> <20220725131020.128550-1-ghostmansd@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2022 13:10:54 -0000 This patch adds support for LibreSOC machine and SVP64 extension flag for PowerPC architecture. SV (Simple-V) is a strict RISC-paradigm Scalable Vector Extension for the Power ISA. SVP64 is the 64-bit Prefixed instruction format implementing SV. Funded by NLnet through EU Grants No: 825310 and 825322, SV is in DRAFT form and is to be publicly submitted via the OpenPOWER Foundation ISA Working Group via the newly-created External RFC Process. For more details, visit https://libre-soc.org. --- gas/config/tc-ppc.c | 2 ++ include/opcode/ppc.h | 3 +++ opcodes/ppc-dis.c | 5 +++++ opcodes/ppc-opc.c | 1 + 4 files changed, 11 insertions(+) diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 452fab1cbf..ffc99857e3 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -1382,6 +1382,8 @@ PowerPC options:\n")); fprintf (stream, _("\ -mpower10, -mpwr10 generate code for Power10 architecture\n")); fprintf (stream, _("\ +-mlibresoc generate code for Libre-SOC architecture\n")); + fprintf (stream, _("\ -mcell generate code for Cell Broadband Engine architecture\n")); fprintf (stream, _("\ -mcom generate code for Power/PowerPC common instructions\n")); diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h index 7bc6ee216e..d5752a42e6 100644 --- a/include/opcode/ppc.h +++ b/include/opcode/ppc.h @@ -237,6 +237,9 @@ 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). */ +#define PPC_OPCODE_SVP64 0x800000000000ull + /* 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 45e8faeef5..f61e6518f1 100644 --- a/opcodes/ppc-dis.c +++ b/opcodes/ppc-dis.c @@ -200,6 +200,11 @@ 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 + | 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 }, { "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 diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c index 7637d3e349..51da625e04 100644 --- a/opcodes/ppc-opc.c +++ b/opcodes/ppc-opc.c @@ -4832,6 +4832,7 @@ const unsigned int num_powerpc_operands = (sizeof (powerpc_operands) #define PPCHTM PPC_OPCODE_POWER8 #define E200Z4 PPC_OPCODE_E200Z4 #define PPCLSP PPC_OPCODE_LSP +#define SVP64 PPC_OPCODE_SVP64 /* Used to mark extended mnemonic in deprecated field so that -Mraw won't use this variant in disassembly. */ #define EXT PPC_OPCODE_RAW -- 2.37.0