From patchwork Thu Oct 28 06:50:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kito Cheng X-Patchwork-Id: 1547350 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=google header.b=kV3q2z5y; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hfx6P0z9mz9sRN for ; Thu, 28 Oct 2021 17:51:07 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7F8FD385781A for ; Thu, 28 Oct 2021 06:51:03 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id E2AF93858402 for ; Thu, 28 Oct 2021 06:50:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E2AF93858402 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-pl1-x631.google.com with SMTP id v20so3740579plo.7 for ; Wed, 27 Oct 2021 23:50:39 -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:mime-version :content-transfer-encoding; bh=QuuN5+2MT27Ywggp2V4rHgXD/SIBZuLhow7yPQ0stmo=; b=kV3q2z5yPRC8W1a+u/djz1TI35vxV5n4cTd0xeeyVlOh1aLWNG5qkWzBHE2FMah3zi nYxNELZwRRX4UcIf3HDI88JqjV4PShCmeQ5nNjs8jrRo5JaVIWg5GnpfRO3aWkNt/3Ar AVWQfFHXcMgq/WUr+eXpAGL9IHa7PnbPQwOu9KEj+bxaC7oOaMm4fmJvyUSUn7roOR8S +hLk2evrPJlFAGrYk1DzfG4YrzYvV1fqYaPpT44IUEynQwVok+aYWzJpfDu9eFlE1Rer 8pPZRYG3LUoT5lwbVZcVGv8eBzTbA2Rlb/xFANYivy9pKHrL35hTn79vCBck5XqmaMHm ZdvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QuuN5+2MT27Ywggp2V4rHgXD/SIBZuLhow7yPQ0stmo=; b=4HgYkbhRi9pWovQpq859J+zyrImaagNreyJqj5DuCZjXqMmY2WHqvJQqj2q7knezBv IYLL3NckJI3VqludXQXggYBTT62xuX8mz/FFSMBK7bDeLfFR1eSNiFCRJ5c2iJWZVoQE UATNZsAndHKysWQKxvsVP55yBH5vM10jYSAq6YeI5mAR2N4pPJAJIGC3JqcwKdOYLsgl xalr6xQXfkR43uXSzg3J8Z39B5Fst1f2rIb3rcTAfbFoGVVy2WMSGNyifsAomqS+zmkc /qLsrrJMoZhgLMW6q9DrUMINIQ1ZcVCvrIcAkKP1aQYiVuTvAfAvp0J+9pzcQZgMMNRL Phxg== X-Gm-Message-State: AOAM533SfYYTkjPc9mUPby88T1QvCBm6Hr3rG6rFf0VR5c/Dzx+sXkZd xP8j7qkijXYrGCV+XvSxYfOsXRAaUVuunQ== X-Google-Smtp-Source: ABdhPJxo9sVZ+Rktw0EZbpWHAPCd1mgmob9dVsjUC5TpvPW8eCenrerIyIiVkYIJZMTsD2d68OBwYw== X-Received: by 2002:a17:903:2291:b0:141:72c1:41cf with SMTP id b17-20020a170903229100b0014172c141cfmr2046336plh.21.1635403838635; Wed, 27 Oct 2021 23:50:38 -0700 (PDT) Received: from hsinchu02.internal.sifive.com (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id e8sm2128938pfv.183.2021.10.27.23.50.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 23:50:38 -0700 (PDT) From: Kito Cheng To: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com, jimw@sifive.com Subject: [committed] RISC-V: Handle zi* extension correctly for arch-canonicalize script Date: Thu, 28 Oct 2021 14:50:31 +0800 Message-Id: <20211028065031.37295-1-kito.cheng@sifive.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kito Cheng Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Canonical order for z-prefixed extension are rely on the canonical order of single letter extension, however we didn't put i into the list before, so when we put zicsr or zifencei it will got exception. gcc/ChangeLog: * config/riscv/arch-canonicalize (CANONICAL_ORDER): Add `i` to CANONICAL_ORDER. --- gcc/config/riscv/arch-canonicalize | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/riscv/arch-canonicalize b/gcc/config/riscv/arch-canonicalize index ea95a0693f3..c7df3c8a313 100755 --- a/gcc/config/riscv/arch-canonicalize +++ b/gcc/config/riscv/arch-canonicalize @@ -28,7 +28,7 @@ import itertools from functools import reduce -CANONICAL_ORDER = "mafdgqlcbjtpvn" +CANONICAL_ORDER = "imafdgqlcbjtpvn" LONG_EXT_PREFIXES = ['z', 's', 'h', 'x'] #