From patchwork Mon Mar 19 21:18:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Clark X-Patchwork-Id: 10295209 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 01A9F602C2 for ; Mon, 19 Mar 2018 21:26:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E498E29432 for ; Mon, 19 Mar 2018 21:26:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D96AC2943B; Mon, 19 Mar 2018 21:26:56 +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 53F3E29432 for ; Mon, 19 Mar 2018 21:26:56 +0000 (UTC) Received: from localhost ([::1]:44015 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ey2Ix-0007lp-58 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 19 Mar 2018 17:26:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ey2C9-0001Nh-N8 for qemu-devel@nongnu.org; Mon, 19 Mar 2018 17:19:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ey2C8-0002fL-NF for qemu-devel@nongnu.org; Mon, 19 Mar 2018 17:19:53 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:38427) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ey2C8-0002eW-Hz for qemu-devel@nongnu.org; Mon, 19 Mar 2018 17:19:52 -0400 Received: by mail-pf0-x242.google.com with SMTP id d26so7557629pfn.5 for ; Mon, 19 Mar 2018 14:19:52 -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:in-reply-to:references; bh=j4IsCu0Ogw4C4VGML3xebQtkhhgEZnHvVT7BhbcJNGc=; b=h46FzEZFG1tzlY6Mdcjhk8CrUYmRtJ9BHO0r72ZFyc2mcwufNZkKqPudd02VtCGGH2 54HTMklI195IiCY1VTlfRssc8iuZpMv4wbEjwopx/tPsZV3te6vUhdn/A5oCXr7ZeaFA 4mBDFlkBMySOdXRAmC5SPOHwE+s515k8QCuWbZ/4QihL3uAfHtkH6SXwJUNff12LcjC2 q/IpCOA3aedbCWINJKHVfhmHDzXS56YVObT/j6hVUzzLK5x64Y0Ww3bQy3dGEB3lsv6E WmMbbO4gm5mGpB0GB2GjrCHvO9JdzOBeXsVlEH8evdcWpmq+TdSq+ULQY8BLCkx7e/It mVHg== 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=R/DTe2pHkB3UI4EPBNDQsHv90JQ8XxEWVZ0t/JrBF/SnTzD/LaK91Sb46keDZs9XRu deGIjJ/GOO7uG0PjAabu36cPuI7L9t1+/vybwd6J4Ds2Hqyk+IaraXBiEU7ShJZZ/rL2 Ghuc9Sm5SeTdZYxwjoKsoQHJcUU+/ybaxyAha5KiRWZ8t8NaNfFWhK+XouqeL6ul22wz ckp0QSIgsfSRA4dmeqc45DFPm59LDlbBGzS6JXKtF/+TG7LMMaFx21+3KYrPuh6jvfOJ 4a7p8jJW2KdqgecMi8aNV383j5dK3HUJ49CJhXu9zlq6QGMbvF8jCe7KUAuW+ydHU3ai 3L2w== X-Gm-Message-State: AElRT7FdcMB9iEVQA/KFSwHZNcbCexh/zxDL1hZdQjxZtFjShIFos9D9 c86gMV26u9BPQHI7IFVlowsGlXvRsTc= X-Google-Smtp-Source: AG47ELvz5+1f0DPi8DFTBJb04YM9yes0U4XSb6vjj5SVr7LFERZecqhZuc/eAGS674YG2FP92cFHqA== X-Received: by 10.98.11.19 with SMTP id t19mr10261118pfi.218.1521494391568; Mon, 19 Mar 2018 14:19:51 -0700 (PDT) Received: from monty.com ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id i127sm120500pfc.136.2018.03.19.14.19.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Mar 2018 14:19:50 -0700 (PDT) From: Michael Clark To: qemu-devel@nongnu.org Date: Mon, 19 Mar 2018 14:18:35 -0700 Message-Id: <1521494329-19546-13-git-send-email-mjc@sifive.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1521494329-19546-1-git-send-email-mjc@sifive.com> References: <1521494329-19546-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:c00::242 Subject: [Qemu-devel] [PATCH v4 12/26] 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: patches@groups.riscv.org, Michael Clark , Palmer Dabbelt , Sagar Karandikar , Bastian Koppelmann 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')