From patchwork Wed Mar 21 20:46:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Clark X-Patchwork-Id: 10300375 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 DDFA460386 for ; Wed, 21 Mar 2018 20:52:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C69CC290A6 for ; Wed, 21 Mar 2018 20:52:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB6CC290B0; Wed, 21 Mar 2018 20:52:41 +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 5B8DD290A6 for ; Wed, 21 Mar 2018 20:52:41 +0000 (UTC) Received: from localhost ([::1]:57373 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eykiu-0006QN-It for patchwork-qemu-devel@patchwork.kernel.org; Wed, 21 Mar 2018 16:52:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53099) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eykeR-00023N-G5 for qemu-devel@nongnu.org; Wed, 21 Mar 2018 16:48:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eykeO-00026u-93 for qemu-devel@nongnu.org; Wed, 21 Mar 2018 16:48:02 -0400 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:39177) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eykeO-00026a-3e for qemu-devel@nongnu.org; Wed, 21 Mar 2018 16:48:00 -0400 Received: by mail-pg0-x241.google.com with SMTP id a19so2401216pgw.6 for ; Wed, 21 Mar 2018 13:47:59 -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=oDVDB19iZbMtMOzIyqZWk2blYn6n5GmfegdBqD4wXE0=; b=UC+/SWaYL2jRMn0ROOawXz9wCeTq8SvtpEPuJPSI1a9/vpXBTAnX6a9PwDcaIXnTj/ 2BFOA2j4bnC+DnAkg3ZVopBVNx+6RyZ/xSZ6dXj7sDbkq5hlu6p5HHgfh/DYg0nqaEx0 DPPoO8NwHUS+g7F8vxmUbXC5cZNRN0WG0HWjPEvEouB0RB5wqwpaXt71d+wfymSZgYUV PSyd2Mvv4A6K1DAGJEjnngDAcnEiS5G3AcpFpCx7y3hjQmCIfLVVfOauQcBguQIbaaC9 Ld9fFEfhprqWsF6kLNJIEy77A/n5x3iQP4lczONYaTYi8vDM+WfOrzyjasgbjSh/75f7 nu1g== 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=oDVDB19iZbMtMOzIyqZWk2blYn6n5GmfegdBqD4wXE0=; b=t0W9dG1YeJaFAQd8D5ucNO0y/VojvBZLFwn5OAFWfoX1IEv8+tPnFJq3WljuRxa3Z2 glwoK4F6R0VjFv+/KvE5BpXCbgMyxlp5Ma558GxhrWRTa5JCtUlSmd+rkfhH3HacxBvY evypFYDw1Md2Jxso1dapq/JSy5A1dS6bDOfghfzynaHog9ujne9YXMqdfuxULH8JiQPz Lj+V/pOqoAeDy+LmPJsrS3TKGieh0+ADbS0b4ptX3TvPvn1RUzgFvd8bFlvNf3ye5kaN QtR5NVSEUgsnwf4FlsO28UZBwYW87YHIjN/kkU+R9i2pDtOE2ybVcaGiS6yKDvGRwj71 OQ+g== X-Gm-Message-State: AElRT7FamoxPlnwEfdk6fWJoGBGkUDZXJW42s1FwfuHtPiHs5N93MTk/ UtuChdS1lqRyOJUehUTYBa1cL3bRn/Y= X-Google-Smtp-Source: AG47ELtTBVhbdObprVcHqWedGLmW33LDa1ephyFbKZ3Uol2ar3YQFXFMtAijuWiYjPa2dc71mwQFmA== X-Received: by 10.101.97.139 with SMTP id c11mr15969270pgv.443.1521665279105; Wed, 21 Mar 2018 13:47:59 -0700 (PDT) Received: from monty.com ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id w10sm8244499pgr.57.2018.03.21.13.47.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Mar 2018 13:47:58 -0700 (PDT) From: Michael Clark To: qemu-devel@nongnu.org Date: Wed, 21 Mar 2018 13:46:47 -0700 Message-Id: <1521665220-3869-12-git-send-email-mjc@sifive.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1521665220-3869-1-git-send-email-mjc@sifive.com> References: <1521665220-3869-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::241 Subject: [Qemu-devel] [PULL 11/24] 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 9de34d7..ad65b39 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 41e06ac..1fdcd75 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -72,6 +72,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')