From e83a032060865550e33659a69a86870f9da880b1 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Thu, 23 Mar 2017 13:24:10 -0700 Subject: [PATCH] Require little-endian host --- riscv/decode.h | 4 ++++ riscv/encoding.h | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/riscv/decode.h b/riscv/decode.h index d82767d..061b5b6 100644 --- a/riscv/decode.h +++ b/riscv/decode.h @@ -7,6 +7,10 @@ # error spike requires a two''s-complement c++ implementation #endif +#ifdef WORDS_BIGENDIAN +# error spike requires a little-endian host +#endif + #include #include #include diff --git a/riscv/encoding.h b/riscv/encoding.h index 3923bff..a7066b7 100644 --- a/riscv/encoding.h +++ b/riscv/encoding.h @@ -124,6 +124,16 @@ #define SPTBR_MODE_SV57 10 #define SPTBR_MODE_SV64 11 +#define PMP_R 0x01 +#define PMP_W 0x02 +#define PMP_X 0x04 +#define PMP_M 0x08 +#define PMP_NAPOT 0x10 +#define PMP_TOR 0x20 +#define PMP_EN 0x40 +#define PMP_LOCK 0x80 +#define PMP_SHIFT 2 + #define IRQ_S_SOFT 1 #define IRQ_H_SOFT 2 #define IRQ_M_SOFT 3 -- 2.30.2