This is the mail archive of the
mailing list for the binutils project.
Re: objdump -D option gives different numbers in different bases
- From: Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de>
- To: openssh <openssh at jguk dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 10 Apr 2002 12:59:15 +0200
- Subject: Re: objdump -D option gives different numbers in different bases
- References: <3CB3B89D.firstname.lastname@example.org>
> I just realised that sometimes -D will give me decimal sometimes for
> mips and other times Hex for the arguments to each opcode.
> There is no option I can find to set that, is it fixed to be sometimes
> decimal and sometimes hex in the sourcecode?
It's hardcoded in opcodes/mips-dis.c. Unsigned immediates are in hex,
signed immediates are in dec. Other numbers are in hex, with the
exception of mtc*/mfc* fields and performance counter registers.
Maybe we should generally standardize on hex output.
> a simple example.
> 8c322935 ori $t1,$t1,0x328c
> 800009fd sd $t1,128($t0)
> ff000924 li $t1,255
> 880051ff sd $s1,132($k0)
> 900052ff sd $s2,140($k0)
This is output from an older toolchain which gets the register names
wrong (it's either k0 or $26).
> relative addressing from $k0 could be controled, and also the code that
> decided the li instruction and the ori instruction.
> if there was a --use-base-dec and --use-base-hex (default) that would be
> very useful I think.
Why do you thinks it's useful? It looks to be a nice-to-have thing.