From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1386) id 4395D385380F; Tue, 4 Oct 2022 07:46:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4395D385380F Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jan Beulich To: bfd-cvs@sourceware.org Subject: [binutils-gdb] RISC-V/gas: don't open-code insn_length() X-Act-Checkin: binutils-gdb X-Git-Author: Jan Beulich X-Git-Refname: refs/heads/master X-Git-Oldrev: 3b25fc4884a93fc61d3de0fc1b46109f26719556 X-Git-Newrev: 8c07e983a28cc05edb87882a33c072c0cdfdedc3 Message-Id: <20221004074629.4395D385380F@sourceware.org> Date: Tue, 4 Oct 2022 07:46:29 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2022 07:46:29 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D8c07e983a28c= c05edb87882a33c072c0cdfdedc3 commit 8c07e983a28cc05edb87882a33c072c0cdfdedc3 Author: Jan Beulich Date: Tue Oct 4 09:45:31 2022 +0200 RISC-V/gas: don't open-code insn_length() =20 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 *a= ddress_expr, || reloc_type =3D=3D BFD_RELOC_RISCV_JMP) { int j =3D reloc_type =3D=3D BFD_RELOC_RISCV_JMP; - int best_case =3D riscv_insn_length (ip->insn_opcode); + int best_case =3D insn_length (ip); unsigned worst_case =3D relaxed_branch_length (NULL, NULL, 0); =20 if (now_seg =3D=3D absolute_section)