public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix [dis]assembly of srai/srli
@ 2017-03-13 21:49 Palmer Dabbelt
  2017-03-14 13:00 ` Nick Clifton
  0 siblings, 1 reply; 3+ messages in thread
From: Palmer Dabbelt @ 2017-03-13 21:49 UTC (permalink / raw)
  To: binutils; +Cc: Andrew Waterman

From: Andrew Waterman <andrew@sifive.com>

These were simple copy/paste errors from the compressed left shift
pattern, which can't have a 0-register.
---
 opcodes/ChangeLog   | 7 +++++++
 opcodes/riscv-opc.c | 8 ++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index f9f2c04..622ccf4 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,10 @@
+2017-03-13  Andrew Waterman  <andrew@sifive.com>
+
+	* riscv-opc.c (riscv_opcodes) <srli/C>: Use match_opcode.
+	<srl> Likewise.
+	<srai> Likewise.
+	<sra> Likewise.
+
 2017-03-09  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* i386-gen.c (opcode_modifiers): Replace S with Load.
diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c
index 61d0159..1bb90ee 100644
--- a/opcodes/riscv-opc.c
+++ b/opcodes/riscv-opc.c
@@ -210,14 +210,14 @@ const struct riscv_opcode riscv_opcodes[] =
 {"sll",       "C",   "d,CU,C>",  MATCH_C_SLLI, MASK_C_SLLI, match_rd_nonzero, INSN_ALIAS },
 {"sll",       "I",   "d,s,t",   MATCH_SLL, MASK_SLL, match_opcode, 0 },
 {"sll",       "I",   "d,s,>",   MATCH_SLLI, MASK_SLLI, match_opcode, INSN_ALIAS },
-{"srli",      "C",   "Cs,Cw,C>",  MATCH_C_SRLI, MASK_C_SRLI, match_rd_nonzero, INSN_ALIAS },
+{"srli",      "C",   "Cs,Cw,C>",  MATCH_C_SRLI, MASK_C_SRLI, match_opcode, INSN_ALIAS },
 {"srli",      "I",   "d,s,>",   MATCH_SRLI, MASK_SRLI, match_opcode, 0 },
-{"srl",       "C",   "Cs,Cw,C>",  MATCH_C_SRLI, MASK_C_SRLI, match_rd_nonzero, INSN_ALIAS },
+{"srl",       "C",   "Cs,Cw,C>",  MATCH_C_SRLI, MASK_C_SRLI, match_opcode, INSN_ALIAS },
 {"srl",       "I",   "d,s,t",   MATCH_SRL, MASK_SRL, match_opcode, 0 },
 {"srl",       "I",   "d,s,>",   MATCH_SRLI, MASK_SRLI, match_opcode, INSN_ALIAS },
-{"srai",      "C",   "Cs,Cw,C>",  MATCH_C_SRAI, MASK_C_SRAI, match_rd_nonzero, INSN_ALIAS },
+{"srai",      "C",   "Cs,Cw,C>",  MATCH_C_SRAI, MASK_C_SRAI, match_opcode, INSN_ALIAS },
 {"srai",      "I",   "d,s,>",   MATCH_SRAI, MASK_SRAI, match_opcode, 0 },
-{"sra",       "C",   "Cs,Cw,C>",  MATCH_C_SRAI, MASK_C_SRAI, match_rd_nonzero, INSN_ALIAS },
+{"sra",       "C",   "Cs,Cw,C>",  MATCH_C_SRAI, MASK_C_SRAI, match_opcode, INSN_ALIAS },
 {"sra",       "I",   "d,s,t",   MATCH_SRA, MASK_SRA, match_opcode, 0 },
 {"sra",       "I",   "d,s,>",   MATCH_SRAI, MASK_SRAI, match_opcode, INSN_ALIAS },
 {"sub",       "C",   "Cs,Cw,Ct",  MATCH_C_SUB, MASK_C_SUB, match_opcode, INSN_ALIAS },
-- 
2.10.2

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix [dis]assembly of srai/srli
  2017-03-13 21:49 [PATCH] Fix [dis]assembly of srai/srli Palmer Dabbelt
@ 2017-03-14 13:00 ` Nick Clifton
  2017-03-14 16:25   ` Palmer Dabbelt
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Clifton @ 2017-03-14 13:00 UTC (permalink / raw)
  To: Palmer Dabbelt, binutils; +Cc: Andrew Waterman

Hi Palmer,

> +2017-03-13  Andrew Waterman  <andrew@sifive.com>
> +
> +	* riscv-opc.c (riscv_opcodes) <srli/C>: Use match_opcode.
> +	<srl> Likewise.
> +	<srai> Likewise.
> +	<sra> Likewise.

Approved - please apply.

Cheers
  Nick


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix [dis]assembly of srai/srli
  2017-03-14 13:00 ` Nick Clifton
@ 2017-03-14 16:25   ` Palmer Dabbelt
  0 siblings, 0 replies; 3+ messages in thread
From: Palmer Dabbelt @ 2017-03-14 16:25 UTC (permalink / raw)
  To: nickc; +Cc: binutils, Andrew Waterman

On Tue, 14 Mar 2017 06:00:23 PDT (-0700), nickc@redhat.com wrote:
> Hi Palmer,
>
>> +2017-03-13  Andrew Waterman  <andrew@sifive.com>
>> +
>> +	* riscv-opc.c (riscv_opcodes) <srli/C>: Use match_opcode.
>> +	<srl> Likewise.
>> +	<srai> Likewise.
>> +	<sra> Likewise.
>
> Approved - please apply.

Thanks.  Committed.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-14 16:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-13 21:49 [PATCH] Fix [dis]assembly of srai/srli Palmer Dabbelt
2017-03-14 13:00 ` Nick Clifton
2017-03-14 16:25   ` Palmer Dabbelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).