From: Andrew Waterman Date: Mon, 19 Dec 2016 06:53:52 +0000 (-0800) Subject: Add canonical JALR for RISC-V X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=755c5297bdbca564e97040ce7f036ed02dc7fa4a;p=binutils-gdb.git Add canonical JALR for RISC-V jalr rd,offset(rs1) rather than jalr rd,rs1,offset This matches the format of other instructions. * riscv-opc.c (riscv_opcodes): Change jr and jalr to "o(s)" format. --- diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 92d2516bc07..452422d03e6 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2016-12-20 Andrew Waterman + + * riscv-opc.c (riscv_opcodes): Change jr and jalr to "o(s)" + format. + 2016-12-20 Andrew Waterman * riscv-dis.c (riscv_disassemble_insn): Default to the ELF's diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c index 256e089c63f..69fca09ace5 100644 --- a/opcodes/riscv-opc.c +++ b/opcodes/riscv-opc.c @@ -132,11 +132,14 @@ const struct riscv_opcode riscv_opcodes[] = {"ret", "I", "", MATCH_JALR | (X_RA << OP_SH_RS1), MASK_JALR | MASK_RD | MASK_RS1 | MASK_IMM, match_opcode, INSN_ALIAS }, {"jr", "C", "d", MATCH_C_JR, MASK_C_JR, match_rd_nonzero, INSN_ALIAS }, {"jr", "I", "s", MATCH_JALR, MASK_JALR | MASK_RD | MASK_IMM, match_opcode, INSN_ALIAS }, +{"jr", "I", "o(s)", MATCH_JALR, MASK_JALR | MASK_RD, match_opcode, INSN_ALIAS }, {"jr", "I", "s,j", MATCH_JALR, MASK_JALR | MASK_RD, match_opcode, INSN_ALIAS }, {"jalr", "C", "d", MATCH_C_JALR, MASK_C_JALR, match_rd_nonzero, INSN_ALIAS }, {"jalr", "I", "s", MATCH_JALR | (X_RA << OP_SH_RD), MASK_JALR | MASK_RD | MASK_IMM, match_opcode, INSN_ALIAS }, +{"jalr", "I", "o(s)", MATCH_JALR | (X_RA << OP_SH_RD), MASK_JALR | MASK_RD, match_opcode, INSN_ALIAS }, {"jalr", "I", "s,j", MATCH_JALR | (X_RA << OP_SH_RD), MASK_JALR | MASK_RD, match_opcode, INSN_ALIAS }, {"jalr", "I", "d,s", MATCH_JALR, MASK_JALR | MASK_IMM, match_opcode, INSN_ALIAS }, +{"jalr", "I", "d,o(s)", MATCH_JALR, MASK_JALR, match_opcode, 0 }, {"jalr", "I", "d,s,j", MATCH_JALR, MASK_JALR, match_opcode, 0 }, {"j", "C", "Ca", MATCH_C_J, MASK_C_J, match_opcode, INSN_ALIAS }, {"j", "I", "a", MATCH_JAL, MASK_JAL | MASK_RD, match_opcode, INSN_ALIAS },