diff options
author | Andrew Burgess <aburgess@redhat.com> | 2022-07-08 15:03:03 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-07-25 14:13:34 +0100 |
commit | 36d94bd42b7b5f3d22d96ae8c850075814d315c0 (patch) | |
tree | 8509d3567204c62a79b729f0fe3cc76306217cf3 /gdb | |
parent | 4f46c0bc36471b725de0253bfec1a42a36e2c5c5 (diff) | |
download | binutils-36d94bd42b7b5f3d22d96ae8c850075814d315c0.zip binutils-36d94bd42b7b5f3d22d96ae8c850075814d315c0.tar.gz binutils-36d94bd42b7b5f3d22d96ae8c850075814d315c0.tar.bz2 |
libopcodes/ppc: add support for disassembler styling
This commit adds disassembler styling to the libopcodes ppc
disassembler. This conversion was pretty straight forward, I just
converted the fprintf_func calls to fprintf_styled_func calls and
added an appropriate style.
For testing the new styling I just assembled then disassembled the
source files in gas/testsuite/gas/ppc and manually checked that the
styling looked reasonable.
I think the only slightly weird case was how things like '4*cr1+eq'
are styled. As best I can tell, this construct, used for example in
this instruction:
crand 4*cr1+lt,4*cr1+gt,4*cr1+eq
is used to access a field of a control register. I initially tried
styling this whole construct as a register[1], but during review it
was suggested that instead different parts of the text should have
different styles. In this commit I propose styling '4*cr1+lt' like
this:
4 - immediate,
* - text,
cr1 - register
+ - text
lt - sub-mnemonic
If the user does not request styled output from objdump, then there
should be no change in the disassembler output after this commit.
[1] https://sourceware.org/pipermail/binutils/2022-July/121771.html
Diffstat (limited to 'gdb')
0 files changed, 0 insertions, 0 deletions