This is the mail archive of the
mailing list for the binutils project.
Re: objdump -D option gives different numbers in different bases
> 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.
I am seeing more decimal used that this, signed is best in decimal, but
there are other opcodes using decimal:
above some unsigned values are comming out in decimal.
> Maybe we should generally standardize on hex output.
I think for the majority of the opcodes hex is best IMO, but this could
be controled by options if people need to force to hex,dec or oct.
> This is output from an older toolchain which gets the register names
> wrong (it's either k0 or $26).
Yes, its an older toolchain, k0 is r26, what do you mean is wrong? the $?
>>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.
When reading through dissassembled code the li macro comes out as 2
opcodes, and sometimes the addui is in decimal so i have to convert it
to hex to add it onto the 0x8000 that was in the lui opcode. addiu seems
to be the worst for this eg:
ori v1,v1,0xf500 <- this is ok
please CC me in any replys