]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
LoongArch: Fix disassembly option parsing stopping at the first option
authorWANG Xuerui <git@xen0n.name>
Mon, 24 Mar 2025 07:54:25 +0000 (15:54 +0800)
committercailulu <cailulu@loongson.cn>
Wed, 26 Mar 2025 07:49:58 +0000 (15:49 +0800)
commit6d1823dc899bb0df45a79c32ea4ef571c1414fcb
treedf99527365ca0d33b5d85d94e3b43db82636af8d
parenta393de33f2b3e8ddbf618ec84a0f9032f0efa859
LoongArch: Fix disassembly option parsing stopping at the first option

Turns out the return value of parse_loongarch_dis_option acts as an
error code, and previously the function always signified failure with
a non-zero return value, making only the first disassembly option get
to take effect.

Fix by adding the missing `return 0`'s to the two success code paths.

Signed-off-by: WANG Xuerui <git@xen0n.name>
binutils/testsuite/binutils-all/loongarch64/dis-options-multi.d [new file with mode: 0644]
binutils/testsuite/binutils-all/loongarch64/dis-options-no-alises.d [new file with mode: 0644]
binutils/testsuite/binutils-all/loongarch64/dis-options-numeric.d [new file with mode: 0644]
binutils/testsuite/binutils-all/loongarch64/dis-options.s [new file with mode: 0644]
opcodes/loongarch-dis.c