Skip to content

Commit

Permalink
RISC-V: Update E and I extension order
Browse files Browse the repository at this point in the history
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 <sagark@eecs.berkeley.edu>
Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Signed-off-by: Michael Clark <mjc@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
  • Loading branch information
Michael Clark committed May 5, 2018
1 parent 8d196c4 commit 79f8693
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion target/riscv/cpu.c
Expand Up @@ -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 ",
Expand Down
1 change: 1 addition & 0 deletions target/riscv/cpu.h
Expand Up @@ -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')
Expand Down

0 comments on commit 79f8693

Please sign in to comment.