opcodes/loongarch: do not print hex notation for signed immediates
authorWANG Xuerui <git@xen0n.name>
Thu, 29 Jun 2023 16:35:02 +0000 (00:35 +0800)
committerliuzhensong <liuzhensong@loongson.cn>
Fri, 30 Jun 2023 02:18:01 +0000 (10:18 +0800)
commit8b6fefaddeec839e6b1121336ba5e6696491d91f
treee020f7ef8e7fb05776d974685d865d42a854229c
parentd04d3bb4a7a244fc8b49a721474cf4388240ca36
opcodes/loongarch: do not print hex notation for signed immediates

The additional hex notation was minimally useful when one had to
inspect code with heavy bit manipulation, or of unclear signedness, but
it clutters the output, and the style is not regular assembly language
syntax either.

Precisely how one approaches the original use case is not taken care of
in this patch (maybe we want a disassembler option forcing a certain
style for immediates, like for example printing every immediate in
decimal or hexadecimal notation), but at least let's stop the current
practice.

ChangeLog:

* testsuite/gas/loongarch/imm_ins.d: Update test case.
* testsuite/gas/loongarch/imm_ins_32.d: Likewise.
* testsuite/gas/loongarch/imm_op.d: Likewise.
* testsuite/gas/loongarch/jmp_op.d: Likewise.
* testsuite/gas/loongarch/load_store_op.d: Likewise.
* testsuite/gas/loongarch/macro_op.d: Likewise.
* testsuite/gas/loongarch/macro_op_32.d: Likewise.
* testsuite/gas/loongarch/privilege_op.d: Likewise.
* testsuite/gas/loongarch/uleb128.d: Likewise.
* testsuite/gas/loongarch/vector.d: Likewise.

ld/ChangeLog:

* testsuite/ld-loongarch-elf/jmp_op.d: Update test case.
* testsuite/ld-loongarch-elf/macro_op.d: Likewise.
* testsuite/ld-loongarch-elf/macro_op_32.d: Likewise.

opcodes/ChangeLog:

* loongarch-dis.c (dis_one_arg): Remove the "(0x%x)" part from
disassembly output of signed immediate operands.

Signed-off-by: WANG Xuerui <git@xen0n.name>
14 files changed:
gas/testsuite/gas/loongarch/imm_ins.d
gas/testsuite/gas/loongarch/imm_ins_32.d
gas/testsuite/gas/loongarch/imm_op.d
gas/testsuite/gas/loongarch/jmp_op.d
gas/testsuite/gas/loongarch/load_store_op.d
gas/testsuite/gas/loongarch/macro_op.d
gas/testsuite/gas/loongarch/macro_op_32.d
gas/testsuite/gas/loongarch/privilege_op.d
gas/testsuite/gas/loongarch/uleb128.d
gas/testsuite/gas/loongarch/vector.d
ld/testsuite/ld-loongarch-elf/jmp_op.d
ld/testsuite/ld-loongarch-elf/macro_op.d
ld/testsuite/ld-loongarch-elf/macro_op_32.d
opcodes/loongarch-dis.c