aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer.dabbelt@eecs.berkeley.edu>2015-09-18 23:34:47 -0700
committerPalmer Dabbelt <palmer.dabbelt@eecs.berkeley.edu>2015-09-18 23:34:47 -0700
commit27cbd8e17ce719a0be205ea8187e155accca94fe (patch)
tree38f198eda9a5c306956b564a0efa10227b7f2b6d /binutils
parent7532ccf00cf310d19af0dc5d1fcaa10f8ce9072d (diff)
downloadriscv-gnu-toolchain-27cbd8e17ce719a0be205ea8187e155accca94fe.zip
riscv-gnu-toolchain-27cbd8e17ce719a0be205ea8187e155accca94fe.tar.gz
riscv-gnu-toolchain-27cbd8e17ce719a0be205ea8187e155accca94fe.tar.bz2
binutils: bfd: move RVC fields to the right place
Diffstat (limited to 'binutils')
-rw-r--r--binutils/include/opcode/riscv.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/binutils/include/opcode/riscv.h b/binutils/include/opcode/riscv.h
index 1a01f25..02a676c 100644
--- a/binutils/include/opcode/riscv.h
+++ b/binutils/include/opcode/riscv.h
@@ -26,20 +26,6 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, US
#include <stdlib.h>
#include <stdint.h>
-/* RVC fields. */
-
-#define OP_MASK_CRS2 0x1f
-#define OP_SH_CRS2 2
-#define OP_MASK_CRS1S 0x7
-#define OP_SH_CRS1S 7
-#define OP_MASK_CRS2S 0x7
-#define OP_SH_CRS2S 2
-
-static const char rvc_rs1_regmap[8] = { 20, 21, 2, 3, 4, 5, 6, 7 };
-#define rvc_rd_regmap rvc_rs1_regmap
-#define rvc_rs2b_regmap rvc_rs1_regmap
-static const char rvc_rs2_regmap[8] = { 20, 21, 2, 3, 4, 5, 6, 0 };
-
typedef uint64_t insn_t;
static inline unsigned int riscv_insn_length (insn_t insn)
@@ -239,6 +225,17 @@ static const char * const riscv_pred_succ[16] = {
#define OP_MASK_CSR 0xfff
#define OP_SH_CSR 20
+/* RVC fields. */
+
+#define OP_MASK_CRS2 0x1f
+#define OP_SH_CRS2 2
+#define OP_MASK_CRS1S 0x7
+#define OP_SH_CRS1S 7
+#define OP_MASK_CRS2S 0x7
+#define OP_SH_CRS2S 2
+
+/* ABI names for selected x-registers. */
+
#define X_RA 1
#define X_SP 2
#define X_GP 3