public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] RISC-V/gas: don't open-code insn_length()
@ 2022-10-04  7:46 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2022-10-04  7:46 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8c07e983a28cc05edb87882a33c072c0cdfdedc3

commit 8c07e983a28cc05edb87882a33c072c0cdfdedc3
Author: Jan Beulich <jbeulich@suse.com>
Date:   Tue Oct 4 09:45:31 2022 +0200

    RISC-V/gas: don't open-code insn_length()
    
    Use the helper when it can be used.

Diff:
---
 gas/config/tc-riscv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index fae314c9757..a47d36ceb72 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -1445,7 +1445,7 @@ append_insn (struct riscv_cl_insn *ip, expressionS *address_expr,
 	  || reloc_type == BFD_RELOC_RISCV_JMP)
 	{
 	  int j = reloc_type == BFD_RELOC_RISCV_JMP;
-	  int best_case = riscv_insn_length (ip->insn_opcode);
+	  int best_case = insn_length (ip);
 	  unsigned worst_case = relaxed_branch_length (NULL, NULL, 0);
 
 	  if (now_seg == absolute_section)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-04  7:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-04  7:46 [binutils-gdb] RISC-V/gas: don't open-code insn_length() Jan Beulich

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).