From patchwork Fri Mar 9 04:12:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Clark X-Patchwork-Id: 10269639 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 38CBC60236 for ; Fri, 9 Mar 2018 04:19:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E0CF29BCD for ; Fri, 9 Mar 2018 04:19:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2178A29BE8; Fri, 9 Mar 2018 04:19:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9052B29BCD for ; Fri, 9 Mar 2018 04:19:28 +0000 (UTC) Received: from localhost ([::1]:43117 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eu9V9-0007tO-NB for patchwork-qemu-devel@patchwork.kernel.org; Thu, 08 Mar 2018 23:19:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eu9Qf-0004IY-Q5 for qemu-devel@nongnu.org; Thu, 08 Mar 2018 23:14:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eu9Qc-0006zy-Ki for qemu-devel@nongnu.org; Thu, 08 Mar 2018 23:14:49 -0500 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:34297) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eu9Qc-0006zd-El for qemu-devel@nongnu.org; Thu, 08 Mar 2018 23:14:46 -0500 Received: by mail-pg0-x244.google.com with SMTP id m19so3123710pgn.1 for ; Thu, 08 Mar 2018 20:14:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=j4IsCu0Ogw4C4VGML3xebQtkhhgEZnHvVT7BhbcJNGc=; b=R76frV+4S5WS+xM/vqgqXOJ+3m+7W1Gi2u035Xce0Lx8sCssux2oN6DQGivSStreeu 0mTKl+pVNIM6MbP0OCGWOCBe4ItRqDIjHd4yBzRh2L81lAKvrtx290tDjMvFj5KJHnlA IPuLSbJA6z2iPp85ORqcEEQFNVzhixuxtOVbxY9wL0AHzEeOIvw1Hz1H9rfMwaYskZDF b02Df9gK+OBVcG+ZhQR6WwHt4SZeN5xcafBs8JZaFBKOReKCW7vhW2szVmpk+dJujtdB CDH6bqnRl+rVvo7NXxg+NUtwOQ37WBnc68Nrb19XwoKdpuNScXg2gpkj2mSsjgkPlbPo v8DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=j4IsCu0Ogw4C4VGML3xebQtkhhgEZnHvVT7BhbcJNGc=; b=fEYr00c/jk0dNQCkD2gHeFStj8Tne6TQZIYZyPBBMhMTAvMSt+rq4OcvgcbHewf7lt kHXMHcvfojzKfhomKZr+v142t14Ngg19JQSwiyUL4HhF2eln+1mJyRt2Bx66Kbpe9ynq FPG7eKHH4sX4HCjsynlTTT1tnD69/IoK8xT9ufLwNrJWQ7bG8sTT/blY7vhnLrVV4rUj d93gMe/5VSOdW3txjD4gcJjr+vNsYkJJ2iFicQgd2bqBcqINPNoMDnaQpn6AQpd7CCDp VuUTsXiHIO0vjfPyhLxy+WF/Pz+f+OX6l5RSHziXyZSnL+UohLQWQWw6+Qd7D1kj6Tkq i9Gw== X-Gm-Message-State: APf1xPAOaJKXqqFLdbSCCkKbSsnWwTxYNRX3ugh54XFKNstt8rtf9mWX IcXqH2dZq4ECWR26lPg2YafhRYzx578= X-Google-Smtp-Source: AG47ELtVKW5kJXUEXij4vV4ffQY5Ux9epJo+O8+xDE2jhLXln4Mg37s89lhypa+CvIIAjOPlzcG/zw== X-Received: by 10.99.1.148 with SMTP id 142mr23688379pgb.24.1520568885558; Thu, 08 Mar 2018 20:14:45 -0800 (PST) Received: from localhost.localdomain (125-237-39-90-fibre.bb.spark.co.nz. [125.237.39.90]) by smtp.gmail.com with ESMTPSA id h15sm334141pfi.56.2018.03.08.20.14.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Mar 2018 20:14:44 -0800 (PST) From: Michael Clark To: qemu-devel@nongnu.org Date: Fri, 9 Mar 2018 17:12:34 +1300 Message-Id: <1520568765-58189-13-git-send-email-mjc@sifive.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1520568765-58189-1-git-send-email-mjc@sifive.com> References: <1520568765-58189-1-git-send-email-mjc@sifive.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::244 Subject: [Qemu-devel] [PATCH v2 12/23] RISC-V: Update E order and I extension order X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , Michael Clark , Palmer Dabbelt , Sagar Karandikar Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Section 22.8 Subset Naming Convention of the RISC-V ISA Specification defines the canonical order for extensions in the ISA string. It is silent on the position of the E extension however E is a substitute for I so it must come early in the extension list order. A comment is added to state E and I are mutually exclusive, as the E extension will be added to the RISC-V port in the future. Cc: Sagar Karandikar Cc: Bastian Koppelmann Signed-off-by: Michael Clark Signed-off-by: Palmer Dabbelt --- target/riscv/cpu.c | 2 +- target/riscv/cpu.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 4851890..d2ae56a 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -26,7 +26,7 @@ /* RISC-V CPU definitions */ -static const char riscv_exts[26] = "IMAFDQECLBJTPVNSUHKORWXYZG"; +static const char riscv_exts[26] = "IEMAFDQCLBJTPVNSUHKORWXYZG"; const char * const riscv_int_regnames[] = { "zero", "ra ", "sp ", "gp ", "tp ", "t0 ", "t1 ", "t2 ", diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index cff02a2..3a0ca2f 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -71,6 +71,7 @@ #define RV(x) ((target_ulong)1 << (x - 'A')) #define RVI RV('I') +#define RVE RV('E') /* E and I are mutually exclusive */ #define RVM RV('M') #define RVA RV('A') #define RVF RV('F')