projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b25fc4
)
RISC-V/gas: don't open-code insn_length()
author
Jan Beulich
<jbeulich@suse.com>
Tue, 4 Oct 2022 07:45:31 +0000
(09:45 +0200)
committer
Jan Beulich
<jbeulich@suse.com>
Tue, 4 Oct 2022 07:45:31 +0000
(09:45 +0200)
Use the helper when it can be used.
gas/config/tc-riscv.c
patch
|
blob
|
history
diff --git
a/gas/config/tc-riscv.c
b/gas/config/tc-riscv.c
index fae314c97577607f796986dea367a2e444494dec..a47d36ceb7219ee7150f906ba366831da7d97cdc 100644
(file)
--- 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)