From patchwork Tue Aug 6 06:55:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kito Cheng X-Patchwork-Id: 1142629 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-506304-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="D2TrsxDy"; dkim=pass (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.b="ah+FdkFW"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 462llz0VWkz9sDB for ; Tue, 6 Aug 2019 16:56:12 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; q=dns; s=default; b=sC68lwTPsS0m 16qAKtJcDJLlcK9QnvTR6YkUVTtHGIaHh7AtJpJ5U8soDGqumal9VOPwxcXHZVc/ uIoCnqtoRea5yaM7icQupJCUgAFv6lAxSMrmDXVqfP9fUvdpr0XaWXfGm6U0OnCp 43p2Wu+6xm5iQOITAAMdmntOUGnY6YQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; s=default; bh=q7XOKtCBINVwH+knpi 0/i9nQHaE=; b=D2TrsxDyiZvAwpM6jGboHlfCSQbD3sUc5HESy+PlB18nEb3Z0I hOXYLNHWcMGJK3Van84Qb+KieOjupbIAXzxt5g4XeykRWuDikyfuBfDOHSZlt1bN idZvwLONNxibYscdV7qp5ceKJYY5V1HZmg3kETCcVsMdHTx8HpdPuNapI= Received: (qmail 60239 invoked by alias); 6 Aug 2019 06:56:06 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 60230 invoked by uid 89); 6 Aug 2019 06:56:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Received:a65, HX-Spam-Relays-External:209.85.210.196, H*RU:209.85.210.196, H*r:sk:mail-pf X-HELO: mail-pf1-f196.google.com Received: from mail-pf1-f196.google.com (HELO mail-pf1-f196.google.com) (209.85.210.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Aug 2019 06:56:04 +0000 Received: by mail-pf1-f196.google.com with SMTP id f17so36975285pfn.6 for ; Mon, 05 Aug 2019 23:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id; bh=oseGItIU1Jjjxc1Ig5y6P9XcVesstOIAw0mF/+0nfHE=; b=ah+FdkFWkj4EA2GPWDIN7ut8wYZ0zDzFqmKA0hKoEJxiPD7vcDR/IWa+r28NXDhVBj //pki8g1hUNZ5WPUwaSERRrKhy1m03vWR433WHLx29oHT7MvmHiJjKiL77rXBDJV3u+K eCJyc7pz3m5rGMd8oDHZzJiQMy8j5omm3QHIdnJUHS4l133Rml9lI3ZqZkHO4axUnngr Q81cAeh+T1UpjIjwD+psjKZoBch4SmRQzoXxahOSsh07MlhCf9e+KFZtelMO/rLSu72W spvmGdSshVoseNgYIaPE5XUErarIUyWHiPy4OHxTiTahGrLzM2TofZTJiu7Sle1ZgUjS +6zg== Received: from localhost.localdomain (220-132-236-182.HINET-IP.hinet.net. [220.132.236.182]) by smtp.gmail.com with ESMTPSA id x13sm91080076pfn.6.2019.08.05.23.56.01 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 05 Aug 2019 23:56:02 -0700 (PDT) From: Kito Cheng To: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com, jimw@sifive.com Cc: Kito Cheng Subject: [PATCH] RISC-V: Handle g extension in multilib-generator Date: Tue, 6 Aug 2019 14:55:54 +0800 Message-Id: <20190806065554.9601-1-kito.cheng@sifive.com> gcc/ChangeLog * gcc/config/riscv/multilib-generator: (canonical_order): Add 'g'. (arch_canonicalize): Support rv32g and rv64g and fix error handling. --- gcc/config/riscv/multilib-generator | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/config/riscv/multilib-generator b/gcc/config/riscv/multilib-generator index e58231c2756..a4125ff01fd 100755 --- a/gcc/config/riscv/multilib-generator +++ b/gcc/config/riscv/multilib-generator @@ -36,17 +36,17 @@ abis = collections.OrderedDict() required = [] reuse = [] -canonical_order = "mafdqlcbjtpvn" +canonical_order = "mafdgqlcbjtpvn" def arch_canonicalize(arch): # TODO: Support Z, S, H, or X extensions. # TODO: Support implied extensions, e.g. D implied F in latest spec. # TODO: Support extension version. new_arch = "" - if arch[:5] in ['rv32e', 'rv32i', 'rv64i']: + if arch[:5] in ['rv32e', 'rv32i', 'rv32g', 'rv64i', 'rv64g']: new_arch = arch[:5] else: - raise Exception("Unexpected arch: `%d`" % arch[:5]) + raise Exception("Unexpected arch: `%s`" % arch[:5]) # Find any Z, S, H or X long_ext_prefixes = ['z', 's', 'h', 'x']